[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: Greg Stein <gstein_at_gmail.com>
Date: Wed, 25 Mar 2009 16:22:59 +0100

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.

Cheers,
-g

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