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

Re: PATCH: cvs2svn tests: exec attr check

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2003-02-27 21:14:45 CET

Marko Macek <Marko.Macek@gmx.net> writes:
> * 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.

Thanks, Marko.

Your log message only mentions two changes -- sort the file list, and
fix a typo -- but there are really three changes here:

  1. You changed some code in get_exec_flag(), but the motivation for
     it is not clear (to me, at least)

  2. In cmp_attr(), you added the sort calls.

  3. Also in cmp_attr(), you fixed a typo.

Looks like changes #2 and #3 got listed in the log message, but #1 did
not. Is change #1 related to the sorting? (A comment in the code
might be helpful too.)

Can you redo the log message and repost? Please use the log message
format described in HACKING, especially, list all the symbols (in this
case, get_exec_flag and cmp_attr).

Sorry to make a fuss, but the effort required to review a change drops
dramatically if the change is completely and accurately described.

Thanks,
-Karl

> 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 Thu Feb 27 21:49:31 2003

This is an archived mail posted to the Subversion Dev mailing list.