Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 323
Marcus Leon Avatar asked Nov 10 '10 19:11

Marcus Leon


People also ask

How do I clone a Mercurial repository?

Clone a remote Mercurial repositoryFrom the main menu, select Hg | Get from Version Control. The Get from Version Control dialog opens. In the dialog that opens, select Mercurial from the Version control list and specify the URL of the remote repository you want to clone. Click Clone.

What is mercurial changeset?

A changeset (sometimes abbreviated "cset") is an atomic collection of changes to files in a repository. It contains all recorded local modification that lead to a new revision of the repository. A changeset is identified uniquely by a changeset ID. In a single repository, you can identify it using a revision number.

What hg command shows a list of changed files?

If you are using the terminal in windows add hg status --rev x:y > your-file. txt to save the list to a file. To only see changes in the current directory: hg status --rev x:y .


1 Answers

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

hg help clone 

So :

hg clone -r 7 
like image 190
pastjean Avatar answered Oct 21 '22 01:10

pastjean