comparison hgext/mq.py @ 18371:ff2c89ebf5d4

mq: stabilize update after strip of parent revision Strip will (if it updates) update to the parent of revs[0], where revs are the roots of the tree that is stripped. When revs was list(set) it was thus undefined which root parent it would update to. With sorted(set) it is at least stable what it updates to. (But it is very possible that another more useful and predictable behaviour could be defined ... such as updating to the tip-most surviving wd ancestor.)
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 15 Jan 2013 02:59:13 +0100
parents 6252b4f1c4b4
children 3e92772d5383
comparison
equal deleted inserted replaced
18370:c605e12dd622 18371:ff2c89ebf5d4
3030 start = i 3030 start = i
3031 break 3031 break
3032 del q.applied[start:end] 3032 del q.applied[start:end]
3033 q.savedirty() 3033 q.savedirty()
3034 3034
3035 revs = list(rootnodes) 3035 revs = sorted(rootnodes)
3036 if update and opts.get('keep'): 3036 if update and opts.get('keep'):
3037 wlock = repo.wlock() 3037 wlock = repo.wlock()
3038 try: 3038 try:
3039 urev = repo.mq.qparents(repo, revs[0]) 3039 urev = repo.mq.qparents(repo, revs[0])
3040 repo.dirstate.rebuild(urev, repo[urev].manifest()) 3040 repo.dirstate.rebuild(urev, repo[urev].manifest())