Mercurial Subrepositories Error

We recently split our mercurial repository into several smaller subreposiories wrapped together with a main repository. The problem is, when we set the main repository as the VCS root, strange error appears. The first was:

Error while applying patch: Problem while loading patch data stream

And in the build log:

Problem while loading patch data stream: Failed to obtain stream from server. Server status: 502 (Proxy Error).

So we thought it might be a problem with authentication to the subrepositories. We enabled mercurial keyring extension and our mercurial.ini (located in the same folder as hg.exe) looks like this:

[extensions]

mercurial_keyring =

[auth]

myremote.schemes = http https

myremote.prefix = srv-XXdevel/hg

myremote.username = teamcity


After this change the error changed as well:
Failed to start build: Failed to build patch for build #1.0.1009 {build id=2015}, VCS root: mercurial: http://srv-XXdevel/hg/XXXX {instance id=9, parent id=7}, due to error: '"c:\Program Files\TortoiseHg\hg.exe" --config ui.interactive=False update --config auth.tc.prefix=* --config auth.tc.username=teamcity --config auth.tc.password=****** --config "auth.tc.schemes=http https" -C -r 72cba74290d8' command failed.

And in the build log there is:
[Updating sources] Failed to build patch for build #1.0.1009 {build id=2015}, VCS root: mercurial:  http://srv-XXdevel/hg/XXXX {instance id=9, parent id=7}, due to error: '"c:\Program Files\TortoiseHg\hg.exe" --config ui.interactive=False update --config auth.tc.prefix=* --config auth.tc.username=teamcity --config auth.tc.password=****** --config "auth.tc.schemes=http https" -C -r 72cba74290d8' command failed.

I tried to set the VCS root to each individual subrepository and tested the connection and they all passed. I have no idea what to try now. Do you have any suggestions please?

Please sign in to leave a comment.