How can you clone a Mercurial repository as of a specific changeset?

Marcus Leon picture Marcus Leon · Nov 10, 2010 · Viewed 28.5k times · Source

How can you clone a Mercurial repository as of a specific changeset?

Ie: If the master repo has changesets 1-10, how can get a copy of the source as it existed in changeset #7?

Answer

pastjean picture pastjean · Nov 10, 2010

This command tells to use -r / --rev switch:

hg help clone

So :

hg clone -r 7