Sometimes it is useful to create a working copy that is made out of a number of different checkouts. For example, you may want different files or subdirectories to come from different locations in a repository, or perhaps from different repositories altogether. If you want every user to have the same layout, you can define the svn:externals properties to pull in the specified resource at the locations where they are needed.

 

Command to get the externals already set for a folder:

svn propget svn:externals <folder_name>

To edit an already assigned external or add a new external to a folder use the command:

  1. first set an appropriate editor to edit the externals:

              SVN_EDITOR=/bin/vi
              export SVN_EDITOR

2.  Then use the below command:

svn propedit svn:externals <folder_name> <absolute_path_to_the_folder>

eg: svn propedit svn:externals test /home/kevin/modules/configuration/test

The above command will open the editor “vi” and we can provide the necessary externals url there and save the file.

 

eg: $ svn propget svn:externals test
/svn/myrepo/application/branches/new1.4.1 suite

 

Note that “suite” is a subfolder inside “test” directory to which the external svn path has to be fetched.

That means, the svn branch “/svn/myrepo/application/branches/new1.4.1” will get synced to the folder /home/kevin/modules/configuration/test/suite whenever it is referenced.