SourceTree: Stuck in "Graft in progress" loop (hg)

I am using SourceTree's Mercurial to interact with a SVN server (which is old, senile and not under my control). I had a conflict at one point which I was trying to resolve. I attempted to graft my (local) Mercurial branch to the SVN head. This gave me some warning about it being dangerous, so I cancled the process. I then stripped the local branch, switched to the SVN head and made some more local changes.

Now, when I try to commit, SourceTree complains that I have a graft in progress. If I chose Abort, it reverts all my local uncommited changes. If I chose Continue, it says

hg graft -y --continue 
skipping ancestor revision 142
Completed with errors, see above

and next time I try to commit it complains that I still have a graft in progress. However, if I run

/Applications/SourceTree.app/Contents/Resources/mercurial_local/hg_local commit -u username

in the repo folder, it happily commits and I can then go to SourceTree and Push. But regardless of what I commit at the terminal, SourceTree is convinced I have a graft in progress.

How can I tell SourceTree that, no, I really don't have a graft in progress, shutup and just commit.

1 answer

1 accepted

This warning is triggered by the presence of a file called '.hg/graftstate' in your repository. This file is usually cleaned up by Mercurial when you finish a graft. Is the file empty?

Nope, it's got some hash value in it. Since I'm pretty confident the graft didn't really happen, I'll just delete it. 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
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

148 views 6 3
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