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

RE: How can I check out parts of a directory tree?

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2005-06-27 20:36:20 CEST

Carsten,

to the best of my knowledge, you can only do this for whole folders,
meaning one folder with all its files ( but not subfolders ).
That's what the '-N' option does for you.

What you can do is:

1. get the 'public' folder as child of current folder,
only the folder, not the files in it!
>svn checkout http://www.mobsol.be/svn/public -N
Checked out revision 7.

2. find a file:
>svn list -R|grep nl.po
subversion/translations/nl.po

3. fetch the file:
>svn update -N ./subversion/translations/nl.po
Skipped 'subversion\translations\nl.po'

Doh! this doesn't work!

So, the real number 3 is:
3. your script has to parse both 'subversion' and 'translations'
folders in this case, and one by one update them, but not
recursively!
>svn update -N ./subversion
A subversion

>svn update -N ./subversion/translations
A subversion\translations
A subversion\translations\nl.po

So you'll get all files in the same folder as the one file you're
interested in.

Hope this helps.

Lieven.

-----Original Message-----
From: Carsten Koch [mailto:Carsten.Koch@icem.com]
Sent: maandag 27 juni 2005 19:57
To: users@subversion.tigris.org
Subject: How can I check out parts of a directory tree?

Hi,

I have to develop software tools that allow users to check out specific
parts of a directory tree.

For example, there is
     http://server/repository/product/trunk/dira/dirb

Users want one script that sets up their environment, so it would create an
empty directory wc, containing an empty directory dira, containing an empty
directory dirb.
They want this structure to be set up so they can later decide what specific
source files to work on.

They want a second script that populates the structure.
Ideally with single files. If, for example, there is a file b.cpp in
http://server/repository/product/trunk/dira/dirb,
they want to say "checkout b.cpp" in any subdirectory (wc, dira, or dirb)
and the script must find out that it needs to put b.cpp into wc/dira/dirb.

I know the easiest way to implement that would be to simply let the first
script check out everything and then remove everything except for the hidden
.svn directories. The second script must then use "svn list -R"
on the base directory to find out where the needed file goes and, in the
above example, issue an "svn update b.cpp"
in wc/dira/dirb.

The problem with checking out everything an then deleting most of it is
obvious: I am wasting a lot of bandwith and people (like me) who only have a
64kbit ISDN line have to wait forever.

Obviously, I could let my script create fake ".svn"
directories, but that does not seem right, as the structure inside them is
subject to change.

Is there a correct way of doing this?

Thanks!

Carsten.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.1/28 - Release Date: 24/06/2005
 
-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.1/28 - Release Date: 24/06/2005
 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jun 27 20:39:33 2005

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.