Commit 424c9194 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

next: remove duplicated targets when updating from an unstable changeset

--HG--
branch : stable
parent 355bd0f7354b
Pipeline #21466 passed with stage
in 5 minutes and 10 seconds
Changelog
=========
10.3.2 - in progress
--------------------
* next: remove duplicated targets when updating from an unstable changeset
10.3.1 -- 2021-04-25
--------------------
......
......@@ -861,6 +861,11 @@ def cmdnext(ui, repo, **opts):
if repo[rev].topic() != topic)
aspchildren = [rev for rev in aspchildren if rev not in filtered]
# Let's make sure we don't have any duplicates between children and
# aspiring children
filtered.update(ctx.rev() for ctx in children)
aspchildren = [rev for rev in aspchildren if rev not in filtered]
# To catch and prevent the case when `next` would get confused by split,
# lets filter those aspiring children which can be stablized on one of
# the aspiring children itself.
......
......@@ -133,8 +133,23 @@ Let's make some changesets unstable
o 0 [] root
Simply walking on unstable changesets should work as expected
$ hg up 'desc("B2")'
switching to topic B
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg prev
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
[s1] B1
$ hg next
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
[s2] B2
B1 shouldn't be considered a target, orphan or not
$ hg up 'desc("A2")'
switching to topic A
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg next
move:[s3] A3
atop:[s2] A2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment