svn externals … yes or no?

断了今生、忘了曾经 提交于 2019-12-04 08:47:12
cletus

SVN Externals are Evil; Use Piston or Braid seems typical of the anti-external camp. And the poster does have a point.

I think a better criteria is:

  • Use external references for internal projects that you can change; and
  • Use vendor branches for external repositories you have no control over.

So it seems the problems with svn externals come from people use them as a substitute for vendor branches. I've seen several people complaining about them in the context of third-party Rails plugins.

So in your case, assuming these projects are all "internal", then I think an svn external is a perfectly valid approach.

I definitely agree with the previous answer. From my experience using externals is excellent solution for infrastructure modules and "internal" libraries as long as you set the externals to specific tag of the library and not to its trunk.

I didn't understand exactly why you want to use workspace that is entirely based on externals and not adding the externals directly to the project itself. My approach is that any project you create on the SVN must be "built-able" when it been checked out.

In my approach your repository should looks like this:

/dependencies
     /xUnit
           /tags
                /1.5
                /1.6
           /trunk
     /NHibernate
           /tags
                /2.1.0
                /2.0.1
           /trunk
/projects
     /project1
           /tags
                /1.0
                    /sources
                    /xUnit(externals to /dependencies/xUnit/tags/1.5)
                    /NHibernate(externals to /dependencies/NHibernate/tags/2.0.1)
           /trunk
                /sources
                /xUnit(externals to /dependencies/xUnit/tags/1.6)
                /NHibernate(externals to /dependencies/NHibernate/tags/2.0.1)
     /project2
           /tags
                /1.0
                    /sources
                    /xUnit(externals to /dependencies/xUnit/tags/1.6)
                    /NHibernate(externals to /dependencies/NHibernate/tags/2.0.1)
           /trunk
                /sources
                /xUnit(externals to /dependencies/xUnit/tags/1.6)
                /NHibernate(externals to /dependencies/NHibernate/tags/2.1.0)

If your svn:externals only reference 3rd party libraries, why not simply use a Maven/Ivy repository? These are for the Java world and I don't know their .Net pendents but I'm quite sure they exist.

I only use svn:externals to share Ant antlib files, until they give the possibility to load them from a jar archive.

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