Hide branch close commits from hg flow


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.

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

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

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.


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Jan 17, 2019 in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

802 views 10 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you