Checking out specific branch from mercurial repository with nested repositories

StackOverflow https://stackoverflow.com/questions/23074737

  •  03-07-2023
  •  | 
  •  

Question

I want to clone http://hg.tryton.org/2.8/trytond/ 2.8 branch. Project uses hgnested extension and recommends checking out with hg nclone url. Current version of project is newer (3.0 or 3.2).

Standard nclone checks out current default. If I specify specific branch to clone, module (hgnested repos) clone fails because of missing revision, branch, etc. in one of nested repos.

Questions:

  1. How does hgnested know where other "repositories" located?
  2. How does hgnested manages list of nested repositories (like .hgsub file or something)
  3. Hwo do I clone specific branch with nested repositories specific to that branch?
Was it helpful?

Solution

  1. hgnested searchs for hg-subrepositories in the current directory tree.
  2. There is no need to manage them explicitly, see question no. 1
  3. hg nclone -b 3.2 http://hg.tryton.org/trytond This will work, because each subrepo(=Tryton module in this case) has a branch 3.2. At the moment you cannot do this for the 2.8 version, because there are new modules without 2.8-branch. The nclone exits on error on the first module without existing 2.8-branch.

You could pull the whole repo with "hg nclone http://hg.tryton.org/trytond" and do an "hg nupdate -r 2.8". You will get an error on each module without 2.8-branch, but you could delete all of them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top