TeamCity: Subversion VCS root with GitHub externals

放肆的年华 提交于 2020-01-24 12:48:05

问题


We have an SVN repository with some externals hosted at GitHub. All is well in development; GutHub supports being accessed by an SVN client very well.

The problem is with TeamCity. It appears to get the externals by date rather than by revision. We get the following error:

   Failed to build patch for build #2.17.7081 {build id=12}, 
   VCS root: svn: https://xxx.xxx.xxx.xx/svn/iaw/trunk {instance id=2, parent id=1}, due to error: Cannot request SVN dated revision: 
   svn: E200007: Server does not support date-based operations
   svn: E200007: The requested report is unknown.
   svn: E175002: REPORT of '/cardeliverynetwork/csharp-apiclient.git/!svn/vcc/default': 501 Not Implemented (https://github.com)
   SVN server: https://github.com/cardeliverynetwork/csharp-apiclient.git/trunk/src/CarDeliveryNetwork.Types
   Used rev: Feb 15, 2013 11:03:24 AM
   Rev text:7081_2013/02/15 11:03:24 +0000

Does anyone know how to force TeamCity to simply get HEAD on externals?

Thanks.


回答1:


It seems like I faced a similar issue when I had an external in Subversion itself.

To solve the same I added the exact revision number of the external in the place where I referred it.

It was basically like this

Reference Before: \gitserver\repository\folder external

Reference After : \gitserver\repository\folder@2013 external

Please try adding the revision like this in the properties of the Subversion folder you are referring. This can be edited like this if you go to properties of the folder in Subversion and do property Edit in Advanced mode.

Hope it works though not so sure!




回答2:


Setting to a specific revision \gitserver\repository\folder@2013 external works, but setting to head revision \gitserver\repository\folder@HEAD external does not work.

This is a known bug in TeamCity where if the externals server timezone is behind the teamcity timezone it cannot get the head revision.

TW-2946 Eliminate necessity of synchronized clock between TeamCity server and VCS

There are some possible workarounds here:

TW-27269 TeamCity doesn't pick up changes from svn:externals produced by GitHub

Possible workarounds:

  • use fixed revision externals instead of "latest revision" ones
  • turn off externals support in the TeamCity VCS root, use agent-side checkout and perform the externals checkout in the first build step of the build in a custom script.
  • In TeamCity 8.0.4 we've added an internal property teamcity.svn.ignore.dated.revision.errors, When this property is set to true, TeamCity allows using server-side checkout with SVN externals pointing to GitHub.

Update:

I can confirm the workaround with teamcity.svn.ignore.dated.revision.errors appears to work and we are able to fetch the HEAD revision from Github :)



来源:https://stackoverflow.com/questions/14894367/teamcity-subversion-vcs-root-with-github-externals

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!