David James wrote:
> On 8/17/05, blair@tigris.org <blair@tigris.org> wrote:
>> + * r15732
>> + Add contrib/client-side/svn_export_empty_files.py.
>> + Justification:
>> + It's a contrib script. Make it more accessible to svn users
>> + in the next svn release.
>> + Votes:
>> + +1: blair
>> +
>
> svn_export_empty_files.py uses gnu_getopt, and therefore it requires
> Python
> 2.4.
You mean Python 2.3 - but anyway, it's a contrib script, it's not required
to conform to the rules of the main distribution.
Of course, if that is the only thing stopping it being used with Python 2.2,
then it would be good to fix. Here's a patch:
Index: svn_export_empty_files.py
===================================================================
--- svn_export_empty_files.py (revision 15741)
+++ svn_export_empty_files.py (working copy)
@@ -37,6 +37,10 @@
"""
import getopt
+try:
+ my_getopt = getopt.gnu_getopt
+except AttributeError:
+ my_getopt = getopt.getopt
import os
import sys
@@ -358,14 +362,14 @@
ctx.delete_needed = False
try:
- opts, args = getopt.gnu_getopt(sys.argv[1:],
- 'hn:p:v',
- ['delete',
- 'help',
- 'name=',
- 'path=',
- 'verbose'
- ])
+ opts, args = my_getopt(sys.argv[1:],
+ 'hn:p:v',
+ ['delete',
+ 'help',
+ 'name=',
+ 'path=',
+ 'verbose'
+ ])
except getopt.GetoptError:
usage(False)
if len(args) < 1 or len(args) > 2:
I haven't committed it, because it would be a waste if there are other
things making the script require Python 2.3. Is someone in a position to
test this? (i.e. has Python 2.2 + svn bindings installed)
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 17 23:39:49 2005