hgext/keyword.py
changeset 34086 a39dce4a76b8
parent 33071 279c072a5c49
child 34500 6c705bf6a8ff
equal deleted inserted replaced
34085:e8a7c1a0565a 34086:a39dce4a76b8
   612             yield chunk
   612             yield chunk
   613     finally:
   613     finally:
   614         if kwt:
   614         if kwt:
   615             kwt.match = origmatch
   615             kwt.match = origmatch
   616 
   616 
   617 def kw_amend(orig, ui, repo, commitfunc, old, extra, pats, opts):
   617 def kw_amend(orig, ui, repo, old, extra, pats, opts):
   618     '''Wraps cmdutil.amend expanding keywords after amend.'''
   618     '''Wraps cmdutil.amend expanding keywords after amend.'''
   619     kwt = getattr(repo, '_keywordkwt', None)
   619     kwt = getattr(repo, '_keywordkwt', None)
   620     if kwt is None:
   620     if kwt is None:
   621         return orig(ui, repo, commitfunc, old, extra, pats, opts)
   621         return orig(ui, repo, old, extra, pats, opts)
   622     with repo.wlock():
   622     with repo.wlock():
   623         kwt.postcommit = True
   623         kwt.postcommit = True
   624         newid = orig(ui, repo, commitfunc, old, extra, pats, opts)
   624         newid = orig(ui, repo, old, extra, pats, opts)
   625         if newid != old.node():
   625         if newid != old.node():
   626             ctx = repo[newid]
   626             ctx = repo[newid]
   627             kwt.restrict = True
   627             kwt.restrict = True
   628             kwt.overwrite(ctx, ctx.files(), False, True)
   628             kwt.overwrite(ctx, ctx.files(), False, True)
   629             kwt.restrict = False
   629             kwt.restrict = False