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

Wrong changelist number used in ant builder property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • None
    • Platform: All, OS: All

      I'm trying to simplify moving some projects over from cruisecontrol. We've been
      using the Cruisecontrol P4ChangeListLabelIncrementer to define the 'label' build
      property to be the latest change, and we then use this in branding our jars,
      etc. with a version number.

      I observed a strange behaviour. The Hudson Perforce plugin seems to be using
      the wrong changelist number. Has anyone else observed it?

       <snipped from the hudson job console log>
      Changing P4 Client View to: //depot/sw/project/main/...
      //kelvin-dev2:hudson:main-nightly/...
      [workspace] $ p4 -s client -i
      Last sync'd change: 5953
      [workspace] $ p4 changes -m 25 //depot/sw/project/main/...
      [workspace] $ p4 describe -s 5955
      [workspace] $ p4 describe -s 5954
      Sync'ing workspace to depot.
      [workspace] $ p4 sync //depot/sw/project/main/...#head
      Sync complete, took 275 MS
      [workspace] $
      /localstorage/kedmison/hudson_home/jobs/main-incr/workspace/java/util/apache-ant/bin/ant
      -Dlabel=$P4_CHANGELIST clean fullbuild doc analyze
      Buildfile: build.xml

      And later on in the log file is evidence that label was defined as 5953 (the
      state of the workspace prior to syncing) rather than 5955 (the state of the
      workspace after syncing).

            Unassigned Unassigned
            kedmison kedmison
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: