Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I branch in SVN and have it branch my svn:external folders as well?

Tags:

I'm using tortoise svn in Windows.

How can I branch in SVN and have it branch my svn:external folders as well?

like image 865
Brian R. Bondy Avatar asked Oct 29 '08 00:10

Brian R. Bondy


People also ask

What is the difference between trunk and branch in svn?

A trunk in SVN is main development area, where major development happens. A branch in SVN is sub development area where parallel development on different functionalities happens. After completion of a functionality, a branch is usually merged back into trunk.

What is branching strategy in svn?

Subversion Branching Strategies Subversion branches (SVN branches) allow your team to work on multiple versions of your code simultaneously. Developers can test out new features without impacting the rest of development with errors and bugs. SVN's “branch” directory runs parallel to the “trunk” directory.

What is svn externals property?

What are externals definitions? Externals definitions map a local directory to the URL of a versioned resource. The svn:externals property can be set on any versioned directory and its value is a multi-line table of subdirectories and absolute repository URLs.

How do I create a branch in svn trunk?

To create a branch or a tag in a Subversion repository, do the following: From the main menu, choose VCS | Subversion | Branch or Tag. Alternatively, select the source folder in the SVN Repositories tool window and choose the Branch or Tag command from the context menu.


1 Answers

You should use svn:externals as external references from different repositories. So svn:externals should refer to components, modules, 3rd party tools, etc.

You should not use svn:externals to emulate a "symbolic link"-behaviour by using externals to point into the same repository. You can solve such issues most of the time by modifying your build-structure, or use checkout-scripts and sparse checkout feature.

svn:externals have a lot of problems most of them are difficult to see, track and repair: see an example here

  • commits cannot span over externals(no atomic commits)
  • branches will not branch their externals(as you pointed out)
  • tags will not "freeze" their externals so latter builds may result in different/broken builds
  • merging and reeintegrate merge will not work on externals

If you use externals to point to other repositories, you will most of the time do not have these problems.

like image 68
Peter Parker Avatar answered Oct 23 '22 15:10

Peter Parker