##// END OF EJS Templates
keyword: rename kwt.record attribute to kwt.postcommit...
Christian Ebert -
r16809:6b704fa2 default
parent child Browse files
Show More
@@ -188,7 +188,7 b' class kwtemplater(object):'
188 188 self.repo = repo
189 189 self.match = match.match(repo.root, '', [], inc, exc)
190 190 self.restrict = kwtools['hgcmd'] in restricted.split()
191 self.record = False
191 self.postcommit = False
192 192
193 193 kwmaps = self.ui.configitems('keywordmaps')
194 194 if kwmaps: # override default templates
@@ -243,7 +243,7 b' class kwtemplater(object):'
243 243
244 244 def overwrite(self, ctx, candidates, lookup, expand, rekw=False):
245 245 '''Overwrites selected files expanding/shrinking keywords.'''
246 if self.restrict or lookup or self.record: # exclude kw_copy
246 if self.restrict or lookup or self.postcommit: # exclude kw_copy
247 247 candidates = self.iskwfile(candidates, ctx)
248 248 if not candidates:
249 249 return
@@ -280,7 +280,7 b' class kwtemplater(object):'
280 280 fp.close()
281 281 if kwcmd:
282 282 self.repo.dirstate.normal(f)
283 elif self.record:
283 elif self.postcommit:
284 284 self.repo.dirstate.normallookup(f)
285 285
286 286 def shrink(self, fname, text):
@@ -583,7 +583,7 b' def reposetup(ui, repo):'
583 583 def kwcommitctx(self, ctx, error=False):
584 584 n = super(kwrepo, self).commitctx(ctx, error)
585 585 # no lock needed, only called from repo.commit() which already locks
586 if not kwt.record:
586 if not kwt.postcommit:
587 587 restrict = kwt.restrict
588 588 kwt.restrict = True
589 589 kwt.overwrite(self[n], sorted(ctx.added() + ctx.modified()),
@@ -661,7 +661,7 b' def reposetup(ui, repo):'
661 661 try:
662 662 # record returns 0 even when nothing has changed
663 663 # therefore compare nodes before and after
664 kwt.record = True
664 kwt.postcommit = True
665 665 ctx = repo['.']
666 666 wstatus = repo[None].status()
667 667 ret = orig(ui, repo, commitfunc, *pats, **opts)
General Comments 0
You need to be logged in to leave comments. Login now