Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HG: Update a directory to a specific revision without cloning the whole repo?

Tags:

mercurial

Is it possible to update a directory to a specific revision without cloning the whole repository (local or on a central server) in Mercurial and how can I use it? This would be great, because to clone the whole repo first takes to much time for me and the folder really don't needs the whole repo. As example: default and the b2.3 branch from which I want to update.

Thanks in advance! :)

like image 702
Joschua Avatar asked Apr 01 '10 15:04

Joschua


2 Answers

You can pull a specific branch, say b2.3 by using hg clone -r b2.3 source-repo target-repo.

If you really need just a non-versioned copy of all the files in revision N, then for some web repositories you may download such a copy using their web interface.

like image 53
Andrey Vlasovskikh Avatar answered Oct 20 '22 00:10

Andrey Vlasovskikh


clone is the preferred way to do it in Mercurial. It should take a minimal amount of time when done locally. I'm unaware of any other way to do it.

Search for "hard links" on this tutorial page for more info on the subject.

like image 33
Karmic Coder Avatar answered Oct 19 '22 22:10

Karmic Coder