[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problem with svn:externals

From: Rush Manbert <rush_at_manbert.com>
Date: 2007-12-01 03:24:10 CET

Gopalakrishnan, Dinesh wrote:
> Hi,
>
> We are in the progress of migrating from cvs to svn. I am looking at the
> svn:externals as an alternative for cvs modules file.
>
> It seemed to work pretty much as expected, except for the following
> scenario.
>
> I have folder-A, on which svn externals is set in such a way that when
> folder-A is checked out, it would check out folder-B, folder-C and
> folder-D inside folder-A.
>
> $ svn co <url>/Folder-A
> A Folder-A
> A Folder-A/Folder-B
> A Folder-A/Folder-C
> A Folder-A/Folder-D
>
> $ cd Folder-A
>
> when i edit any of the file in Folder-B and do a svn ci from Folder-A,
> it works as expected. However, when i do changes in files in Folder-B,
> Folder-C and Folder-D, and then when i do a svn ci from Folder-A, the
> check-in does not happen.
>
> `svn status` would state files in Folder-B, Folder-C and Folder-D are
> modified. But the commit from Folder-A would not work as expected.
>
> So, my requirement here is that when i do a `svn ci` from Folder-A, i
> want all the changes in Folder-B, Folder-C and Folder-D to be
> checked-in.
>
> Is this a problem with svn:externals, or is there any workaround for
> this issue?
>

As others have said, this is by design. If you want to do sparse
checkouts, or platform-specific checkouts, the only way that I know of
is to use svn switch. The pattern is that you make an empty
"placeholder" directory in the repository for something that is not
always checked out, or checked out differently in different
circumstances. Then you svn switch that directory to some other
directory in your repository. It pretty much forces you to do your
checkouts using scripts, but you can put self-describing metadata (svn
properties) in the repository directories that let you keep the details
in the repository itself. I have just finished implementing this and it
really works pretty well. After you check out, you can use a SVN GUI
client to manage the tree (smartSvn, for instance), or just command line
svn.

I searched around a lot when I was moving from a CVS repository (that
only used modules for checkout) to a new SVN repository. I found this
technique in a message that I think was on the SVN users list, posted by
someone from Collabnet. He said that they use this method internally.

- Rush

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Dec 1 03:24:54 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.