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

[PATCH] change-svn-wc-format (minor change)

From: Edmund Wong <edmund_at_belfordhk.com>
Date: Tue, 31 Mar 2009 12:22:04 +0800

Hi guys,

Minor change to line #93. According to Python rules,
the following is 'wrong' (for v2.6):

   except UnrecognizedWCFormatException, e:

It should be:

   except (UnrecognizedWCFormatException, e):

Please note that this was 'accidentally' pointed out by
ibarrien_at_adobe.com. I looked at the v2.6 rules and
'lo and behold, it's wrong to have the first line.
(Of course, the interpreter didn't complain when
I ran it, but rules are rules.) Mind you, he was referring
to Python 3.01, in which case the statement should
be:

   except (UnrecognziedWCFormatException as e):

But since 3.0x isn't supported in subversion (yet),
I'll leave this until later or never since by 1.7,
this script will be useless, at least for 1.7 users. :)

[[[
     Changed an exception statement to reflect
   2.6 rules.

   * tools/client-side/change-svn-wc-format.py:
       (write_dir_format): Added parenthesis to
                           the exception line
                           as per Python 2.6 rules.

   Found by: Ignacio Barrientos <ibarrien_at_adobe.com>

   Patch by: Edmund Wong <edmund_at_belfordhk.com>

]]]

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1491128

Index: change-svn-wc-format.py
===================================================================
--- change-svn-wc-format.py (revision 36881)
+++ change-svn-wc-format.py (working copy)
@@ -89,7 +89,7 @@
       print("Parsing file '%s'" % entries.path)
     try:
       entries.parse(self.verbosity)
- except UnrecognizedWCFormatException, e:
+ except (UnrecognizedWCFormatException, e):
       if self.error_on_unrecognized:
         raise
       sys.stderr.write("%s, skipping\n" % e)
Received on 2009-03-31 12:58:21 CEST

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.