jenkinsci / jenkinsci/subversion-plugin

[JENKINS-71384] Subversion Plugin Cannot Check Out Pegged Revision

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

Description

I have a Maven project with two parameters ("branch" and "revision") which has a Subversion repository URL of "svn://server/path/$branch@$revision". When the project is being executed, the job's logfile shows the following:

 

19:38:11 Baue in Arbeitsbereich C:\Program Files (x86)\Jenkins\jobs\job\workspace

19:38:12 Location 'svn://server/path/branches/release-7.6.4@​4250' does not exist

19:38:12 Checking out a fresh workspace because there's no workspace at C:\Program Files (x86)\Jenkins\jobs\job\workspace

19:38:12 Cleaning local Directory .

19:38:12 Checking out svn://server/path/branches/release-7.6.4 at revision 4250 --quiet

19:38:12 Using sole credentials buildserver account in realm ' SVN Repository'

19:38:12 ERROR: Failed to check out svn://server/path/branches/release-7.6.4@​4250

19:38:12 org.tmatesoft.svn.core.SVNException: svn: E160013: File not found: revision 4544, path '/branches/release-7.6.4'

19:38:12 ...more stacktrace until...

19:38:12 at

hudson.scm.subversion.CheckoutUpdater$SubversionUpdateTask.perform(CheckoutUpdater.java:139)

Now, the exception is correct; /branches/release-7.6.4 does indeed not exist at revision 4544. However, it does exist at revision 4250 which is the one being requested by the URL!

The source code of SubversionUpdateTask shows, in line 123, shortly before the line mentioned in the stracktrace:

checkout.setSource(SvnTarget.fromURL(location.getSVNURL(), SVNRevision.HEAD));

This seems to completely remove the peg revision from the checkout operation, dooming it to fail if the branch has been removed between the revision that is supposed to be checked out and HEAD.

---
Originally reported by bombe, imported from: Subversion Plugin Cannot Check Out Pegged Revision


  • status: Open
  • priority: Minor
  • component(s): subversion-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251212-090250

Raw content of original issue

I have a Maven project with two parameters ("branch" and "revision") which has a Subversion repository URL of "svn://server/path/$branch@$revision". When the project is being executed, the job's logfile shows the following:
 
19:38:11 Baue in Arbeitsbereich C:\Program Files (x86)\Jenkins\jobs\job\workspace
19:38:12 Location 'svn://server/path/branches/release-7.6.4@4250' does not exist
19:38:12 Checking out a fresh workspace because there's no workspace at C:\Program Files (x86)\Jenkins\jobs\job\workspace
19:38:12 Cleaning local Directory .
19:38:12 Checking out svn://server/path/branches/release-7.6.4 at revision 4250 --quiet
19:38:12 Using sole credentials buildserver account in realm '<svn://server:3690> SVN Repository'
19:38:12 ERROR: Failed to check out svn://server/path/branches/release-7.6.4@4250
19:38:12 org.tmatesoft.svn.core.SVNException: svn: E160013: File not found: revision 4544, path '/branches/release-7.6.4'
19:38:12 ...more stacktrace until...
19:38:12 at
hudson.scm.subversion.CheckoutUpdater$SubversionUpdateTask.perform(CheckoutUpdater.java:139)

Now, the exception is correct; /branches/release-7.6.4 does indeed not exist at revision 4544. However, it does exist at revision 4250 which is the one being requested by the URL!

The source code of SubversionUpdateTask shows, in line 123, shortly before the line mentioned in the stracktrace:

checkout.setSource(SvnTarget.fromURL(location.getSVNURL(), SVNRevision.HEAD));

This seems to completely remove the peg revision from the checkout operation, dooming it to fail if the branch has been removed between the revision that is supposed to be checked out and HEAD.

  • environment: Jenkins 2.348, Subversion Plugin 2.17.2

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.