This is with version 5.0.2 of TeamCity.
This question seems pretty dead, but here's what I did (I had to figure it out today):
TeamCity (I'm using 6.0) seems to swallow the '#' symbol in the uri, so you just need to make sure you put it in quotes:
"https://<username>:<password>@bitbucket.org/<your-account>/<your-project>#<your-release-tag>"
A few other quircks:
TeamCity may see the hash and try to populate the Branch Name textbox. Delete anything it puts in here as Hg doesn't seem to support this.
Because the url needs to be in quotes, you need to embed your username/password in the url (anything in the User name or Password text boxes will be ignored). TeamCity can't insert them like it normally would because of the quotes around the url.
The latest version of TeamCity has added an option in the VCS Root config to specify which branch/tag to pull.
I ran into a similar scenario, wherein we wanted to have a build configuration that would always build whatever was tagged as a production build. I solved the issue by switching checkout mode to "agent checkout" so that the agent working directory contains the entire mercurial repository, not just the latest files. I then added a build step before the actual build. All it does is:
hg update prod-build
after which the build can proceed on the correct version.
Note that this is on TC 6.5, but I assume custom build steps are in the cards for TC 5 as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With