Mercurial > hg
changeset 12496:0b5d7da3bb78
keyword: restore restricted read mode value after overwriting
Even though just enforcing expansion after overwriting files in
the working directory caused no problems that we know of, this avoids
a potential source of problems (e.g. in collaboration other extensions)
at no costs.
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Sun, 26 Sep 2010 19:18:41 +0200 |
parents | 6401e8547427 |
children | 5d00a35ea2ea |
files | hgext/keyword.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/keyword.py Sun Sep 26 19:18:41 2010 +0200 +++ b/hgext/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.'''