##// END OF EJS Templates
exchange: drop now-unnecessary "local" from lock name variables...
Martin von Zweigbergk -
r33788:20d663a1 default
parent child Browse files
Show More
@@ -438,17 +438,17 b' def push(repo, remote, force=False, revs'
438 raise error.Abort(_('cannot push: destination does not support the '
438 raise error.Abort(_('cannot push: destination does not support the '
439 'unbundle wire protocol command'))
439 'unbundle wire protocol command'))
440
440
441 # get local lock as we might write phase data
441 # get lock as we might write phase data
442 localwlock = locallock = None
442 wlock = lock = None
443 locallocked = False
443 locked = False
444 try:
444 try:
445 # bundle2 push may receive a reply bundle touching bookmarks or other
445 # bundle2 push may receive a reply bundle touching bookmarks or other
446 # things requiring the wlock. Take it now to ensure proper ordering.
446 # things requiring the wlock. Take it now to ensure proper ordering.
447 maypushback = pushop.ui.configbool('experimental', 'bundle2.pushback')
447 maypushback = pushop.ui.configbool('experimental', 'bundle2.pushback')
448 if (not _forcebundle1(pushop)) and maypushback:
448 if (not _forcebundle1(pushop)) and maypushback:
449 localwlock = pushop.repo.wlock()
449 wlock = pushop.repo.wlock()
450 locallock = pushop.repo.lock()
450 lock = pushop.repo.lock()
451 locallocked = True
451 locked = True
452 except IOError as err:
452 except IOError as err:
453 if err.errno != errno.EACCES:
453 if err.errno != errno.EACCES:
454 raise
454 raise
@@ -458,7 +458,7 b' def push(repo, remote, force=False, revs'
458 msg = 'cannot lock source repository: %s\n' % err
458 msg = 'cannot lock source repository: %s\n' % err
459 pushop.ui.debug(msg)
459 pushop.ui.debug(msg)
460 try:
460 try:
461 if locallocked:
461 if locked:
462 pushop.trmanager = transactionmanager(pushop.repo,
462 pushop.trmanager = transactionmanager(pushop.repo,
463 'push-response',
463 'push-response',
464 pushop.remote.url())
464 pushop.remote.url())
@@ -476,10 +476,10 b' def push(repo, remote, force=False, revs'
476 finally:
476 finally:
477 if pushop.trmanager:
477 if pushop.trmanager:
478 pushop.trmanager.release()
478 pushop.trmanager.release()
479 if locallock is not None:
479 if lock is not None:
480 locallock.release()
480 lock.release()
481 if localwlock is not None:
481 if wlock is not None:
482 localwlock.release()
482 wlock.release()
483
483
484 return pushop
484 return pushop
485
485
General Comments 0
You need to be logged in to leave comments. Login now