How so I set build from mercurial bookmark?

I have a repository on Kiln than has some hg bookmarks, and I want TeamCity to build from the "master" bookmark on the default branch. From the reading the blog post http://blog.jetbrains.com/teamcity/2013/04/mercurial-bookmarks/ it seems like I should just be able to put "master" in the "default branch" field, and that should be it.

That's what I've done, but TeamCity is saying "VCS problem" with the error

     Cannot find revision of the default branch 'master' of vcs root mercurial: https://my-company.kilnhg.com/Repository

What do I need to do to make this work? Other parts of our build process require hg, so switching to git for this isn't an option.

11 comments
Comment actions Permalink

I think you misconfigured your VCS root. By default, default branch in HG is default.

0
Comment actions Permalink

Yea, but that blog post I linked to says "In TeamCity bookmarks can be used in branch and branch specification fields of VCS root settings just like regular branches." - so I thought I could just put in "master" in there and it would work.

If that isn't the case, how I make it only build from the bookmark master?

0
Comment actions Permalink

By default, local bookmarks (vs. branches) are not pushed to server (http://mercurial.selenic.com/wiki/Bookmarks/). Please ensure first that bookmarks are pushed to server from your local repository.

0
Comment actions Permalink

Yup, they have been pushed to the server. They show up in the Kiln web-UI and they are pulled when I clone locally with mercurial.

0
Comment actions Permalink

You can go to VCS settings and set "Clone repository to:" to custom path, then go to this folder (on server) and check whether bookmark is present in cloned copy.

In addition, you check teamcity-vcs.log for some helpful information.

0
Comment actions Permalink

The bookmark is present when I use "Clone repository to" and I also checked the "system\caches\mercurial\hg_-1508064759688852481" folder and it has it there as well.

The teamcity-vcs.log shows both errors and successes. e.g.

[2014-04-16 14:33:28,873]   INFO [ical executor 2] -      jetbrains.buildServer.VCS - Cannot load current state for VCS root '"MassSpec - Rothbury - Trunk (1)" {instance id=296, parent internal id=176, parent id=Trunk_MassSpec, description: "mercurial: https://my-company.kilnhg.com/Code/Repositories/Rothbury/MassSpecTrunk"}', id=296: Cannot find revision of the default branch 'master' of vcs root mercurial: https://my-company.kilnhg.com/Code/Repositories/Rothbury/MassSpecTrunk
[2014-04-16 14:34:46,501]   INFO [cal executor 10] - .buildTriggers.vcs.LoadChanges - Collecting changes for VCS root "MassSpec - Rothbury - Trunk (1)" {instance id=296, parent internal id=176, parent id=Trunk_MassSpec, description: "mercurial: https://my-company.kilnhg.com/Code/Repositories/Rothbury/MassSpecTrunk"} from state RepositoryStateImpl{defaultBranch=master,branchRevisions={master: 56b89cb9c2d4}} to state RepositoryStateImpl{defaultBranch=master,branchRevisions={master: 56b89cb9c2d4}}
[2014-04-16 14:34:46,501]   INFO [cal executor 10] -      jetbrains.buildServer.VCS - Finish collecting changes succesfully for VCS root "MassSpec - Rothbury - Trunk (1)" {instance id=296, parent internal id=176, parent id=Trunk_MassSpec, description: "mercurial: https://my-company.kilnhg.com/Code/Repositories/Rothbury/MassSpecTrunk"} from state RepositoryStateImpl{defaultBranch=master,branchRevisions={master: 56b89cb9c2d4}} to state RepositoryStateImpl{defaultBranch=master,branchRevisions={master: 56b89cb9c2d4}}; 0 changes collected 0 changes reported, time spent: < 1ms


It does seem like it might be building the correct branch, but I'm not sure 100% sure. But it still keeps showing this error message next to the "Current status" on the build config page.

0
Comment actions Permalink

Please enable 'debug-vcs' logging preset at Administration > Diagnostics, reproduce the problem and attach teamcity-vcs.log to the issue.

0
Comment actions Permalink

That's really odd. After setting that, the error has gone away and it shows a "master" tag next to the build on config page.

I'll try switching off the debug logging to make sure that the problem stays fixed.

0
Comment actions Permalink

Looks like that problem is still showing up after all (and I've switched debug-vcs back on)

Untitled-1.png

Is there a way to privately send you the teamcity-vcs log? I don't want the commit messages etc. being public.

0
Comment actions Permalink

Send it to teamcity-feedback@jetbrains.com with a link to this thread.

0

Please sign in to leave a comment.