How can I clone a Mercurial repository without the .hg folder to save time (the project is big)? I only need the tip files.
How can I clone a Mercurial repository without the .hg folder to save time
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
.hgdirectory is what stores your complete repository information. That is, information about all your files and their revisions tracked by the repository. As for storage, it usually is pretty efficient since it is compressed using binary differerencing.When you clone a repository, the only thing that is cloned is the .hg directory. The working copy you will get after the clone is retrieved from that
.hg.If all you want to store is the repository information (say on a server), you can remove the working copy with
hg update null.If you want to create a clone of your repository without the revision information, you can use the
hg archivecommand (see reference below). Be aware that this copy is just a “working copy” (to use some common svn terminology). You can’t commit, nor do any other mercurial operation with it.