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

Unrecognized option "-overwrite" with 2002 version of ClearCase

    XMLWordPrintable

Details

    Description

      We are still using the first version of ClearCase. Since the version 1.3.15 (July 7th 2013) of the Jenkins ClearCase plugin, it looks like 2002 versions are not handled anymore.

      [JOB] $ cleartool -version
      Rational ClearCase LT Client 2002.05.00 (Mon Oct 29 13:49:09 2001)
      IBM(R) ClearCase LT Integration (R) Version 1.0 (5/30/00 Driver)
      Licensed Material - Property of IBM
      (C)Copyright IBM Corp. 2000 and others. All rights reserved.

      cleartool 2002.05.00 (Fri Oct 26 20:24:09 2001)
      Running cleartool setcs, this operation may take a while
      [view] $ cleartool setcs -current -overwrite
      cleartool: Error: Unrecognized option "-overwrite"
      Usage: setcs [-tag view-tag] {-current | -default | -stream | pname}
      FATAL: Base ClearCase failed. exit code=1
      FATAL: java.io.IOException: cleartool did not return the expected exit code. Command line="setcs -current -overwrite", actual exit code=1
      ERROR: null

      I was able to fix the problem by adding the 2002 cases to the lines 64 and 67 of the CleartoolVersion.java file.

      CleartoolVersion.java
      // Handle Clearcase 2002 and 2003 versions
      if (op1 == 2002 || op1 == 2003) {
          return -1;
      }
      if (op2 == 2002 || op2 == 2003) {
          return 1;
      }
      

      Can you confirm this is a bug?

      I made the correction on Github. I hope you will confirm it.

      Attachments

        Activity

          Code changed in jenkins
          User: Stéphane Bruckert
          Path:
          src/main/java/hudson/plugins/clearcase/CleartoolVersion.java
          http://jenkins-ci.org/commit/clearcase-plugin/dc1a81f5d3bf2f6da24ef6aaf419c569cfa0ac23
          Log:
          JENKINS-18819 Unrecognized option "-overwrite" with 2002 version of ClearCase

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stéphane Bruckert Path: src/main/java/hudson/plugins/clearcase/CleartoolVersion.java http://jenkins-ci.org/commit/clearcase-plugin/dc1a81f5d3bf2f6da24ef6aaf419c569cfa0ac23 Log: JENKINS-18819 Unrecognized option "-overwrite" with 2002 version of ClearCase

          I didn't know there was still a 2002 version around. I polished a bit your PR and released it in 1.3.19.

          You can get it earlier from
          http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/clearcase/1.3.19/clearcase-1.3.19.hpi

          (availability in update center always take 24-48 hours)

          vlatombe Vincent Latombe added a comment - I didn't know there was still a 2002 version around. I polished a bit your PR and released it in 1.3.19. You can get it earlier from http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/clearcase/1.3.19/clearcase-1.3.19.hpi (availability in update center always take 24-48 hours)

          Great! Thanks for the reactivity!

          stephanebruckert Stéphane Bruckert added a comment - Great! Thanks for the reactivity!

          People

            vlatombe Vincent Latombe
            stephanebruckert Stéphane Bruckert
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: