##// END OF EJS Templates
with: use context manager for wlock in keyword demo
Bryan O'Sullivan -
r27816:98391f38 default
parent child Browse files
Show More
@@ -444,11 +444,8 b' def demo(ui, repo, *args, **opts):'
444 444 repo[None].add([fn])
445 445 ui.note(_('\nkeywords written to %s:\n') % fn)
446 446 ui.note(keywords)
447 wlock = repo.wlock()
448 try:
447 with repo.wlock():
449 448 repo.dirstate.setbranch('demobranch')
450 finally:
451 wlock.release()
452 449 for name, cmd in ui.configitems('hooks'):
453 450 if name.split('.', 1)[0].find('commit') > -1:
454 451 repo.ui.setconfig('hooks', name, '', 'keyword')
General Comments 0
You need to be logged in to leave comments. Login now