On 29.07.2010 16:28, Bob Archer wrote:
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


I see... I understand what he is saying now. I misunderstood from the
first paragraph him saying he wanted it to "update" sub-folders so I
assumed they were already checked out.

I guess I am spoiled because in TortoiseSVN you can do this very
easily by just selecting the folder in the repository browser,
choosing Update to revision, select HEAD and Fully Recursive and it
gets all the parent folders automatically too.

That's because TSVN does the lengthy process of updating each intermediate folder individually.
So it does the:
  $ svn up --depth empty trunk
  $ svn up --depth empty trunk/subversion
  $ svn up --depth empty trunk/subversion/tests
  $ svn up               trunk/subversion/tests/cmdline
without asking the user but just does this (if the folders don't exist yet).

But I would be happy if the svn lib would do that automatically with a new flag.

Stefan


--
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net

Reply via email to