0
votes

I have a project in a svn with externals, for example

- myproject
|
|--------stuff1
|--------stuff2
|--------external-lib    // svn::external

I need to add a file (a Makefile) inside the external-lib directory, I want to commint it inside my repository (myproject), not the external one. It's very important to don't modify the external repository. Is it possible? I want to use the head revision of the external repository.

3
The external svn path, does it contain files, or just directories?jgifford25
@jgifford25: files and directoriesRuggero Turra

3 Answers

1
votes

I suggest to store the Makefile into myproject directly. Then you can run it from external-lib using

make -f ../Makefile.external
0
votes

What you want is not possible, unless you create a branch of the external repository in your own and ditch the svn:externals altogether. Of course, that would mean that you have to maintain updates to the external lib yourself, by merging (which could be probably be automated relatively easily, since you don't modify anything other than adding this file).

That said, Martin's solution seems the path of least resistance in your case...

0
votes

Based upon the response to my comment under your question, if your server and client(s) are using Subversion 1.6.x, you can do this. With Subversion 1.6.x, the support of externals for file is now available. So for each file and directory contained at the svn::external path, you'll need to create and entry in the svn:externals property for the myproject directory.

The svn:externals property will look something like this:

^/external-lib/file1 file1
^/external-lib/directoryA directoryA
^/external-lib/file2 file2
^/external-lib/directoryB directoryB

You can read more about svn:externals here: http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html

Now, as long as external-lib and myproject exist in the same repository, the working copies will allow you to commit changes to files and directories in external-lib.