fixing svn status on incomplete files issue #32

--HG--
branch : 1.0.x
This commit is contained in:
holger krekel 2009-08-14 18:01:16 +02:00
parent d702f4da14
commit d2f497084e
3 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,8 @@ Changes between 1.0.0 and 1.0.1
* fix issue #33: added --version flag (thanks Benjamin Peterson)
* fix issue #32: adding support for "incomplete" paths to wcpath.status()
* "Test" prefixed classes are *not* collected by default anymore if they
have an __init__ method

View File

@ -225,6 +225,12 @@ class TestWCSvnCommandPath(CommonSvnTests):
'''
XMLWCStatus.fromstring(xml, self.root)
def test_status_wrong_xml(self):
# testing for XML without author - this used to raise an exception
xml = u'<entry path="/home/jean/zope/venv/projectdb/parts/development-products/DataGridField">\n<wc-status item="incomplete" props="none" revision="784">\n</wc-status>\n</entry>'
st = XMLWCStatus.fromstring(xml, self.root)
assert len(st.incomplete) == 1
def test_diff(self):
p = self.root / 'anotherfile'
out = p.diff(rev=2)

View File

@ -671,6 +671,10 @@ class XMLWCStatus(WCStatus):
wcpath = rootwcpath.join(path, abs=1)
rootstatus.ignored.append(wcpath)
continue
elif itemstatus == 'incomplete':
wcpath = rootwcpath.join(path, abs=1)
rootstatus.incomplete.append(wcpath)
continue
rev = statusel.getAttribute('revision')
if itemstatus == 'added' or itemstatus == 'none':