Resharper code style sharing with svn externals

Hi,

I am working on several C# project and I am looking to share the resharper file. I created a location where the resharper style file is : ^/ReSharper/SolutionFile.5.1.ReSharper

Adding the following external into the trunk project works fine but teamcity build fails.

svn:externals:
^/ReSharper/SolutionFile.5.1.ReSharper MyProject.5.1.ReSharper


It seems Teamcity cannot include an externals into the project's trunk, I get this error :  [Failure] Failed to start build
And the following logs :

[17:53:55]: Updating sources: server side checkout... (17s)

[17:54:14]: [Updating sources: server side checkout...] Failed  to build patch for build #22761 {build id=7337}, VCS root: svn:  http://svn.global:95/repos/MyProject/Trunk  {id=1}, due to error: Unknown path kind: none for  http://svn.global:95/repos/ReSharper/SolutionFile.5.1.ReSharper@RR[none  => 22732_22732]@9cce9859-9768-9a45-a6e3-ca1a01a736a6

[17:54:13]: Patch is broken, can be found in file: C:\TeamCity\buildAgent\temp\cache\temp8408896284393745247patch_7337

[17:54:13]:
Failed to  build patch for build #22762 {build id=7338}, VCS root: svn:  http://svn.global:95/repos/MyProject/Trunk  {id=85}, due to error: Unknown path kind: none for ttp://svn.global:95/repos/ReSharper/SolutionFile.5.1.ReSharper@RR[none  => 22732_22732]@9cce9859-9768-9a45-a6e3-ca1a01a736a6
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)


I have some other usefull externals into my projects, and I cannot ignore externals for Teamcity build. Is it possible to ignore only one externals ? (considering the document, the answer is no)

Can you suggest me another way to share the R# style file accross several project ?

Thanks in advance for your answer.

13 comments
Comment actions Permalink

No one to help me on this subject ?


0
Comment actions Permalink

Hi Emmanuel

^ shortcut point to a root of repository. Do your projects actually stored in the same repository?
Can you checkout new working copy outside of TeamCity successfully?

Michael

0
Comment actions Permalink

Hi Michael,

Yes, the projects are in the same repository, that's why we are using ^

There is no problem to checkout the directory using svn and/or turtoiseSvn.

Regards,

Emmanuel

0
Comment actions Permalink

We already use svn:externals with and there is no problem if it is checkouted in a sub directory (ie : ^/ReSharper/SolutionFile.5.1.ReSharper tools/MyProject.5.1.ReSharper works)

0
Comment actions Permalink

Hello Emmanuel,

  Which version of TeamCity do you use?

  Regards,
  KIR

0
Comment actions Permalink

Hello,

The version we are using is : Version 6.0.3 (build 15925)

Regards,

Emmanuel

0
Comment actions Permalink

Emmanuel,

  Could you try using checkout on agent mode for checking out project sources? Would this resolve the problem?

  Also, please attach teamcity-vcs.log file from the TeamCity server.


  Thanks!
  KIR

0
Comment actions Permalink

Hi Kirill,

I tried your solution and I don't have a problem about getting sources from SVN anymore. But the build fails because an externals was missing.
I looked on the work directory on my agent, and I noticed that all svn:externals files were not downloaded on the serveur, only svn:externals directory, and most of my projects require common externals files.

If I let the configuration using checkout mode "Automatically on server", we can find the following error into teamcity-vcs.log :

[2011-04-06 16:38:21,892]   WARN [rmal executor 8] -  jetbrains.buildServer.VCS.SVN - Cannot process externals: Unknown path kind: none for http://svn.global:95/repos/VisualStudioStuffs/Resharper/SolutionFile.5.1.ReSharper@RR[none => 22732_22732]@9cce9859-9768-9a45-a6e3-ca1a01a736a6
Externals URL: http://svn.global:95/repos/VisualStudioStuffs/Resharper/SolutionFile.5.1.ReSharper
Current path: C:\SandBox.5.1.ReSharper
Connection URL: http://svn.global:95/repos/Sandbox/trunk
jetbrains.buildServer.vcs.VcsException: Unknown path kind: none for http://svn.global:95/repos/VisualStudioStuffs/Resharper/SolutionFile.5.1.ReSharper@RR[none => 22732_22732]@9cce9859-9768-9a45-a6e3-ca1a01a736a6


at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.exportFiles(SvnConnection.java:712)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.access$1000(SvnConnection.java:39)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection$7.runAction(SvnConnection.java:780)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.processAllExternals(SvnConnection.java:323)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.processExternalsExport(SvnConnection.java:761)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.exportFilesForDirectory(SvnConnection.java:749)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.exportFiles(SvnConnection.java:703)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.buildPatch(SvnConnection.java:638)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport$SvnIncludeRulePatchBuilder.buildPatch(SvnSupport.java:626)
at jetbrains.buildServer.serverSide.impl.projectSources.BuildPatchUtil$1.buildPatch(BuildPatchUtil.java:2)
at jetbrains.buildServer.vcs.VcsSupportUtil.buildPatch(VcsSupportUtil.java:93)
at jetbrains.buildServer.serverSide.impl.projectSources.BuildPatchUtil.buildPatch(BuildPatchUtil.java:8)
at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildCleanPatchToStream(PatchComposer.java:44)
at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.access$100(PatchComposer.java:140)
at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer$2.constructPatch(PatchComposer.java:2)
at jetbrains.buildServer.serverSide.impl.projectSources.SmallPatchCache.getCachedCleanPatch(SmallPatchCache.java:9)
at jetbrains.buildServer.serverSide.impl.projectSources.PatchCacheImpl.requestCachedPatch(PatchCacheImpl.java:22)
at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.getOrMakeCacheableCleanPatch(PatchComposer.java:78)
at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.makePatch(PatchComposer.java:112)
at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildPatchForRoot(PatchComposer.java:6)
at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildPatch(PatchComposer.java:72)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.buildPatch(BuildTypeImpl.java:286)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl$$FastClassByCGLIB$$a84db719.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at jetbrains.buildServer.serverSide.impl.auth.TeamCityMethodSecurityInterceptor.invoke(TeamCityMethodSecurityInterceptor.java:3)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:582)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl$$EnhancerByCGLIB$$9036f7ba.buildPatch(<generated>)
at jetbrains.buildServer.serverSide.impl.BuildStarter$2.call(BuildStarter.java:5)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Regards,

Emmanuel

0
Comment actions Permalink

Hello Emmanuel,

  Could you please confirm that the path http://svn.global:95/repos/VisualStudioStuffs/Resharper/SolutionFile.5.1.ReSharper exists in your repository?
  Does it exists for revision 22732?

  Kind regards,
  KIR

0
Comment actions Permalink

Hell Kirill,

Yes I confirm you the path exists and is valid.
There is not problem when checkouted the project using svn directly :

Z:\tmp>svn co http://svn.global:95/repos/bac_a_sable/trunk
A    trunk\rakefile.rb
U   trunk
Fetching external item into 'trunk\SandBox.5.1.ReSharper'
E    trunk\SandBox.5.1.ReSharper
Checked out external at revision 22732.

Fetching external item into 'trunk\NConsoler'
A    trunk\NConsoler\nconsoler.csharpus.com.url
A    trunk\NConsoler\Data
A    trunk\NConsoler\Data\NConsoler.cs
A    trunk\NConsoler\Data\NConsoler.pdb
A    trunk\NConsoler\Data\releasenotes.txt
A    trunk\NConsoler\NConsoler.dll
Checked out external at revision 17546.
Checked out revision 23012.
Z:\tmp>


Here is the svn:externals :


Z:\tmp\trunk>svn pget svn:externals
-r22732 ^/VisualStudioStuffs/Resharper/SolutionFile.5.1.ReSharper SandBox.5.1.ReSharper
-r17546 ^/SharedLibExt.Net/NConsoler/trunk NConsoler

0
Comment actions Permalink

Hello again,

  Could you please try the following:

  - Try to build using checkout on agent (as I understand, the build would fail because file externals won't be checked out).
  - Go to the build agent to the corresponding directory, where the build was running
  - run svn update command, including username, which is specified in the TeamCity VCS root settings, like svn --username <user> update
   Would it show errors? Will it checkout missing files?

  Thanks,
  KIR

0
Comment actions Permalink

Hi Kirill,

I performed you procedure, and the result are :
     1 step : The build failed because externals file are missing
     2 step : The svn up with the teamcity svn dedicated user updated missing files without any error
     3 step : Running the build step by hand (I am using rake file to build and generate artifacts) worked

Looking on teamcity options under "Edit VCS Root", I found the option "Working copy format", I updated to 1.6 (1.5 previously) and ran a new build (files are cleaned before build) and it works using checkout on agent but not using checkout on server.

It seems the checkout on server doesn't manage version 1.6, is there a way to update server files in order to manage that ?

Teamcity server is running on a dedicated 8-cores computer and the 3 agents are running on it, what is the best VCS checkout mode for this configuration ?

Using chekout on agent doesn't perform an svn export, and .svn files are on the server which is a security problem (the serveur is on a shared computer) and files are copied in my artifacts (I can change all of my rakefiles, but I prefer another solution !).

Thank you for your answer.

Regards,

Emmanuel

0
Comment actions Permalink

Hello Emmanuel,

   I've tried to replicate your environment with TeamCity 6.0.3 build - and so far it works.
  I tried this with svn:// protocol on the MacOSx machine, but our local tests run on different platforms.

  May I ask you to enable SVN debug logs and to create issue in our tracker with full logs from the server?

  Regarding your setup - for your case, I'd expect SVN checkout on agent to be slightly faster then checkout on server.
  And TeamCity definitely supports SVN 1.6 features for both modes, it is really strange that it doesn't work for you.

  Thanks and sorry for the problem :(

  KIR

0

Please sign in to leave a comment.