1 new commit in py:
https://bitbucket.org/hpk42/py/changeset/5afa5d2a3bea/ changeset: 5afa5d2a3bea user: hpk42 date: 2011-11-24 11:21:51 summary: try to fix failures related to subversion 1.7. affected #: 6 files diff -r c8e97602a6cb3a2b3332f1bb3f76a857bfa7c5fa -r 5afa5d2a3bea96b5741202a799aae44b8394802c CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,9 @@ - fix issue7: source.getstatementrange() now raises proper error if no valid statement can be found +- fix issue8: fix code and tests of svnurl/svnwc to work on subversion 1.7 - + note that path.status(updates=1) will not properly work svn-17's status + --xml output is broken. Changes between 1.4.4 and 1.4.5 ================================================== diff -r c8e97602a6cb3a2b3332f1bb3f76a857bfa7c5fa -r 5afa5d2a3bea96b5741202a799aae44b8394802c py/__init__.py --- a/py/__init__.py +++ b/py/__init__.py @@ -8,7 +8,7 @@ (c) Holger Krekel and others, 2004-2010 """ -__version__ = '1.4.6.dev1' +__version__ = '1.4.6.dev3' from py import _apipkg diff -r c8e97602a6cb3a2b3332f1bb3f76a857bfa7c5fa -r 5afa5d2a3bea96b5741202a799aae44b8394802c py/_path/svnurl.py --- a/py/_path/svnurl.py +++ b/py/_path/svnurl.py @@ -233,6 +233,8 @@ e = sys.exc_info()[1] if e.err.find('non-existent in that revision') != -1: raise py.error.ENOENT(self, e.err) + elif e.err.find("E200009:") != -1: + raise py.error.ENOENT(self, e.err) elif e.err.find('File not found') != -1: raise py.error.ENOENT(self, e.err) elif e.err.find('not part of a repository')!=-1: diff -r c8e97602a6cb3a2b3332f1bb3f76a857bfa7c5fa -r 5afa5d2a3bea96b5741202a799aae44b8394802c py/_path/svnwc.py --- a/py/_path/svnwc.py +++ b/py/_path/svnwc.py @@ -482,10 +482,13 @@ except py.process.cmdexec.Error: e = sys.exc_info()[1] strerr = e.err.lower() - if strerr.find('file not found') != -1: + if strerr.find('not found') != -1: + raise py.error.ENOENT(self) + elif strerr.find("E200009:") != -1: raise py.error.ENOENT(self) if (strerr.find('file exists') != -1 or strerr.find('file already exists') != -1 or + strerr.find('w150002:') != -1 or strerr.find("can't create directory") != -1): raise py.error.EEXIST(self) raise @@ -593,7 +596,7 @@ out = self._authsvn('lock').strip() if not out: # warning or error, raise exception - raise Exception(out[4:]) + raise ValueError("unknown error in svn lock command") def unlock(self): """ unset a previously set lock """ @@ -1066,6 +1069,8 @@ modrev = '?' author = '?' date = '' + elif itemstatus == "replaced": + pass else: #print entryel.toxml() commitel = entryel.getElementsByTagName('commit')[0] @@ -1148,7 +1153,11 @@ raise ValueError("Not a versioned resource") #raise ValueError, "Not a versioned resource %r" % path self.kind = d['nodekind'] == 'directory' and 'dir' or d['nodekind'] - self.rev = int(d['revision']) + try: + self.rev = int(d['revision']) + except KeyError: + self.rev = None + self.path = py.path.local(d['path']) self.size = self.path.size() if 'lastchangedrev' in d: diff -r c8e97602a6cb3a2b3332f1bb3f76a857bfa7c5fa -r 5afa5d2a3bea96b5741202a799aae44b8394802c setup.py --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ name='py', description='library with cross-python path, ini-parsing, io, code, log facilities', long_description = open('README.txt').read(), - version='1.4.6.dev1', + version='1.4.6.dev3', url='http://pylib.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff -r c8e97602a6cb3a2b3332f1bb3f76a857bfa7c5fa -r 5afa5d2a3bea96b5741202a799aae44b8394802c testing/path/test_svnwc.py --- a/testing/path/test_svnwc.py +++ b/testing/path/test_svnwc.py @@ -1,5 +1,6 @@ import py import os, sys +import pytest from py._path.svnwc import InfoSvnWCCommand, XMLWCStatus, parse_wcinfotime from py._path import svnwc as svncommon from svntestbase import CommonSvnTests @@ -105,6 +106,7 @@ assert r.join('sampledir/otherfile').basename in [item.basename for item in s.unchanged] + @pytest.mark.xfail(reason="svn-1.7 has buggy 'status --xml' output") def test_status_update(self, path1): r = path1 try: @@ -112,6 +114,7 @@ s = r.status(updates=1, rec=1) # Comparing just the file names, because paths are unpredictable # on Windows. (long vs. 8.3 paths) + py.std.pprint.pprint(s.allpath()) assert r.join('anotherfile').basename in [item.basename for item in s.update_available] #assert len(s.update_available) == 1 @@ -122,7 +125,6 @@ p = path1.join("samplefile") p.remove() p.ensure(dir=0) - p.add() try: s = path1.status() assert p.basename in [item.basename for item in s.replaced] @@ -164,8 +166,6 @@ otherrepo, otherrepourl, otherwc = repowc2 d = path1.ensure('sampledir', dir=1) try: - d.remove() - d.add() d.update() d.propset('svn:externals', 'otherwc %s' % (otherwc.url,)) d.update() @@ -181,7 +181,7 @@ def test_status_deleted(self, path1): d = path1.ensure('sampledir', dir=1) d.remove() - d.add() + d.ensure(dir=1) path1.commit() d.ensure('deletefile', dir=0) d.commit() @@ -338,7 +338,7 @@ somefile = root.join('somefile') somefile.ensure(file=True) # not yet added to repo - py.test.raises(py.process.cmdexec.Error, 'somefile.lock()') + py.test.raises((py.process.cmdexec.Error, ValueError), 'somefile.lock()') somefile.write('foo') somefile.commit('test') assert somefile.check(versioned=True) Repository URL: https://bitbucket.org/hpk42/py/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn