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

PATCH: cvs2svn tests: exec attr check

From: Marko Macek <Marko.Macek_at_gmx.net>
Date: 2003-02-26 22:15:03 CET

Hi!

* cvs2svn/tests/cmptag.py:
   - Sort the file list before checking for attributes. Directory order is
     not guaranteed.
   - Fix syntax error / typo when attribute mismatch is detected.

Regards,
Mark

Index: cmptag.py
===================================================================
--- cmptag.py (revision 5121)
+++ cmptag.py (working copy)
@@ -44,7 +44,8 @@
            continue
         f = os.path.join(dirname, fn)
         mode = os.stat(f)[0]
- arg.append((fn, mode & stat.S_IXUSR))
+ arg[0].append((dirname[len(arg[1]):] + "/" + fn,
+ mode & stat.S_IXUSR))
         i += 1
         
     
@@ -52,10 +53,12 @@
 def cmp_attr(dir1, dir2):
     attr1 = []
     attr2 = []
- os.path.walk(dir1, get_exec_flag, attr1)
- os.path.walk(dir2, get_exec_flag, attr2)
+ os.path.walk(dir1, get_exec_flag, [ attr1, dir1 ])
+ os.path.walk(dir2, get_exec_flag, [ attr2, dir2 ])
+ attr1.sort();
+ attr2.sort();
     if attr1 != attr2:
- print repr(attr1), attr(2)
+ print repr(attr1), repr(attr2)
        raise "mismatch in file attributes"
 
 def check_tag(cvs_repo, module, tag, svn_repo, path):

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 26 22:08:03 2003

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.