ERROR Unable to collect changes with SubVersion

Hello,

Situation: We had main branch 1.1.7 and someone decided to branch a new revision to 1.1.7.1 and rename the main branch from 1.1.7 to 1.1.7.2. I'm no fan of renaming previous branch but at first everything worked fine in Tortoise/CommitMonitor and TeamCity

Later on, some refactoring was applied to 1.1.7.2 (mostly cleanup via removing of directory and files). From that point on, the TeamCity project for 1.1.7.2 failed with the error "Unable to collect changes" (see below)

The problem is that TeamCity is applying an invalid operation on SubVersion ("Cannot replace a directory from within") and the server refuse it.

Tortoise/CommitMonitor has no issue with the branch (check out, commit all working)

Also, as we merge some of the changes to another branch (1.1.8) it also broke in TeamCity but still Tortoise/CommitMonitor has no issue. The first branch 1.1.7.1 are still working properly. So the cleanup is obviously a factor but we suspect that the rename of the branch from 1.1.7 to 1.1.7.2 is also a factor.

Can someone explain why TeamCity would perform an illegal operation in SubVersion in that scenario?

Thank you in advance

========================================================================================================================================

Finished 'Wed Nov 25 12:13:38 EST 2009' with status 'ERROR Unable to collect changes'

[12:13:38]: bt40
[12:13:38]: Checking for changes
[12:13:38]: java.util.concurrent.ExecutionException: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'SSDISManager :: DIS_1.1.7.2' : Error collecting changes for VCS root 'svn: http://xcalibur2/svn/DDI/Solutions/DIS/branches/DIS_1.1.7.2' #39
org.tmatesoft.svn.core.SVNException: svn: Cannot replace a directory from within
svn: REPORT of '/svn/DDI/!svn/vcc/default': 500 Internal Server Error (http://xcalibur2)
java.util.concurrent.ExecutionException: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'SSDISManager :: DIS_1.1.7.2' : Error collecting changes for VCS root 'svn: http://xcalibur2/svn/DDI/Solutions/DIS/branches/DIS_1.1.7.2' #39
org.tmatesoft.svn.core.SVNException: svn: Cannot replace a directory from within
svn: REPORT of '/svn/DDI/!svn/vcc/default': 500 Internal Server Error (http://xcalibur2)
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:205)
at java.util.concurrent.FutureTask.get(FutureTask.java:80)
at jetbrains.buildServer.serverSide.impl.CancelableTaskHolder.waitForTaskToComplete(CancelableTaskHolder.java:12)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.doCollectChanges(TopBuildDependencyGraphImpl.java:72)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.access$000(TopBuildDependencyGraphImpl.java:66)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java:2)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java:1)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$4.run(TopBuildDependencyGraphImpl.java)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:20)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:11)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.runAsSystem(TopBuildDependencyGraphImpl.java:54)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:12)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:64)
at jetbrains.buildServer.serverSide.impl.BuildChangesCollector.collectChangesForBuild(BuildChangesCollector.java:16)
at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:5)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'SSDISManager :: DIS_1.1.7.2' : Error collecting changes for VCS root 'svn: http://xcalibur2/svn/DDI/Solutions/DIS/branches/DIS_1.1.7.2' #39
org.tmatesoft.svn.core.SVNException: svn: Cannot replace a directory from within
svn: REPORT of '/svn/DDI/!svn/vcc/default': 500 Internal Server Error (http://xcalibur2)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$ChangesCollectorResultImpl.rethrowIfOurBuildType(VcsChangesCollectorImpl.java:29)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$ChangesCollectorResultImpl.checkNoProblemsInMyBuildTypes(VcsChangesCollectorImpl.java:121)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$ChangesCollectorResultImpl.checkingForChangesFinished(VcsChangesCollectorImpl.java:17)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$1.call(VcsChangesCollectorImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$1.call(VcsChangesCollectorImpl.java:32)
... 5 more
Caused by: jetbrains.buildServer.vcs.VcsException: Error collecting changes for VCS root 'svn: http://xcalibur2/svn/DDI/Solutions/DIS/branches/DIS_1.1.7.2' #39
org.tmatesoft.svn.core.SVNException: svn: Cannot replace a directory from within
svn: REPORT of '/svn/DDI/!svn/vcc/default': 500 Internal Server Error (http://xcalibur2)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.collectBuildChanges(SvnSupport.java:321)
at jetbrains.buildServer.vcs.VcsSupportUtil.collectBuildChanges(VcsSupportUtil.java:37)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.collectBuildChanges(SvnSupport.java:215)
at jetbrains.buildServer.vcs.VcsSupport.collectChanges(VcsSupport.java:50)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.collectChanges(VcsChangesLoader.java:118)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.collectBuildChanges(VcsChangesLoader.java:202)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.collectChangesForRule(VcsChangesLoader.java:212)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.collectChanges4CommonCheckoutRule(VcsChangesLoader.java:23)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.loadChangesForRoot(VcsChangesLoader.java:139)
at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:563)
at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:61)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$3.call(VcsChangesCollectorImpl.java:2)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$3.call(VcsChangesCollectorImpl.java:1)
... 5 more
Caused by: org.tmatesoft.svn.core.SVNException: svn: Cannot replace a directory from within
svn: REPORT of '/svn/DDI/!svn/vcc/default': 500 Internal Server Error (http://xcalibur2)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1263)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.status(DAVRepository.java:803)
at org.tmatesoft.svn.core.io.SVNRepository.status(SVNRepository.java:2034)
at jetbrains.buildServer.buildTriggers.vcs.svn.ExternalsContentProvider.loadAllExternals(ExternalsContentProvider.java:71)
at jetbrains.buildServer.buildTriggers.vcs.svn.ExternalsContentProvider.loadExternals(ExternalsContentProvider.java:41)
at jetbrains.buildServer.buildTriggers.vcs.svn.ExternalsContentProvider.calcExternals(ExternalsContentProvider.java:32)
at jetbrains.buildServer.buildTriggers.vcs.svn.ExternalsProvider.collectExternals(ExternalsProvider.java:42)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.processExternalsChanges(SvnConnection.java:302)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.addChanges(SvnConnection.java:268)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection$4.runAction(SvnConnection.java:318)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.processAllExternals(SvnConnection.java:380)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.processExternalsChanges(SvnConnection.java:304)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.addChanges(SvnConnection.java:268)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection$4.runAction(SvnConnection.java:318)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.processAllExternals(SvnConnection.java:380)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.processExternalsChanges(SvnConnection.java:304)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.addChanges(SvnConnection.java:268)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.collectBuildChanges(SvnSupport.java:303)
... 17 more

[12:13:38]: Build finished

4 comments
Comment actions Permalink

Hello,

   As I can see from the stacktrace, the problem occurs when TeamCity tries to collect changes for externals included to the 1.1.7.2 branch.

  Most likely, some declared externals in branch 1.1.7.2 became invalid and this causes TeamCity to fail.

  Could you please check, which externals are declared in 1.1.7.2 branch?

   TeamCity tries to process externals recursively, i.e. if repoA includes repoB includes repoC, teamcity will recursively collect all the changes for all externals.

   If you won't found the problem, could you please describe externals structure you have for your project?

  Kind regards,
  KIR

0
Comment actions Permalink

Hi Kirill, rigth now, the structure look like this :

  • Branch_1.1.7.2
    • External to Project A
    • External to Project B
    • External to Project C
    • External to Project D


When we remove the external to project D, everything is fine, i.e. TC can collect change and do checkout/update.
So the problem is within Project D. The actual external is a valid path. So you're saying that TC scan all sub-directories of ProjectD in search of external?
Is there a log that will identify the invalid external? Or a command that help to find which directory has external properties?

Thanks

0
Comment actions Permalink

Maybe there is one thing... I've added an external to a file in a directory under ProjectD.
Does that may be the problem?

0
Comment actions Permalink

Yep, this is the problem. TeamCity 4.5.x doesn't support file externals, TeamCity 5.0 will do.

Regards,
KIR

0

Please sign in to leave a comment.