[PATCH rfc] branches: introduce closing of other heads on other named branches

Matt Harbison mharbison72 at gmail.com
Sun Oct 25 03:45:12 UTC 2015


On Sat, 24 Oct 2015 20:47:01 -0400, Didly <didlybom at gmail.com> wrote:

> On Sun, Oct 25, 2015 at 2:02 AM, Mads Kiilerich <mads at kiilerich.com>  
> wrote:
>> # HG changeset patch
>> # User Mads Kiilerich <madski at unity3d.com>
>> # Date 1445731342 -7200
>> #      Sun Oct 25 02:02:22 2015 +0200
>> # Branch stable
>> # Node ID ee590daabd2fe53685f14289db72aa03faeb2cb1
>> # Parent  39dbf495880b8a439d912091109427d27a7e616a
>> branches: introduce closing of other heads on other named branches
>>
>> Closing of named branches was problematic. Especially when a lot of  
>> branches
>> were used and there was a need for closing them so they no longer  
>> showed up.
>> Closing a branch required a commit on the branch. That created an extra  
>> head on
>> the branch. To make sure that users who had the changesets from the  
>> branch also
>> had the close commit, the close had to be done before merging anywhere,  
>> or an
>> additional merge had to be done. That became even more troublesome when
>> branches were nested so merging one branch actually also introduced  
>> several
>> other unclosed branch heads in the ancestry. The extra commits on  
>> branches
>> could also often end up causing multiple heads on the branches if  
>> development
>> was continued elsewhere anyway.
>>
>> Instead, make it possible for commits to also mark existing commits as  
>> closed.
>> With --other-close REVSET, all the branch heads in that revset will be  
>> marked
>> as closed in meta data of the commit.
>>
>> For general commits of closing all ancestor branch heads, use something  
>> like:
>>   hg commit --other-close "::parents()"
>>
>> For more efficient closing of just the branches that has been merged,  
>> use
>> something like:
>>   hg commit --other-close "only(p2(),p1())"
>
> Since there is already a --close-branch flag, perhaps a better name
> for this would be --close-branches ?

That seems too subtly different from the original spelling wise.  Why not  
just let the existing --close-branch take a revset, and if none is given,  
'.' is implied?

> Cheers,
>
> Angel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list