Show More
@@ -308,8 +308,6 b' class pushoperation(object):' | |||||
308 | self.bookmarks = bookmarks |
|
308 | self.bookmarks = bookmarks | |
309 | # allow push of new branch |
|
309 | # allow push of new branch | |
310 | self.newbranch = newbranch |
|
310 | self.newbranch = newbranch | |
311 | # did a local lock get acquired? |
|
|||
312 | self.locallocked = None |
|
|||
313 | # step already performed |
|
311 | # step already performed | |
314 | # (used to check what steps have been already performed through bundle2) |
|
312 | # (used to check what steps have been already performed through bundle2) | |
315 | self.stepsdone = set() |
|
313 | self.stepsdone = set() | |
@@ -442,6 +440,7 b' def push(repo, remote, force=False, revs' | |||||
442 |
|
440 | |||
443 | # get local lock as we might write phase data |
|
441 | # get local lock as we might write phase data | |
444 | localwlock = locallock = None |
|
442 | localwlock = locallock = None | |
|
443 | locallocked = False | |||
445 | try: |
|
444 | try: | |
446 | # bundle2 push may receive a reply bundle touching bookmarks or other |
|
445 | # bundle2 push may receive a reply bundle touching bookmarks or other | |
447 | # things requiring the wlock. Take it now to ensure proper ordering. |
|
446 | # things requiring the wlock. Take it now to ensure proper ordering. | |
@@ -449,9 +448,8 b' def push(repo, remote, force=False, revs' | |||||
449 | if (not _forcebundle1(pushop)) and maypushback: |
|
448 | if (not _forcebundle1(pushop)) and maypushback: | |
450 | localwlock = pushop.repo.wlock() |
|
449 | localwlock = pushop.repo.wlock() | |
451 | locallock = pushop.repo.lock() |
|
450 | locallock = pushop.repo.lock() | |
452 |
|
|
451 | locallocked = True | |
453 | except IOError as err: |
|
452 | except IOError as err: | |
454 | pushop.locallocked = False |
|
|||
455 | if err.errno != errno.EACCES: |
|
453 | if err.errno != errno.EACCES: | |
456 | raise |
|
454 | raise | |
457 | # source repo cannot be locked. |
|
455 | # source repo cannot be locked. | |
@@ -460,7 +458,7 b' def push(repo, remote, force=False, revs' | |||||
460 | msg = 'cannot lock source repository: %s\n' % err |
|
458 | msg = 'cannot lock source repository: %s\n' % err | |
461 | pushop.ui.debug(msg) |
|
459 | pushop.ui.debug(msg) | |
462 | try: |
|
460 | try: | |
463 |
if |
|
461 | if locallocked: | |
464 | pushop.trmanager = transactionmanager(pushop.repo, |
|
462 | pushop.trmanager = transactionmanager(pushop.repo, | |
465 | 'push-response', |
|
463 | 'push-response', | |
466 | pushop.remote.url()) |
|
464 | pushop.remote.url()) |
General Comments 0
You need to be logged in to leave comments.
Login now