Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-563

scm:status returns erroneous value on Windows XP

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.3
    • None
    • None
    • Patch

    Description

      I have one checkout in my current dir (pom.xml):

      From my CMD shell:
      =========
      C:\CCSTORAGE\SIS_Stream5\CVOB_SIS_ST\COMP_SIS\Import\S3src\Sis3Reporting>dir
      Volume in drive C has no label.
      Volume Serial Number is 9628-F5FE

      Directory of C:\CCSTORAGE\SIS_Stream5\CVOB_SIS_ST\COMP_SIS\Import\S3src\Sis3Reporting

      12.07.2010 09:46 <DIR> .
      12.07.2010 09:46 <DIR> ..
      09.07.2010 15:44 <DIR> Model
      12.07.2010 10:07 4 624 pom.xml
      09.07.2010 15:44 <DIR> Services
      09.07.2010 15:10 <DIR> src
      09.07.2010 15:34 <DIR> target
      1 File(s) 4 624 bytes
      6 Dir(s) 112 731 258 880 bytes free

      =========
      C:\CCSTORAGE\SIS_Stream5\CVOB_SIS_ST\COMP_SIS\Import\S3src\Sis3Reporting>cleartool lscheckout -cview -r -fmt %n\n
      pom.xml

      C:\CCSTORAGE\SIS_Stream5\CVOB_SIS_ST\COMP_SIS\Import\S3src\Sis3Reporting>
      =========

      Running mvn scm:status
      =========
      C:\CCSTORAGE\SIS_Stream5\CVOB_SIS_ST\COMP_SIS\Import\S3src\Sis3Reporting>mvn scm:status
      [INFO] Scanning for projects...
      [INFO] Reactor build order:
      [INFO] Sis3Reporting
      [INFO] Model
      [INFO] Services
      [INFO] Searching repository for plugin with prefix: 'scm'.
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Sis3Reporting
      [INFO] task-segment: [scm:status] (aggregator-style)
      [INFO] ------------------------------------------------------------------------
      [INFO] [scm:status

      {execution: default-cli}

      ]
      [INFO] checked-out status for m.xml
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3 seconds
      [INFO] Finished at: Mon Jul 12 11:44:05 CEST 2010
      [INFO] Final Memory: 7M/16M
      [INFO] ------------------------------------------------------------------------
      C:\CCSTORAGE\SIS_Stream5\CVOB_SIS_ST\COMP_SIS\Import\S3src\Sis3Reporting>
      ========

      The org.apache.maven.scm.provider.clearcase.command.status.ClearCaseStatusConsumer
      line: 64
      checkedOutFiles.add(
      new ScmFile( workingDirectory.getAbsolutePath() + line.substring( 1 ), ScmFileStatus.CHECKED_OUT ) );

      Seems like the line.substring(1) removes the two first characters (po) from pom.xml.
      I am assuming this is looking for a unix style ./ notation in front of the current dir. In windows this is not working.

      I tried:
      checkedOutFiles.add(
      new ScmFile( workingDirectory.getAbsolutePath() + File.separator + line, ScmFileStatus.CHECKED_OUT )

      And edited the test case to omit ./ from the status text content. And it is woring in my environment.

      The above fix will not work outside Windows environments.

      Attachments

        1. status.patch
          0.5 kB
          Espen Tjønneland
        2. ClearCaseStatusConsumer.patch
          1.0 kB
          Espen Tjønneland
        3. ClearCaseStatusConsumer.patch
          3 kB
          Espen Tjønneland

        Activity

          People

            Unassigned Unassigned
            etj@knowit.no Espen Tjønneland
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: