Rev 447: Convert working copy locking errors to Bazaar errors. in http://people.samba.org/bzr/jelmer/bzr-svn/bzr.dev
Jelmer Vernooij
jelmer at samba.org
Sat May 5 15:17:14 BST 2007
At http://people.samba.org/bzr/jelmer/bzr-svn/bzr.dev
------------------------------------------------------------
revno: 447
revision-id: jelmer at samba.org-20070505141653-lzcfl8um8utc7yyc
parent: jelmer at samba.org-20070502115715-4o1dliyaye1a6a3n
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: main
timestamp: Sat 2007-05-05 16:16:53 +0200
message:
Convert working copy locking errors to Bazaar errors.
modified:
errors.py errors.py-20061226172623-w1sbj8ynpo0eojqp-1
tests/test_errors.py test_errors.py-20070129114605-ban03f32t6ja14ez-1
=== modified file 'errors.py'
--- a/errors.py 2007-03-17 21:25:43 +0000
+++ b/errors.py 2007-05-05 14:16:53 +0000
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-from bzrlib.errors import BzrError, ConnectionReset
+from bzrlib.errors import BzrError, ConnectionReset, LockError
import svn.core
@@ -32,6 +32,8 @@
if num == svn.core.SVN_ERR_RA_SVN_CONNECTION_CLOSED:
return ConnectionReset(msg=msg)
+ elif num == svn.core.SVN_ERR_WC_LOCKED:
+ return LockError(message=msg)
else:
return err
=== modified file 'tests/test_errors.py'
--- a/tests/test_errors.py 2007-01-31 12:54:40 +0000
+++ b/tests/test_errors.py 2007-05-05 14:16:53 +0000
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-from bzrlib.errors import ConnectionReset
+from bzrlib.errors import ConnectionReset, LockError
from bzrlib.tests import TestCase
from errors import convert_svn_error, convert_error
@@ -44,6 +44,9 @@
def test_convert_error_reset(self):
self.assertIsInstance(convert_error(SubversionException(svn.core.SVN_ERR_RA_SVN_CONNECTION_CLOSED, "Connection closed")), ConnectionReset)
+ def test_convert_error_lock(self):
+ self.assertIsInstance(convert_error(SubversionException(svn.core.SVN_ERR_WC_LOCKED, "Working copy locked")), LockError)
+
def test_decorator_nothrow(self):
@convert_svn_error
def test_nothrow(foo):
More information about the bazaar-commits
mailing list