[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: David Weintraub <qazwart_at_gmail.com>
Date: 2005-06-28 03:56:19 CEST

Subversion doesn't do "checkouts" like most other VCS do. You don't
need to lock a file in order to edit it, so there is no need to do
individual checkouts to tell Subversion what files you want to edit.
Because of this, Subversion was designed to create whole working
directories and not just a file here and there. You really cannot just
checkout a single file.

If you do checkout a whole directory and then delete all the files you
don't want, Subversion would be insisting that your directory needs an
update. I don't think you can even do a commit until you do an "svn
update" and copy back all of the missing files. In the end, you
wouldn't save any bandwidth or diskspace.

It is always easier to work with the tool than to attempt to adopt a
tool to work in a way it wasn't designed. If you really need to
checkout a single file at a time, you maybe better off going with CVS.

This is not a brush off. Not every development shop works the same way
and some tools are better working in certain paradigms than others.
Linux for example doesn't use Subversion because Subversion assumes a
single central repository, and Linux development doesn't work that
way. If you must work in a particular way, you're better off finding a
tool that supports the way you work than attempting to adopt a tool to
work in a way it wasn't intended.

On 6/27/05, Carsten Koch <Carsten.Koch@icem.com> wrote:
> 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
>
>

-- 
--
David Weintraub
qazwart@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jun 28 03:58:40 2005

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