##// END OF EJS Templates
with: use context manager for wlock in kw_amend
Bryan O'Sullivan -
r27817:476e402e default
parent child Browse files
Show More
@@ -653,8 +653,7 b' def reposetup(ui, repo):'
653 653
654 654 def kw_amend(orig, ui, repo, commitfunc, old, extra, pats, opts):
655 655 '''Wraps cmdutil.amend expanding keywords after amend.'''
656 wlock = repo.wlock()
657 try:
656 with repo.wlock():
658 657 kwt.postcommit = True
659 658 newid = orig(ui, repo, commitfunc, old, extra, pats, opts)
660 659 if newid != old.node():
@@ -663,8 +662,6 b' def reposetup(ui, repo):'
663 662 kwt.overwrite(ctx, ctx.files(), False, True)
664 663 kwt.restrict = False
665 664 return newid
666 finally:
667 wlock.release()
668 665
669 666 def kw_copy(orig, ui, repo, pats, opts, rename=False):
670 667 '''Wraps cmdutil.copy so that copy/rename destinations do not
General Comments 0
You need to be logged in to leave comments. Login now