1

I originally posted this question and found that Bitbucket does not support nested sub repos (CORRECTION: Bitbucket was not the problem at all...potentially bad information or misunderstood what they meant by nested subrepo) . I had to arrange them in Tortoise as sibling Repos. Mercurial to Bitbucket - Subrepository - Repository is unrelated error

My problem now is that TortoiseHg/Mercurial does not pick up the changes in my subrepos.

My directory structure looks like this: (sibling and not child folders)

MainRepo (to hold all subrepos)
SubRepo1 (main project)
SubRepo2 (class library)
SubRepo3 (class library)

etc...

In my .hgsub file, i have the following

SubRepo1 = ../SubRepo1
SubRepo2 = ../SubRepo2
SubRepo3 = ../SubRepo3

etc...

My problem is that the MainRepo does not detect any of the changes in my SubRepo. I noticed that there is now a folder for in the MainRepo folder for each of my subrepos. I suspect TortoiseHg is looking in there for changes...and not my ../SubRepoX folder.

Can anyone guide me to a working SubRepository scenario for TortoiseHg pushing to Bitbucket

UPDATE: See this link for the resolution to my subrepo problem. Recommended way to coordinate versions of multiple dependent mercurial repositories?

Community
  • 1
  • 1
faldeland
  • 587
  • 6
  • 20

1 Answers1

2

The subrepo directory reference should be relative to the location of the .hgsub file.

Therefore, you should have = ./SubRepo rather than ../SubRepo.

Here's the official docs. They're not too hard to read.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Mikezx6r
  • 16,829
  • 7
  • 33
  • 31
  • Thank you...I was hopeful that your simple change would have done the trick. Unfortunately, that doesn't help in the TortoiseHg world. I formatted the .hgsub file to use a static path, and the same result occurs. It appears to not be a relative path issue, but an issue that Tortoise SubRepos and Bitbucket do not get along. Perhaps someone with TortoiseHg SubRepo and Bitbucket experience can offer assistance. – faldeland Dec 17 '12 at 20:53
  • I successfully used TortoiseHG, subrepos and Bitbucket, so I know it did work (was about 4 months ago). I don't think bitbucket should impact the result. It's just an HG server, so shouldn't be part of the issue. Do you see the changes ok from the command-line, but not from tortoisehg? Is that the issue? THG, when looking at the main repo, will show that a subrepo has changed in the diff view, but won't show the actual changes (IIRC). The subrepo will be a link which will open the subrepo in a new tab. We CAN get this working. Will check tonight for more config details. – Mikezx6r Dec 19 '12 at 12:58
  • Hello @Mikezx6r, turns out that I went back to a nested subrepo structure. When adding subrepos via TortoiseHg, they formatted the .hgsub file like this subrepo = subrepo ... which was intuitive to me. But actually, it needed to be subrepo = ../subrepo ... That did the trick for me. I tried so many different variations, but this explains my resolution better http://stackoverflow.com/questions/13934437/recommended-way-to-coordinate-versions-of-multiple-dependent-mercurial-repositor – faldeland Dec 19 '12 at 15:51
  • Glad you were able to resolve it. I hadn't used TortoiseHG to define my subrepos, so perhaps that's why I didn't have issues. – Mikezx6r Dec 19 '12 at 16:33