SmartSVN allows you to perform a checkout, that will not be managed by it. Does mercurial have a command that will only checkout a specific revision, discarding all commits before it?
Asked
Active
Viewed 162 times
2
-
clone the repository and delete the `.hg` directory ;) don't know if there are better alternatives – knittl Jun 25 '11 at 14:23
-
yes, but for big repositories you would have to download a lot of unnecesary data – Geo Jun 25 '11 at 14:27
-
I don't think you have another choise, only if you have a web-frontend in front of your repository which allows you to do a simple download of the current head. See http://stackoverflow.com/questions/2586824/partial-clone-with-git-and-mercurial – ba__friend Jun 25 '11 at 14:28
3 Answers
3
Assuming you have the necessary permissions, a straight copy will work:
rsync --exclude .hg [user@host:]/path/to/hg/repo mycopy

John Zwinck
- 239,568
- 38
- 324
- 436
-
1That will only work if the working directory is updated to the revision one wants. Might work for some circumstances, but not for some server-hosted repositories. – Joel B Fant Jun 25 '11 at 20:07
3
Mercurial does not have a command that will let you checkout a single revision from a remote repository. If the repository is local, them see the archive command.
However, most webservers lest you download any revision as a zip or tar file. For the normal hgweb you use URLs like this:
and for Bitbucket you use URLs like this:

Vadim Kotov
- 8,084
- 8
- 48
- 62

Martin Geisler
- 72,968
- 25
- 171
- 229