I\'m using Mercurial locally for a project (it\'s the only repo there\'s no pushing/pulling to/from anywhere else).
To date it\'s got a linear history. However, the
I just encountered a case of needing to revert just one file to previous revision, right after I had done commit and push. Shorthand syntax for specifying these revisions isn't covered by the other answers, so here's command to do that
hg revert path/to/file -r-2
That -2
will revert to the version before last commit, using -1
would just revert current uncommitted changes.