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

Bob Hood bhood2 at comcast.net
Sun Dec 18 20:37:24 UTC 2016


On 12/18/2016 9:38 AM, Arne Babenhauserheide wrote:
> Bob Hood writes:
>> 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.:
> So what you mean by branch is "the information that there are different
> tracks of development"?
>
> You can remove that by explicitly closing the branch:
>
>    $ hg commit --close-branch -m "MESSAGE"
>
> Then the branch becomes inactive. The information is still in history
> but not visible in `hg branches` or `hg heads`.

Indeed, "named branches" become inactive using the above command; e.g.:

     ...
     PluginMetadata             34632:f16327aeacc1
     jon                        34339:d5179eb05c19
     RadiosityExperiment        31080:a2b360111e2f
     BxDF_Proving_Ground        28200:2e57dc4ccda4
     NewNodalFeatures           24252:cfe6dd5a6705
*    LW2017.0.1                 58654:f40d2ed84d27 (inactive)**
**    default.matt               58626:6cc6d42e0ab2 (inactive)**
**    LW2017.0.1.antti           58551:1efc975c8027 (inactive)**
**    LW2017.davidf              56385:aea27e87a13f (inactive)**
*    ...

But they can never be removed, and are easily revived with a simple commit.  
If I correctly understood what I read, regular bookmarks are /not/ retained in 
repository, nor do they display with "hg branches", once /they/ have been 
"closed," right?

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


More information about the Mercurial mailing list