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

Failed to tag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      Platform: PC, OS: Solaris
    • Similar Issues:

      Description

      I wanted to tag build and received error:
      Failed to tag
      org.tmatesoft.svn.core.SVNException: svn: File not found: revision 69572,
      path 'XXX'
      at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error
      (SVNErrorManager.java:63)
      at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error
      (SVNErrorManager.java:50)
      at org.tmatesoft.svn.core.internal.io.svn.SVNReader.handleFailureStatus
      (SVNReader.java:261)
      at org.tmatesoft.svn.core.internal.io.svn.SVNReader.parse
      (SVNReader.java:240)
      at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.read
      (SVNConnection.java:270)
      at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.read
      (SVNRepositoryImpl.java:1267)
      at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getLocationsImpl
      (SVNRepositoryImpl.java:287)
      at org.tmatesoft.svn.core.io.SVNRepository.getLocations
      (SVNRepository.java:892)
      at org.tmatesoft.svn.core.io.SVNRepository.getLocations
      (SVNRepository.java:1245)
      at org.tmatesoft.svn.core.wc.SVNBasicClient.getLocations
      (SVNBasicClient.java:829)
      at org.tmatesoft.svn.core.wc.SVNCopyClient.copyReposToRepos
      (SVNCopyClient.java:902)
      at org.tmatesoft.svn.core.wc.SVNCopyClient.setupCopy(SVNCopyClient.java:520)
      at org.tmatesoft.svn.core.wc.SVNCopyClient.doCopy(SVNCopyClient.java:261)
      at hudson.scm.SubversionTagAction$TagWorkerThread.perform
      (SubversionTagAction.java:169)
      at hudson.model.TaskThread.run(TaskThread.java:77)
      Completed

      My guess is that hudson has problem with spaces because path on the svn server
      (which I replaced here with XXX) contained space and hudson replaced it with %
      20.

        Attachments

        1. PATCH.txt
          1.0 kB
          vojtechhabarta

          Activity

          Hide
          k2nakamura k2nakamura added a comment -

          It looks like the stack trace is thrown when you click "Build Tag", which is not
          a part of svn-tag, but Hudson subversion core support. I reassigned to
          "subversion" sub component.

          Show
          k2nakamura k2nakamura added a comment - It looks like the stack trace is thrown when you click "Build Tag", which is not a part of svn-tag, but Hudson subversion core support. I reassigned to "subversion" sub component.
          Hide
          k2nakamura k2nakamura added a comment -

          Kohsuke,
          Can you take a look at this issue, or re-assign to an appropriate person?

          Thanks,

          kenji

          Show
          k2nakamura k2nakamura added a comment - Kohsuke, Can you take a look at this issue, or re-assign to an appropriate person? Thanks, kenji
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Can you check your hypothesis by trying to tag a directory that doesn't contain
          space?

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Can you check your hypothesis by trying to tag a directory that doesn't contain space?
          Hide
          vojtechhabarta vojtechhabarta added a comment -

          I tried to tag a directory that doesn't contain space and it worked without any
          problem.

          Also some older hudson (older than 1.238) did not have problems with tagging
          this directory.

          Show
          vojtechhabarta vojtechhabarta added a comment - I tried to tag a directory that doesn't contain space and it worked without any problem. Also some older hudson (older than 1.238) did not have problems with tagging this directory.
          Hide
          vojtechhabarta vojtechhabarta added a comment -

          Workaroud is to create tag manually (I use TortoiseSVN 1.5.2 on Windows) and
          manually add tag to hudson's build.xml. (which is not so convenient )

          I also tried to create tag on hudson machine (Solaris) using this command:
          svn copy "SOME PATH" --revision XXX another_path -m message
          and it worked well.
          (svn, version 1.5.0 (r31699))

          Show
          vojtechhabarta vojtechhabarta added a comment - Workaroud is to create tag manually (I use TortoiseSVN 1.5.2 on Windows) and manually add tag to hudson's build.xml. (which is not so convenient ) I also tried to create tag on hudson machine (Solaris) using this command: svn copy "SOME PATH" --revision XXX another_path -m message and it worked well. (svn, version 1.5.0 (r31699))
          Hide
          vojtechhabarta vojtechhabarta added a comment -

          I created simple standalone test application which calls SVNKit directly
          (without Hudson involved) and the result was the same as in Hudson. So I
          reported this bug to SVNKit team and they adviced me to set "pegRevision" to
          the same value as "revision" when creating SVNCopySource.

          I tried it and it works.

          When "pegRevision" is UNDEFINED (like in class hudson.scm.SubversionTagAction)
          and "revision" is set for example to 1000 SVNKit tries to figure out what was
          the name of source URL at revision 1000 assuming source URL exists in HEAD
          (latest) revision and it can happen that this URL doesn't exist in HEAD
          revision for example when it was renamed or deleted later.

          So when tagging builds made in the past pegRevision should be set to the
          particular revision in the past. At least this is my understanding now.

          Could you please replace UNDEFINED revision on line 168 in
          hudson.scm.SubversionTagAction with SVNRevision.create(e.getKey().revision)? Or
          should I request access to hudson source repository and fix it?

          Thanks
          Vojta

          Show
          vojtechhabarta vojtechhabarta added a comment - I created simple standalone test application which calls SVNKit directly (without Hudson involved) and the result was the same as in Hudson. So I reported this bug to SVNKit team and they adviced me to set "pegRevision" to the same value as "revision" when creating SVNCopySource. I tried it and it works. When "pegRevision" is UNDEFINED (like in class hudson.scm.SubversionTagAction) and "revision" is set for example to 1000 SVNKit tries to figure out what was the name of source URL at revision 1000 assuming source URL exists in HEAD (latest) revision and it can happen that this URL doesn't exist in HEAD revision for example when it was renamed or deleted later. So when tagging builds made in the past pegRevision should be set to the particular revision in the past. At least this is my understanding now. Could you please replace UNDEFINED revision on line 168 in hudson.scm.SubversionTagAction with SVNRevision.create(e.getKey().revision)? Or should I request access to hudson source repository and fix it? Thanks Vojta
          Hide
          vojtechhabarta vojtechhabarta added a comment -

          fixed in hudson.scm.SubversionTagAction class

          Show
          vojtechhabarta vojtechhabarta added a comment - fixed in hudson.scm.SubversionTagAction class
          Hide
          vojtechhabarta vojtechhabarta added a comment -

          Created an attachment (id=569)
          Patch fixing this issue

          Show
          vojtechhabarta vojtechhabarta added a comment - Created an attachment (id=569) Patch fixing this issue

            People

            Assignee:
            kohsuke Kohsuke Kawaguchi
            Reporter:
            vojtechhabarta vojtechhabarta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: