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