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

Re: SVN improvements - again ;)

From: Michael Sweet <mike_at_easysw.com>
Date: 2006-04-06 15:50:12 CEST

Julian Foad wrote:
> Ben Collins-Sussman wrote:
>> On 3/28/06, Alexander Limi <limi@plone.org> wrote:
> [...]
>>> It's impossible for me to know where this failed. Would it be
>>> possible to
>>> make it do something like:
>>>
>>> $ svn up *
>>> Archetypes: Updated to revision 21411.
>>> CMFPlone: Updated to revision 66241.
>>> Ploneboard: Updated to revision 21411.
>>
>> Hmm, interesting. Technically, you typed the equivalent of
>>
>> $ svn up archetypes cmfplone ploneboard
>>
>> Which subversion treats exactly the same as if you had typed
>>
>> $ svn up archetypes
>> $ svn up cmfplone
>> $ svn up ploneboard
>>
>> So yeah, perhaps if 'update' has multiple targets, it can tell you
>> what it's updating...
>
> As an incremental improvement, printing the name of each target would
> help in cases like this, but I don't think that gain is worth the risk
> of upsetting people who parse the output for the "Updated to revision
> N." line.
>
> If "svn update" is to handle multiple targets in a better way than just
> iterating over them as it does now, then ultimately I'd like it to
> combine them and do a single update covering all of them, at least a
> single update for each group of targets that are in the same
> repository. (Whether that would involve changing the semantics in any
> way beyond just printing a single "Updated" line for each repository is
> unclear.)
>
> The difficulty above, of not knowing which target each part of the
> output refers to, can be resolved easily by replacing "svn up *" with
> something like "for T in *; do echo Updating $T:; svn up $T; done".

Building on that, how about just printing the directory that is being
updated when the user specifies more than one directory, e.g.:

     $ svn up *
     Updating 'archetypes'
     Updated to revision 21411.
     Updating 'CMFPlone'
     Updated to revision 66241.
     Updating 'Ploneboard'
     Updated to revision 21411.

vs.:

     $ svn up archetypes
     Updated to revision 21411.

That would keep the output to a minimum for the common "svn up"
scenario while providing enough information for users when they
update multiple directories. Scripts can continue to parse the
output for the single-directory output format, and if you are
doing multiple directories you probably are already using a for
loop for each directory anyways...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 6 15:50:48 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.