hgext/keyword.py
branchstable
changeset 15070 e4c65158b5e7
parent 14671 35c2cc322ba8
child 15072 91d2efecb245
--- a/hgext/keyword.py	Sat Aug 27 04:56:12 2011 +0900
+++ b/hgext/keyword.py	Thu Sep 08 19:30:25 2011 +0100
@@ -270,7 +270,10 @@
                 data, found = _shrinktext(data, re_kw.subn)
             if found:
                 self.ui.note(msg % f)
+                fpath = self.repo.wjoin(f)
+                mode = os.lstat(fpath).st_mode
                 self.repo.wwrite(f, data, ctx.flags(f))
+                os.chmod(fpath, mode)
                 if kwcmd:
                     self.repo.dirstate.normal(f)
                 elif self.record: