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

Re: [PATCH] Add --dry-run flag to "svn update" client command

From: Mark Phippard <markphip_at_gmail.com>
Date: Wed, 2 Mar 2011 08:50:31 -0500

On Wed, Mar 2, 2011 at 8:42 AM, Hyrum K Wright <hyrum_at_hyrumwright.org> wrote:
> On Wed, Mar 2, 2011 at 4:14 AM, Bert Huijben <bert_at_qqmail.nl> wrote:
>>
>>
>>> -----Original Message-----
>>> From: Arwin Arni [mailto:arwin_at_collab.net]
>>> Sent: woensdag 2 maart 2011 10:49
>>> To: dev_at_subversion.apache.org
>>> Subject: [PATCH] Add --dry-run flag to "svn update" client command
>>>
>>> Hi All,
>>>
>>> In my effort to understand the delta editor API, I took it upon myself
>>> to try and implement the --dry-run flag for "svn update".
>>> With Kamesh's guidance, I think I've managed to pull it off.
>>>
>>> Here is the relevant Issue.
>>> http://subversion.tigris.org/issues/show_bug.cgi?id=2491
>>>
>>> I have attached a log message and a patch that implements --dry-run for
>>> update.
>>>
>>> Currently, externals are handled inside
>>> subversion/libsvn_client/externals.c by running checkout/switch. For a
>>> dry-run update to mimic a real update, the notifications have to be the
>>> same. Since some of these notifications are generated by the above
>>> mentioned checkout/switch runs, I have to implement dry-run for them
>>> also. I'll take this up as a follow-up exercise. Now, the dry-run will
>>> simply ignore any externals in the working copy.
>>>
>>> Please review this and share your thoughts.
>>
>> I don't think this is the way we should implement this.
>>
>> This patch adds an if before every operation in the update editor that changes the working copy. This makes the update editor harder to maintain, while you really only need a simple editor implementation that notifies its output to get a dry run output.
>>
>> That would allow the dry run code to be maintained independently without obfuscating the existing update editor.
>>
>>
>> Besides: I don't know why the update editor really needs --dry run support. We always told our users to use svn status -U, which shows the same information in a generally more useful output.
>>
>> A dry run update is a nice feature for 'svn' with console notification, but implemented this way it doesn't help any other Subversion client, while status -U does. Should we improve status -U instead?
>
> Agreed.  I'm not a fan of duplicating this functionality (and
> maintaining them in parallel when they inevitably drift) as part of
> 'svn up'.  Let's improve what we already have, rather than inventing
> 'svn st -U'

I think Arwin has some good points. Unless we let update do its thing
and discard the updates we cannot know if there are going to be
conflicts. I do not think svn st -U would ever grow a feature like
that would it?

I also do not see why clients could not use this. Presumably it sends
notifications just like merge --dry-run.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on 2011-03-02 14:51:06 CET

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.