You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Elango Subramanian <el...@collab.net> on 2010/07/28 19:19:51 UTC

Requesting a New Feature

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.

 

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

 

Thanks & Regards.

_____________________________________________

Elango S

 


Re: Requesting a New Feature

Posted by Stefan Küng <to...@gmail.com>.
On Thu, Feb 10, 2011 at 18:34, Julian Foad <ju...@wandisco.com> wrote:
> 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?

I'm confused, isn't this already implemented?

svn_client_update4() has a parameter 'makeparents' for which the docs tell:
 * If @a make_parents is TRUE, create any non-existent parent
 * directories also by checking them out at depth=empty.

it mentions "parent directories" (plural), so I would assume that this
already should be implemented as requested?

Stefan


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

Re: Requesting a New Feature

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 02/10/2011 02:49 PM, Bob Archer wrote:
>> On 02/10/2011 12:34 PM, Julian Foad wrote:
>>> p.s. C-Mike, did I dream it, or did you implement something
>> similar
>>> just a few weeks ago?  Maybe --parents for another subcommand?
>>
>> Wow.  I mean ... just ... wow.
>>
>> /me cries.
> 
> Is that a yea or nay?

Yes, I implemented this already.  See issue #3748.
http://subversion.tigris.org/issues/show_bug.cgi?id=3748

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


RE: Requesting a New Feature

Posted by Bob Archer <Bo...@amsi.com>.
> On 02/10/2011 12:34 PM, Julian Foad wrote:
> > p.s. C-Mike, did I dream it, or did you implement something
> similar
> > just a few weeks ago?  Maybe --parents for another subcommand?
> 
> Wow.  I mean ... just ... wow.
> 
> /me cries.

Is that a yea or nay?

BOb


Re: Requesting a New Feature

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 02/10/2011 02:54 PM, Mark Phippard wrote:
> On Thu, Feb 10, 2011 at 2:48 PM, C. Michael Pilato <cm...@collab.net> wrote:
>> On 02/10/2011 12:34 PM, Julian Foad wrote:
>>> p.s. C-Mike, did I dream it, or did you implement something similar just
>>> a few weeks ago?  Maybe --parents for another subcommand?
>>
>> Wow.  I mean ... just ... wow.
>>
>> /me cries.
> 
> That is what you get for going through old emails.

Indeed!

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


Re: Requesting a New Feature

Posted by Mark Phippard <ma...@gmail.com>.
On Thu, Feb 10, 2011 at 2:48 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 02/10/2011 12:34 PM, Julian Foad wrote:
>> p.s. C-Mike, did I dream it, or did you implement something similar just
>> a few weeks ago?  Maybe --parents for another subcommand?
>
> Wow.  I mean ... just ... wow.
>
> /me cries.

That is what you get for going through old emails.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

Re: Requesting a New Feature

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 02/10/2011 12:34 PM, Julian Foad wrote:
> p.s. C-Mike, did I dream it, or did you implement something similar just
> a few weeks ago?  Maybe --parents for another subcommand?

Wow.  I mean ... just ... wow.

/me cries.

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


Re: Requesting a New Feature

Posted by Julian Foad <ju...@wandisco.com>.
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



Re: Requesting a New Feature

Posted by "C. Michael Pilato" <cm...@collab.net>.
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

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


RE: Requesting a New Feature

Posted by Bob Archer <Bo...@amsi.com>.
> 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

Yes, I know and kudos to TSVN... while I am perfectly adept at the svn command line I still use TSVN cause it does much of the heavy lifting for you if you are doing anything more than a basic svn up or svn ci.

BOb


Re: Requesting a New Feature

Posted by Stefan Küng <to...@gmail.com>.
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

RE: Requesting a New Feature

Posted by Bob Archer <Bo...@amsi.com>.
> 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.

BOb



> 
> 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 <cm...@collab.net>
> CollabNet   <>   www.collab.net   <>   Distributed Development On
> Demand


Re: Requesting a New Feature

Posted by "C. Michael Pilato" <cm...@collab.net>.
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 <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: Requesting a New Feature

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
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
> 

RE: Requesting a New Feature

Posted by Bob Archer <Bo...@amsi.com>.
> 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