comparison mercurial/bundle2.py @ 29294:077d0535f51f stable

bundle2: don't assume ordering of heads checked after push Usually, the heads will have the same ordering in handlecheckheads. Insisting on the same ordering is however an unnecessary constraint that in some custom cases can cause pushes to fail even though the actual heads didn't change. This caused production issues for us in combination with the current version of https://bitbucket.org/Unity-Technologies/hgwebcachingproxy/ .
author Mads Kiilerich <madski@unity3d.com>
date Wed, 01 Jun 2016 21:40:52 +0200
parents 032c4c2f802a
children 6215b5537ba5
comparison
equal deleted inserted replaced
29272:e82ca7d0967c 29294:077d0535f51f
1451 h = inpart.read(20) 1451 h = inpart.read(20)
1452 assert not h 1452 assert not h
1453 # Trigger a transaction so that we are guaranteed to have the lock now. 1453 # Trigger a transaction so that we are guaranteed to have the lock now.
1454 if op.ui.configbool('experimental', 'bundle2lazylocking'): 1454 if op.ui.configbool('experimental', 'bundle2lazylocking'):
1455 op.gettransaction() 1455 op.gettransaction()
1456 if heads != op.repo.heads(): 1456 if sorted(heads) != sorted(op.repo.heads()):
1457 raise error.PushRaced('repository changed while pushing - ' 1457 raise error.PushRaced('repository changed while pushing - '
1458 'please try again') 1458 'please try again')
1459 1459
1460 @parthandler('output') 1460 @parthandler('output')
1461 def handleoutput(op, inpart): 1461 def handleoutput(op, inpart):