views:

46

answers:

1

I'm using Hudson to build my project from my Mercurial repository. There are two jobs: One builds the tip, the other should build the latest release. When I tag a release and then use that tag in the field "branch", I get this error:

[workspace] $ hg update --clean --rev Release_1_2_beta1
abort: unknown revision 'Release_1_2_beta1'!

When I run the same command in my local copy, it works. It also works when I clone the What could be the reason that it breaks on Hudson?

+1  A: 

Nothing you're doing is inherently wrong, but I have a guess based on how mercurial tags are tracked. Is it possible that you're cloning into that workspace using --rev too?

This pattern of commands doesn't work:

% hg init test

% echo this > test/file

% hg -R test commit --addremove --message 'a commit'
adding file

% hg -R test tag mytag

% hg clone --rev mytag test test-clone

% hg -R test-clone update --rev mytag
abort: unknown revision 'mytag'!

The reason that doesn't work is the clone --rev brings over all the changesets up to and including the one pointed to by the tag mytag, but it doesn't bring over the subsequent changeset that actually creates a tag named mytag.

If that's the problem (and again it's just a guess) then you either need to clone over everything or hg update to tip.

If that's not the case look in your .hgtags file and verify that tag exists in it.

Ry4an
I see no `hg clone`. What I see in the logs is `hg incoming -r mytag`. Could that lead to the same effect?
Aaron Digulla