Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16314

cvs plugin removes sticky branch tag

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have a problem when I use maven to generate a release from a cvs branch on jenkins.

      Here is the my environment :

      OS windows 2003 server
      jenkins 1.482
      jenkins cvs plugin 2.5
      maven 3
      maven-release-plugin 2.1
      cvs.exe native windows client 1.11.22 from http://cvs.nongnu.org (quite old, I know)

      The project is a maven project, in jenkins I configured it to use a cvs branch as the code source location. The project can be compiled without any issue on jenkins, but when I try to perform a maven release, the compilation crashes. More exactly, it stops when it tries to commit the modified pom.xml to cvs server.

      Here is the error message :

      [INFO] [INFO] BUILD SUCCESS
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Total time: 1:40.298s
      [INFO] [INFO] Finished at: Thu Jan 10 15:58:36 CET 2013
      [INFO] [INFO] Final Memory: 38M/247M
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] Checking in modified POMs...
      [INFO] Executing: cmd.exe /X /C "cvs -z3 -f -q commit -R -F C:\DOCUME~1\lsa_web\LOCALS~1\Temp\scm-commit-message2086459184030940886.txt pom.xml"
      
      [INFO] Working directory: D:\xxxxx
      mojoFailed org.apache.maven.plugins:maven-release-plugin:2.1(default-cli)
      projectFailed xxx:xxx:1.0.4-SNAPSHOT
      sessionEnded
      ...
      message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project xxx: Unable to commit files
      
      Provider message:
      The cvs command failed.
      Command output:
      cvs commit: Up-to-date check failed for `pom.xml'
      cvs [commit aborted]: correct above errors first!
      
      cause : Unable to commit files
      Provider message:
      The cvs command failed.
      Command output:
      cvs commit: Up-to-date check failed for `pom.xml'
      cvs [commit aborted]: correct above errors first!
      

      Then I looked into the code of the cvs plugin and found that it strips out the sticky date tags after cvs check out.
      https://github.com/jenkinsci/cvs-plugin/blob/master/src/main/java/hudson/scm/AbstractCvs.java#L694

      Without the sticky tag (branch), the cvs.exe launched by maven during release tries to commit the modified pom.xml to HEAD which can obviously not work.

      C:\TEMP\workspace>cvs.exe status pom.xml
      ===================================================================
      File: pom.xml           Status: Needs Merge
         Working revision:    1.18.4.12
         Repository revision: 1.35    /APPLICATIONS/CVS01D/xxxx/cvsrepository/xxx/pom.xml,v
         Commit Identifier:   JtFwavfT373XqEzw
         Sticky Tag:          (none)
         Sticky Date:         (none)
         Sticky Options:      (none)
      

      Should the plugin removes the sticky branch tag when the code is checked out from a branch ?

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Michael Clarke
          Path:
          src/main/java/hudson/scm/AbstractCvs.java
          http://jenkins-ci.org/commit/cvs-plugin/d781d2879043784309856eaf169b67d6c517599c
          Log:
          [FIXED JENKINS-16314] Retain tag information on post-checkout cleanup


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Clarke Path: src/main/java/hudson/scm/AbstractCvs.java http://jenkins-ci.org/commit/cvs-plugin/d781d2879043784309856eaf169b67d6c517599c Log: [FIXED JENKINS-16314] Retain tag information on post-checkout cleanup – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
          Hide
          jamesmorgan James Morgan added a comment -

          Thanks for looking into this

          Show
          jamesmorgan James Morgan added a comment - Thanks for looking into this
          Hide
          aandrulis Adriano Andrulis added a comment -

          Hi Michael, do you know when the next version will be release?
          Thanks in advance.

          Show
          aandrulis Adriano Andrulis added a comment - Hi Michael, do you know when the next version will be release? Thanks in advance.
          Hide
          rvsoni Ravi Soni added a comment -

          Hi, In which build we will get this Fix. we are using 1.509.1 LTS this does not have this fix available. we urgently need this fix.

          Thanks,

          Show
          rvsoni Ravi Soni added a comment - Hi, In which build we will get this Fix. we are using 1.509.1 LTS this does not have this fix available. we urgently need this fix. Thanks,
          Hide
          mc1arke Michael Clarke added a comment -

          This fix has been released in version 2.9 of the CVS plugin. Releases of the CVS plugin are independent of releases of the Jenkins core: you need to go into your Jenkins update centre and check for plugin updates.

          Show
          mc1arke Michael Clarke added a comment - This fix has been released in version 2.9 of the CVS plugin. Releases of the CVS plugin are independent of releases of the Jenkins core: you need to go into your Jenkins update centre and check for plugin updates.

            People

            • Assignee:
              mc1arke Michael Clarke
              Reporter:
              xdu xdu xdu
            • Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: