From 6863f54951031ff14c96e2ccbeb7a405c16d110f Mon Sep 17 00:00:00 2001 From: hpk Date: Tue, 2 Dec 2008 11:08:51 +0100 Subject: [PATCH] [svn r60277] triggered by https://codespeak.net/issue/py-dev/issue66 * check for 1.5 messages for non-versioned resources * modify non-recursive commit test to account for subversion behaviour changes (non-recursive commit on directory will now commit modified files in it, but will not recurse or add subdirs) --HG-- branch : trunk --- py/path/svn/testing/test_wccommand.py | 9 ++++----- py/path/svn/wccommand.py | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/py/path/svn/testing/test_wccommand.py b/py/path/svn/testing/test_wccommand.py index 68c73db1e..d9e1738b4 100644 --- a/py/path/svn/testing/test_wccommand.py +++ b/py/path/svn/testing/test_wccommand.py @@ -366,22 +366,21 @@ class TestWCSvnCommandPath(CommonSvnTests): def test_commit_nonrecursive(self): root = self.root somedir = root.join('sampledir') - somefile = somedir.join('otherfile') - somefile.write('foo') + somedir.mkdir("subsubdir") somedir.propset('foo', 'bar') status = somedir.status() assert len(status.prop_modified) == 1 - assert len(status.modified) == 1 + assert len(status.added) == 1 somedir.commit('non-recursive commit', rec=0) status = somedir.status() assert len(status.prop_modified) == 0 - assert len(status.modified) == 1 + assert len(status.added) == 1 somedir.commit('recursive commit') status = somedir.status() assert len(status.prop_modified) == 0 - assert len(status.modified) == 0 + assert len(status.added) == 0 def test_commit_return_value(self): root = self.root diff --git a/py/path/svn/wccommand.py b/py/path/svn/wccommand.py index 016be8cbc..558d32cb5 100644 --- a/py/path/svn/wccommand.py +++ b/py/path/svn/wccommand.py @@ -389,6 +389,8 @@ recursively. """ except py.process.cmdexec.Error, e: if e.err.find('Path is not a working copy directory') != -1: raise py.error.ENOENT(self, e.err) + elif e.err.find("is not under version control") != -1: + raise py.error.ENOENT(self, e.err) raise # XXX SVN 1.3 has output on stderr instead of stdout (while it does # return 0!), so a bit nasty, but we assume no output is output