You'll want to make a local clone where you preserve only the changesets that are also present in the remote repository. Use TortoiseHg, hg log
or similar to figure out which of your revisions is that lastest revision you didn't make (the one before the mess started). Using hg outgoing
can help here -- it will list all the changesets you made -- pick a revision number earlier than any of those.
If the target revision is called good
and your clone is called foo
, then do:
hg clone -r good foo foo-clean
This will be a fast, local operation -- there is no reason to download everything again. The foo-clean
clone will only contain changesets up to revision good
. You can now replace foo-clean/.hg/hgrc
with foo/.hg/hgrc
in order to preserve your repository-local settings such as the default push/pull path.
When you are satisfied that foo-clean
has everything you need from foo
, then simply delete foo
and rename foo-clean
to foo
. Do a hg pull
to get any new changesets from the remote repository into your clone and continue like normal.
If nobody has pushed new changesets to the remote repository, then it is very simple to determine which revision you want to use as good
above: hg id default
will tell you the ID of the tip in the remote repository.