Question

I've read http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html, but I didn't see the info I needed. It (barely) talked about propset, but not propedit, which is what I wanted. I have the v1.8 client.

Say I have the following module hierarchy in

root URL = https://mySvnRepo

^/projects/trunk/module1
^/projects/trunk/module2
^/projects/trunk/module3

Say I branched the whole projects/* tree to

^/projects/branches/branch1/module1
^/projects/branches/branch1/module2
^/projects/branches/branch1/module3

...and

^/projects/branches/branch2/module1
^/projects/branches/branch2/module2
^/projects/branches/branch2/module3

How can I use svn externals so my working copy looks like

/home/svn/projects/module1 from http://mySvnRepo/projects/trunk
/home/svn/projects/module2 from http://mySvnRepo/projects/branches/branch1
/home/svn/projects/module3 from http://mySvnRepo/projects/branches/branch2

For example.

I don't need a lecture on why I should/shouldn't do this. I just want to know how. If I shoot myself in the foot (or head) that's fine for now. I'm just trying to prove a workflow that may or may not work. Thanks!

Was it helpful?

Solution

Put the following svn:externals definition in a text file named externals.txt:

^/projects/trunk/module1 module1
^/projects/branches/branch1/module2 module2
^/projects/branches/branch2/module3 module3

In a working copy, run svn mkdir to create a directory named externals under the root of the repository. Then, run svn propset svn:externals --file externals.txt with the path to this new directory.

An svn update run from externals in the working copy will retrieve the external directories.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top