Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2756

Failure with subversion 1.5+ externals relative directories

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • subversion-plugin
    • None
    • Platform: All, OS: All

      Hudson does not handle subversion new external format introduced with 1.5, and
      in particular relative directories.

      For example, the following repository cannot be checked out properly:
      root
      proj1
      lib/...
      proj2
      X lib

      with svn:externals set in proj2 to:
      $ svn propget svn:externals .
      ../proj1/lib lib

      The fix might be to upgrade svnkit to 1.2.1 (where is the patch used to produce
      svnkit-1.2.0-hudson-3 ?). At least, a workaround here was to replace
      svnkit-1.2.0-hudson-3 with svnkit-1.2.1 and comment the change introduced to fix
      #1539.

      Index: core/src/main/java/hudson/scm/SubversionUpdateEventHandler.java
      ===================================================================
      — core/src/main/java/hudson/scm/SubversionUpdateEventHandler.java (revision 13571)
      +++ core/src/main/java/hudson/scm/SubversionUpdateEventHandler.java (working copy)
      @@ -115,9 +115,9 @@
      }
      } else if (action == SVNEventAction.UPDATE_EXTERNAL) {
      // for externals definitions

      • SVNExternal ext = event.getExternalInfo();
      • if(ext==null) {
      • // prepare for the situation where the user created their own
        svnkit
        +// SVNExternal ext = event.getExternalInfo();
        +// if(ext==null) {
        +// // prepare for the situation where the user created their
        own svnkit
        File jarFile = null;
        try { jarFile = Which.jarFile(SVNEvent.class); @@ -125,14 +125,14 @@ // ignore this failure }

        out.println("AssertionError: appears to be using unpatched
        svnkit at "+ jarFile);

      • } else { - out.println(Messages.SubversionUpdateEventHandler_FetchExternal( - ext.getResolvedURL(), ext.getRevision().getNumber(), event.getFile())); - //#1539 - an external inside an external needs to have the path appended - externals.add(new SubversionSCM.External(modulePath + "/" + path.substring(0 - ,path.length() - ext.getPath().length()) - ,ext)); - }

        +// } else

        { +// out.println(Messages.SubversionUpdateEventHandler_FetchExternal( +// ext.getResolvedURL(), ext.getRevision().getNumber(), event.getFile())); +// //#1539 - an external inside an external needs to have the path appended +// externals.add(new SubversionSCM.External(modulePath + "/" + path.substring(0 +// ,path.length() - ext.getPath().length()) +// ,ext)); +// }

        return;
        } else if (action == SVNEventAction.UPDATE_COMPLETED) {
        /*

            Unassigned Unassigned
            pguyot pguyot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: