Merge lp:~mwhudson/launchpad/bzr-2.1b4-upgrade into lp:launchpad
- bzr-2.1b4-upgrade
- Merge into devel
Proposed by
Michael Hudson-Doyle
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~mwhudson/launchpad/bzr-2.1b4-upgrade |
Merge into: | lp:launchpad |
Diff against target: |
409 lines (+24/-94) 17 files modified
lib/devscripts/ec2test/entrypoint.py (+6/-0) lib/lp/codehosting/bzrutils.py (+1/-27) lib/lp/codehosting/codeimport/tests/test_worker.py (+0/-8) lib/lp/codehosting/codeimport/worker.py (+2/-3) lib/lp/codehosting/puller/tests/test_scheduler.py (+0/-8) lib/lp/codehosting/puller/tests/test_worker.py (+1/-2) lib/lp/codehosting/puller/tests/test_worker_formats.py (+1/-6) lib/lp/codehosting/scanner/tests/test_acceptance.py (+2/-3) lib/lp/codehosting/scanner/tests/test_bzrsync.py (+1/-2) lib/lp/codehosting/tests/test_acceptance.py (+3/-16) lib/lp/codehosting/tests/test_bzrutils.py (+1/-5) lib/lp/codehosting/vfs/branchfs.py (+1/-2) lib/lp/codehosting/vfs/tests/test_branchfs.py (+1/-2) lib/lp/codehosting/vfs/tests/test_transport.py (+1/-5) lib/lp/codehosting/vfs/transport.py (+1/-2) lib/lp/testing/__init__.py (+1/-2) versions.cfg (+1/-1) |
To merge this branch: | bzr merge lp:~mwhudson/launchpad/bzr-2.1b4-upgrade |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email: mp+16521@code.launchpad.net |
Commit message
Upgrade to 2.1b4 and drop some compatibility code for older bzrs
Description of the change
To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/devscripts/ec2test/entrypoint.py' | |||
2 | --- lib/devscripts/ec2test/entrypoint.py 2009-09-18 05:36:00 +0000 | |||
3 | +++ lib/devscripts/ec2test/entrypoint.py 2009-12-23 02:50:28 +0000 | |||
4 | @@ -13,6 +13,7 @@ | |||
5 | 13 | import sys | 13 | import sys |
6 | 14 | 14 | ||
7 | 15 | from bzrlib.errors import BzrCommandError | 15 | from bzrlib.errors import BzrCommandError |
8 | 16 | from bzrlib import ui | ||
9 | 16 | 17 | ||
10 | 17 | from devscripts.ec2test import builtins | 18 | from devscripts.ec2test import builtins |
11 | 18 | from devscripts.ec2test.controller import ( | 19 | from devscripts.ec2test.controller import ( |
12 | @@ -32,6 +33,11 @@ | |||
13 | 32 | 33 | ||
14 | 33 | We run the specified command, or give help if none was specified. | 34 | We run the specified command, or give help if none was specified. |
15 | 34 | """ | 35 | """ |
16 | 36 | # XXX MichaelHudson, 2009-12-23, bug=499637: run_bzr fails unless you set | ||
17 | 37 | # a ui_factory. | ||
18 | 38 | ui.ui_factory = ui.make_ui_for_terminal( | ||
19 | 39 | sys.stdin, sys.stdout, sys.stderr) | ||
20 | 40 | |||
21 | 35 | controller = EC2CommandController() | 41 | controller = EC2CommandController() |
22 | 36 | controller.install_bzrlib_hooks() | 42 | controller.install_bzrlib_hooks() |
23 | 37 | controller.load_module(builtins) | 43 | controller.load_module(builtins) |
24 | 38 | 44 | ||
25 | === modified file 'lib/lp/codehosting/bzrutils.py' | |||
26 | --- lib/lp/codehosting/bzrutils.py 2009-09-18 00:08:40 +0000 | |||
27 | +++ lib/lp/codehosting/bzrutils.py 2009-12-23 02:50:28 +0000 | |||
28 | @@ -11,7 +11,6 @@ | |||
29 | 11 | __all__ = [ | 11 | __all__ = [ |
30 | 12 | 'add_exception_logging_hook', | 12 | 'add_exception_logging_hook', |
31 | 13 | 'DenyingServer', | 13 | 'DenyingServer', |
32 | 14 | 'ensure_base', | ||
33 | 15 | 'get_branch_stacked_on_url', | 14 | 'get_branch_stacked_on_url', |
34 | 16 | 'get_vfs_format_classes', | 15 | 'get_vfs_format_classes', |
35 | 17 | 'HttpAsLocalTransport', | 16 | 'HttpAsLocalTransport', |
36 | @@ -26,8 +25,7 @@ | |||
37 | 26 | 25 | ||
38 | 27 | from bzrlib import config, trace | 26 | from bzrlib import config, trace |
39 | 28 | from bzrlib.errors import ( | 27 | from bzrlib.errors import ( |
42 | 29 | NoSuchFile, NotStacked, UnstackableBranchFormat, | 28 | NotStacked, UnstackableBranchFormat, UnstackableRepositoryFormat) |
41 | 30 | UnstackableRepositoryFormat) | ||
43 | 31 | from bzrlib.remote import RemoteBranch, RemoteBzrDir, RemoteRepository | 29 | from bzrlib.remote import RemoteBranch, RemoteBzrDir, RemoteRepository |
44 | 32 | from bzrlib.transport import register_transport, unregister_transport | 30 | from bzrlib.transport import register_transport, unregister_transport |
45 | 33 | from bzrlib.transport.local import LocalTransport | 31 | from bzrlib.transport.local import LocalTransport |
46 | @@ -105,30 +103,6 @@ | |||
47 | 105 | return stacked_on_url | 103 | return stacked_on_url |
48 | 106 | 104 | ||
49 | 107 | 105 | ||
50 | 108 | # XXX: JonathanLange 2007-06-13 bugs=120135: | ||
51 | 109 | # This should probably be part of bzrlib. | ||
52 | 110 | def ensure_base(transport): | ||
53 | 111 | """Make sure that the base directory of `transport` exists. | ||
54 | 112 | |||
55 | 113 | If the base directory does not exist, try to make it. If the parent of the | ||
56 | 114 | base directory doesn't exist, try to make that, and so on. | ||
57 | 115 | """ | ||
58 | 116 | try: | ||
59 | 117 | transport.ensure_base() | ||
60 | 118 | except NoSuchFile: | ||
61 | 119 | # transport.create_prefix was added in Bazaar 1.15, and _create_prefix | ||
62 | 120 | # was removed. Check to see if transport has a create_prefix method | ||
63 | 121 | # and use the old _create_prefix if it's not there. | ||
64 | 122 | # | ||
65 | 123 | # This can be removed once Bazaar 1.15 has landed on Launchpad. | ||
66 | 124 | create_prefix = getattr(transport, 'create_prefix', None) | ||
67 | 125 | if create_prefix is not None: | ||
68 | 126 | create_prefix() | ||
69 | 127 | else: | ||
70 | 128 | from bzrlib.builtins import _create_prefix | ||
71 | 129 | _create_prefix(transport) | ||
72 | 130 | |||
73 | 131 | |||
74 | 132 | _exception_logging_hooks = [] | 106 | _exception_logging_hooks = [] |
75 | 133 | 107 | ||
76 | 134 | _original_log_exception_quietly = trace.log_exception_quietly | 108 | _original_log_exception_quietly = trace.log_exception_quietly |
77 | 135 | 109 | ||
78 | === modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py' | |||
79 | --- lib/lp/codehosting/codeimport/tests/test_worker.py 2009-12-01 03:02:27 +0000 | |||
80 | +++ lib/lp/codehosting/codeimport/tests/test_worker.py 2009-12-23 02:50:28 +0000 | |||
81 | @@ -898,14 +898,6 @@ | |||
82 | 898 | super(TestBzrSvnImport, self).setUp() | 898 | super(TestBzrSvnImport, self).setUp() |
83 | 899 | load_optional_plugin('svn') | 899 | load_optional_plugin('svn') |
84 | 900 | self.setUpImport() | 900 | self.setUpImport() |
85 | 901 | # XXX MichaelHudson, 2009-11-24, bug=464174: | ||
86 | 902 | # TestCaseWithMemoryTransport likes to set these environment variables | ||
87 | 903 | # to unicode strings and bzr-svn hits an assertion failure in this | ||
88 | 904 | # case. | ||
89 | 905 | os.environ['BZR_HOME'] = os.environ['BZR_HOME'].encode( | ||
90 | 906 | sys.getfilesystemencoding()) | ||
91 | 907 | os.environ['HOME'] = os.environ['HOME'].encode( | ||
92 | 908 | sys.getfilesystemencoding()) | ||
93 | 909 | 901 | ||
94 | 910 | def makeImportWorker(self, source_details): | 902 | def makeImportWorker(self, source_details): |
95 | 911 | """Make a new `ImportWorker`.""" | 903 | """Make a new `ImportWorker`.""" |
96 | 912 | 904 | ||
97 | === modified file 'lib/lp/codehosting/codeimport/worker.py' | |||
98 | --- lib/lp/codehosting/codeimport/worker.py 2009-12-08 02:53:47 +0000 | |||
99 | +++ lib/lp/codehosting/codeimport/worker.py 2009-12-23 02:50:28 +0000 | |||
100 | @@ -28,7 +28,6 @@ | |||
101 | 28 | from bzrlib.upgrade import upgrade | 28 | from bzrlib.upgrade import upgrade |
102 | 29 | 29 | ||
103 | 30 | from canonical.cachedproperty import cachedproperty | 30 | from canonical.cachedproperty import cachedproperty |
104 | 31 | from lp.codehosting.bzrutils import ensure_base | ||
105 | 32 | from lp.codehosting.codeimport.foreigntree import ( | 31 | from lp.codehosting.codeimport.foreigntree import ( |
106 | 33 | CVSWorkingTree, SubversionWorkingTree) | 32 | CVSWorkingTree, SubversionWorkingTree) |
107 | 34 | from lp.codehosting.codeimport.tarball import ( | 33 | from lp.codehosting.codeimport.tarball import ( |
108 | @@ -78,7 +77,7 @@ | |||
109 | 78 | 77 | ||
110 | 79 | def push(self, db_branch_id, bzr_tree, required_format): | 78 | def push(self, db_branch_id, bzr_tree, required_format): |
111 | 80 | """Push up `bzr_tree` as the Bazaar branch for `code_import`.""" | 79 | """Push up `bzr_tree` as the Bazaar branch for `code_import`.""" |
113 | 81 | ensure_base(self.transport) | 80 | self.transport.create_prefix() |
114 | 82 | branch_from = bzr_tree.branch | 81 | branch_from = bzr_tree.branch |
115 | 83 | target_url = self._getMirrorURL(db_branch_id) | 82 | target_url = self._getMirrorURL(db_branch_id) |
116 | 84 | try: | 83 | try: |
117 | @@ -262,7 +261,7 @@ | |||
118 | 262 | source_transport = get_transport('.') | 261 | source_transport = get_transport('.') |
119 | 263 | remote_name = self._getRemoteName(filename) | 262 | remote_name = self._getRemoteName(filename) |
120 | 264 | local_file = source_transport.get(filename) | 263 | local_file = source_transport.get(filename) |
122 | 265 | ensure_base(self._transport) | 264 | self._transport.create_prefix() |
123 | 266 | try: | 265 | try: |
124 | 267 | self._transport.put_file(remote_name, local_file) | 266 | self._transport.put_file(remote_name, local_file) |
125 | 268 | finally: | 267 | finally: |
126 | 269 | 268 | ||
127 | === modified file 'lib/lp/codehosting/puller/tests/test_scheduler.py' | |||
128 | --- lib/lp/codehosting/puller/tests/test_scheduler.py 2009-12-22 00:26:49 +0000 | |||
129 | +++ lib/lp/codehosting/puller/tests/test_scheduler.py 2009-12-23 02:50:28 +0000 | |||
130 | @@ -643,14 +643,6 @@ | |||
131 | 643 | def setUp(self): | 643 | def setUp(self): |
132 | 644 | TrialTestCase.setUp(self) | 644 | TrialTestCase.setUp(self) |
133 | 645 | PullerBranchTestCase.setUp(self) | 645 | PullerBranchTestCase.setUp(self) |
134 | 646 | # XXX MichaelHudson, 2009-11-21, bug=464174: | ||
135 | 647 | # TestCaseWithMemoryTransport likes to set these environment variables | ||
136 | 648 | # to unicode strings and Twisted's spawnProcess doesn't like that | ||
137 | 649 | # (reasonably enough). | ||
138 | 650 | os.environ['BZR_HOME'] = os.environ['BZR_HOME'].encode( | ||
139 | 651 | sys.getfilesystemencoding()) | ||
140 | 652 | os.environ['HOME'] = os.environ['HOME'].encode( | ||
141 | 653 | sys.getfilesystemencoding()) | ||
142 | 654 | self.makeCleanDirectory(config.codehosting.hosted_branches_root) | 646 | self.makeCleanDirectory(config.codehosting.hosted_branches_root) |
143 | 655 | self.makeCleanDirectory(config.codehosting.mirrored_branches_root) | 647 | self.makeCleanDirectory(config.codehosting.mirrored_branches_root) |
144 | 656 | branch_id = self.factory.makeAnyBranch( | 648 | branch_id = self.factory.makeAnyBranch( |
145 | 657 | 649 | ||
146 | === modified file 'lib/lp/codehosting/puller/tests/test_worker.py' | |||
147 | --- lib/lp/codehosting/puller/tests/test_worker.py 2009-12-22 00:26:49 +0000 | |||
148 | +++ lib/lp/codehosting/puller/tests/test_worker.py 2009-12-23 02:50:28 +0000 | |||
149 | @@ -21,7 +21,6 @@ | |||
150 | 21 | from bzrlib.tests import TestCaseInTempDir, TestCaseWithTransport | 21 | from bzrlib.tests import TestCaseInTempDir, TestCaseWithTransport |
151 | 22 | from bzrlib.transport import get_transport | 22 | from bzrlib.transport import get_transport |
152 | 23 | 23 | ||
153 | 24 | from lp.codehosting.bzrutils import ensure_base | ||
154 | 25 | from lp.codehosting.puller.worker import ( | 24 | from lp.codehosting.puller.worker import ( |
155 | 26 | BranchLoopError, BranchMirrorer, BranchReferenceForbidden, | 25 | BranchLoopError, BranchMirrorer, BranchReferenceForbidden, |
156 | 27 | PullerWorkerProtocol, StackedOnBranchNotFound, | 26 | PullerWorkerProtocol, StackedOnBranchNotFound, |
157 | @@ -134,7 +133,7 @@ | |||
158 | 134 | source_tree.commit('commit message') | 133 | source_tree.commit('commit message') |
159 | 135 | # Make the directory. | 134 | # Make the directory. |
160 | 136 | dest = get_transport(to_mirror.dest) | 135 | dest = get_transport(to_mirror.dest) |
162 | 137 | ensure_base(dest) | 136 | dest.create_prefix() |
163 | 138 | dest.mkdir('.bzr') | 137 | dest.mkdir('.bzr') |
164 | 139 | # 'dest' is not a branch. | 138 | # 'dest' is not a branch. |
165 | 140 | self.assertRaises( | 139 | self.assertRaises( |
166 | 141 | 140 | ||
167 | === modified file 'lib/lp/codehosting/puller/tests/test_worker_formats.py' | |||
168 | --- lib/lp/codehosting/puller/tests/test_worker_formats.py 2009-06-25 04:06:00 +0000 | |||
169 | +++ lib/lp/codehosting/puller/tests/test_worker_formats.py 2009-12-23 02:50:28 +0000 | |||
170 | @@ -12,12 +12,7 @@ | |||
171 | 12 | from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1 | 12 | from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1 |
172 | 13 | from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack5 | 13 | from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack5 |
173 | 14 | from bzrlib.repofmt.weaverepo import RepositoryFormat6, RepositoryFormat7 | 14 | from bzrlib.repofmt.weaverepo import RepositoryFormat6, RepositoryFormat7 |
180 | 15 | try: | 15 | from bzrlib.tests.per_repository import TestCaseWithRepository |
175 | 16 | from bzrlib.tests.repository_implementations.test_repository import ( | ||
176 | 17 | TestCaseWithRepository) | ||
177 | 18 | except ImportError: | ||
178 | 19 | from bzrlib.tests.per_repository import TestCaseWithRepository | ||
179 | 20 | |||
181 | 21 | 16 | ||
182 | 22 | from lp.codehosting.puller.tests import PullerWorkerMixin | 17 | from lp.codehosting.puller.tests import PullerWorkerMixin |
183 | 23 | from lp.codehosting.tests.helpers import LoomTestMixin | 18 | from lp.codehosting.tests.helpers import LoomTestMixin |
184 | 24 | 19 | ||
185 | === modified file 'lib/lp/codehosting/scanner/tests/test_acceptance.py' | |||
186 | --- lib/lp/codehosting/scanner/tests/test_acceptance.py 2009-06-25 04:06:00 +0000 | |||
187 | +++ lib/lp/codehosting/scanner/tests/test_acceptance.py 2009-12-23 02:50:28 +0000 | |||
188 | @@ -22,7 +22,6 @@ | |||
189 | 22 | from zope.component import getUtility | 22 | from zope.component import getUtility |
190 | 23 | 23 | ||
191 | 24 | from lp.codehosting.vfs import branch_id_to_path | 24 | from lp.codehosting.vfs import branch_id_to_path |
192 | 25 | from lp.codehosting.bzrutils import ensure_base | ||
193 | 26 | from lp.codehosting.tests.helpers import ( | 25 | from lp.codehosting.tests.helpers import ( |
194 | 27 | create_branch_with_one_revision, LoomTestMixin) | 26 | create_branch_with_one_revision, LoomTestMixin) |
195 | 28 | from canonical.config import config | 27 | from canonical.config import config |
196 | @@ -49,7 +48,7 @@ | |||
197 | 49 | local_path_from_url( | 48 | local_path_from_url( |
198 | 50 | config.codehosting.internal_branch_by_id_root), | 49 | config.codehosting.internal_branch_by_id_root), |
199 | 51 | branch_id_to_path(db_branch.id)) | 50 | branch_id_to_path(db_branch.id)) |
201 | 52 | ensure_base(get_transport(destination)) | 51 | get_transport(destination).create_prefix() |
202 | 53 | self.addCleanup(lambda: shutil.rmtree(destination)) | 52 | self.addCleanup(lambda: shutil.rmtree(destination)) |
203 | 54 | return destination | 53 | return destination |
204 | 55 | 54 | ||
205 | @@ -112,7 +111,7 @@ | |||
206 | 112 | # Build the loom in the destination directory. | 111 | # Build the loom in the destination directory. |
207 | 113 | self.addCleanup(lambda: os.chdir(os.getcwd())) | 112 | self.addCleanup(lambda: os.chdir(os.getcwd())) |
208 | 114 | os.chdir(destination) | 113 | os.chdir(destination) |
210 | 115 | loom_tree = self.makeLoomBranchAndTree('.') | 114 | self.makeLoomBranchAndTree('.') |
211 | 116 | 115 | ||
212 | 117 | loom_branch = bzrlib.branch.Branch.open(destination) | 116 | loom_branch = bzrlib.branch.Branch.open(destination) |
213 | 118 | self.installTestBranch(self.db_branch, loom_branch) | 117 | self.installTestBranch(self.db_branch, loom_branch) |
214 | 119 | 118 | ||
215 | === modified file 'lib/lp/codehosting/scanner/tests/test_bzrsync.py' | |||
216 | --- lib/lp/codehosting/scanner/tests/test_bzrsync.py 2009-10-17 14:06:03 +0000 | |||
217 | +++ lib/lp/codehosting/scanner/tests/test_bzrsync.py 2009-12-23 02:50:28 +0000 | |||
218 | @@ -32,7 +32,6 @@ | |||
219 | 32 | from lp.code.model.branchrevision import BranchRevision | 32 | from lp.code.model.branchrevision import BranchRevision |
220 | 33 | from lp.code.model.branchmergeproposaljob import IUpdatePreviewDiffJobSource | 33 | from lp.code.model.branchmergeproposaljob import IUpdatePreviewDiffJobSource |
221 | 34 | from lp.code.model.revision import Revision, RevisionAuthor, RevisionParent | 34 | from lp.code.model.revision import Revision, RevisionAuthor, RevisionParent |
222 | 35 | from lp.codehosting.bzrutils import ensure_base | ||
223 | 36 | from lp.codehosting.scanner.bzrsync import ( | 35 | from lp.codehosting.scanner.bzrsync import ( |
224 | 37 | BzrSync, InvalidStackedBranchURL, schedule_diff_updates, | 36 | BzrSync, InvalidStackedBranchURL, schedule_diff_updates, |
225 | 38 | schedule_translation_upload) | 37 | schedule_translation_upload) |
226 | @@ -128,7 +127,7 @@ | |||
227 | 128 | 127 | ||
228 | 129 | def makeBzrBranchAndTree(self, db_branch, format=None): | 128 | def makeBzrBranchAndTree(self, db_branch, format=None): |
229 | 130 | """Make a Bazaar branch at the warehouse location of `db_branch`.""" | 129 | """Make a Bazaar branch at the warehouse location of `db_branch`.""" |
231 | 131 | ensure_base(self.get_transport(db_branch.unique_name)) | 130 | self.get_transport(db_branch.unique_name).create_prefix() |
232 | 132 | return self.make_branch_and_tree(db_branch.unique_name, format=format) | 131 | return self.make_branch_and_tree(db_branch.unique_name, format=format) |
233 | 133 | 132 | ||
234 | 134 | def makeDatabaseBranch(self, *args, **kwargs): | 133 | def makeDatabaseBranch(self, *args, **kwargs): |
235 | 135 | 134 | ||
236 | === modified file 'lib/lp/codehosting/tests/test_acceptance.py' | |||
237 | --- lib/lp/codehosting/tests/test_acceptance.py 2009-11-21 00:28:10 +0000 | |||
238 | +++ lib/lp/codehosting/tests/test_acceptance.py 2009-12-23 02:50:28 +0000 | |||
239 | @@ -11,7 +11,7 @@ | |||
240 | 11 | import xmlrpclib | 11 | import xmlrpclib |
241 | 12 | 12 | ||
242 | 13 | import bzrlib.branch | 13 | import bzrlib.branch |
244 | 14 | from bzrlib.tests import TestCaseWithTransport | 14 | from bzrlib.tests import multiply_tests, TestCaseWithTransport |
245 | 15 | from bzrlib.urlutils import local_path_from_url | 15 | from bzrlib.urlutils import local_path_from_url |
246 | 16 | from bzrlib.workingtree import WorkingTree | 16 | from bzrlib.workingtree import WorkingTree |
247 | 17 | 17 | ||
248 | @@ -265,11 +265,7 @@ | |||
249 | 265 | # Push up a new branch. | 265 | # Push up a new branch. |
250 | 266 | remote_url = self.getTransportURL('~testuser/+junk/new-branch') | 266 | remote_url = self.getTransportURL('~testuser/+junk/new-branch') |
251 | 267 | self.push(self.first_tree, remote_url) | 267 | self.push(self.first_tree, remote_url) |
257 | 268 | # XXX MichaelHudson, 2008-12-11: The way that getLastRevision is | 268 | self.assertBranchesMatch(self.first_tree, remote_url) |
253 | 269 | # currently implemented doesn't work with empty branches. When it can | ||
254 | 270 | # be rewritten to use revision-info, the next line can be re-enabled. | ||
255 | 271 | # See comment in getLastRevision for more. | ||
256 | 272 | #self.assertBranchesMatch(self.first_tree, remote_url) | ||
258 | 273 | 269 | ||
259 | 274 | # Commit to it. | 270 | # Commit to it. |
260 | 275 | tree.commit('new revision', allow_pointless=True) | 271 | tree.commit('new revision', allow_pointless=True) |
261 | @@ -629,16 +625,7 @@ | |||
262 | 629 | if scenario[0] not in excluded_scenarios | 625 | if scenario[0] not in excluded_scenarios |
263 | 630 | and not scenario[0].startswith('RemoteRepositoryFormat')] | 626 | and not scenario[0].startswith('RemoteRepositoryFormat')] |
264 | 631 | new_suite = unittest.TestSuite() | 627 | new_suite = unittest.TestSuite() |
275 | 632 | try: | 628 | multiply_tests(base_suite, scenarios, new_suite) |
266 | 633 | from bzrlib.tests import multiply_tests | ||
267 | 634 | multiply_tests(base_suite, scenarios, new_suite) | ||
268 | 635 | except ImportError: | ||
269 | 636 | # XXX: MichaelHudson, 2009-03-11: This except clause can be deleted | ||
270 | 637 | # once sourcecode/bzr has bzr.dev r4102. | ||
271 | 638 | from bzrlib.tests import adapt_tests, TestScenarioApplier | ||
272 | 639 | adapter = TestScenarioApplier() | ||
273 | 640 | adapter.scenarios = scenarios | ||
274 | 641 | adapt_tests(base_suite, adapter, new_suite) | ||
276 | 642 | return new_suite | 629 | return new_suite |
277 | 643 | 630 | ||
278 | 644 | 631 | ||
279 | 645 | 632 | ||
280 | === modified file 'lib/lp/codehosting/tests/test_bzrutils.py' | |||
281 | --- lib/lp/codehosting/tests/test_bzrutils.py 2009-11-21 00:34:12 +0000 | |||
282 | +++ lib/lp/codehosting/tests/test_bzrutils.py 2009-12-23 02:50:28 +0000 | |||
283 | @@ -16,11 +16,7 @@ | |||
284 | 16 | from bzrlib.tests import ( | 16 | from bzrlib.tests import ( |
285 | 17 | multiply_tests, TestCase, TestCaseWithTransport, TestLoader, | 17 | multiply_tests, TestCase, TestCaseWithTransport, TestLoader, |
286 | 18 | TestNotApplicable) | 18 | TestNotApplicable) |
292 | 19 | try: | 19 | from bzrlib.tests.per_branch import TestCaseWithBzrDir, branch_scenarios |
288 | 20 | from bzrlib.tests.per_branch import TestCaseWithBzrDir, branch_scenarios | ||
289 | 21 | except ImportError: | ||
290 | 22 | from bzrlib.tests.branch_implementations import ( | ||
291 | 23 | TestCaseWithBzrDir, branch_scenarios) | ||
293 | 24 | 20 | ||
294 | 25 | from lp.codehosting.bzrutils import ( | 21 | from lp.codehosting.bzrutils import ( |
295 | 26 | add_exception_logging_hook, DenyingServer, get_branch_stacked_on_url, | 22 | add_exception_logging_hook, DenyingServer, get_branch_stacked_on_url, |
296 | 27 | 23 | ||
297 | === modified file 'lib/lp/codehosting/vfs/branchfs.py' | |||
298 | --- lib/lp/codehosting/vfs/branchfs.py 2009-10-20 02:20:37 +0000 | |||
299 | +++ lib/lp/codehosting/vfs/branchfs.py 2009-12-23 02:50:28 +0000 | |||
300 | @@ -83,7 +83,6 @@ | |||
301 | 83 | 83 | ||
302 | 84 | from lp.codehosting.vfs.branchfsclient import ( | 84 | from lp.codehosting.vfs.branchfsclient import ( |
303 | 85 | BlockingProxy, BranchFileSystemClient, trap_fault) | 85 | BlockingProxy, BranchFileSystemClient, trap_fault) |
304 | 86 | from lp.codehosting.bzrutils import ensure_base | ||
305 | 87 | from lp.codehosting.vfs.transport import ( | 86 | from lp.codehosting.vfs.transport import ( |
306 | 88 | AsyncVirtualServer, AsyncVirtualTransport, _MultiServer, | 87 | AsyncVirtualServer, AsyncVirtualTransport, _MultiServer, |
307 | 89 | get_chrooted_transport, get_readonly_transport, TranslationError) | 88 | get_chrooted_transport, get_readonly_transport, TranslationError) |
308 | @@ -281,7 +280,7 @@ | |||
309 | 281 | self._checkPath(trailing_path) | 280 | self._checkPath(trailing_path) |
310 | 282 | transport = self.base_transport.clone(branch_id_to_path(data['id'])) | 281 | transport = self.base_transport.clone(branch_id_to_path(data['id'])) |
311 | 283 | try: | 282 | try: |
313 | 284 | ensure_base(transport) | 283 | transport.create_prefix() |
314 | 285 | except TransportNotPossible: | 284 | except TransportNotPossible: |
315 | 286 | # Silently ignore TransportNotPossible. This is raised when the | 285 | # Silently ignore TransportNotPossible. This is raised when the |
316 | 287 | # base transport is read-only. | 286 | # base transport is read-only. |
317 | 288 | 287 | ||
318 | === modified file 'lib/lp/codehosting/vfs/tests/test_branchfs.py' | |||
319 | --- lib/lp/codehosting/vfs/tests/test_branchfs.py 2009-11-21 00:28:10 +0000 | |||
320 | +++ lib/lp/codehosting/vfs/tests/test_branchfs.py 2009-12-23 02:50:28 +0000 | |||
321 | @@ -27,7 +27,6 @@ | |||
322 | 27 | AsyncLaunchpadTransport, BranchTransportDispatch, | 27 | AsyncLaunchpadTransport, BranchTransportDispatch, |
323 | 28 | DirectDatabaseLaunchpadServer, LaunchpadInternalServer, LaunchpadServer, | 28 | DirectDatabaseLaunchpadServer, LaunchpadInternalServer, LaunchpadServer, |
324 | 29 | TransportDispatch, UnknownTransportType, branch_id_to_path) | 29 | TransportDispatch, UnknownTransportType, branch_id_to_path) |
325 | 30 | from lp.codehosting.bzrutils import ensure_base | ||
326 | 31 | from lp.codehosting.inmemory import InMemoryFrontend, XMLRPCWrapper | 30 | from lp.codehosting.inmemory import InMemoryFrontend, XMLRPCWrapper |
327 | 32 | from lp.codehosting.sftp import FatLocalTransport | 31 | from lp.codehosting.sftp import FatLocalTransport |
328 | 33 | from lp.codehosting.vfs.transport import AsyncVirtualTransport | 32 | from lp.codehosting.vfs.transport import AsyncVirtualTransport |
329 | @@ -547,7 +546,7 @@ | |||
330 | 547 | """ | 546 | """ |
331 | 548 | backing_transport = self.backing_transport.clone( | 547 | backing_transport = self.backing_transport.clone( |
332 | 549 | '%s/.bzr/' % branch_to_path(branch, add_slash=False)) | 548 | '%s/.bzr/' % branch_to_path(branch, add_slash=False)) |
334 | 550 | ensure_base(backing_transport) | 549 | backing_transport.create_prefix() |
335 | 551 | return backing_transport | 550 | return backing_transport |
336 | 552 | 551 | ||
337 | 553 | def test_get_mapped_file(self): | 552 | def test_get_mapped_file(self): |
338 | 554 | 553 | ||
339 | === modified file 'lib/lp/codehosting/vfs/tests/test_transport.py' | |||
340 | --- lib/lp/codehosting/vfs/tests/test_transport.py 2009-07-17 00:26:05 +0000 | |||
341 | +++ lib/lp/codehosting/vfs/tests/test_transport.py 2009-12-23 02:50:28 +0000 | |||
342 | @@ -7,11 +7,7 @@ | |||
343 | 7 | 7 | ||
344 | 8 | import unittest | 8 | import unittest |
345 | 9 | 9 | ||
351 | 10 | try: | 10 | from bzrlib.tests import per_transport |
347 | 11 | from bzrlib.tests import per_transport | ||
348 | 12 | except ImportError: | ||
349 | 13 | from bzrlib.tests import test_transport_implementations as per_transport | ||
350 | 14 | |||
352 | 15 | from bzrlib.transport import chroot, get_transport, Transport | 11 | from bzrlib.transport import chroot, get_transport, Transport |
353 | 16 | from bzrlib.transport.local import LocalTransport | 12 | from bzrlib.transport.local import LocalTransport |
354 | 17 | from bzrlib.urlutils import local_path_to_url | 13 | from bzrlib.urlutils import local_path_to_url |
355 | 18 | 14 | ||
356 | === modified file 'lib/lp/codehosting/vfs/transport.py' | |||
357 | --- lib/lp/codehosting/vfs/transport.py 2009-06-25 04:06:00 +0000 | |||
358 | +++ lib/lp/codehosting/vfs/transport.py 2009-12-23 02:50:28 +0000 | |||
359 | @@ -30,7 +30,6 @@ | |||
360 | 30 | unregister_transport) | 30 | unregister_transport) |
361 | 31 | 31 | ||
362 | 32 | from twisted.internet import defer | 32 | from twisted.internet import defer |
363 | 33 | from lp.codehosting.bzrutils import ensure_base | ||
364 | 34 | from canonical.twistedsupport import extract_result, gatherResults | 33 | from canonical.twistedsupport import extract_result, gatherResults |
365 | 35 | 34 | ||
366 | 36 | 35 | ||
367 | @@ -56,7 +55,7 @@ | |||
368 | 56 | """Return a chrooted transport serving `url`.""" | 55 | """Return a chrooted transport serving `url`.""" |
369 | 57 | transport = get_transport(url) | 56 | transport = get_transport(url) |
370 | 58 | if mkdir: | 57 | if mkdir: |
372 | 59 | ensure_base(transport) | 58 | transport.create_prefix() |
373 | 60 | chroot_server = chroot.ChrootServer(transport) | 59 | chroot_server = chroot.ChrootServer(transport) |
374 | 61 | chroot_server.setUp() | 60 | chroot_server.setUp() |
375 | 62 | return get_transport(chroot_server.get_url()) | 61 | return get_transport(chroot_server.get_url()) |
376 | 63 | 62 | ||
377 | === modified file 'lib/lp/testing/__init__.py' | |||
378 | --- lib/lp/testing/__init__.py 2009-10-29 09:25:20 +0000 | |||
379 | +++ lib/lp/testing/__init__.py 2009-12-23 02:50:28 +0000 | |||
380 | @@ -34,7 +34,6 @@ | |||
381 | 34 | isinstance as zope_isinstance, removeSecurityProxy) | 34 | isinstance as zope_isinstance, removeSecurityProxy) |
382 | 35 | 35 | ||
383 | 36 | from canonical.launchpad.webapp import errorlog | 36 | from canonical.launchpad.webapp import errorlog |
384 | 37 | from lp.codehosting.bzrutils import ensure_base | ||
385 | 38 | from lp.codehosting.vfs import branch_id_to_path, get_multi_server | 37 | from lp.codehosting.vfs import branch_id_to_path, get_multi_server |
386 | 39 | from canonical.config import config | 38 | from canonical.config import config |
387 | 40 | # Import the login and logout functions here as it is a much better | 39 | # Import the login and logout functions here as it is a much better |
388 | @@ -588,7 +587,7 @@ | |||
389 | 588 | # This is a work-around for some failures on PQM, arguably caused by | 587 | # This is a work-around for some failures on PQM, arguably caused by |
390 | 589 | # relying on test set-up that is happening in the Makefile rather than | 588 | # relying on test set-up that is happening in the Makefile rather than |
391 | 590 | # the actual test set-up. | 589 | # the actual test set-up. |
393 | 591 | ensure_base(get_transport(base)) | 590 | get_transport(base).create_prefix() |
394 | 592 | return os.path.join(base, branch_id_to_path(branch.id)) | 591 | return os.path.join(base, branch_id_to_path(branch.id)) |
395 | 593 | 592 | ||
396 | 594 | def createMirroredBranchAndTree(self): | 593 | def createMirroredBranchAndTree(self): |
397 | 595 | 594 | ||
398 | === modified file 'versions.cfg' | |||
399 | --- versions.cfg 2009-12-21 03:18:24 +0000 | |||
400 | +++ versions.cfg 2009-12-23 02:50:28 +0000 | |||
401 | @@ -3,7 +3,7 @@ | |||
402 | 3 | 3 | ||
403 | 4 | [versions] | 4 | [versions] |
404 | 5 | # Alphabetical, case-insensitive, please! :-) | 5 | # Alphabetical, case-insensitive, please! :-) |
406 | 6 | bzr = 2.1b3 | 6 | bzr = 2.1b4 |
407 | 7 | chameleon.core = 1.0b35 | 7 | chameleon.core = 1.0b35 |
408 | 8 | chameleon.zpt = 1.0b17 | 8 | chameleon.zpt = 1.0b17 |
409 | 9 | ClientForm = 0.2.10 | 9 | ClientForm = 0.2.10 |
Hi,
This branch updates us to bzr 2.1b4. This could have been a one character change in versions.cfg, but I accidentally ended up removing a bunch of cruft we had that was only there to support old versions of bzr. The one of these that has the largest (textual) impact is removing lp.codehosting. bzrutils. ensure_ base, all the others are pretty trivial I think.
Cheers,
mwh