SourceTree won't discard changes, can't unshelve stored diff

I have a major issue with the newest version of SourceTree for Windows, I added an existing repository to SourceTree (I had recently rebuilt this machine and hadn't installed SourceTree on it yet since I didn't know Mercurial support had finally been added). I had a bunch of new commits to pull before I could commit my latest changes, so I went ahead and shelved my changes. I then pulled and updated.

The problem is that, once I updated, SourceTree is convinced that two of the files in the repo are modified. They're not, but I can't make it go away. I've tried discarding the changes repeatedly, both in SourceTree and on the command line, but they continue to show as modified. The big problem is that now I can't unshelve my changes.

This is probably a result of line ending issues, but regardless of what the cause is, it needs to be handled properly, that particular issue being a well known problem between Windows and *nix systems. I've tried any number of things, but can't get this to work. I created a short screen cap showing the problem:

Luckily I anticipated that there might be an issue and backed up my changes elsewhere, so all I had to do was copy them back into the repo. After that, the commit went fine and I was able to push up to Bitbucket. And after that, SourceTree doesn't show any "modified" unmodified files so things seem OK. But it definitely makes me leery of trusting my changes to the shelf without backing them up elsewhere.

So this is really probably just a bug and should be filed as such, but all the links try to push me here instead of the bug tracker, so I'll give this a go first...

3 answers

1 accepted

0 votes
Accepted answer

So this problem re-occurred outside of SourceTree just now, so I had to track it down.

It looks as if something (and I'm thinking SourceTree, because this only happened after today's update) added the eol extension to my .hgrc file (or mercurial.ini, I'm not clear as to which would take precedence and I went through both of them; no, I didn't install both of them, but various tools over time have decided I needed one or the other in particular). I don't think it was the eol= declarator in and of itself: I think it was the [eol] configuration section with a couple of entries for cleverencode. I didn't even know those options existed, so I know that I didn't add them in there! Once I removed those, the problem went away.

If SourceTree does add those cleverencode bits, it might be a good idea to NOT do that, because, at least with the version of Mercurial on my system, it seems to cause this issue, which is a real blocker.

Did someone found a solution for this?

Have same issue

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Canada

Happy New Year - First AUG of the year - great success

Hi Everyone, Hope everyone had a great holiday season and is ready for an exciting 2019.  We had our first AUG last night featuring Tempo Timesheets.  A great presentation and lots of int...

15 views 0 1
View post

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