diff -r 834f71467ecc -r 502c40551c8d hgkw/keyword.py --- a/hgkw/keyword.py Fri May 18 01:21:54 2012 +0100 +++ b/hgkw/keyword.py Thu May 31 12:47:49 2012 +0200 @@ -188,7 +188,7 @@ self.repo = repo self.match = match.match(repo.root, '', [], inc, exc) self.restrict = kwtools['hgcmd'] in restricted.split() - self.record = False + self.postcommit = False kwmaps = self.ui.configitems('keywordmaps') if kwmaps: # override default templates @@ -243,7 +243,7 @@ def overwrite(self, ctx, candidates, lookup, expand, rekw=False): '''Overwrites selected files expanding/shrinking keywords.''' - if self.restrict or lookup or self.record: # exclude kw_copy + if self.restrict or lookup or self.postcommit: # exclude kw_copy candidates = self.iskwfile(candidates, ctx) if not candidates: return @@ -280,7 +280,7 @@ fp.close() if kwcmd: self.repo.dirstate.normal(f) - elif self.record: + elif self.postcommit: self.repo.dirstate.normallookup(f) def shrink(self, fname, text): @@ -583,7 +583,7 @@ def kwcommitctx(self, ctx, error=False): n = super(kwrepo, self).commitctx(ctx, error) # no lock needed, only called from repo.commit() which already locks - if not kwt.record: + if not kwt.postcommit: restrict = kwt.restrict kwt.restrict = True kwt.overwrite(self[n], sorted(ctx.added() + ctx.modified()), @@ -661,7 +661,7 @@ try: # record returns 0 even when nothing has changed # therefore compare nodes before and after - kwt.record = True + kwt.postcommit = True ctx = repo['.'] wstatus = repo[None].status() ret = orig(ui, repo, commitfunc, *pats, **opts)