elmentary (watson): merge (named) branches and/or bookmarks

Bob Hood bhood2 at comcast.net
Sun Dec 18 15:24:45 UTC 2016


On 12/18/2016 2:57 AM, Arne Babenhauserheide wrote:
> Bob Hood writes:
>> On 12/17/2016 2:56 AM, Uwe Brauer wrote:
>>> Sorry for such an elementary question again, but bookmarks drive my
>>> crazy.
>> Coming from Subversion, I had a hard time wrapping my head around the paradigm
>> as well, until I realized one day that named branches in Mercurial are just
>> /permanent bookmarks/. Like regular bookmarks, they automatically follow a
>> head as commits are made, but the head they are tracking is /just never meant
>> to be merged back into their parent branch/--hence,
> What do you mean by that?
>
> It’s regular usage to merge a branch back into the parent branch.


Of course. If my understanding is correct, bookmarks (and named branches) just 
track /logical/ branch points (separate heads).

Here's the model that we use:  Developers work in a sandboxed named branch (a 
/permanently//separate/ head of development), which mirrors the main branch, 
and then builds from those isolated named branches are exposed to testing.  
When testing approves, the developer merges their work into the main branch, 
however, the separate head, like the bookmark tracking it /never goes away/.  
Hence, the permanently separate head, in the guise of the named branch, never 
terminates when it is merged back to the main branch.

As I understand it, this is not true for a regular bookmark.  They can be 
removed, and hence the /logical/ branch they are tracking is terminated when 
the heads are merged, e.g.:

main --------o-------------o---------o----->
               \            ^         ^
                v           |         |
                o-----------o---------x
                ^           ^         ^______ merge heads and delete bookmark
                |           |________________ merge to main, bookmark continues
                |____________________________ new head createdwith bookmark


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20161218/fde98707/attachment-0002.html>


More information about the Mercurial mailing list