Question

I want my Noda Time continuous build - hosted by a private TeamCity server in my home - to fetch the Mercurial log as an XML file. The source code is hosted on Google Code. This is so that I can use it for benchmark browsing on the public web site. It's all very much a work in progress, but it's basically starting to come together.

I'd expected that fetching the log as part of the TeamCity build would be simple. After all, it's already fetched the source in order to perform the build. From a normal repository directory, I can just run:

hg log --style xml > hg-log.xml

Unfortunately, as far as I can see, the "checkout" directory in Team City isn't an actual Mercurial repository - it's a copy of just the contents of the repository at the appropriate commit. That means I can't run hg log in that directory... or any other directory that I've been able to find so far. None of the predefined build parameters seem to have a local repository path, although I'm hoping I've missed one.

My current workaround is to fetch the source again as part of the build (just the default branch, of course) and then use that to get the log. It works, but it feels insanely wasteful.

It's not clear to me how or where TeamCity actually performs the source checkout - I'm really hoping there's a local repo somewhere that I can use to get the log.

Was it helpful?

Solution

Do you have your agent checkout settings set to "on agent"?

By default, the server does a checkout and then sends the bits to the client.

You can find the setting here:

image

OTHER TIPS

Try checking out as 'Automatically on agent'. This should make the checkout directory an actual repos.

Tell TeamCity to check out on the agent. That way, your build agents will run hg, and the checkout directory on the agent will be a repo you can run hg log --style xml > hg-log.xml on.

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