I'm having a repository A with local changes which are very similar to the changes commited to repository B.
To keep things simple, lets say the local changes are in file a.
While in repository A, I pulled from repository B.
hg pull http://B_url:8000
And then I did, with local changes in the working directory
hg up
Please note the history is linear, hg heads contains only one tip, since I never committed anything to A. A has only local changes to the working directory.
Mercurial, as it should, warned about conflicts in file a. File a now contains the >>>> known signs for conflict.
I want to revert file a to the local version it had before the update. How can I do that with Mercurial? It's not in any revision now, it was just a local change.
hg rollbackis a good one, but this is a good case for committing changes locally often, even when things aren't working 100%. – Rob Sobers♦ Aug 25 2010 at 14:03[rebase]Mercurial extension to collapse redundant changesets after successful merge. So your history will be clean. – Anton Moiseev Aug 26 2010 at 14:49git stash. – Elazar Leibovich Aug 26 2010 at 18:04