mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
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.)
This commit is contained in:
parent
b76126725e
commit
4f5178beb0
@ -3032,7 +3032,7 @@ def strip(ui, repo, *revs, **opts):
|
||||
del q.applied[start:end]
|
||||
q.savedirty()
|
||||
|
||||
revs = list(rootnodes)
|
||||
revs = sorted(rootnodes)
|
||||
if update and opts.get('keep'):
|
||||
wlock = repo.wlock()
|
||||
try:
|
||||
|
@ -309,16 +309,16 @@ after strip of merge parent
|
||||
2 different branches: 2 strips
|
||||
|
||||
$ hg strip 2 4
|
||||
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
|
||||
$ hg glog
|
||||
@ changeset: 2:65bd5f99a4a3
|
||||
o changeset: 2:65bd5f99a4a3
|
||||
| tag: tip
|
||||
| user: test
|
||||
| date: Thu Jan 01 00:00:00 1970 +0000
|
||||
| summary: d
|
||||
|
|
||||
o changeset: 1:ef3a871183d7
|
||||
@ changeset: 1:ef3a871183d7
|
||||
| user: test
|
||||
| date: Thu Jan 01 00:00:00 1970 +0000
|
||||
| summary: b
|
||||
|
Loading…
Reference in New Issue
Block a user