##// END OF EJS Templates
with: use context manager for wlock in unshelve
Bryan O'Sullivan -
r27837:496ca4de default
parent child Browse files
Show More
@@ -602,11 +602,8 def unshelve(ui, repo, *shelved, **opts)
602 than ``maxbackups`` backups are kept, if same timestamp
602 than ``maxbackups`` backups are kept, if same timestamp
603 prevents from deciding exact order of them, for safety.
603 prevents from deciding exact order of them, for safety.
604 """
604 """
605 wlock = repo.wlock()
605 with repo.wlock():
606 try:
607 return _dounshelve(ui, repo, *shelved, **opts)
606 return _dounshelve(ui, repo, *shelved, **opts)
608 finally:
609 lockmod.release(wlock)
610
607
611 def _dounshelve(ui, repo, *shelved, **opts):
608 def _dounshelve(ui, repo, *shelved, **opts):
612 abortf = opts['abort']
609 abortf = opts['abort']
General Comments 0
You need to be logged in to leave comments. Login now