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

Unrecognized option "-overwrite" with 2002 version of ClearCase

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved: