« Return to Thread: SCM SVN Provider fails on Windows with cygwin/svn because of "C:/" prefix

Re: SCM SVN Provider fails on Windows with cygwin/svn because of "C:/" prefix

by Ovidiu Feodorov-3 :: Rate this Message:

Reply to Author | View in Thread

Jörg Schaible wrote:
> Hi,
>  
Hi, thanks for answering.

> Ovidiu Feodorov wrote at Dienstag, 30. Juni 2009 04:55:
>
> [snip]
>  
>> It seems quite obvious that this could be handled by cygwin svn
>>    
>
> No. Cygwin provides a POSIX layer for the file operations to allow unix
> utilities to compile and work in the Cygwin environment. Although some
> basic commands in Cygwin understand DOSish syntax, its up to the individual
> maintainer to patch that into the code and maintain this patch. Obviously
> this is no fun and normally not done.
>  

One more reason to handle this at the Maven level, especially given the
fact that someone else bumped into similar problems and introduced
support for <useCygwinPath>.

> [...]
> IMHO the flag useCygwinPath should be enough. The implementation can
> determin the paths itself by executing "cygpath -u path" for each. The
> cygwinMountPath option is not a good choice, since it depends on the
> developer's environment and might not work at all if the path is on the
> network.
>  

Yes, that's what I thought too, but

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <configuration>
                        <svn-settings>
                            <useCygwinPath>true</useCygwinPath>
                        </svn-settings>
                    </configuration>
                </plugin>

had no effect whatsoever when I first tried it, and then after looking
at
https://svn.apache.org/repos/asf/maven/scm/tags/maven-scm-1.2/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java,
I found out why, SvnCommandLineUtils, the code that generates the
content of the --targets file, doesn't even look at anything remotely
related to SCM configuration.

It is just:

        for ( Iterator i = files.iterator(); i.hasNext(); )
        {
            File f = (File) i.next();
            sb.append( f.getPath().replace( '\\', '/' ) );
            sb.append( ls );
        }

which dumps OS-dependent path representation into the text file (yes,
changing backslashes into forward slashes, but this doesn't help with "C:".

This is where I would to try to patch.

If I have time tomorrow, I'll actually write the patch and see if it works.



 « Return to Thread: SCM SVN Provider fails on Windows with cygwin/svn because of "C:/" prefix