##// END OF EJS Templates
with: use context manager for wlock in kw_copy
Bryan O'Sullivan -
r27818:484895cc default
parent child Browse files
Show More
@@ -673,8 +673,7 b' def reposetup(ui, repo):'
673 For the latter we have to follow the symlink to find out whether its
673 For the latter we have to follow the symlink to find out whether its
674 target is configured for expansion and we therefore must unexpand the
674 target is configured for expansion and we therefore must unexpand the
675 keywords in the destination.'''
675 keywords in the destination.'''
676 wlock = repo.wlock()
676 with repo.wlock():
677 try:
678 orig(ui, repo, pats, opts, rename)
677 orig(ui, repo, pats, opts, rename)
679 if opts.get('dry_run'):
678 if opts.get('dry_run'):
680 return
679 return
@@ -694,8 +693,6 b' def reposetup(ui, repo):'
694 candidates = [f for f in repo.dirstate.copies() if
693 candidates = [f for f in repo.dirstate.copies() if
695 'l' not in wctx.flags(f) and haskwsource(f)]
694 'l' not in wctx.flags(f) and haskwsource(f)]
696 kwt.overwrite(wctx, candidates, False, False)
695 kwt.overwrite(wctx, candidates, False, False)
697 finally:
698 wlock.release()
699
696
700 def kw_dorecord(orig, ui, repo, commitfunc, *pats, **opts):
697 def kw_dorecord(orig, ui, repo, commitfunc, *pats, **opts):
701 '''Wraps record.dorecord expanding keywords after recording.'''
698 '''Wraps record.dorecord expanding keywords after recording.'''
General Comments 0
You need to be logged in to leave comments. Login now