exchange: use context manager for bundle1 unbundling
The lazy locking is not used for bundle1, so using a regular context
manager is clearer.
--- a/mercurial/exchange.py Thu Jun 15 14:47:18 2017 -0700
+++ b/mercurial/exchange.py Thu Jun 15 22:57:20 2017 -0700
@@ -1733,8 +1733,8 @@
# push can proceed
if not util.safehasattr(cg, 'params'):
# legacy case: bundle1 (changegroup 01)
- lockandtr[1] = repo.lock()
- r = cg.apply(repo, source, url)
+ with repo.lock():
+ r = cg.apply(repo, source, url)
else:
r = None
try: