I\'m moving a build process to use mercurial and want to get the working directory back to the state of the tip revision. Earlier runs of the build process will have modified so
hg up -C
This will remove all the changes and update to the latest head in the current branch.
And you can turn on purge extension to be able to remove all unversioned files too.