Comments
Patch
@@ -195,12 +195,14 @@
old = repo[marks[cur]]
new = repo[node]
divs = [repo[b] for b in marks
if b.split('@', 1)[0] == cur.split('@', 1)[0]]
anc = repo.changelog.ancestors([new.rev()])
+ # consider successor changesets as well
+ foreground = obsolete.foreground(repo, [marks[cur]])
deletefrom = [b.node() for b in divs if b.rev() in anc or b == new]
- if old.descendant(new):
+ if old.descendant(new) or new.node() in foreground:
marks[cur] = new.node()
update = True
if deletedivergent(repo, deletefrom, cur):
update = True
@@ -215,15 +215,19 @@
$ hg id --debug -i -r 4
d047485b3896813b2a624e86201983520f003206
$ hg debugobsolete 6efa171f091b00a3c35edc15d48c52a498929953 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
$ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa d047485b3896813b2a624e86201983520f003206
-Test that 5 is detected as a valid destination from 3
-
+Test that 5 is detected as a valid destination from 3 and brings its active
+bookmark along with it
$ hg up --quiet --hidden 3
+ $ hg book bm
$ hg up
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ updating bookmark bm
+ $ hg book
+ * bm 5:ff252e8273df
Test that 5 is detected as a valid destination from 1 and also accepts moving
the bookmark (issue4015)
$ hg up --quiet 0 # we should be able to update to 1 directly
$ hg up --quiet 1 # but not implemented yet.