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

Re: svn commit: r36086 - trunk/contrib/client-side/svnmerge

From: Paul Burba <ptburba_at_gmail.com>
Date: Wed, 25 Mar 2009 11:46:45 -0400

On Wed, Mar 25, 2009 at 11:22 AM, Greg Stein <gstein_at_gmail.com> wrote:
> This rev was asked about on IRC, for inclusion into 1.6.x. I've got no
> opinion on that, but I do have a review of it...
>
> On Mon, Feb 23, 2009 at 22:45, Paul T. Burba <pburba_at_collab.net> wrote:
>>...
>> +++ trunk/contrib/client-side/svnmerge/svnmerge.py      Mon Feb 23 13:45:14 2009        (r36086)
>> @@ -908,7 +908,12 @@ def set_props(dir, name, props):
>>     if props:
>>         _run_propset(dir, name, props)
>>     else:
>> -        svn_command('propdel "%s" "%s"' % (name, dir))
>> +        # Check if NAME exists on DIR before trying to delete it.
>> +        # As of 1.6 propdel no longer supports deleting a
>> +        # non-existent property.
>> +        out = launchsvn('propget "%s" "%s"' % (name, dir))
>> +        if (len(out) > 0):
>> +            svn_command('propdel "%s" "%s"' % (name, dir))
>
> That 'if' condition is so redundant, it's not even funny :-P
>
> if out:
>  svn_command(...)
>
>
> No need to get the length, nor to check for greater than zero. Just
> redundant stuff for Python.

Yikes, thanks Greg, fixed r36767.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1416929
Received on 2009-03-25 16:47:23 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.