When updating the 'stable' builds of our projects, I update the repository URL
      from svn://aaa/project/branches/182 to svn://aaa/project/branches/183 ( for
      instance ).

      This results in a clean checkout ( Checking out a fresh workspace because the
      workspace is not svn://aaa/project/branches/183 ), which takes somewhere around
      30 minutes, when a svn switch would've taken a few seconds.

      What I suggest is a (perhaps per job configurable) setting which would use svn
      switch if all but the last

      {x}

      path elements are the same.

      For instance, a setting of 1 would allow switch to be used for

      svn://aaa/project/branches/183 -> svn://aaa/project/branches/184

      but not for

      svn://aaa/project/branches/183 -> svn://aaa/project/trunk

      A setting of 2 would allow switch to be used for both.

      A setting of 0 would disallow the usage of svn switch.

        1. subversion.diff
          12 kB
        2. subversion2.diff
          10 kB
        3. subversion3.diff
          11 kB

          [JENKINS-2556] Use svn switch where applicable

          kutzi added a comment -

          Could someone (preferably the one submitting the patch) check if the patch can still be applied without conflicts and convert it to a Github pull request?
          Then I'll have a look at it - when time allows.

          kutzi added a comment - Could someone (preferably the one submitting the patch) check if the patch can still be applied without conflicts and convert it to a Github pull request? Then I'll have a look at it - when time allows.

          Peter Ross added a comment -

          See pull request https://github.com/jenkinsci/subversion-plugin/pull/34

          My code looks for changes like branches/a to branches/b, or branches/a to trunk, or trunk to branches/a.

          Peter Ross added a comment - See pull request https://github.com/jenkinsci/subversion-plugin/pull/34 My code looks for changes like branches/a to branches/b, or branches/a to trunk, or trunk to branches/a.

          Peter Ross added a comment -

          After review from kutzi see pull request https://github.com/jenkinsci/subversion-plugin/pull/35

          Peter Ross added a comment - After review from kutzi see pull request https://github.com/jenkinsci/subversion-plugin/pull/35

          Code changed in jenkins
          User: peter
          Path:
          src/main/java/hudson/scm/subversion/UpdateUpdater.java
          http://jenkins-ci.org/commit/subversion-plugin/520b99380895e1768f7a8b2270b3e3fea41e64a5
          Log:
          JENKINS-2556 Detect when a "svn switch" can be used rather than a "svn checkout" in the UpdateUpdater.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: peter Path: src/main/java/hudson/scm/subversion/UpdateUpdater.java http://jenkins-ci.org/commit/subversion-plugin/520b99380895e1768f7a8b2270b3e3fea41e64a5 Log: JENKINS-2556 Detect when a "svn switch" can be used rather than a "svn checkout" in the UpdateUpdater.

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/scm/subversion/UpdateUpdater.java
          http://jenkins-ci.org/commit/subversion-plugin/6f3538ce695914395c3080741e117da0ff444ef3
          Log:
          Merge pull request #35 from petdr/jenkins_2556

          [FIXED JENKINS-2556] Use "svn switch" rather than a "svn checkout" if applicable

          Compare: https://github.com/jenkinsci/subversion-plugin/compare/d0cb4fa7bc48...6f3538ce6959


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/scm/subversion/UpdateUpdater.java http://jenkins-ci.org/commit/subversion-plugin/6f3538ce695914395c3080741e117da0ff444ef3 Log: Merge pull request #35 from petdr/jenkins_2556 [FIXED JENKINS-2556] Use "svn switch" rather than a "svn checkout" if applicable Compare: https://github.com/jenkinsci/subversion-plugin/compare/d0cb4fa7bc48...6f3538ce6959 – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .

          Jesse Glick added a comment -

          For the record: a user of the 1.45 plugin who was encountering unexplained errors such as

          Building remotely on … in workspace …\workspace\…job…
          Checking out a fresh workspace because there's no workspace at …\workspace\…job…\SRC
          Cleaning local Directory SRC
          hudson.util.IOException2: remote file operation failed: …\workspace\…job… at hudson.remoting.Channel@…:…
              at hudson.FilePath.act(FilePath.java:861)
              at hudson.FilePath.act(FilePath.java:838)
              at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:843)
              at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:781)
              at hudson.model.AbstractProject.checkout(AbstractProject.java:1331)
              at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:682)
              at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:587)
              at hudson.model.Run.execute(Run.java:1557)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:236)
          Caused by: java.io.IOException: Unable to delete …\workspace\…job…\SRC\…file…
              at hudson.Util.deleteFile(Util.java:243)
              at hudson.Util.deleteRecursive(Util.java:293)
              at hudson.Util.deleteContentsRecursive(Util.java:204)
              at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:75)
              at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:153)
              at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:161)
              at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:121)
              at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:153)
              at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:903)
              at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:884)
              at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:867)
              at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
              at hudson.remoting.UserRequest.perform(UserRequest.java:118)
              at hudson.remoting.UserRequest.perform(UserRequest.java:48)
              at hudson.remoting.Request$2.run(Request.java:326)
              at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
              at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
              at java.util.concurrent.FutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
          

          reports that these issues disappear when using a build of the plugin incorporating this (JENKINS-2556) fix.

          Jesse Glick added a comment - For the record: a user of the 1.45 plugin who was encountering unexplained errors such as Building remotely on … in workspace …\workspace\…job… Checking out a fresh workspace because there's no workspace at …\workspace\…job…\SRC Cleaning local Directory SRC hudson.util.IOException2: remote file operation failed: …\workspace\…job… at hudson.remoting.Channel@…:… at hudson.FilePath.act(FilePath.java:861) at hudson.FilePath.act(FilePath.java:838) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:843) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:781) at hudson.model.AbstractProject.checkout(AbstractProject.java:1331) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:682) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:587) at hudson.model.Run.execute(Run.java:1557) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Caused by: java.io.IOException: Unable to delete …\workspace\…job…\SRC\…file… at hudson.Util.deleteFile(Util.java:243) at hudson.Util.deleteRecursive(Util.java:293) at hudson.Util.deleteContentsRecursive(Util.java:204) at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:75) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:153) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:161) at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:121) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:153) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:903) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:884) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:867) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) reports that these issues disappear when using a build of the plugin incorporating this ( JENKINS-2556 ) fix.

          Matt Doran added a comment -

          Any thoughts pushing a new build of the SVN plugin that includes this fix?

          Matt Doran added a comment - Any thoughts pushing a new build of the SVN plugin that includes this fix?

          kutzi added a comment -

          After I've burned 2 release numbers because of a stupid maven bug (http://www.shredzone.de/cilla/page/373/maven-release-plugin-and-git-fix.html), I've released it as 1.48

          kutzi added a comment - After I've burned 2 release numbers because of a stupid maven bug ( http://www.shredzone.de/cilla/page/373/maven-release-plugin-and-git-fix.html ), I've released it as 1.48

          Anand Raju added a comment -

          Hello Kutzi,
          I am on Jenkins v1.546 and Jenkins Subversion Plugin v1.54. I still do not see the switch option when setting the checkout strategy in a new or pre-existing job. Is it only update which internally does switch as well when needed? or Is there any manual installation needed for SVN switch option to appear in the drop-down?

          Anand Raju added a comment - Hello Kutzi, I am on Jenkins v1.546 and Jenkins Subversion Plugin v1.54. I still do not see the switch option when setting the checkout strategy in a new or pre-existing job. Is it only update which internally does switch as well when needed? or Is there any manual installation needed for SVN switch option to appear in the drop-down?

          Anand Raju added a comment -

          Hello Kutzi,
          I tested out the build and its automatically doing a switch when necessary. For others who have a similar confusion, it is the SVN update option under checkout strategy drop-down which performs a switch when applicable.

          Anand Raju added a comment - Hello Kutzi, I tested out the build and its automatically doing a switch when necessary. For others who have a similar confusion, it is the SVN update option under checkout strategy drop-down which performs a switch when applicable.

            kutzi kutzi
            rombert Robert Munteanu
            Votes:
            21 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: