Rev 2609: Add PartialCloningNotSupported error. in file:///data/jelmer/bzr/shallow/

Jelmer Vernooij jelmer at samba.org
Fri Jul 13 12:03:07 BST 2007


At file:///data/jelmer/bzr/shallow/

------------------------------------------------------------
revno: 2609
revision-id: jelmer at samba.org-20070712144206-5e230fhf3swbzkwo
parent: pqm at pqm.ubuntu.com-20070712114408-7iozx4b8hq8ts24n
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: shallow
timestamp: Thu 2007-07-12 17:42:06 +0300
message:
  Add PartialCloningNotSupported error.
modified:
  bzrlib/errors.py               errors.py-20050309040759-20512168c4e14fbd
  bzrlib/tests/test_errors.py    test_errors.py-20060210110251-41aba2deddf936a8
=== modified file 'bzrlib/errors.py'
--- a/bzrlib/errors.py	2007-07-05 22:42:07 +0000
+++ b/bzrlib/errors.py	2007-07-12 14:42:06 +0000
@@ -297,6 +297,14 @@
         self.url = url
 
 
+class PartialCloningNotSupported(BzrError):
+
+    _fmt = "'%(bzrdir)s' does not support partial cloning."
+
+    def __init__(self, bzrdir):
+        self.bzrdir = bzrdir
+
+
 class WorkingTreeAlreadyPopulated(BzrError):
 
     _fmt = """Working tree already populated in %(base)s"""

=== modified file 'bzrlib/tests/test_errors.py'
--- a/bzrlib/tests/test_errors.py	2007-07-05 22:42:07 +0000
+++ b/bzrlib/tests/test_errors.py	2007-07-12 14:42:06 +0000
@@ -135,6 +135,11 @@
             "to be.",
             str(error))
 
+    def test_partial_cloning_not_supported(self):
+        error = errors.PartialCloningNotSupported("a bzrdir")
+        self.assertEqual("'a bzrdir' does not support partial cloning.", 
+            str(error))
+
     def test_read_only_lock_error(self):
         error = errors.ReadOnlyLockError('filename', 'error message')
         self.assertEqualDiff("Cannot acquire write lock on filename."




More information about the bazaar-commits mailing list