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

patch to use cvs update of releases with submodules on different branches

XMLWordPrintable

    • Icon: Patch Patch
    • Resolution: Duplicate
    • Icon: Major Major
    • cvs-plugin
    • None
    • Platform: All, OS: All

      on our environment we are using CVS and ant to build and deploy releases of a
      customer application. The releases are structured in submodules on different
      tags and branches which are referenced by a xml file.

      A release is defined like this
      --> build.xml
      --> units.xml

      the units.xml describes the different modules of the application like the following:
      <units>
      <unit>
      <name>module-a</name>
      <tag>v39-0</tag>
      <repository>XXXX</repository>
      </unit>
      <unit>
      <name>module-a</name>
      <tag>HEAD</tag>
      <repository>XXXX</repository>
      </unit>
      ...
      </units>

      Why we generated this issue?
      when we checkout the release via hudson and runs the ant task to checkout the
      different units on different tags/branches - the build process works fine.
      when the cvs updates process is executed - all submodules are updated to the
      branch of the release - the build of the wholes release fails.

      We patched the following class to get it working on our environment:
      Path: /core/main/java/scm/CVSSCM.java
      Output of svn diff :
      Index: CVSSCM.java
      ===================================================================
      — CVSSCM.java (revision 20403)
      +++ CVSSCM.java (working copy)
      @@ -514,11 +514,12 @@
      if(dryRun)
      cmd.add("-n");
      cmd.add("update","-PdC");

      • if (branch != null) {
        + /*
        + if (branch != null) { cmd.add("-r", branch); }

        configureDate(cmd, date);

      • + */
        if(flatten) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

      This patch provides the functionality to preserve the given tag/branch of the
      underlaying modules in the given environment. For us it works fine.

      Can you check the patch please. It would be very helpfully when the patch can be
      integrated into one of the next releases of hudson.

            mc1arke Michael Clarke
            gunniman gunniman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: