[
https://issues.apache.org/jira/browse/WAGON-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16368504#comment-16368504
]
ASF GitHub Bot commented on WAGON-497:
--------------------------------------
GitHub user basinilya opened a pull request:
https://github.com/apache/maven-wagon/pull/40
[WAGON-497] fix ScmWagon.put() strips existing parent directories
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/basinilya/maven-wagon WAGON-497
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/maven-wagon/pull/40.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #40
----
commit 158c38356b186d53de0c303c9f28d517c0bba21d
Author: Ilya Basin <basinilya@...>
Date: 2018-02-18T09:31:46Z
fix CvsWagonTest: the test repo has no subfolders
commit 9ccd99fb875503dfa775b161d62dcedf557c7ff7
Author: Ilya Basin <basinilya@...>
Date: 2018-02-18T08:55:32Z
[WAGON-497] fix ScmWagon.put() strips existing parent directories
----
> ScmWagon.put() strips parent dirs from the target path, if they already exist
> in SCM
> ------------------------------------------------------------------------------------
>
> Key: WAGON-497
> URL: https://issues.apache.org/jira/browse/WAGON-497
> Project: Maven Wagon
> Issue Type: Bug
> Components: wagon-scm
> Affects Versions: 3.0.0, 3.0.1
> Reporter: Ilya Basin
> Priority: Major
>
> 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()|https://github.com/apache/maven-wagon/blob/be94400731575f54ff537ec90359460f42a561cc/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java#L741]
> when all test files are checked in correctly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)