I am trying to use the subrepo feature of mercurial, using the mercurial eclipse plugin\tortoiseHG.
These are the steps I took:
- Created an empty dir
/root
- cloned all repos that I want to be subrepos inside this folder (
/root/sub1
,/root/sub2
) - Created and added the
.hgsub
file in the root repo/root/.hgsub
and put all the mappings of the sub repos in it - using tortoiseHG, right clicked on
/root
and selectedcreate repository here
- again with tortoise, selected all the files inside
/root
and added them to to the root repo - commited the root repo
- pushed the local root repo into an empty repo I have set up on kiln
Then, I pulled the root repo in eclipse, using import->mercurial.
Now I see that all the subrepos appear as though they are unversioned (no "orange cylinder" icon next to their corresponding folders in the eclipse file explorer).
Furthermore, when I right click on one of the subrepos, I don't get all the hg commands in the "team" menu as I usually get, with root projects - no "pull", "push" etc.
Also, when I made a change to a file in a subrepo, and then "committed" the root project, it told me there were no changes found.
I see the same behavior also in tortoiseHG - When I am browsing files under /root
, the files belonging directly to the root repo have an small icon (a V sign) on them marking they are version controlled, while the subrepos' folders aren't marked as such.
What makes me suspect it's some error on my side, is that 1. both tortoise and eclipse do the same thing, so it's less probable to be a bug in either one 2. What they do looks rather sophisticated, so not probable to happen by a bug - they both ignore all folders that are in .hgsub. Had the opposite happened (all subrepos treated as regular folders of the main repo rather than being treated as unversioned), I would have thought it's a bug caused by not treating subrepos. But clearly both apps acknowledge the .hgsub file
Am I doing something wrong, or is it a bug?