TeamCity v6 - Server was not able to build correct patch, most likely due to VCS errors, will try again.

Hi all,

We recently upgraded to TeamCity v6, we use Team Foundation Server 2010 and we are now getting the following error when we try and build our projects :

[14:51:01]: Patch is broken, can be found in file: C:\TeamCity\buildAgent\temp\cache\temp1445606620290593694patch_2747
[14:51:01]: Failed to build patch for build #55 {build id=2747}, VCS root: tfs: http://tfs:8080/tfs/SCSLCollection $/Company/ {id=1}, due to error: TFS failed. ExitCode: 1, Stdout:: TFS Native Verifier v6.0 Copyright (C) 2006-2011 JetBrains s.r.o. INFO  - Use Tfs from JetBrains.TeamCity.Tfs.Tfs10Accessor TFS Native Accessor v6.0 Copyright (C) 2006-2011 JetBrains s.r.o. INFO  - Connecting to server http://tfs:8080/tfs/SCSLCollection Build Patch:   Server='http://tfs:8080/tfs/SCSLCollection'   Username='TFSService'   Root='c:\TeamCity\temp\TC-TFS-340-1300114256910.mappipngs'   CurrentVersion='1802' INFO  - No matched workspaces were found. Will recreate workspace and perofming clean checkout. INFO  - Created workspace:TeamCity-S-zx8yjnyn4yf32593kvjbaoai3/SCSL-DEV\TFSService(TeamCity checkout workspace) INFO  - Settings up mappings for created workspace: TeamCity-S-zx8yjnyn4yf32593kvjbaoai3/SCSL-DEV\TFSService(TeamCity checkout workspace). INFO  - Failed to setup workspace TeamCity-S-zx8yjnyn4yf32593kvjbaoai3/SCSL-DEV\TFSService(TeamCity checkout workspace). '$/Company' cannot be cloaked because it does not have a mapped parent. INFO  - Exception type is Microsoft.TeamFoundation.VersionControl.Client.VersionControlException INFO  - Tried to setup mappings: +:$/Company/SCSL/Products/Common/PDFFormFiller=>C:\TeamCity\temp\TC-TFS-340-1300114256910\SCSL\Products\Common\PDFFormFiller +:$/Company/External/External Components=>C:\TeamCity\temp\TC-TFS-340-1300114256910\External\External Components -:$/Company  INFO  - Workspace TeamCity-S-zx8yjnyn4yf32593kvjbaoai3/SCSL-DEV\TFSService(TeamCity checkout workspace) removed INFO  - Failed to create workspace. '$/Company' cannot be cloaked because it does not have a mapped parent. INFO  - Exception type is Microsoft.TeamFoundation.VersionControl.Client.VersionControlException INFO  - Delete all intersecting TeamCity workspaces. INFO  - My mappings:  +:$/Company/SCSL/Products/Common/PDFFormFiller=>C:\TeamCity\temp\TC-TFS-340-1300114256910\SCSL\Products\Common\PDFFormFiller +:$/Company/External/External Components=>C:\TeamCity\temp\TC-TFS-340-1300114256910\External\External Components -:$/Company  INFO  - My mappings:  +:$/Company/SCSL/Products/Common/PDFFormFiller=>C:\TeamCity\temp\TC-TFS-340-1300114256910\SCSL\Products\Common\PDFFormFiller +:$/Company/External/External Components=>C:\TeamCity\temp\TC-TFS-340-1300114256910\External\External Components -:$/Company  INFO  - Created workspace:TeamCity-S-v84zqeu2x1f22ugivm8btg7o4/SCSL-DEV\TFSService(TeamCity checkout workspace) INFO  - Settings up mappings for created workspace: TeamCity-S-v84zqeu2x1f22ugivm8btg7o4/SCSL-DEV\TFSService(TeamCity checkout workspace). INFO  - Failed to setup workspace TeamCity-S-v84zqeu2x1f22ugivm8btg7o4/SCSL-DEV\TFSService(TeamCity checkout workspace). '$/Company' cannot be cloaked because it does not have a mapped parent. INFO  - Exception type is Microsoft.TeamFoundation.VersionControl.Client.VersionControlException INFO  - Tried to setup mappings: +:$/Company/SCSL/Products/Common/PDFFormFiller=>C:\TeamCity\temp\TC-TFS-340-1300114256910\SCSL\Products\Common\PDFFormFiller +:$/Company/External/External Components=>C:\TeamCity\temp\TC-TFS-340-1300114256910\External\External Components -:$/Company  INFO  - Workspace TeamCity-S-v84zqeu2x1f22ugivm8btg7o4/SCSL-DEV\TFSService(TeamCity checkout workspace) removed INFO  - Start Update workspaces cache INFO  - Finished Update workspaces cache in 15.6227ms ERROR - Failed to create workspace. Try simplifying checkout rules. '$/Company' cannot be cloaked because it does not have a mapped parent. System.Exception: Failed to create workspace. Try simplifying checkout rules. '$/Company' cannot be cloaked because it does not have a mapped parent. ---> System.Exception: Failed to create workspace. Try simplifying checkout rules. '$/Company' cannot be cloaked because it does not have a mapped parent. ---> Microsoft.TeamFoundation.VersionControl.Client.VersionControlException: '$/Company' cannot be cloaked because it does not have a mapped parent.    at Microsoft.TeamFoundation.VersionControl.Client.Client.InternalSetWorkingFolder(Workspace workspace, WorkingFolder workingFolder, Boolean isDelete)    at Microsoft.TeamFoundation.VersionControl.Client.Workspace.CreateMapping(WorkingFolder mapping)    at JetBrains.TeamCity.Tfs.ExtensionMethods.ForEach[T](IEnumerable`1 enu, Action`1 act) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\ExtensionMethods.cs:line 29    at JetBrains.TeamCity.Tfs.WorkspaceMappings.SetupMappings(Workspace wp) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceMappings.cs:line 53    at JetBrains.TeamCity.Tfs.WorkspaceManager.SetupWorkspace(Workspace sp) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 52    at JetBrains.TeamCity.Tfs.WorkspaceManager.<CreateWorkspace>b__1() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 58    at JetBrains.TeamCity.Tfs.WorkspaceManager.CreateWorkspace() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 80    --- End of inner exception stack trace ---    at JetBrains.TeamCity.Tfs.WorkspaceManager.CreateWorkspace() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 84    at JetBrains.TeamCity.Tfs.WorkspaceManager.GetMappedWorkspaceImpl() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 105    at JetBrains.TeamCity.Tfs.WorkspaceManager.GetMappedWorkspace() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 91    at JetBrains.TeamCity.Tfs.CleanPatchCommandBase.DoWithWorkspace(WorkspaceManager manager, Int32 currentChangesetId) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\CleanPatchCommandBase.cs:line 0    at JetBrains.TeamCity.Tfs.CleanPatchCommandBase.DoWithTfs(VersionControlServer vcs, Int32 fromChangesetId, Int32 currentChangesetId) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\CleanPatchCommandBase.cs:line 35    at JetBrains.TeamCity.Tfs.ComplicatedCommand.DoWithTfs(VersionControlServer vcs) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\ComplicatedCommand.cs:line 37    at JetBrains.TeamCity.Tfs.Command.Do() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\Command.cs:line 28    at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\Program.cs:line 256    --- End of inner exception stack trace ---    at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\Program.cs:line 349 , Stderr::  jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$1: Server was not able to build correct patch, most likely due to VCS errors, will try again.      at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.throwError(PatchDownloaderImpl.java:113)      at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:103)      at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:64)      at jetbrains.buildServer.agent.impl.patch.UpdateSourcesPatcherBase.copyPatchToTempFile(UpdateSourcesPatcherBase.java:70)      at jetbrains.buildServer.agent.impl.patch.UpdateSourcesFromServer.updateSources(UpdateSourcesFromServer.java:62)      at jetbrains.buildServer.agent.impl.patch.UpdateSourcesBuildStageBase.doSourceUpdate(UpdateSourcesBuildStageBase.java:90)      at jetbrains.buildServer.agent.impl.patch.UpdateSourcesBuildStageBase.doRecoverableStage(UpdateSourcesBuildStageBase.java:58)      at jetbrains.buildServer.agent.impl.buildStages.startStages.RecoverableBuildStage.doLastAttempt(RecoverableBuildStage.java:112)      at jetbrains.buildServer.agent.impl.buildStages.startStages.RecoverableBuildStage.doBuildStage(RecoverableBuildStage.java:70)      at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)      at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:29)      at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:68)      at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:31)      at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)      at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:65)      at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:48)      at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:250)      at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:48)      at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:223)      at java.lang.Thread.run(Unknown Source) Caused by: jetbrains.buildServer.vcs.patches.UnsuccessfulPatchException: Failed to build patch for build #55 {build id=2747}, VCS root: tfs: http://tfs:8080/tfs/SCSLCollection $/Company/ {id=1}, due to error: TFS failed. ExitCode: 1, Stdout:: TFS Native Verifier v6.0 Copyright (C) 2006-2011 JetBrains s.r.o. INFO  - Use Tfs from JetBrains.TeamCity.Tfs.Tfs10Accessor TFS Native Accessor v6.0 Copyright (C) 2006-2011 JetBrains s.r.o. INFO  - Connecting to server http://tfs:8080/tfs/SCSLCollection Build Patch:   Server='http://tfs:8080/tfs/SCSLCollection'   Username='TFSService'   Root='c:\TeamCity\temp\TC-TFS-340-1300114256910.mappipngs'   CurrentVersion='1802' INFO  - No matched workspaces were found. Will recreate workspace and perofming clean checkout. INFO  - Created workspace:TeamCity-S-zx8yjnyn4yf32593kvjbaoai3/SCSL-DEV\TFSService(TeamCity checkout workspace) INFO  - Settings up mappings for created workspace: TeamCity-S-zx8yjnyn4yf32593kvjbaoai3/SCSL-DEV\TFSService(TeamCity checkout workspace). INFO  - Failed to setup workspace TeamCity-S-zx8yjnyn4yf32593kvjbaoai3/SCSL-DEV\TFSService(TeamCity checkout workspace). '$/Company' cannot be cloaked because it does not have a mapped parent. INFO  - Exception type is Microsoft.TeamFoundation.VersionControl.Client.VersionControlException INFO  - Tried to setup mappings: +:$/Company/SCSL/Products/Common/PDFFormFiller=>C:\TeamCity\temp\TC-TFS-340-1300114256910\SCSL\Products\Common\PDFFormFiller +:$/Company/External/External Components=>C:\TeamCity\temp\TC-TFS-340-1300114256910\External\External Components -:$/Company  INFO  - Workspace TeamCity-S-zx8yjnyn4yf32593kvjbaoai3/SCSL-DEV\TFSService(TeamCity checkout workspace) removed INFO  - Failed to create workspace. '$/Company' cannot be cloaked because it does not have a mapped parent. INFO  - Exception type is Microsoft.TeamFoundation.VersionControl.Client.VersionControlException INFO  - Delete all intersecting TeamCity workspaces. INFO  - My mappings:  +:$/Company/SCSL/Products/Common/PDFFormFiller=>C:\TeamCity\temp\TC-TFS-340-1300114256910\SCSL\Products\Common\PDFFormFiller +:$/Company/External/External Components=>C:\TeamCity\temp\TC-TFS-340-1300114256910\External\External Components -:$/Company  INFO  - My mappings:  +:$/Company/SCSL/Products/Common/PDFFormFiller=>C:\TeamCity\temp\TC-TFS-340-1300114256910\SCSL\Products\Common\PDFFormFiller +:$/Company/External/External Components=>C:\TeamCity\temp\TC-TFS-340-1300114256910\External\External Components -:$/Company  INFO  - Created workspace:TeamCity-S-v84zqeu2x1f22ugivm8btg7o4/SCSL-DEV\TFSService(TeamCity checkout workspace) INFO  - Settings up mappings for created workspace: TeamCity-S-v84zqeu2x1f22ugivm8btg7o4/SCSL-DEV\TFSService(TeamCity checkout workspace). INFO  - Failed to setup workspace TeamCity-S-v84zqeu2x1f22ugivm8btg7o4/SCSL-DEV\TFSService(TeamCity checkout workspace). '$/Company' cannot be cloaked because it does not have a mapped parent. INFO  - Exception type is Microsoft.TeamFoundation.VersionControl.Client.VersionControlException INFO  - Tried to setup mappings: +:$/Company/SCSL/Products/Common/PDFFormFiller=>C:\TeamCity\temp\TC-TFS-340-1300114256910\SCSL\Products\Common\PDFFormFiller +:$/Company/External/External Components=>C:\TeamCity\temp\TC-TFS-340-1300114256910\External\External Components -:$/Company  INFO  - Workspace TeamCity-S-v84zqeu2x1f22ugivm8btg7o4/SCSL-DEV\TFSService(TeamCity checkout workspace) removed INFO  - Start Update workspaces cache INFO  - Finished Update workspaces cache in 15.6227ms ERROR - Failed to create workspace. Try simplifying checkout rules. '$/Company' cannot be cloaked because it does not have a mapped parent. System.Exception: Failed to create workspace. Try simplifying checkout rules. '$/Company' cannot be cloaked because it does not have a mapped parent. ---> System.Exception: Failed to create workspace. Try simplifying checkout rules. '$/Company' cannot be cloaked because it does not have a mapped parent. ---> Microsoft.TeamFoundation.VersionControl.Client.VersionControlException: '$/Company' cannot be cloaked because it does not have a mapped parent.    at Microsoft.TeamFoundation.VersionControl.Client.Client.InternalSetWorkingFolder(Workspace workspace, WorkingFolder workingFolder, Boolean isDelete)    at Microsoft.TeamFoundation.VersionControl.Client.Workspace.CreateMapping(WorkingFolder mapping)    at JetBrains.TeamCity.Tfs.ExtensionMethods.ForEach[T](IEnumerable`1 enu, Action`1 act) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\ExtensionMethods.cs:line 29    at JetBrains.TeamCity.Tfs.WorkspaceMappings.SetupMappings(Workspace wp) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceMappings.cs:line 53    at JetBrains.TeamCity.Tfs.WorkspaceManager.SetupWorkspace(Workspace sp) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 52    at JetBrains.TeamCity.Tfs.WorkspaceManager.<CreateWorkspace>b__1() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 58    at JetBrains.TeamCity.Tfs.WorkspaceManager.CreateWorkspace() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 80    --- End of inner exception stack trace ---    at JetBrains.TeamCity.Tfs.WorkspaceManager.CreateWorkspace() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 84    at JetBrains.TeamCity.Tfs.WorkspaceManager.GetMappedWorkspaceImpl() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 105    at JetBrains.TeamCity.Tfs.WorkspaceManager.GetMappedWorkspace() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\WorkspaceManager.cs:line 91    at JetBrains.TeamCity.Tfs.CleanPatchCommandBase.DoWithWorkspace(WorkspaceManager manager, Int32 currentChangesetId) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\CleanPatchCommandBase.cs:line 0    at JetBrains.TeamCity.Tfs.CleanPatchCommandBase.DoWithTfs(VersionControlServer vcs, Int32 fromChangesetId, Int32 currentChangesetId) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\CleanPatchCommandBase.cs:line 35    at JetBrains.TeamCity.Tfs.ComplicatedCommand.DoWithTfs(VersionControlServer vcs) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\ComplicatedCommand.cs:line 37    at JetBrains.TeamCity.Tfs.Command.Do() in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\Command.cs:line 28    at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\Program.cs:line 256    --- End of inner exception stack trace ---    at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\Agent\work\9f2b3673cc66b89\TfsNativeAccessor\src\Program.cs:line 349 , Stderr::       at jetbrains.buildServer.vcs.patches.AbstractPatcher$1.fail(AbstractPatcher.java:93)      at jetbrains.buildServer.vcs.patches.LowLevelPatcher.readPatchStream(LowLevelPatcher.java:156)      at jetbrains.buildServer.vcs.patches.LowLevelPatcher.applyPatch(LowLevelPatcher.java:79)      at jetbrains.buildServer.vcs.patches.AbstractPatcher.applyPatch(AbstractPatcher.java:42)      at jetbrains.buildServer.agent.impl.patch.PatchApplierImpl.applyPatch(PatchApplierImpl.java:18)      at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatchInFileIsCompleted(PatchDownloaderImpl.java:83)      at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:93)      ... 18 more

I have removed all the workspaces from TFS, and still no joy.

I have replaced the tfs plugins files from this discussion:
http://youtrack.jetbrains.net/issue/TW-14804

Nothing has changed with TFS this used to work with the previous version, any ideas?

Regards,

Mike

1 comment
Comment actions Permalink

Have finally found the solution, for some reason the following checkout rule :

"-:."

causes this error. So I have removed this and now all works as expected.

0

Please sign in to leave a comment.