Failed to Tag Subversion

I can't seem to get the tagging for subversion to work. To test the config I have been testing with the 'Label this build sources' link on the Changes report for a successful build. No matter what I put into the 'Labeling rules' 'trunk' gets prepended to my config for both the left and right of the =>. So if I have 'trunk=>tags' in the 'Labeling rules' I get the following error, notice how 'trunk' is prepended.

Failed: Failed to set label 'build-1.0.0.606': Labeling the path 'trunk/trunk' to 'trunk/tags/build-1.0.0.606' has failed with the error: svn: Path trunk does not exist in revision 61

10 comments

Hello Jay,

Looks like your URL is ending with 'trunk'.

You can either truncate 'trunk' in the URL (but in this case you should specify
checkout rules if you want to preserve the old directory structure), or specify
absolute paths in the labeling rules, like "/project/trunk=>/project/tags".

I can't seem to get the tagging for subversion to work. To test the
config I have been testing with the 'Label this build sources' link on
the Changes report for a successful build. No matter what I put into
the 'Labeling rules' 'trunk' gets prepended to my config for both the
left and right of the =>. So if I have 'trunk=>tags' in the 'Labeling
rules' I get the following error, notice how 'trunk' is prepended.

Failed: Failed to set label 'build-1.0.0.606': Labeling the path
'trunk/trunk' to 'trunk/tags/build-1.0.0.606' has failed with the
error: svn: Path trunk does not exist in revision 61

--
Sergey Anchipolevsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Now it says:
Failed: Failed to set label 'build-1.0.0.615': No labeling rules found for checkout rules =>

I suspect that someone else on my project has edited the config, though I can not see what is different.

Choose VCS roots to label: is checked
VCS labeling mode: is set to 'Successful only' and Labeling pattern: to 'build-%system.build.number%'


Labeling rules are set to '/nex/trunk=>/nex/tags'

0

Hello Jay,

what's the URL in your VCS root?

Now it says:
Failed: Failed to set label 'build-1.0.0.615': No labeling rules found
for checkout rules =>
I suspect that someone else on my project has edited the config,
though I can not see what is different.

Choose VCS roots to label: is checked
VCS labeling mode: is set to 'Successful only' and Labeling pattern:
to 'build-%system.build.number%'
Labeling rules are set to '/nex/trunk=>/nex/tags'

--
Sergey Anchipolevsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

https://nex-scontrol:8443/svn/nex/trunk

0

Hello Jay,

then labeling rules should be "/svn/nex/trunk=>/svn/nex/tags".
The paths should be absolute starting from the repository root.

https://nex-scontrol:8443/svn/nex/trunk

--
Sergey Anchipolevsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Hello,

I've been working on this with Jay. We have tried the SVN root at both https://nex-scontrol:8443/svn/nex and https://nex-scontrol:8443/svn/nex/trunk, and we have set the labeling rules to /svn/nex/trunk=>/svn/nex/tags, but we are still not able to create a tag in subversion. When we try the "Label this build sources" link, we see the following message:

Failed: Failed to set label 'build-1.0.0.642': Labeling the path 'svn/nex/trunk' to 'svn/nex/tags/build-1.0.0.642' has failed with the error: svn: Path trunk does not exist in revision 93

Are there any other settings that we should check?

0

Hello Erik,

I cannot reproduce the problem locally. Everything works fine at my side
with both relative and absolute paths.
Please ensure your permissions allow coping SVN directories.

Also I would like to see your SVN logs.
You should enable debug logging by uncommenting the following elements in
/conf/teamcity-server-log4j.xml : ... This enables writing debug messages to the file ]]>/logs/teamcity-svn.log

After you get the error please send me this log.


Thank you.

Hello,

I've been working on this with Jay. We have tried the SVN root at
both https://nex-scontrol:8443/svn/nex and
https://nex-scontrol:8443/svn/nex/trunk, and we have set the labeling
rules to /svn/nex/trunk=>/svn/nex/tags, but we are still not able to
create a tag in subversion. When we try the "Label this build
sources" link, we see the following message:

Failed: Failed to set label 'build-1.0.0.642': Labeling the path
'svn/nex/trunk' to 'svn/nex/tags/build-1.0.0.642' has failed with the
error: svn: Path trunk does not exist in revision 93

Are there any other settings that we should check?

--
Sergey Anchipolevsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Erik,

Please note that the finished build uses not the current labeling rules, but the ones that were actual when the build started. So to check updated settings you will need to run a new build after VCS root modifications.

This may be a bit not evident, but this approach allows to apply correct labeling even if a root is changed afterwards.

Another point is that "/" in the beginning of the labeling rules is important: it tells TeamCity to apply the rules from the repository root and not the VCS root defined.


--
Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

All,

Thanks so much for your suggestions - sorry to have taken so long to respond. I have tried every combination of absolute paths and none of them seem to work. However, I did find that relative paths work when I take 'trunk' out of the URL, as originally mentioned by Sergey. So,

https://nex-scontrol:8443/svn/nex

as the URL, and

trunk=>tags

as the labeling rules seems to have done the trick.

Thanks for all your help!

Erik

0

Erik,
  What is your checkout rules?
I am getting the same type of error:
Failed: Failed to set label 'test': No labeling rules found
for checkout rules

your label rules trunk=>tags is releative to your TC defined VCS root but the error I get is trying to match labeling rules to checkout rules so I am wondering what your checkout rules are if you can label successfully.

0

Please sign in to leave a comment.