Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Hide branch close commits from hg flow

Helge Söderström January 11, 2013

Hi!

We're using SourceTree with Mercurial to great satisfaction for our development, but there's one thing annoying me, which I wonder if it's configurable.

Problem:
If a developer has worked on a branch, completed the feature / change, merged into default (which is our release branch) and closed their working branch, there's this final dot in the flow showing that closing commit.

Desired solution:
I'd like the line merging the branch flow with the default branch line to be the final one, instead of having that branch close dot staying just above the line merging the two branches. Is this possible?

I hope I made sense there...

Thanks for great work, Atlassian.

// dim

1 answer

1 accepted

0 votes
Answer accepted
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2013

Hi Helge,

Thanks for the input. Closing branches can be confusing when it comes to looking at the graph. The graph reflects what has actually happened in terms of commits/merges/branches and so we maintain what's true to what Mercurial reports in the log. If you check out the Mercurial docs on closing a branch it states "This creates a closing changeset which typically contains no modifications to tracked files." So true to Mercurial, there is a merge commit and a close commit which can't be done in one go. There's two options in your case:

  1. Leave the branch open and let it become inactive (of course the branch will still technically be open though)
  2. Close your branch first, and then do your merge commit. This seems wrong, but for your case would be the only other option.

We wouldn't really mess with the log view to reflect something which isn't true, unfortunately Mercurial doesn't let you do a merge commit whilst closing the branch in one go.

Hope that helps

Helge Söderström January 14, 2013

Hey, Kieran, and thanks for your answer. Yeah, it's good that SourceTree reflects the actual goings-on in Mercurial, so I'm with you there. On the next branch, I'll try closing it before and see how it looks.

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events