Maven SCM
  1. Maven SCM
  2. SCM-481

cygwin SVN does not understand the target file generated by SvnCommandLineUtils.addTarget()

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Component/s: maven-scm-provider-svn
    • Labels:
      None
    • 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)



    • Complexity:
      Intermediate
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      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.

        Issue Links

          Activity

          Hide
          Ovidiu Feodorov added a comment -

          Attached patch (relative to 1.2).

          Show
          Ovidiu Feodorov added a comment - Attached patch (relative to 1.2).
          Show
          Ovidiu Feodorov added a comment - More discussions on this subject here: http://mail-archives.apache.org/mod_mbox/maven-scm-users/200906.mbox/%3C4A493627.7010201@novaordis.com%3E
          Hide
          Ovidiu Feodorov added a comment -

          Based on SCM-368, it seems that using absolute paths has a reason. I would suggest to make this configurable. For more details on this discussion, see here: http://mail-archives.apache.org/mod_mbox/maven-users/200907.mbox/%3C4A4CFD2B.6060301@novaordis.com%3E

          Show
          Ovidiu Feodorov added a comment - Based on SCM-368 , it seems that using absolute paths has a reason. I would suggest to make this configurable. For more details on this discussion, see here: http://mail-archives.apache.org/mod_mbox/maven-users/200907.mbox/%3C4A4CFD2B.6060301@novaordis.com%3E
          Hide
          Michael Osipov added a comment -

          Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          Show
          Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.
          Hide
          Karsten Tinnefeld added a comment -

          Work-around: use the Windows binaries distributed with TortoiseSVN (at http://tortoisesvn.net) - install with command line utilities and add them to PATH.

          Note: at the time of the creation of the ticket, the above binaries were not available for the then latest major revision of subversion, making the search for alternative binaries a top priority.

          Show
          Karsten Tinnefeld added a comment - Work-around: use the Windows binaries distributed with TortoiseSVN (at http://tortoisesvn.net ) - install with command line utilities and add them to PATH. Note: at the time of the creation of the ticket, the above binaries were not available for the then latest major revision of subversion, making the search for alternative binaries a top priority.
          Hide
          Michael Osipov added a comment -

          Is this issue still valid? Does someone want it to be reopened?

          Show
          Michael Osipov added a comment - Is this issue still valid? Does someone want it to be reopened?
          Hide
          Karsten Tinnefeld added a comment -

          The issue was valid last time I checked (maybe in 2012?) and nothing has changed in the mean time. So guess yes.
          Anyway, as the tortoisesvn project produces valid and current binaries since then, I do not bother it not being reopened, maybe work-around could be documented with the module documentation:

          "On Windows platform, TortoiseSVN binaries of Subversion must be used and be available on PATH, as RedHat Cygwin binaries produce invalid results due to path processing issues (wontfix)."

          Show
          Karsten Tinnefeld added a comment - The issue was valid last time I checked (maybe in 2012?) and nothing has changed in the mean time. So guess yes. Anyway, as the tortoisesvn project produces valid and current binaries since then, I do not bother it not being reopened, maybe work-around could be documented with the module documentation: "On Windows platform, TortoiseSVN binaries of Subversion must be used and be available on PATH, as RedHat Cygwin binaries produce invalid results due to path processing issues (wontfix)."
          Hide
          Michael Osipov added a comment -

          Karsten, please provide a patch for the documentation with a followup issue.

          Show
          Michael Osipov added a comment - Karsten, please provide a patch for the documentation with a followup issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Ovidiu Feodorov
            • Votes:
              7 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: