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

[PATCH] Change test suite to read file properties in XML format [was: Re: cvs2svn test suite breakage caused by svn changes]

From: Michael Haggerty <mhagger_at_alum.mit.edu>
Date: Sun, 26 Jul 2009 18:02:40 +0200

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.

Thanks,
Michael

[[[
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.

* subversion/tests/cmdline/svntest/tree.py
  (get_props): Read svn properties via "svn proplist -v" using the
  "--xml" option.
]]]

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2375675

Received on 2009-07-26 18:03:06 CEST

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.