7

I accidentally ran hg update featurebranch while my working directory had changes. When it asked me to resolve merge conflicts on the first file, I immediately pressed Ctrl-C to kill the command. Now when I try to commit I get the error:

abort: last update was interrupted
(use 'hg update' to get a consistent checkout)

What does that mean and how do I recover from this situation?

Philip
  • 4,128
  • 5
  • 31
  • 49

1 Answers1

12

hg update -r . will do a no-op update to the working branch without changing any files and fix the error message.

I'm not entirely sure how/why it works, so if someone explains that I will accept their answer.

Philip
  • 4,128
  • 5
  • 31
  • 49
  • 1
    Haven't tried it myself, but `.` is a synonym of the parent of the current state. If you are not issuing a `-C` with the update, I assume you are truly executing a no-op. However, the good side of it is that it also tells Mercurial that the update completed successfully, resetting the `interrupted` state. – Vince May 16 '14 at 15:51