Mercurial (Kiln) agent-side pull and update fail with subrespoitories

Hi,

I have a mercurial (Kiln 2.5.175.0) repository that contains other mercurial repos as subrepositories. These subrepositories are also hosted on the same version of kiln.

When I set up a build configuration referencing this repo the first clone completed successfully, and I could build my code.

Subsequent updates that only required pulling updates to the top level repo (and none of the subrepos) also worked.

However, when I updated the revision of one of the contained subrepositories, TeamCity failed in pulling down the latest changes to the agent side repo.

I turned on debug-vcs on the teamcity server, and reran the build. The error repeated. The build log contained the following:

[15:43:34]: Updating sources: agent side checkout... (8s)
[15:43:34]: [Updating sources: agent side checkout...] VCS Root: MyProject Kiln (8s)
[15:43:34]: [VCS Root: ThirdPartyIPReport Kiln] revision: 50:cfa127cf308c
[15:43:34]: [VCS Root: ThirdPartyIPReport Kiln] Start pulling changes
[15:43:42]: [VCS Root: ThirdPartyIPReport Kiln] Changes successfully pulled
[15:43:42]: [VCS Root: ThirdPartyIPReport Kiln] Updating working directory from the local repository copy
[15:43:43]: [Updating sources: agent side checkout...] Failed to perform checkout on agent: '"C:\Program Files\TortoiseHg\hg.exe" update -C -r cfa127cf308c' command failed. stderr: abort: http authorization required


And the teamcity-vcs.log on the agent contained this:


[2011-08-22 14:26:10,691]   WARN -      jetbrains.buildServer.VCS - Error output produced by: "C:\Program Files\TortoiseHg\hg.exe" pull http://builduser:******@kiln/kiln/Repo/Repositories/Group/MyProject
[2011-08-22 14:26:10,691]   WARN -      jetbrains.buildServer.VCS - Cookie file C:\Documents and Settings\builduser\_hgcookies\23d43dba2b8e4d63568753d5bc11febe exists, but could not be opened.
Continuing without cookie authentication.

[2011-08-23 16:41:13,508]   WARN -      jetbrains.buildServer.VCS - '"C:\Program Files\TortoiseHg\hg.exe" update -C -r aa3175c5bddd' command failed.
stderr: Cookie file C:\Documents and Settings\builduser\_hgcookies\d41d8cd98f00b204e9800998ecf8427e exists, but could not be opened.
Continuing without cookie authentication.
abort: http authorization required


[2011-08-23 16:42:00,024]   WARN -      jetbrains.buildServer.VCS - '"C:\Program Files\TortoiseHg\hg.exe" update -C -r aa3175c5bddd' command failed.
stderr: abort: http authorization required


[2011-08-23 16:53:22,227]   WARN -      jetbrains.buildServer.VCS - '"C:\Program Files\TortoiseHg\hg.exe" update -C -r 0bc6464f0270' command failed.
stderr: killed!


[2011-08-24 15:43:43,172]   WARN -      jetbrains.buildServer.VCS - '"C:\Program Files\TortoiseHg\hg.exe" update -C -r cfa127cf308c' command failed.
stderr: abort: http authorization required


I'd hope to be able to successfully pull in updates to subrepos - our workflow actually depends on this. Do you know of anyway to address this?


Many Thanks,


Will
--
3 comments
Comment actions Permalink

Hi Will,

we have the same problem on our setup today. It seems like 'hg update' command in the main repository requires user to enter credentials in interactive mode, at least hg 1.7.1 does that. Since we run hg non-interactively we cannot give it creadentials. Also I noticed that hg 1.8.2 updates subrepositories without additional authentication (it takes auth settings from .hgrc). Which version of hg do you use?

Also I think that an option "Clean all files before build:" can help in your case, because it will do clone of subrepository, not the pull. And clone seems to work fine.

0
Comment actions Permalink

Hi Dmitry,

Thanks for your suggestions. I am using Mercurial 1.9+10-e9264b45237d, which is the latest distributed with Kiln.

I tried enabling "Clean all files before build:" on the mercurial VCS root, but it still failed with the same error. Could it perhaps have anything to do with agent-side checkouts? I understand that agent-side checkout is necessary to use subrepositories.

Thanks,

Will
--

0
Comment actions Permalink

Will,
you are right, an agent-side checkout is required for subrepositories to work. Do you have an [auth] section in the .hgrc on the agent? I think, my clone succeed because I have something like this in the .hgrc:

[auth]
repo.prefix = http://hg.server.url
repo.prefix.username = hguser
repo.prefix.password = hgpassword

0

Please sign in to leave a comment.