Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pause/resume repository cloning in mercurial?

Tags:

mercurial

I've recently needed to clone into development tree of some large projects (e.g. https://hg.mozilla.org/mozilla-central), but the problem is I'm on an slow unstable connection and thus I may not clone into the repository in a single pass.

Is it possible to pause/resume the cloning process somehow?

like image 727
semekh Avatar asked May 08 '13 15:05

semekh


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.

How do I delete a Mercurial repository?

Once you decide that a file no longer belongs in your repository, use the hg remove command.

What is HG repository?

Strictly speaking, the term repository refers to the directory named . hg (dot hg) in the repository root directory. The repository root directory is the parent directory of the . hg directory. Mercurial stores its internal data structures – the metadata – inside that .


1 Answers

To clone a large repository in multiple passes, you can use the --rev option on the clone command. For example:

hg clone --rev 100 <remote URL> <local path>
cd <local path>
hg pull --rev 200
hg pull --rev 300
etc

See this related SO question.

like image 109
Tim Henigan Avatar answered Sep 25 '22 06:09

Tim Henigan