Geo
Geo

Reputation: 96887

Mercurial: don't manage as a project

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?

Upvotes: 2

Views: 167

Answers (3)

Christian Specht
Christian Specht

Reputation: 36431

You can use the archive command.

Upvotes: 3

Martin Geisler
Martin Geisler

Reputation: 73788

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:

https://www.mercurial-scm.org/repo/hg/archive/tip.zip

and for Bitbucket you use URLs like this:

https://bitbucket.org/mirror/mercurial/get/tip.zip

Upvotes: 3

John Zwinck
John Zwinck

Reputation: 249374

Assuming you have the necessary permissions, a straight copy will work:

rsync --exclude .hg [user@host:]/path/to/hg/repo mycopy

Upvotes: 3

Related Questions