views:

68

answers:

2

Sometimes I have to return to a really old branch when I depended on a ton of external libraries. Updating to the current branch removes the source files for those dependencies, but the artifacts are left there, as well as a few folders and such.

I would like to have a way to force a mercurial repo to be as if I had just cloned it from the remote (master) repository. I don't want to just nuke my repo and re-clone it, because that forces me to download hundreds of MB from the remote server.

+4  A: 

Why don't you clone not from remote server, but from your local repository? After that you could nuke your repo with old untracked files.

hg clone path_to_your_local_repo your_new_repo

After this you could map your new repo to your remote server in hgrc file

denis_k
+1 for the most clever solution.
Billy ONeal
+2  A: 

You can use the purge extension, or if you are on an UNIX-like system: hg st -nu0 | xargs -0 rm.

tonfa
+1 and checkmark for the easiest solution.
Billy ONeal