3

I switched to a branch and

hg revert --all

then I wanted to import a diff file with

hg import [filename]

However, I got "abort: uncommitted changes". So I typed

hg st

It turned out that I had several modified files. But I tried with

hg diff -g

Only a blank line showed on the command prompt. And both

hg revert --all --no-backup

and

hg up -C -r [revision]

are not working. I also tried to delete those files and then revert them, switch to another branch then switch back, but those files are still identified as modified.

Y.W
  • 31
  • 1
  • Sometimes diff won't show (or seem to show) apparent changes because they could just be line endings, newlines, etc. If you diff using a graphical tool in "strict" mode (lke Winmerge for instance) it might more clearly show any differences. – StayOnTarget Jun 17 '19 at 11:30
  • You wrote that `hg revert --all --no-backup` did not work - how did it fail? – StayOnTarget Jun 17 '19 at 11:30
  • i have the same issue. `hg revert --all --no-backup` doesn't seem to do anything, it lists a bunch of 'reverting ...' files, but if i run it again, it just says the same thing. – Spongman Aug 31 '19 at 19:57

1 Answers1

2

I ended up in this situation today, too.

I worked around the issue by running hg update -C null to empty the working folder, then hg update [revision] for the revision I wanted.

Tom Whittock
  • 201
  • 1
  • 3