When using Mercurial, how do you undo all changes in the working directory since the last commit? It seems like this would be a simple thing, but it\'s escaping me.
hg revert
is your friend:
hg revert --all
hg update
merges your changes to your current working copy with the target revision. Merging the latest revision with your changed files (=current working copy) results in the same changes that you already have, i.e., it does nothing :-)
If you want to read up on Mercurial, I'd recommend the very awesome tutorial Hg Init.