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

Re: Requesting a New Feature

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Thu, 29 Jul 2010 10:14:11 -0400

Sorta kinda. Let's use our own tree as an example. We start with an empty
checkout of the root of our project:

  $ svn co --depth empty http://svn.apache.org/repos/asf/subversion \
                         subversion
  $ cd subversion

Now you decide that you want the trunk code for our cmdline tests (and only
that code). You can do this today by the following lengthy process:

  $ svn up --depth empty trunk
  $ svn up --depth empty trunk/subversion
  $ svn up --depth empty trunk/subversion/tests
  $ svn up trunk/subversion/tests/cmdline

(IIRC, --depth and --set-depth are equivalent here because this behavior is
more checkout-like than update-like.)

Alternatively, I *suspect* you could do this:

  $ svn up --depth empty trunk trunk/subversion trunk/subversion/tests
  $ svn up trunk/subversion/tests/cmdline

So, fewer commands, but still an annoying approach. Elango is wondering why
'svn update' doesn't add missing-but-needed parent directories (at
depth=empty) by default. Why can't the above be shortened to just:

  $ svn up trunk/subversion/tests/cmdline

?

I think that's a fair question to ask. Note that if we like the idea but
don't wish to make it the default behavior, we have the --parents option we
can employ here to toggle it:

  $ svn up --parents trunk/subversion/tests/cmdline

On 07/29/2010 01:39 AM, Daniel Shahaf wrote:
> I assumed the request was to "pull in" a/b/c/d to a wc that doesn't have it
> yet... in which case I have to assume the OP (Elango) meant '--set-depth=empty'.
>
> (it's not an unreasonable feature idea IMO)
>
> Bob Archer wrote on Wed, Jul 28, 2010 at 17:33:04 -0400:
>>> Quiet a lot of users have reported that they would like to have a
>>> flag in svn update that allows them to update several sub
>>> directories in one command
>>>
>>> (when using sparse checkout),
>>>
>>> for example: a command like this
>>>
>>> svn up a\b\c\d will bring folder d with its content, and its
>>> parents.
>>>
>>
>>
>> Are you saying svn update isn't updating ALL of the currently checked out folders? My understanding is that it is supposed to. Of course I have been wrong before and I don't use sparse checkouts very often.
>>
>>
>>> Currently users need to run several commands to perform that:
>>>
>>> svn up --depth empty a
>>>
>>> svn up --depth empty a\b
>>>
>>> svn up --depth empty a\b\c
>>>
>>> svn up a\b\c\d
>>>
>>
>> Of course specifying --depth empty when you do an update will keep it from updating sub-folders.
>>
>> BOb
>>

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2010-07-29 16:14:56 CEST

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