##// END OF EJS Templates
with: use context manager for lock in histedit cleanupnode
Bryan O'Sullivan -
r27833:321759df default
parent child Browse files
Show More
@@ -1471,9 +1471,7 b' def cleanupnode(ui, repo, name, nodes):'
1471 1471 The set of node to strip may contains unknown nodes."""
1472 1472 ui.debug('should strip %s nodes %s\n' %
1473 1473 (name, ', '.join([node.short(n) for n in nodes])))
1474 lock = None
1475 try:
1476 lock = repo.lock()
1474 with repo.lock():
1477 1475 # do not let filtering get in the way of the cleanse
1478 1476 # we should probably get rid of obsolescence marker created during the
1479 1477 # histedit, but we currently do not have such information.
@@ -1488,8 +1486,6 b' def cleanupnode(ui, repo, name, nodes):'
1488 1486 # but this trigger a bug in changegroup hook.
1489 1487 # This would reduce bundle overhead
1490 1488 repair.strip(ui, repo, c)
1491 finally:
1492 release(lock)
1493 1489
1494 1490 def stripwrapper(orig, ui, repo, nodelist, *args, **kwargs):
1495 1491 if isinstance(nodelist, str):
General Comments 0
You need to be logged in to leave comments. Login now