Reputation: 5657
We have this mercurial remote repository (lets call it repo01):
A --- B --- C --- D (default)
\
--- E --- F (other)
We need to grant access to the E-F branch to our client, but not the A-D one. On the other hand we need to keep track of changes to the E-F branch. So I was thinking that if we could somehow copy the E-F branch to a different remote repository, we could achieve just that.
So the other remote repository (let's call it repo02) would look like this:
E --- F (other)
Then we would work with both repositories and the client would just work with repo02. The question is, can this actually be done and if yes how?
Upvotes: 1
Views: 200
Reputation: 32444
Your question is the combination of these two questions:
If you were going to copy the entire history of the branch other
then you would just need to provide the -b
option to hg clone
:
hg clone http://your/repo -b other
For your purposes, you must combine it with some way of creating a shallow clone, which Mercurial doesn't natively support. Look at the extensions suggested in the top two answers to the second question above (https://bitbucket.org/facebook/remotefilelog and https://www.mercurial-scm.org/wiki/ShallowClone).
Upvotes: 1