SourceTree / Deleted subrepo and unable to switch branch

Hello. I'm using SourceTree (1.8.1) with Bitbucket and Mercurial.

My repository is using Git flow (or Hg flow in this case) with subrepositories. When I execute the following steps, I get into a state where I am unable to switch into the default branch.

  • Set up basic repository structure with two branches: default and develop.
  • Both branches reference a subrepository called X.
  • With the develop branch as active, I delete the subrepository X (which updates the .hgsub in the develop branch) and commit this change.
  • This creates a state where the subrepos X is not referenced from develop, but is still being referenced from default.
  • In this state, if I try to switch to the default branch, I get an error (abort: http authorization required) and cannot switch out of the active develop branch.

I'm not sure what to do to be able to switch into the default branch again, or why it ends up in this state. Thanks for your time.

1 answer

I was able to resolve the issue by manually editing the .hgsub and .hgsubstate files (via the Bitbucket web interface), and deleting the reference to the subrepository X in the default branch.

Still, I would like to know why this issue happened and if there is a better way to resolve it,s o I am leaving the question as unanswered. Thanks.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,101 views 4 2
Read article

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