##// END OF EJS Templates
exchange: remove need for "locked" variable...
Martin von Zweigbergk -
r33789:5904511f default
parent child Browse files
Show More
@@ -440,7 +440,6 b' def push(repo, remote, force=False, revs'
440
440
441 # get lock as we might write phase data
441 # get lock as we might write phase data
442 wlock = lock = None
442 wlock = lock = None
443 locked = False
444 try:
443 try:
445 # bundle2 push may receive a reply bundle touching bookmarks or other
444 # bundle2 push may receive a reply bundle touching bookmarks or other
446 # things requiring the wlock. Take it now to ensure proper ordering.
445 # things requiring the wlock. Take it now to ensure proper ordering.
@@ -448,7 +447,9 b' def push(repo, remote, force=False, revs'
448 if (not _forcebundle1(pushop)) and maypushback:
447 if (not _forcebundle1(pushop)) and maypushback:
449 wlock = pushop.repo.wlock()
448 wlock = pushop.repo.wlock()
450 lock = pushop.repo.lock()
449 lock = pushop.repo.lock()
451 locked = True
450 pushop.trmanager = transactionmanager(pushop.repo,
451 'push-response',
452 pushop.remote.url())
452 except IOError as err:
453 except IOError as err:
453 if err.errno != errno.EACCES:
454 if err.errno != errno.EACCES:
454 raise
455 raise
@@ -457,11 +458,8 b' def push(repo, remote, force=False, revs'
457 # synchronisation.
458 # synchronisation.
458 msg = 'cannot lock source repository: %s\n' % err
459 msg = 'cannot lock source repository: %s\n' % err
459 pushop.ui.debug(msg)
460 pushop.ui.debug(msg)
461
460 try:
462 try:
461 if locked:
462 pushop.trmanager = transactionmanager(pushop.repo,
463 'push-response',
464 pushop.remote.url())
465 pushop.repo.checkpush(pushop)
463 pushop.repo.checkpush(pushop)
466 _pushdiscovery(pushop)
464 _pushdiscovery(pushop)
467 if not _forcebundle1(pushop):
465 if not _forcebundle1(pushop):
General Comments 0
You need to be logged in to leave comments. Login now