[issue1877] bookmarks: please do not move bookmarks on merges

obs bugs at mercurial.selenic.com
Mon Oct 19 08:44:33 UTC 2009


New submission from obs <obensonne at googlemail.com>:

I know bookmarks are supposed to move on commits. When merging a bookmarked
revision into another head, the bookmark moves to the merging commit. 
The merging commit is a child of the previous bookmarked revision, so
technically this just conforms to the "move on commit" idea. However, is
this a desired behavior in a typical "switch-and-merge-branches-repeatedly"
workflow? I don't think so.

Example:
I have a named branch 'dev' for working on bigger changes. At the same time
I have multiple short-living bookmarked heads to work on smaller changes.
Below is an example, main, fix1 and feature2 are bookmarked heads: 

dev main fix1 feature2
 o    o    o    o
  \   |    |   /
   .  .    .  .

The problem here is that if I do a 'hg merge main' within the 'dev' branch,
that bookmark moves into the dev branch, technically correct according to
the bookmark definition, but semantically wrong. When merging in a
bookmarked revision, the referenced bookmark should not move.

Thoughts?

----------
messages: 10800
nosy: obs
priority: feature
status: unread
title: bookmarks: please do not move bookmarks on merges

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1877>
____________________________________________________



More information about the Mercurial-devel mailing list