jenkinsci / jenkinsci/subversion-plugin

[JENKINS-8811] Tag this build fails when attempting to tag a branch that has not changed

Open
#767 6 comments 0 reactions 0 assignees View on GitHub
component:subversion-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
131
Forks
275
Avg merge
12h 4m
Merged PRs (30d)
6

Description

1. Start with a repository structure that contains this: http://svn/repos/trunk/mybranch

2. Create a branch as follows: svn copy http://svn/repos/trunk http://svn/repos/branches/develop

3. Setup a Hudson job that checks out the workspace from: http://svn/repos/branches/develop/mybranch

4. Run the job

5. Try to use the Tag this build function on the build

6. Tag this build will fail with the error message:

ERROR: Failed to tag

org.tmatesoft.svn.core.SVNException: svn: Path 'http://svn/repos/branches/develop/mybranch' does not exist in revision 173,203

at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)

at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)

at org.tmatesoft.svn.core.internal.wc.SVNCopyDriver.copyReposToRepos(SVNCopyDriver.java:264)

at org.tmatesoft.svn.core.internal.wc.SVNCopyDriver.setupCopy(SVNCopyDriver.java:628)

at org.tmatesoft.svn.core.wc.SVNCopyClient.doCopy(SVNCopyClient.java:426)

at hudson.scm.SubversionTagAction$TagWorkerThread.perform(SubversionTagAction.java:262)

at hudson.model.TaskThread.run(TaskThread.java:126)

Completed

The reason according to my analysis is the fact that the Last Changed Rev is stored instead of the Revision. The Last Changed Rev is created before step 2 above, i.e. it fails because the url http://svn/repos/branches/develop/mybranch does not exist in this revision.

This has also been identified in this discussion:

http://jenkins.361315.n4.nabble.com/problem-in-svn-tag-plugin-or-how-hudson-creates-revision-txt-td2965746.html

---
Originally reported by peter_walls, imported from: Tag this build fails when attempting to tag a branch that has not changed


  • status: Open
  • priority: Major
  • component(s): subversion-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 4
  • imported: 20251212-090250

Raw content of original issue

1. Start with a repository structure that contains this: http://svn/repos/trunk/mybranch
2. Create a branch as follows: svn copy http://svn/repos/trunk http://svn/repos/branches/develop
3. Setup a Hudson job that checks out the workspace from: http://svn/repos/branches/develop/mybranch
4. Run the job
5. Try to use the Tag this build function on the build
6. Tag this build will fail with the error message:

ERROR: Failed to tag
org.tmatesoft.svn.core.SVNException: svn: Path 'http://svn/repos/branches/develop/mybranch' does not exist in revision 173,203
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
at org.tmatesoft.svn.core.internal.wc.SVNCopyDriver.copyReposToRepos(SVNCopyDriver.java:264)
at org.tmatesoft.svn.core.internal.wc.SVNCopyDriver.setupCopy(SVNCopyDriver.java:628)
at org.tmatesoft.svn.core.wc.SVNCopyClient.doCopy(SVNCopyClient.java:426)
at hudson.scm.SubversionTagAction$TagWorkerThread.perform(SubversionTagAction.java:262)
at hudson.model.TaskThread.run(TaskThread.java:126)
Completed

The reason according to my analysis is the fact that the Last Changed Rev is stored instead of the Revision. The Last Changed Rev is created before step 2 above, i.e. it fails because the url http://svn/repos/branches/develop/mybranch does not exist in this revision.

This has also been identified in this discussion:
http://jenkins.361315.n4.nabble.com/problem-in-svn-tag-plugin-or-how-hudson-creates-revision-txt-td2965746.html

  • environment: Windows

1 attachment

- [SubversionTagAction.java](https://issues.jenkins.io/secure/attachment/21097/SubversionTagAction.java)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.