I have a Mercurial repository containing a handful of related projects. I want to branch just one of these projects to work on it elsewhere.
Is cloning just part of a repository possible, and is that the right way to achieve this?
I have a Mercurial repository containing a handful of related projects. I want to branch just one of these projects to work on it elsewhere.
Is cloning just part of a repository possible, and is that the right way to achieve this?
I believe Mercurial doesn't allow operations on only part of the repository. For example, there is only a single .hg directory, at the root of the repo.
It is not possible, hg clone
will clone the whole repository.
You can take a look a the sub-repository extension that allows you to have repositories inside a repository, which might match your needs.
What you want is a narrow or partial clone, but this is not yet supported.
One option, is to instead not do a sub clone, but to use the convert extention to split your repo into more than one repo.
Hey, James Hopkin
Could you please tell me what workaround you have found to dealing with such kind of repository.
I also have similar kind of repository and would like to clone the portion (project1) of the repository so that each team can work on their clone portion and push their final changes in to main repository.
You can also mail me your workaround details on [email protected].
Thanks, Praveen
I used xcopy for now, no idea what the Linux equivalent is, or if I really needed all of the switches, but it does the trick:
xcopy /D /S /I /Q /H /R /K /Y "django\django\contrib\admin\media" "D:\Coding\Workspace\src\django_apps\media"
This is straight forward with ConvertExtension. http://mercurial.selenic.com/wiki/ConvertExtension#Converting_from_Mercurial