equal
deleted
inserted
replaced
407 with repo.lock(): |
407 with repo.lock(): |
408 currentphase = repo[nhex].phase() |
408 currentphase = repo[nhex].phase() |
409 newphase = abs(int(newphasestr)) # let's avoid negative index surprise |
409 newphase = abs(int(newphasestr)) # let's avoid negative index surprise |
410 oldphase = abs(int(oldphasestr)) # let's avoid negative index surprise |
410 oldphase = abs(int(oldphasestr)) # let's avoid negative index surprise |
411 if currentphase == oldphase and newphase < oldphase: |
411 if currentphase == oldphase and newphase < oldphase: |
412 try: |
412 with repo.transaction('pushkey-phase') as tr: |
413 tr = repo.transaction('pushkey-phase') |
|
414 advanceboundary(repo, tr, newphase, [bin(nhex)]) |
413 advanceboundary(repo, tr, newphase, [bin(nhex)]) |
415 tr.close() |
|
416 finally: |
|
417 tr.release() |
|
418 return 1 |
414 return 1 |
419 elif currentphase == newphase: |
415 elif currentphase == newphase: |
420 # raced, but got correct result |
416 # raced, but got correct result |
421 return 1 |
417 return 1 |
422 else: |
418 else: |