hgkw/keyword.py
changeset 807 f14ab0ca530d
parent 804 b7fbc49d5c75
child 808 cd9ec33f5bca
--- a/hgkw/keyword.py	Sun Sep 26 19:18:41 2010 +0200
+++ b/hgkw/keyword.py	Sun Sep 26 19:18:41 2010 +0200
@@ -198,6 +198,7 @@
             candidates = [f for f in ctx.files() if f in ctx]
         candidates = [f for f in candidates if self.iskwfile(f, ctx.flags)]
         if candidates:
+            restrict = self.restrict
             self.restrict = True        # do not expand when reading
             mf = ctx.manifest()
             msg = (expand and _('overwriting %s expanding keywords\n')
@@ -223,7 +224,7 @@
                         self.repo.dirstate.normal(f)
                     elif self.record:
                         self.repo.dirstate.normallookup(f)
-            self.restrict = False
+            self.restrict = restrict
 
     def shrinktext(self, text):
         '''Unconditionally removes all keyword substitutions from text.'''