Issues with hg update -C and bookmarks
Marc Strapetz
marc.strapetz at syntevo.com
Tue Jul 14 14:21:21 UTC 2015
With the following setup:
$ hg init
$ touch x
$ hg commit -A "initial import"
$ touch y
$ hg commit -A -m "y added"
$ hg checkout 0
$ touch z
$ hg commit -A -m "z added"
$ hg up 1
$ hg bookmark bm
There will be default with two diverged heads at r1 and r2 and a
bookmark on r1.
$ hg summary
parent: 1:4009599f6088
y added
branch: default
bookmarks: *bm
...
Starting from this setup, following behavior is rather unexpected to me:
(1) hg update -C . will loose the active bookmark
$ hg update -C .
$ hg summary
parent: 1:4009599f6088
y added
branch: default
bookmarks: bm
commit: (clean)
update: 1 new changesets, 2 branch heads (merge)
I would expect to see bookmark "*bm" still active.
(2) hg upgdate -C checks out r2 (expected), but leaves bookmark bm
active (unexpected)
$ hg update -C
$ hg summary
parent: 2:eb990d6c7e06 tip
z added
branch: default
commit: (clean)
update: 1 new changesets, 2 branch heads (merge)
$ hg bookmarks
* bm 1:4009599f6088
I would probably expect that bookmark "bm" isn't active anymore. What's
the meaning of an active bookmark which is not checked out?
Tested on Windows with Mercurial 3.4.2.
-Marc
More information about the Mercurial
mailing list