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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

555 views 1 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