Externals Definitions
Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different locations in a repository or perhaps from different repositories altogether. You could certainly set up such a scenario by hand—using svn checkout to create the sort of nested working copy structure you are trying to achieve. But if this layout is important for everyone who uses your repository, every other user will need to perform the same checkout operations that you did.
Fortunately, Subversion provides support for externals
definitions. An externals definition is a mapping of a local
directory to the URL—and ideally a particular revision—of a versioned directory. In
Subversion, you declare externals definitions in groups using the svn:externals
property. You can create or modify
this property using svn propset or
svn propedit (see Manipulating Properties). It can be set on any versioned
directory, and its value describes both the external repository location
and the client-side directory to which that location should be checked
out.
The convenience of the svn:externals
property is that once it is set on a versioned directory, everyone who checks out a working copy with that directory also gets the benefit of the externals definition. In other words, once one person has made the effort to define the nested working copy structure, no one else has to bother—Subversion will, after checking ...
Get Version Control with Subversion, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.