Re: [PATCH] Add verify-all script to run repeated conversions and verify each one

Michael Haggerty <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.devel
Message-ID <[email protected]>
Greg Ward wrote:
> On Sat, Aug 22, 2009 at 10:12 AM, Michael Haggerty<[email protected]> wrote:
>> If this is really going to become a testing framework, then we need to
>> think about promoting this script and the verify-cvs2svn.py script out
>> of the "contrib" directory into the maintained part of the project.  At
>> the same time, we might rename verify-cvs2svn.py to something more
>> generic and also something importable (i.e., s/-/_/).  Then, also, the
>> verify-all script could use verify-cvs2svn.py as a Python library rather
>> than as a separate process.
> 
> Sounds fine to me.  Turning the script into a module opens up all
> sorts of possibilities (like adding an optional verification pass
> after cvs2xxx runs).

Yes.  So it should probably move to cvs2svn_lib with all our other modules.

>> By the way, to decide what branches and tags need verification, it would
>> be safer to determine the symbol names from the CVS repo instead of the
>> target repo.  Otherwise, the verification would not notice if a
>> conversion forgets a symbol.
> 
> There's a "who guards the guards?" problem: either we get something in
> cvs2svn_lib to report all CVS tags and branches (or at least, all that
> it was instructed to convert and should therefore be verified), or we
> reinvent a little bit of its CVS-grokking logic.  The former means
> that the test code depends on the code that it's testing.  The latter
> makes the test code independent, but reinvents a wheel.

I don't think that the "who guards the guards?" problem is so terrible.
 Much of the "cvs2" functionality is covered by the test suite for
cvs2svn, and so should catch grave problems like completely omitting a
branch.  Then, assuming that the enumeration of branches and tags is
done by code that is shared across the backends, it would be OK for the
verify-cvs2svn-style tests assume that the branch and tag lists are correct.

>> In fact, the verification script could input a symbol-info file output
>> by the main conversion.  This would not only tell it what symbols are
>> present in the CVS repository, but would also let it know which symbols
>> were excluded or renamed in the conversion.
> 
> If we go with that option (no wheel reinventing, but test code depends
> on tested code), then we should also make it write symbol
> transformation info.  E.g. verification needs to know to compare CVS
> tag x to target tag y.

Yes, you're right that to cover the general case we also need to handle
symbol transformations.  But symbol transformations are *quite* general
(for example, they can make two CVS tags into a single SVN tag), so it
might not be practical to handle *all* cases.

Still, every little bit counts, and a partial job would already be a big
improvement.  Let not the perfect be the enemy of the good.

Michael

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2386556

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.