[
https://issues.apache.org/jira/browse/SCM-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17961711#comment-17961711
]
ASF GitHub Bot commented on SCM-481:
------------------------------------
jira-importer opened a new issue, #696:
URL: https://github.com/apache/maven-scm/issues/696
**[Ovidiu
Predescu](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ovidiu)**
opened
**[SCM-481](https://issues.apache.org/jira/browse/SCM-481?redirect=false)** and
commented
SCM 1.2 generates a SVN target file (--targets
c:\Users\ovidiu\AppData\Local\Temp\maven-scm-xxxxx-targets) that contains
Windows absolute paths
("c:/work/playground/maven/release-plugin-experiments/pom.xml").
cygwin SVN fails to understand it:
[INFO] Unable to commit files
Provider message:
The svn command failed.
Command output:
svn:
'/cygdrive/c/work/playground/maven/release-plugin-experiments/C:' is
not a working copy
svn: Can't open file
'/cygdrive/c/work/playground/maven/release-plugin-experiments/C:/.svn/entries':
No such file or directory
Configuring Maven to use \<useCygwinPath>true\</useCygwinPath> as advised in
http://maven.apache.org/scm/subversion.html has no effect. Even if
SvnCommandLineUtils.addTarget() did use the flag and did generate a
cygwin-compliant path, SVN would also fail with:
[INFO] Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: '/cygdrive' is not a working copy
svn: Can't open file '/cygdrive/.svn/entries': No such file or directory
Solution 1: modify SvnCommandLineUtils.addTarget()'s signature to receive
the working directory, and method's behavior to extract relative paths and
write relative paths in the --target file.
Patch attached.
If Maven development team intends to apply the patch, I will also write
extra test cases. All current tests pass.
Solution 2: A better solution would be to actually patch
org.apache.maven.scm.ScmFileSet to maintain relative paths, as its contract
advertises. It currently doesn't. If ScmFileSet is fixed to maintain correct
state, then Solution 1 would be rendered obsolete.
I am also willing to implement a fix for Solution 2, if it is validated by
the Maven development team.
---
**Affects:** 1.2
**Attachments:**
-
[SCM-481.diff](https://issues.apache.org/jira/secure/attachment/12718656/SCM-481.diff)
(_4.71 kB_)
**Issue Links:**
- [SCM-213](https://issues.apache.org/jira/browse/SCM-213) Broken with Cygwin
- [SCM-368](https://issues.apache.org/jira/browse/SCM-368) Windows path
length limitations can be overcome by feeding an absolute path to SVN
7 votes, 7 watchers
> cygwin SVN does not understand the target file generated by
> SvnCommandLineUtils.addTarget()
> -------------------------------------------------------------------------------------------
>
> Key: SCM-481
> URL: https://issues.apache.org/jira/browse/SCM-481
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-provider-svn
> Affects Versions: 1.2
> Environment: Windows Vista
> CYGWIN_NT-6.0 novaordis 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
> svn, version 1.5.4 (r33841)
> Reporter: Ovidiu Predescu
> Priority: Major
> Attachments: SCM-481.diff
>
>
> SCM 1.2 generates a SVN target file (--targets
> c:\Users\ovidiu\AppData\Local\Temp\maven-scm-xxxxx-targets) that contains
> Windows absolute paths
> ("c:/work/playground/maven/release-plugin-experiments/pom.xml").
> cygwin SVN fails to understand it:
> [INFO] Unable to commit files
> Provider message:
> The svn command failed.
> Command output:
> svn:
> '/cygdrive/c/work/playground/maven/release-plugin-experiments/C:' is
> not a working copy
> svn: Can't open file
>
> '/cygdrive/c/work/playground/maven/release-plugin-experiments/C:/.svn/entries':
> No such file or directory
> Configuring Maven to use <useCygwinPath>true</useCygwinPath> as advised in
> http://maven.apache.org/scm/subversion.html has no effect. Even if
> SvnCommandLineUtils.addTarget() did use the flag and did generate a
> cygwin-compliant path, SVN would also fail with:
> [INFO] Unable to commit files
> Provider message:
> The svn command failed.
> Command output:
> svn: '/cygdrive' is not a working copy
> svn: Can't open file '/cygdrive/.svn/entries': No such file or directory
> Solution 1: modify SvnCommandLineUtils.addTarget()'s signature to receive the
> working directory, and method's behavior to extract relative paths and write
> relative paths in the --target file.
> Patch attached.
> If Maven development team intends to apply the patch, I will also write extra
> test cases. All current tests pass.
> Solution 2: A better solution would be to actually patch
> org.apache.maven.scm.ScmFileSet to maintain relative paths, as its contract
> advertises. It currently doesn't. If ScmFileSet is fixed to maintain correct
> state, then Solution 1 would be rendered obsolete.
> I am also willing to implement a fix for Solution 2, if it is validated by
> the Maven development team.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)