On Thu, 2011-02-10, C. Michael Pilato wrote:
> Now tracked as http://subversion.tigris.org/issues/show_bug.cgi?id=3804
> 
> On 07/29/2010 10:14 AM, C. Michael Pilato 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

+1 to doing this, with the "--parents" flag required.  (Given that we
already use --parents in other subcommands, it would feel unnecessary
and inconsistent not to require it here.)

p.s. C-Mike, did I dream it, or did you implement something similar just
a few weeks ago?  Maybe --parents for another subcommand?

- Julian


Reply via email to