Rev 2234: Various changes in response to John's review. in sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/
Andrew Bennetts
andrew.bennetts at canonical.com
Wed Apr 18 06:39:46 BST 2007
At sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/
------------------------------------------------------------
revno: 2234
revision-id: andrew.bennetts at canonical.com-20070418053831-u9bbsbljuzymrz6z
parent: andrew.bennetts at canonical.com-20070418051019-tek0rr8alo1z2sop
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss
timestamp: Wed 2007-04-18 15:38:31 +1000
message:
Various changes in response to John's review.
modified:
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
bzrlib/tests/branch_implementations/test_parent.py test_parent.py-20050830052751-5e62766623c32222
bzrlib/tests/bzrdir_implementations/test_bzrdir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-04-17 09:01:53 +0000
+++ b/bzrlib/repository.py 2007-04-18 05:38:31 +0000
@@ -1747,7 +1747,7 @@
"""
def __init__(self, transport_server, transport_readonly_server, formats,
- vfs_transport_factory=None):
+ vfs_transport_factory=None):
self._transport_server = transport_server
self._transport_readonly_server = transport_readonly_server
self._vfs_transport_factory = vfs_transport_factory
@@ -1760,6 +1760,8 @@
new_test = deepcopy(test)
new_test.transport_server = self._transport_server
new_test.transport_readonly_server = self._transport_readonly_server
+ # Only override the test's vfs_transport_factory if one was
+ # specified, otherwise just leave the default in place.
if self._vfs_transport_factory:
new_test.vfs_transport_factory = self._vfs_transport_factory
new_test.bzrdir_format = bzrdir_format
=== modified file 'bzrlib/tests/branch_implementations/__init__.py'
--- a/bzrlib/tests/branch_implementations/__init__.py 2007-03-28 13:45:26 +0000
+++ b/bzrlib/tests/branch_implementations/__init__.py 2007-04-18 05:38:31 +0000
@@ -28,11 +28,17 @@
BranchTestProviderAdapter,
_legacy_formats,
)
+from bzrlib.smart.server import (
+ SmartTCPServer_for_testing,
+ ReadonlySmartTCPServer_for_testing,
+ )
from bzrlib.tests import (
adapt_modules,
TestLoader,
TestSuite,
)
+from bzrlib.remote import RemoteBranchFormat, RemoteBzrDirFormat
+from bzrlib.transport.memory import MemoryServer
def test_suite():
@@ -71,12 +77,6 @@
adapt_modules(test_branch_implementations, adapter, loader, result)
- from bzrlib.smart.server import (
- SmartTCPServer_for_testing,
- ReadonlySmartTCPServer_for_testing,
- )
- from bzrlib.remote import RemoteBranchFormat, RemoteBzrDirFormat
- from bzrlib.transport.memory import MemoryServer
adapt_to_smart_server = BranchTestProviderAdapter(
SmartTCPServer_for_testing,
ReadonlySmartTCPServer_for_testing,
=== modified file 'bzrlib/tests/branch_implementations/test_parent.py'
--- a/bzrlib/tests/branch_implementations/test_parent.py 2007-04-13 07:39:17 +0000
+++ b/bzrlib/tests/branch_implementations/test_parent.py 2007-04-18 05:38:31 +0000
@@ -15,14 +15,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-import cStringIO
-import os
import sys
-from bzrlib import urlutils
-from bzrlib.branch import Branch
import bzrlib.errors
-from bzrlib.osutils import abspath, realpath, getcwd
+from bzrlib.osutils import getcwd
from bzrlib.tests import TestCaseWithTransport
from bzrlib import urlutils
=== modified file 'bzrlib/tests/bzrdir_implementations/test_bzrdir.py'
--- a/bzrlib/tests/bzrdir_implementations/test_bzrdir.py 2007-04-13 07:39:17 +0000
+++ b/bzrlib/tests/bzrdir_implementations/test_bzrdir.py 2007-04-18 05:38:31 +0000
@@ -243,7 +243,7 @@
tree.bzrdir.open_branch().set_revision_history([])
tree.set_parent_trees([])
tree.commit('revision 2', rev_id='2')
- tree.branch.bzrdir.open_repository().copy_content_into(shared_repo)
+ tree.branch.repository.copy_content_into(shared_repo)
dir = self.make_bzrdir('shared/source')
dir.create_branch()
target = dir.clone(self.get_url('shared/target'))
@@ -263,7 +263,7 @@
tree.branch.bzrdir.open_branch().set_revision_history([])
tree.set_parent_trees([])
tree.commit('revision 2', rev_id='2')
- tree.branch.bzrdir.open_repository().copy_content_into(shared_repo)
+ tree.branch.repository.copy_content_into(shared_repo)
if shared_repo.make_working_trees():
shared_repo.set_make_working_trees(False)
self.assertFalse(shared_repo.make_working_trees())
@@ -310,7 +310,7 @@
tree.set_parent_trees([])
tree.commit('revision 2', rev_id='2')
source = self.make_repository('source')
- tree.branch.bzrdir.open_repository().copy_content_into(source)
+ tree.branch.repository.copy_content_into(source)
dir = source.bzrdir
target = dir.clone(self.get_url('target'), revision_id='2')
raise TestSkipped('revision limiting not strict yet')
@@ -606,7 +606,7 @@
tree.set_parent_trees([])
tree.commit('revision 2', rev_id='2')
source = self.make_repository('source')
- tree.branch.bzrdir.open_repository().copy_content_into(source)
+ tree.branch.repository.copy_content_into(source)
dir = source.bzrdir
try:
shared_repo = self.make_repository('target', shared=True)
@@ -628,7 +628,7 @@
tree.bzrdir.open_branch().set_revision_history([])
tree.set_parent_trees([])
tree.commit('revision 2', rev_id='2')
- tree.branch.bzrdir.open_repository().copy_content_into(shared_repo)
+ tree.branch.repository.copy_content_into(shared_repo)
dir = self.make_bzrdir('shared/source')
dir.create_branch()
target = self.sproutOrSkip(dir, self.get_url('shared/target'))
@@ -648,7 +648,7 @@
tree.bzrdir.open_branch().set_revision_history([])
tree.set_parent_trees([])
tree.commit('revision 2', rev_id='2')
- tree.branch.bzrdir.open_repository().copy_content_into(shared_repo)
+ tree.branch.repository.copy_content_into(shared_repo)
if shared_repo.make_working_trees():
shared_repo.set_make_working_trees(False)
self.assertFalse(shared_repo.make_working_trees())
@@ -673,7 +673,7 @@
tree.set_parent_trees([])
tree.commit('revision 2', rev_id='2')
source = self.make_repository('source')
- tree.branch.bzrdir.open_repository().copy_content_into(source)
+ tree.branch.repository.copy_content_into(source)
dir = source.bzrdir
try:
shared_repo = self.make_repository('target', shared=True)
@@ -697,7 +697,7 @@
tree.set_parent_trees([])
tree.commit('revision 2', rev_id='2')
source = self.make_repository('source')
- tree.branch.bzrdir.open_repository().copy_content_into(source)
+ tree.branch.repository.copy_content_into(source)
dir = source.bzrdir
target = self.sproutOrSkip(dir, self.get_url('target'), revision_id='2')
raise TestSkipped('revision limiting not strict yet')
@@ -708,7 +708,7 @@
tree.add('foo')
tree.commit('revision 1')
source = self.make_branch('source')
- tree.branch.bzrdir.open_repository().copy_content_into(source.repository)
+ tree.branch.repository.copy_content_into(source.repository)
tree.bzrdir.open_branch().copy_content_into(source)
dir = source.bzrdir
target = self.sproutOrSkip(dir, self.get_url('target'))
@@ -736,7 +736,7 @@
tree.add('foo')
tree.commit('revision 1', rev_id='1')
source = self.make_branch('source')
- tree.branch.bzrdir.open_repository().copy_content_into(source.repository)
+ tree.branch.repository.copy_content_into(source.repository)
tree.bzrdir.open_branch().copy_content_into(source)
dir = source.bzrdir
try:
@@ -754,7 +754,7 @@
tree.add('foo')
tree.commit('revision 1', rev_id='1')
source = self.make_branch('source')
- tree.branch.bzrdir.open_repository().copy_content_into(source.repository)
+ tree.branch.repository.copy_content_into(source.repository)
tree.bzrdir.open_branch().copy_content_into(source)
dir = source.bzrdir
try:
@@ -848,7 +848,7 @@
tree.commit('revision 1', rev_id='1')
tree.commit('revision 2', rev_id='2', allow_pointless=True)
source = self.make_branch('source')
- tree.branch.bzrdir.open_repository().copy_content_into(source.repository)
+ tree.branch.repository.copy_content_into(source.repository)
tree.bzrdir.open_branch().copy_content_into(source)
dir = source.bzrdir
target = self.sproutOrSkip(dir, self.get_url('target'), revision_id='1')
More information about the bazaar-commits
mailing list