Michael Haggerty wrote:
> The cvs2svn test suite was partly broken by some upstream changes in
> svntest (r32463 and r32484), which in turn were made to support format
> changes in the output of "svn proplist".
> If these changes were indeed intentional, I suppose that our only
> alternative would be to write a parser that can handle either form of
> the output (or switch to parsing the XML output or using the SVN
> bindings directly). Any other suggestions are welcome.
I finally had some time to address this.
The attached patch changes the test suite to read SVN file properties
via "svn proplist -v" in XML format rather than using text format (which
is hard to parse and has varied over time). And this is the whole
purpose of offering XML output, doesn't it?
Aside from the difference between Python unicode and non-unicode
strings, the results of the new code are equal to those of the old code
for all cases in the standard "make check".
The only difference I would expect compared to the old code is that the
old code handled end-of-lines unusually, which I presume was a
side-effect of having to parse the text output of "svn proplist". I
think that what the new code does is the "right thing", but *if* there
are problems they are likely to appear under Windows, which I don't have
available for testing.
Of course, the old code exercised "svn proplist -v" in text mode,
whereas the new code exercises "svn proplist -v --xml". However,
invoking "svn proplist" via get_props() is not the point of the tests
but rather an implementation detail, so I think that the difference is
not a problem.
I am a committer to the "svntest" part of the project, but I haven't
been very active lately so I would appreciate somebody reviewing the
code before I commit it.
Read svn properties in XML rather than text format in test suite.
This makes the routine shorter and more robust to strange property
values and to format changes in the text output format.
(get_props): Read svn properties via "svn proplist -v" using the
Received on 2009-07-26 18:03:06 CEST