jenkinsci / jenkinsci/subversion-plugin

[JENKINS-32892] SVN_REVISION(_1) gets set to an unexpected value, seems to be "Last Changed Rev" from previous build.

Open
#1,350 0 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

SVN_REVISION(_1) gets set to an unexpected value, seems to be "last modified" from previous build.

For a regular job (here maven, but seems to happen also on freestyle) using subversion plugin for checkout, we get the following behaviour:

Job overview states

Revision: 55304

Checking out http://svn-[.....]/trunk at revision '2016-02-11T13:04:54.819 +0100'

At revision 55305

variables set in this build by subversion plugin:

SVN_REVISION_1=55291

SVN_REVISION=55291

svn info from prebuild-step shell command states:

Revision: 55305

Last Changed Rev: 55304

When running another build of this job:

Job overview states

Revision: 55304

Checking out http://svn-[...]/trunk at revision '2016-02-11T13:10:41.523 +0100'

At revision 55315

variables set in this build by subversion plugin:

SVN_REVISION_1=55304

SVN_REVISION=55304

svn info from prebuild-step shell command states:

Revision: 55315

Last changed Rev: 55304

We expected SVN_REVISION(_1) to be set to the value of svn info "Last Changed Rev" of the current build, but it seems like it gets set to the value of svn info "Last Changed Rev" which was seen in the previous build.

When we start a checkout, abort the job immediately after checkout, and start again, we get the SVN_REVISION(_1) set as expected, but only if nobody has checked in new changes before starting a new build.

This behaviour is reproducible for us for all jobs using subversion plugin for checkout.

---
Originally reported by tcb_xy, imported from: SVN_REVISION(_1) gets set to an unexpected value, seems to be "Last Changed Rev" from previous build.


  • status: Open
  • priority: Major
  • component(s): subversion-plugin
  • label(s): subversion, variable, variables
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251212-090250

Raw content of original issue

SVN_REVISION(_1) gets set to an unexpected value, seems to be "last modified" from previous build.

For a regular job (here maven, but seems to happen also on freestyle) using subversion plugin for checkout, we get the following behaviour:

Job overview states
Revision: 55304

Checking out http://svn-[.....]/trunk at revision '2016-02-11T13:04:54.819 +0100'
At revision 55305

variables set in this build by subversion plugin:
SVN_REVISION_1=55291
SVN_REVISION=55291

svn info from prebuild-step shell command states:
Revision: 55305
Last Changed Rev: 55304

When running another build of this job:

Job overview states
Revision: 55304

Checking out http://svn-[...]/trunk at revision '2016-02-11T13:10:41.523 +0100'
At revision 55315

variables set in this build by subversion plugin:
SVN_REVISION_1=55304
SVN_REVISION=55304

svn info from prebuild-step shell command states:
Revision: 55315
Last changed Rev: 55304

We expected SVN_REVISION(_1) to be set to the value of svn info "Last Changed Rev" of the current build, but it seems like it gets set to the value of svn info "Last Changed Rev" which was seen in the previous build.

When we start a checkout, abort the job immediately after checkout, and start again, we get the SVN_REVISION(_1) set as expected, but only if nobody has checked in new changes before starting a new build.

This behaviour is reproducible for us for all jobs using subversion plugin for checkout.

environment

```
AMD64

Debian GNU/Linux 8

Jenkins LTS 1.609.3

Tomcat 7.0.54

Oracle JDK 8

Subversion Plugin 1.5.7

LANG=de_DE.UTF-8

```

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.