[py-dev] error on trunk in py.path.svn support
Martijn Faassen
faassen at startifact.com
Tue Aug 19 19:02:34 CEST 2008
Hi there,
I just tried the trunk of Py with my project which makes very heavy use
of the py.path SVN facilities, and I get a lot of errors that look like
this:
File
"/home/faassen/buildout/z3c.vcsync/py/py/path/svn/wccommand.py", line
270, in status
rootstatus = XMLWCStatus(self).fromstring(out, self)
File
"/home/faassen/buildout/z3c.vcsync/py/py/path/svn/wccommand.py", line
687, in fromstring
for c in commitel.getElementsByTagName('author')[0]\
IndexError: list index out of range
It looks to me like a certain assumption about the format of the XML
returned is incorrect.
The SVN version on my system is svn, version 1.4.3 (r23084)
When debugging it, the XML that trips up the code looks like this:
<entry path="/tmp/pytest-23/wc">
<wc-status item="normal" props="none" revision="0">
<commit revision="0">
<date>2008-08-19T16:50:53.400198Z</date>
</commit>
</wc-status>
</entry>
It looks like this means there is not always an 'author' entry in this
XML structure.
Attached is a patch to wccommand.py that makes the problem go away (and
indeed seems to fix the original problem I was looking into - the trunk
has support for the svn status flag R, something that py 0.9.1 didn't have).
I realize this patch isn't enough but needs a test as well. I could find
no obvious way (in the form of documentation, say, the README.txt, or
the website) on how to actually run the tests of the trunk. :) It's
quite possible I missed something.
Is py 0.9.2 to be based off the work on the trunk?
Regards,
Martijn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: authorxml.patch
Type: text/x-patch
Size: 867 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20080819/51707bff/attachment.bin>
More information about the Pytest-dev
mailing list