Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-497

ScmWagon#put() strips parent dirs from the target path if they already exist in SCM

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 3.1.0
    • Fix Version/s: 3.1.0
    • Component/s: wagon-scm
    • Labels:
      None

      Description

      Here're the symptoms of the bug:
      ScmCvsExeWagonTest.testWagonGetFileList() wants to checkin multiple files into "/file-list/".
      When the test repo is fresh, only the first file is checked in correctly. All other files are checked into the repo root.

      Reason (and why it works fine with SVN):

      In ScmWagon.checkOut() targetName is split to existing parth an non-existing part.

      in case of svn:

      • checks out repoUrl + existingPart
      • mkdirs missingPart
      • return missingPart

      the caller copies the new file into coDir/ + missingPart/

      on second put() all dirs exist

      • checks out repoUrl + allPart
      • return empty string

      the caller copies the new file into coDir/
      in case of cvs (on second put()):

      • checks out repoUrl WITHOUT allPart
      • returns empty string
        the caller copies the new file into coDir/

      My current goal is to re-enable ScmCvsExeWagonTest. There are numerous bugs in wagon-scm and fixing just one is not enough to run even a single test case.

      However, the proposed pull request will let you reach the point in WagonTestCase#testWagonGetFileList() when all test files are checked in correctly.

      UPD: The test case "testWagon" which could reveal that is disabled by mistake: it runs only if supportsGetIfNewer(), but we don't call getIfNewer() there.

      UPD2: the cvs rls command is not widely supported, but ScmWagon cannot checkout when list() unsupported: it throws "Failed to create directory ", although the directory already exists.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                basinilya Ilya Basin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: