From d2f497084e4e2071bb3bf8bd7bd65de65fa1e121 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 14 Aug 2009 18:01:16 +0200 Subject: [PATCH] fixing svn status on incomplete files issue #32 --HG-- branch : 1.0.x --- CHANGELOG | 2 ++ py/path/svn/testing/test_wccommand.py | 6 ++++++ py/path/svn/wccommand.py | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 9c5547029..46506e19c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/py/path/svn/testing/test_wccommand.py b/py/path/svn/testing/test_wccommand.py index 8067f80f5..5fe58a656 100644 --- a/py/path/svn/testing/test_wccommand.py +++ b/py/path/svn/testing/test_wccommand.py @@ -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'\n\n\n' + st = XMLWCStatus.fromstring(xml, self.root) + assert len(st.incomplete) == 1 + def test_diff(self): p = self.root / 'anotherfile' out = p.diff(rev=2) diff --git a/py/path/svn/wccommand.py b/py/path/svn/wccommand.py index ae6245160..51394b69b 100644 --- a/py/path/svn/wccommand.py +++ b/py/path/svn/wccommand.py @@ -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':