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

SVN:Externals not on root path download but aren't tracked (exceptions during update too)

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

      When a subversion job is created that contains externals other than on the root
      path, they are checked out properly, but, the revisions for those externals are
      not, and exceptions are thrown out in the console during update.

      An example, project A
      /A/trunk/import/thirdparty has svn:externals set to bring down junit as
      http://svn/....../junit/jar/

      when the SubversionUpdateEventHandler captures this as an
      SVNEventAction.UPDATE_EXTERNAL action, it uses the ModulePath to prepend the
      path of the external... which would be trunk/junit as opposed to using the path
      of the item that has the external, which would be trunk/import/thirdparty/junit.

      this is visible in the svnexternals.txt file as well as the stack trace output
      during buildtime console output.

      "ERROR: Failed to parse svn info for external http://svn/basic/lib/junit at
      trunk/import/junit
      org.tmatesoft.svn.core.SVNException: svn:
      'C:\Users\seymore\.hudson\jobs\services.core\workspace\trunk\import' is not a
      working copy
      svn: Cannot read from to
      'C:\Users\seymore\.hudson\jobs\services.core\workspace\trunk\import\.svn\format':
      path refers to directory or read access is denied
      at
      org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:55)
      at
      org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:40)
      at
      org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.open(SVNAdminAreaFactory.java:132)
      at
      org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.doOpen(SVNWCAccess.java:344)
      at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:261)
      at
      org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.probeOpen(SVNWCAccess.java:279)
      at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:1915)
      at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:1852)
      at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2206)
      at hudson.scm.SubversionSCM$BuildRevisionMapTask.invoke(SubversionSCM.java:630)
      at hudson.scm.SubversionSCM$BuildRevisionMapTask.invoke(SubversionSCM.java:600)
      at hudson.FilePath.act(FilePath.java:312)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:307)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:566)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:244)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:218)
      at hudson.model.Run.run(Run.java:749)
      at hudson.model.Build.run(Build.java:102)
      at hudson.model.ResourceController.execute(ResourceController.java:70)
      at hudson.model.Executor.run(Executor.java:71)"

      the paths are a little different in the stack trace, but its the same problem.
      In the stack trace trunk/import/junit is actually stored under
      trunk/server/lib/import/junit .. the directory import has the external set to
      make junit a child. svnexternals.txt has it stored as trunk/import/junit

          [JENKINS-1539] SVN:Externals not on root path download but aren't tracked (exceptions during update too)

          I thought that in your situation modulePath=trunk and
          ext.getPath()==import/thirdparty.

          It seems like you have run Hudson under the debugger. Would you be interested in
          writing a patch for this?

          Kohsuke Kawaguchi added a comment - I thought that in your situation modulePath=trunk and ext.getPath()==import/thirdparty. It seems like you have run Hudson under the debugger. Would you be interested in writing a patch for this?

          davidseymore added a comment -

          Yeah, let me cook up a solution and get one tested out.

          davidseymore added a comment - Yeah, let me cook up a solution and get one tested out.

          davidseymore added a comment -

          Created an attachment (id=218)
          Here is the fix.. sorta hacky... but, fixes me right up (svn diff format)

          davidseymore added a comment - Created an attachment (id=218) Here is the fix.. sorta hacky... but, fixes me right up (svn diff format)

          davidseymore added a comment -

          Looking at it more.. the issue appears to be because of an external inside of an
          external.... the path of the ext is the path relative to the external's.. which
          we have to append on the path of the first external to.

          yeah.. wonky evil svn:externals are wonky and evil.

          davidseymore added a comment - Looking at it more.. the issue appears to be because of an external inside of an external.... the path of the ext is the path relative to the external's.. which we have to append on the path of the first external to. yeah.. wonky evil svn:externals are wonky and evil.

          davidseymore added a comment -

          changing from defect to patch.

          davidseymore added a comment - changing from defect to patch.

          davidseymore added a comment -

          Do I need to do anything else to get the patch reviewed/accepted/commited for a
          future release?

          davidseymore added a comment - Do I need to do anything else to get the patch reviewed/accepted/commited for a future release?

          davidseymore added a comment -

          Kohsuke.. assigning this over to you.. I'm not sure what else to do..

          davidseymore added a comment - Kohsuke.. assigning this over to you.. I'm not sure what else to do..

          davidseymore added a comment -

          Just checked in the fix.

          davidseymore added a comment - Just checked in the fix.

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=9428
          Log:
          recorded JENKINS-1539.
          Also see rev.9411 in SVN.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=9428 Log: recorded JENKINS-1539 . Also see rev.9411 in SVN.

            kohsuke Kohsuke Kawaguchi
            davidseymore davidseymore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: