Rev 5424: (jelmer) Allow control directories to not support create_workingtree(), in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Sep 14 13:30:23 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5424 [merge]
revision-id: pqm at pqm.ubuntu.com-20100914123018-2ozoky6crajelpkr
parent: pqm at pqm.ubuntu.com-20100914110939-hvk7xfh39y9hq76a
parent: jelmer at samba.org-20100911202526-r4an60xthcqt45mf
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2010-09-14 13:30:18 +0100
message:
(jelmer) Allow control directories to not support create_workingtree(),
even if they are local. (Jelmer Vernooij)
modified:
bzrlib/tests/per_controldir/test_controldir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
=== modified file 'bzrlib/tests/per_controldir/test_controldir.py'
--- a/bzrlib/tests/per_controldir/test_controldir.py 2010-09-10 09:46:15 +0000
+++ b/bzrlib/tests/per_controldir/test_controldir.py 2010-09-11 20:25:26 +0000
@@ -76,7 +76,7 @@
"""
try:
return a_bzrdir.create_workingtree()
- except errors.NotLocalUrl:
+ except (errors.NotLocalUrl, errors.UnsupportedOperation):
raise TestSkipped("cannot make working tree with transport %r"
% a_bzrdir.transport)
@@ -104,7 +104,7 @@
dir.create_branch()
try:
wt = dir.create_workingtree(revision_id=bzrlib.revision.NULL_REVISION)
- except errors.NotLocalUrl:
+ except (errors.NotLocalUrl, errors.UnsupportedOperation):
raise TestSkipped("cannot make working tree with transport %r"
% dir.transport)
self.assertEqual([], wt.get_parent_ids())
@@ -1006,7 +1006,8 @@
registry = controldir.network_format_registry
network_name = format.network_name()
looked_up_format = registry.get(network_name)
- self.assertEqual(format.__class__, looked_up_format.__class__)
+ self.assertTrue(
+ issubclass(format.__class__, looked_up_format.__class__))
# The network name must be a byte string.
self.assertIsInstance(network_name, str)
@@ -1151,7 +1152,7 @@
source.branch.clone(made_control)
try:
made_tree = made_control.create_workingtree(revision_id='a')
- except errors.NotLocalUrl:
+ except (errors.NotLocalUrl, errors.UnsupportedOperation):
raise TestSkipped("Can't make working tree on transport %r" % t)
self.assertEqual(['a'], made_tree.get_parent_ids())
@@ -1169,7 +1170,7 @@
made_repo = made_control.create_repository()
made_branch = made_control.create_branch()
made_tree = made_control.create_workingtree()
- except errors.NotLocalUrl:
+ except (errors.NotLocalUrl, errors.UnsupportedOperation):
raise TestSkipped("Can't initialize %r on transport %r"
% (self.bzrdir_format, t))
opened_tree = made_control.open_workingtree()
More information about the bazaar-commits
mailing list