Merge ~cjwatson/launchpad:codehosting-breezy into launchpad:master
- Git
- lp:~cjwatson/launchpad
- codehosting-breezy
- Merge into master
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 932b8ea2913fc50e322b3e6ce1a05432e92bdc1b |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:codehosting-breezy |
Merge into: | launchpad:master |
Diff against target: |
4255 lines (+704/-661) 103 files modified
Makefile (+2/-2) brzplugins/builder (+1/-0) brzplugins/difftacular (+1/-0) brzplugins/loom (+1/-0) brzplugins/lpserve/__init__.py (+20/-20) brzplugins/lpserve/test_lpserve.py (+26/-26) constraints.txt (+5/-0) dev/null (+0/-1) lib/launchpad_loggerhead/app.py (+3/-3) lib/launchpad_loggerhead/wsgi.py (+5/-5) lib/lp/app/browser/stringformatter.py (+1/-1) lib/lp/code/browser/bazaar.py (+3/-3) lib/lp/code/browser/sourcepackagerecipe.py (+1/-1) lib/lp/code/bzr.py (+23/-23) lib/lp/code/configure.zcml (+4/-4) lib/lp/code/errors.py (+1/-1) lib/lp/code/interfaces/branch.py (+4/-4) lib/lp/code/interfaces/tests/test_branch.py (+10/-10) lib/lp/code/mail/codereviewcomment.py (+10/-13) lib/lp/code/mail/patches.py (+15/-16) lib/lp/code/model/branch.py (+3/-3) lib/lp/code/model/branchjob.py (+11/-11) lib/lp/code/model/branchlookup.py (+1/-1) lib/lp/code/model/diff.py (+5/-5) lib/lp/code/model/directbranchcommit.py (+5/-4) lib/lp/code/model/gitrepository.py (+1/-1) lib/lp/code/model/revision.py (+2/-2) lib/lp/code/model/sourcepackagerecipedata.py (+1/-1) lib/lp/code/model/tests/test_branch.py (+6/-6) lib/lp/code/model/tests/test_branchjob.py (+26/-25) lib/lp/code/model/tests/test_branchmergeproposaljobs.py (+2/-2) lib/lp/code/model/tests/test_diff.py (+3/-3) lib/lp/code/model/tests/test_gitref.py (+1/-1) lib/lp/code/model/tests/test_gitrepository.py (+1/-1) lib/lp/code/model/tests/test_sourcepackagerecipe.py (+1/-1) lib/lp/code/scripts/tests/test_scan_branches.py (+1/-1) lib/lp/code/scripts/tests/test_sendbranchmail.py (+5/-5) lib/lp/code/scripts/tests/test_upgrade_branches.py (+1/-1) lib/lp/code/stories/branches/xx-bazaar-home.txt (+9/-9) lib/lp/code/stories/webservice/xx-branch.txt (+1/-1) lib/lp/code/templates/bazaar-index.pt (+2/-2) lib/lp/code/tests/helpers.py (+1/-1) lib/lp/code/tests/test_bzr.py (+11/-10) lib/lp/code/xmlrpc/branch.py (+1/-1) lib/lp/code/xmlrpc/codehosting.py (+1/-1) lib/lp/code/xmlrpc/tests/test_branch.py (+1/-1) lib/lp/code/xmlrpc/tests/test_codehosting.py (+3/-3) lib/lp/codehosting/__init__.py (+53/-21) lib/lp/codehosting/bzrutils.py (+15/-15) lib/lp/codehosting/codeimport/tests/test_worker.py (+2/-2) lib/lp/codehosting/inmemory.py (+1/-1) lib/lp/codehosting/puller/scheduler.py (+1/-1) lib/lp/codehosting/puller/tests/__init__.py (+3/-3) lib/lp/codehosting/puller/tests/test_acceptance.py (+7/-7) lib/lp/codehosting/puller/tests/test_errors.py (+2/-2) lib/lp/codehosting/puller/tests/test_scheduler.py (+6/-8) lib/lp/codehosting/puller/tests/test_worker.py (+21/-21) lib/lp/codehosting/puller/tests/test_worker_formats.py (+16/-16) lib/lp/codehosting/puller/worker.py (+21/-16) lib/lp/codehosting/rewrite.py (+1/-1) lib/lp/codehosting/scanner/buglinks.py (+1/-1) lib/lp/codehosting/scanner/bzrsync.py (+7/-7) lib/lp/codehosting/scanner/mergedetection.py (+1/-1) lib/lp/codehosting/scanner/tests/test_buglinks.py (+4/-4) lib/lp/codehosting/scanner/tests/test_bzrsync.py (+8/-7) lib/lp/codehosting/scanner/tests/test_email.py (+1/-1) lib/lp/codehosting/scanner/tests/test_mergedetection.py (+3/-3) lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py (+1/-1) lib/lp/codehosting/sftp.py (+4/-4) lib/lp/codehosting/sshserver/session.py (+20/-17) lib/lp/codehosting/sshserver/tests/test_session.py (+16/-9) lib/lp/codehosting/tests/helpers.py (+9/-7) lib/lp/codehosting/tests/servers.py (+1/-1) lib/lp/codehosting/tests/test_acceptance.py (+35/-35) lib/lp/codehosting/tests/test_breezy.py (+5/-5) lib/lp/codehosting/tests/test_bzrutils.py (+18/-15) lib/lp/codehosting/tests/test_format_comparison.py (+1/-1) lib/lp/codehosting/tests/test_lpserve.py (+6/-6) lib/lp/codehosting/tests/test_sftp.py (+6/-6) lib/lp/codehosting/tests/test_upgrade.py (+16/-18) lib/lp/codehosting/upgrade.py (+9/-11) lib/lp/codehosting/vfs/branchfs.py (+11/-13) lib/lp/codehosting/vfs/tests/test_branchfs.py (+20/-22) lib/lp/codehosting/vfs/tests/test_filesystem.py (+8/-8) lib/lp/codehosting/vfs/tests/test_transport.py (+4/-4) lib/lp/codehosting/vfs/tests/test_transport_extensions.py (+1/-1) lib/lp/codehosting/vfs/transport.py (+29/-29) lib/lp/scripts/runlaunchpad.py (+4/-4) lib/lp/testing/__init__.py (+13/-11) lib/lp/testing/factory.py (+3/-3) lib/lp/translations/browser/productseries.py (+1/-1) lib/lp/translations/pottery/detect_intltool.py (+1/-1) lib/lp/translations/pottery/tests/test_detect_intltool.py (+2/-2) lib/lp/translations/scripts/tests/test_translations_to_branch.py (+2/-2) lib/lp/translations/scripts/translations_to_branch.py (+2/-2) lib/lp/translations/tests/test_rosetta_branches_script.py (+3/-3) lib/lp_sitecustomize.py (+13/-6) scripts/mirror-branch.py (+2/-20) scripts/update-stacked-on.py (+5/-4) setup.py (+2/-0) utilities/create-lp-wadl-and-apidoc.py (+3/-3) utilities/sourcedeps.cache (+9/-9) utilities/sourcedeps.conf (+3/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ioana Lasc (community) | Approve | ||
Review via email: mp+373805@code.launchpad.net |
Commit message
Port codehosting to Breezy
Description of the change
Most of this is relatively mechanical: bzrlib imports become breezy imports, some things move around a little more (mainly to breezy.bzr), bzrdir becomes controldir in many cases, I tightened up some bytes/text handling, and there were a couple of other minor API changes.
Due to problems with subvertpy, codeimport remains on Bazaar for now. This entails some fiddly code to allow Bazaar and Breezy to coexist in the same codebase.
DirectBranchCom
We have to explicitly initialize Breezy in lib/lp/
We have to disable some plugins that are now built into Breezy and likely to cause trouble if invoked, although unfortunately we have no very elegant way to do that. cvs, darcs, email, and mtn are disabled using BRZ_DISABLE_
The hack in scripts/
This is essentially the same as https:/
Otto Co-Pilot (otto-copilot) wrote : | # |
Preview Diff
1 | diff --git a/Makefile b/Makefile | |||
2 | index 62d59e2..0fc97c2 100644 | |||
3 | --- a/Makefile | |||
4 | +++ b/Makefile | |||
5 | @@ -306,10 +306,10 @@ run_all: build inplace stop | |||
6 | 306 | memcached,rabbitmq -i $(LPCONFIG) | 306 | memcached,rabbitmq -i $(LPCONFIG) |
7 | 307 | 307 | ||
8 | 308 | run_codebrowse: compile | 308 | run_codebrowse: compile |
10 | 309 | BZR_PLUGIN_PATH=bzrplugins $(PY) scripts/start-loggerhead.py | 309 | BRZ_PLUGIN_PATH=brzplugins $(PY) scripts/start-loggerhead.py |
11 | 310 | 310 | ||
12 | 311 | start_codebrowse: compile | 311 | start_codebrowse: compile |
14 | 312 | BZR_PLUGIN_PATH=$(shell pwd)/bzrplugins $(PY) scripts/start-loggerhead.py --daemon | 312 | BRZ_PLUGIN_PATH=$(shell pwd)/brzplugins $(PY) scripts/start-loggerhead.py --daemon |
15 | 313 | 313 | ||
16 | 314 | stop_codebrowse: | 314 | stop_codebrowse: |
17 | 315 | $(PY) scripts/stop-loggerhead.py | 315 | $(PY) scripts/stop-loggerhead.py |
18 | diff --git a/brzplugins/builder b/brzplugins/builder | |||
19 | 316 | new file mode 120000 | 316 | new file mode 120000 |
20 | index 0000000..2877987 | |||
21 | --- /dev/null | |||
22 | +++ b/brzplugins/builder | |||
23 | @@ -0,0 +1 @@ | |||
24 | 1 | ../sourcecode/brz-builder/brzbuildrecipe | ||
25 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
26 | diff --git a/brzplugins/difftacular b/brzplugins/difftacular | |||
27 | 1 | new file mode 120000 | 3 | new file mode 120000 |
28 | index 0000000..e34dfd2 | |||
29 | --- /dev/null | |||
30 | +++ b/brzplugins/difftacular | |||
31 | @@ -0,0 +1 @@ | |||
32 | 1 | ../sourcecode/difftacular | ||
33 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
34 | diff --git a/brzplugins/loom b/brzplugins/loom | |||
35 | 1 | new file mode 120000 | 3 | new file mode 120000 |
36 | index 0000000..ed0b36f | |||
37 | --- /dev/null | |||
38 | +++ b/brzplugins/loom | |||
39 | @@ -0,0 +1 @@ | |||
40 | 1 | ../sourcecode/brz-loom | ||
41 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
42 | diff --git a/bzrplugins/lpserve/__init__.py b/brzplugins/lpserve/__init__.py | |||
43 | 1 | similarity index 97% | 3 | similarity index 97% |
44 | 2 | rename from bzrplugins/lpserve/__init__.py | 4 | rename from bzrplugins/lpserve/__init__.py |
45 | 3 | rename to brzplugins/lpserve/__init__.py | 5 | rename to brzplugins/lpserve/__init__.py |
46 | index 1db2554..b956568 100644 | |||
47 | --- a/bzrplugins/lpserve/__init__.py | |||
48 | +++ b/brzplugins/lpserve/__init__.py | |||
49 | @@ -28,7 +28,7 @@ import tempfile | |||
50 | 28 | import threading | 28 | import threading |
51 | 29 | import time | 29 | import time |
52 | 30 | 30 | ||
54 | 31 | from bzrlib import ( | 31 | from breezy import ( |
55 | 32 | commands, | 32 | commands, |
56 | 33 | errors, | 33 | errors, |
57 | 34 | lockdir, | 34 | lockdir, |
58 | @@ -36,15 +36,15 @@ from bzrlib import ( | |||
59 | 36 | trace, | 36 | trace, |
60 | 37 | ui, | 37 | ui, |
61 | 38 | ) | 38 | ) |
63 | 39 | from bzrlib.commands import ( | 39 | from breezy.commands import ( |
64 | 40 | Command, | 40 | Command, |
65 | 41 | register_command, | 41 | register_command, |
66 | 42 | ) | 42 | ) |
68 | 43 | from bzrlib.option import ( | 43 | from breezy.option import ( |
69 | 44 | Option, | 44 | Option, |
70 | 45 | RegistryOption, | 45 | RegistryOption, |
71 | 46 | ) | 46 | ) |
73 | 47 | from bzrlib.transport import ( | 47 | from breezy.transport import ( |
74 | 48 | get_transport, | 48 | get_transport, |
75 | 49 | transport_server_registry, | 49 | transport_server_registry, |
76 | 50 | ) | 50 | ) |
77 | @@ -88,7 +88,7 @@ class cmd_launchpad_server(Command): | |||
78 | 88 | type=unicode), | 88 | type=unicode), |
79 | 89 | RegistryOption( | 89 | RegistryOption( |
80 | 90 | 'protocol', help="Protocol to serve.", | 90 | 'protocol', help="Protocol to serve.", |
82 | 91 | lazy_registry=('bzrlib.transport', 'transport_server_registry'), | 91 | lazy_registry=('breezy.transport', 'transport_server_registry'), |
83 | 92 | value_switches=True), | 92 | value_switches=True), |
84 | 93 | ] | 93 | ] |
85 | 94 | 94 | ||
86 | @@ -192,7 +192,7 @@ class LPForkingService(object): | |||
87 | 192 | that should be reset. | 192 | that should be reset. |
88 | 193 | 193 | ||
89 | 194 | fork-env allows you to supply environment variables such as | 194 | fork-env allows you to supply environment variables such as |
91 | 195 | "BZR_EMAIL: joe@foo.com" which will be set in os.environ before | 195 | "BRZ_EMAIL: joe@foo.com" which will be set in os.environ before |
92 | 196 | the command is run. | 196 | the command is run. |
93 | 197 | """ | 197 | """ |
94 | 198 | 198 | ||
95 | @@ -301,9 +301,9 @@ class LPForkingService(object): | |||
96 | 301 | # don't know any way to *remove* a function registered via | 301 | # don't know any way to *remove* a function registered via |
97 | 302 | # 'atexit()' so if the forking service has some state, we my try to | 302 | # 'atexit()' so if the forking service has some state, we my try to |
98 | 303 | # clean it up incorrectly. | 303 | # clean it up incorrectly. |
102 | 304 | # Note that the bzr script itself uses sys.exitfunc(); os._exit() in | 304 | # Note that the brz script itself uses sys.exitfunc(); os._exit() in |
103 | 305 | # the 'bzr' main script, as the teardown time of all the python | 305 | # the 'brz' main script, as the teardown time of all the python |
104 | 306 | # state was quite noticeable in real-world runtime. As such, bzrlib | 306 | # state was quite noticeable in real-world runtime. As such, breezy |
105 | 307 | # should be pretty safe, or it would have been failing for people | 307 | # should be pretty safe, or it would have been failing for people |
106 | 308 | # already. | 308 | # already. |
107 | 309 | # [Decision #7] | 309 | # [Decision #7] |
108 | @@ -483,7 +483,7 @@ class LPForkingService(object): | |||
109 | 483 | os.rmdir(base_path) | 483 | os.rmdir(base_path) |
110 | 484 | 484 | ||
111 | 485 | def _bind_child_file_descriptors(self, base_path): | 485 | def _bind_child_file_descriptors(self, base_path): |
113 | 486 | # Note: by this point bzrlib has opened stderr for logging | 486 | # Note: by this point breezy has opened stderr for logging |
114 | 487 | # (as part of starting the service process in the first place). | 487 | # (as part of starting the service process in the first place). |
115 | 488 | # As such, it has a stream handler that writes to stderr. | 488 | # As such, it has a stream handler that writes to stderr. |
116 | 489 | # logging tries to flush and close that, but the file is already | 489 | # logging tries to flush and close that, but the file is already |
117 | @@ -975,16 +975,16 @@ register_command(cmd_launchpad_replay) | |||
118 | 975 | # manually, and observe what was expensive to import. It doesn't seem | 975 | # manually, and observe what was expensive to import. It doesn't seem |
119 | 976 | # very easy to get this right automatically. | 976 | # very easy to get this right automatically. |
120 | 977 | libraries_to_preload = [ | 977 | libraries_to_preload = [ |
131 | 978 | 'bzrlib.errors', | 978 | 'breezy.bzr.groupcompress_repo', |
132 | 979 | 'bzrlib.repofmt.groupcompress_repo', | 979 | 'breezy.bzr.smart', |
133 | 980 | 'bzrlib.repository', | 980 | 'breezy.bzr.smart.protocol', |
134 | 981 | 'bzrlib.smart', | 981 | 'breezy.bzr.smart.request', |
135 | 982 | 'bzrlib.smart.protocol', | 982 | 'breezy.bzr.smart.server', |
136 | 983 | 'bzrlib.smart.request', | 983 | 'breezy.bzr.smart.vfs', |
137 | 984 | 'bzrlib.smart.server', | 984 | 'breezy.errors', |
138 | 985 | 'bzrlib.smart.vfs', | 985 | 'breezy.repository', |
139 | 986 | 'bzrlib.transport.local', | 986 | 'breezy.transport.local', |
140 | 987 | 'bzrlib.transport.readonly', | 987 | 'breezy.transport.readonly', |
141 | 988 | 'lp.codehosting.bzrutils', | 988 | 'lp.codehosting.bzrutils', |
142 | 989 | 'lp.codehosting.vfs', | 989 | 'lp.codehosting.vfs', |
143 | 990 | 'lp.codehosting.vfs.branchfs', | 990 | 'lp.codehosting.vfs.branchfs', |
144 | diff --git a/bzrplugins/lpserve/test_lpserve.py b/brzplugins/lpserve/test_lpserve.py | |||
145 | 991 | similarity index 96% | 991 | similarity index 96% |
146 | 992 | rename from bzrplugins/lpserve/test_lpserve.py | 992 | rename from bzrplugins/lpserve/test_lpserve.py |
147 | 993 | rename to brzplugins/lpserve/test_lpserve.py | 993 | rename to brzplugins/lpserve/test_lpserve.py |
148 | index 6879ee6..3801df4 100644 | |||
149 | --- a/bzrplugins/lpserve/test_lpserve.py | |||
150 | +++ b/brzplugins/lpserve/test_lpserve.py | |||
151 | @@ -11,18 +11,18 @@ import tempfile | |||
152 | 11 | import threading | 11 | import threading |
153 | 12 | import time | 12 | import time |
154 | 13 | 13 | ||
156 | 14 | from bzrlib import ( | 14 | from breezy import ( |
157 | 15 | errors, | 15 | errors, |
158 | 16 | osutils, | 16 | osutils, |
159 | 17 | tests, | 17 | tests, |
160 | 18 | trace, | 18 | trace, |
161 | 19 | ) | 19 | ) |
163 | 20 | from bzrlib.plugins import lpserve | 20 | from breezy.plugins import lpserve |
164 | 21 | from testtools import content | 21 | from testtools import content |
165 | 22 | 22 | ||
166 | 23 | from lp.codehosting import ( | 23 | from lp.codehosting import ( |
169 | 24 | get_bzr_path, | 24 | get_brz_path, |
170 | 25 | get_BZR_PLUGIN_PATH_for_subprocess, | 25 | get_BRZ_PLUGIN_PATH_for_subprocess, |
171 | 26 | ) | 26 | ) |
172 | 27 | from lp.testing.fakemethod import FakeMethod | 27 | from lp.testing.fakemethod import FakeMethod |
173 | 28 | 28 | ||
174 | @@ -187,13 +187,13 @@ class TestLPForkingServiceParseEnv(tests.TestCase): | |||
175 | 187 | self.assertEnv({}, 'end\n') | 187 | self.assertEnv({}, 'end\n') |
176 | 188 | 188 | ||
177 | 189 | def test_one_entries(self): | 189 | def test_one_entries(self): |
180 | 190 | self.assertEnv({'BZR_EMAIL': 'joe@foo.com'}, | 190 | self.assertEnv({'BRZ_EMAIL': 'joe@foo.com'}, |
181 | 191 | 'BZR_EMAIL: joe@foo.com\n' | 191 | 'BRZ_EMAIL: joe@foo.com\n' |
182 | 192 | 'end\n') | 192 | 'end\n') |
183 | 193 | 193 | ||
184 | 194 | def test_two_entries(self): | 194 | def test_two_entries(self): |
187 | 195 | self.assertEnv({'BZR_EMAIL': 'joe@foo.com', 'BAR': 'foo'}, | 195 | self.assertEnv({'BRZ_EMAIL': 'joe@foo.com', 'BAR': 'foo'}, |
188 | 196 | 'BZR_EMAIL: joe@foo.com\n' | 196 | 'BRZ_EMAIL: joe@foo.com\n' |
189 | 197 | 'BAR: foo\n' | 197 | 'BAR: foo\n' |
190 | 198 | 'end\n') | 198 | 'end\n') |
191 | 199 | 199 | ||
192 | @@ -201,10 +201,10 @@ class TestLPForkingServiceParseEnv(tests.TestCase): | |||
193 | 201 | self.assertInvalid('') | 201 | self.assertInvalid('') |
194 | 202 | 202 | ||
195 | 203 | def test_invalid_end(self): | 203 | def test_invalid_end(self): |
197 | 204 | self.assertInvalid("BZR_EMAIL: joe@foo.com\n") | 204 | self.assertInvalid("BRZ_EMAIL: joe@foo.com\n") |
198 | 205 | 205 | ||
199 | 206 | def test_invalid_entry(self): | 206 | def test_invalid_entry(self): |
201 | 207 | self.assertInvalid("BZR_EMAIL joe@foo.com\nend\n") | 207 | self.assertInvalid("BRZ_EMAIL joe@foo.com\nend\n") |
202 | 208 | 208 | ||
203 | 209 | 209 | ||
204 | 210 | class TestLPForkingService(TestCaseWithLPForkingService): | 210 | class TestLPForkingService(TestCaseWithLPForkingService): |
205 | @@ -238,19 +238,19 @@ class TestLPForkingService(TestCaseWithLPForkingService): | |||
206 | 238 | def test_send_fork_env_with_env(self): | 238 | def test_send_fork_env_with_env(self): |
207 | 239 | response = self.send_message_to_service( | 239 | response = self.send_message_to_service( |
208 | 240 | 'fork-env rocks\n' | 240 | 'fork-env rocks\n' |
210 | 241 | 'BZR_EMAIL: joe@example.com\n' | 241 | 'BRZ_EMAIL: joe@example.com\n' |
211 | 242 | 'end\n') | 242 | 'end\n') |
212 | 243 | self.assertEqual('ok\nfake forking\n', response) | 243 | self.assertEqual('ok\nfake forking\n', response) |
214 | 244 | self.assertEqual([(['rocks'], {'BZR_EMAIL': 'joe@example.com'})], | 244 | self.assertEqual([(['rocks'], {'BRZ_EMAIL': 'joe@example.com'})], |
215 | 245 | self.service.fork_log) | 245 | self.service.fork_log) |
216 | 246 | 246 | ||
217 | 247 | def test_send_fork_env_slowly(self): | 247 | def test_send_fork_env_slowly(self): |
218 | 248 | response = self.send_message_to_service( | 248 | response = self.send_message_to_service( |
219 | 249 | 'fork-env rocks\n' | 249 | 'fork-env rocks\n' |
221 | 250 | 'BZR_EMAIL: joe@example.com\n' | 250 | 'BRZ_EMAIL: joe@example.com\n' |
222 | 251 | 'end\n', one_byte_at_a_time=True) | 251 | 'end\n', one_byte_at_a_time=True) |
223 | 252 | self.assertEqual('ok\nfake forking\n', response) | 252 | self.assertEqual('ok\nfake forking\n', response) |
225 | 253 | self.assertEqual([(['rocks'], {'BZR_EMAIL': 'joe@example.com'})], | 253 | self.assertEqual([(['rocks'], {'BRZ_EMAIL': 'joe@example.com'})], |
226 | 254 | self.service.fork_log) | 254 | self.service.fork_log) |
227 | 255 | 255 | ||
228 | 256 | def test_send_incomplete_fork_env_timeout(self): | 256 | def test_send_incomplete_fork_env_timeout(self): |
229 | @@ -258,7 +258,7 @@ class TestLPForkingService(TestCaseWithLPForkingService): | |||
230 | 258 | # content | 258 | # content |
231 | 259 | response = self.send_message_to_service( | 259 | response = self.send_message_to_service( |
232 | 260 | 'fork-env rocks\n' | 260 | 'fork-env rocks\n' |
234 | 261 | 'BZR_EMAIL: joe@example.com\n', | 261 | 'BRZ_EMAIL: joe@example.com\n', |
235 | 262 | one_byte_at_a_time=True) | 262 | one_byte_at_a_time=True) |
236 | 263 | # Note that we *don't* send a final 'end\n' | 263 | # Note that we *don't* send a final 'end\n' |
237 | 264 | self.assertStartsWith(response, 'FAILURE\n') | 264 | self.assertStartsWith(response, 'FAILURE\n') |
238 | @@ -315,24 +315,24 @@ class TestCaseWithSubprocess(tests.TestCaseWithTransport): | |||
239 | 315 | The launchpad infrastructure requires a fair amount of configuration to | 315 | The launchpad infrastructure requires a fair amount of configuration to |
240 | 316 | get paths, etc correct. This provides a "start_bzr_subprocess" command | 316 | get paths, etc correct. This provides a "start_bzr_subprocess" command |
241 | 317 | that has all of those paths appropriately set, but otherwise functions the | 317 | that has all of those paths appropriately set, but otherwise functions the |
243 | 318 | same as the bzrlib.tests.TestCase version. | 318 | same as the breezy.tests.TestCase version. |
244 | 319 | """ | 319 | """ |
245 | 320 | 320 | ||
246 | 321 | def start_bzr_subprocess(self, process_args, env_changes=None, | 321 | def start_bzr_subprocess(self, process_args, env_changes=None, |
247 | 322 | working_dir=None): | 322 | working_dir=None): |
248 | 323 | """Start bzr in a subprocess for testing. | 323 | """Start bzr in a subprocess for testing. |
249 | 324 | 324 | ||
251 | 325 | Copied and modified from `bzrlib.tests.TestCase.start_bzr_subprocess`. | 325 | Copied and modified from `breezy.tests.TestCase.start_bzr_subprocess`. |
252 | 326 | This version removes some of the skipping stuff, some of the | 326 | This version removes some of the skipping stuff, some of the |
253 | 327 | irrelevant comments (e.g. about win32) and uses Launchpad's own | 327 | irrelevant comments (e.g. about win32) and uses Launchpad's own |
255 | 328 | mechanisms for getting the path to 'bzr'. | 328 | mechanisms for getting the path to 'brz'. |
256 | 329 | 329 | ||
257 | 330 | Comments starting with 'LAUNCHPAD' are comments about our | 330 | Comments starting with 'LAUNCHPAD' are comments about our |
258 | 331 | modifications. | 331 | modifications. |
259 | 332 | """ | 332 | """ |
260 | 333 | if env_changes is None: | 333 | if env_changes is None: |
261 | 334 | env_changes = {} | 334 | env_changes = {} |
263 | 335 | env_changes['BZR_PLUGIN_PATH'] = get_BZR_PLUGIN_PATH_for_subprocess() | 335 | env_changes['BRZ_PLUGIN_PATH'] = get_BRZ_PLUGIN_PATH_for_subprocess() |
264 | 336 | old_env = {} | 336 | old_env = {} |
265 | 337 | 337 | ||
266 | 338 | def cleanup_environment(): | 338 | def cleanup_environment(): |
267 | @@ -348,12 +348,12 @@ class TestCaseWithSubprocess(tests.TestCaseWithTransport): | |||
268 | 348 | cwd = osutils.getcwd() | 348 | cwd = osutils.getcwd() |
269 | 349 | os.chdir(working_dir) | 349 | os.chdir(working_dir) |
270 | 350 | 350 | ||
274 | 351 | # LAUNCHPAD: We can't use self.get_bzr_path(), since it'll find | 351 | # LAUNCHPAD: We can't use self.get_brz_path(), since it'll find |
275 | 352 | # lib/bzrlib, rather than the path to bin/bzr. | 352 | # lib/breezy, rather than the path to bin/brz. |
276 | 353 | bzr_path = get_bzr_path() | 353 | brz_path = get_brz_path() |
277 | 354 | try: | 354 | try: |
278 | 355 | cleanup_environment() | 355 | cleanup_environment() |
280 | 356 | command = [bzr_path] | 356 | command = [brz_path] |
281 | 357 | command.extend(process_args) | 357 | command.extend(process_args) |
282 | 358 | process = self._popen( | 358 | process = self._popen( |
283 | 359 | command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, | 359 | command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
284 | @@ -464,8 +464,8 @@ class TestCaseWithLPForkingServiceSubprocess(TestCaseWithSubprocess): | |||
285 | 464 | # The service wants to create this file as a socket. | 464 | # The service wants to create this file as a socket. |
286 | 465 | os.remove(path) | 465 | os.remove(path) |
287 | 466 | env_changes = { | 466 | env_changes = { |
290 | 467 | 'BZR_PLUGIN_PATH': lpserve.__path__[0], | 467 | 'BRZ_PLUGIN_PATH': lpserve.__path__[0], |
291 | 468 | 'BZR_LOG': tempname, | 468 | 'BRZ_LOG': tempname, |
292 | 469 | } | 469 | } |
293 | 470 | proc = self._start_subprocess(path, env_changes) | 470 | proc = self._start_subprocess(path, env_changes) |
294 | 471 | return proc, path | 471 | return proc, path |
295 | @@ -579,7 +579,7 @@ class TestLPServiceInSubprocess(TestCaseWithLPForkingServiceSubprocess): | |||
296 | 579 | 579 | ||
297 | 580 | def test_fork_respects_env_vars(self): | 580 | def test_fork_respects_env_vars(self): |
298 | 581 | path, pid, sock = self.send_fork_request('whoami', | 581 | path, pid, sock = self.send_fork_request('whoami', |
300 | 582 | env={'BZR_EMAIL': 'this_test@example.com'}) | 582 | env={'BRZ_EMAIL': 'this_test@example.com'}) |
301 | 583 | stdout_content, stderr_content = self.communicate_with_fork(path) | 583 | stdout_content, stderr_content = self.communicate_with_fork(path) |
302 | 584 | self.assertEqual('', stderr_content) | 584 | self.assertEqual('', stderr_content) |
303 | 585 | self.assertEqual('this_test@example.com\n', stdout_content) | 585 | self.assertEqual('this_test@example.com\n', stdout_content) |
304 | diff --git a/bzrplugins/builder b/bzrplugins/builder | |||
305 | 586 | deleted file mode 120000 | 586 | deleted file mode 120000 |
306 | index 733b41e..0000000 | |||
307 | --- a/bzrplugins/builder | |||
308 | +++ /dev/null | |||
309 | @@ -1 +0,0 @@ | |||
310 | 1 | ../sourcecode/bzr-builder/ | ||
311 | 2 | \ No newline at end of file | 0 | \ No newline at end of file |
312 | diff --git a/bzrplugins/difftacular b/bzrplugins/difftacular | |||
313 | 3 | deleted file mode 120000 | 1 | deleted file mode 120000 |
314 | index 7129510..0000000 | |||
315 | --- a/bzrplugins/difftacular | |||
316 | +++ /dev/null | |||
317 | @@ -1 +0,0 @@ | |||
318 | 1 | ../sourcecode/difftacular/ | ||
319 | 2 | \ No newline at end of file | 0 | \ No newline at end of file |
320 | diff --git a/bzrplugins/loom b/bzrplugins/loom | |||
321 | 3 | deleted file mode 120000 | 1 | deleted file mode 120000 |
322 | index 68f0573..0000000 | |||
323 | --- a/bzrplugins/loom | |||
324 | +++ /dev/null | |||
325 | @@ -1 +0,0 @@ | |||
326 | 1 | ../sourcecode/bzr-loom | ||
327 | 2 | \ No newline at end of file | 0 | \ No newline at end of file |
328 | diff --git a/constraints.txt b/constraints.txt | |||
329 | index 6a7b6c3..fccf0fa 100644 | |||
330 | --- a/constraints.txt | |||
331 | +++ b/constraints.txt | |||
332 | @@ -176,11 +176,14 @@ backports.lzma==0.0.3 | |||
333 | 176 | BeautifulSoup==3.2.1 | 176 | BeautifulSoup==3.2.1 |
334 | 177 | beautifulsoup4[lxml]==4.7.1 | 177 | beautifulsoup4[lxml]==4.7.1 |
335 | 178 | billiard==3.5.0.5 | 178 | billiard==3.5.0.5 |
336 | 179 | bleach==3.1.0 | ||
337 | 180 | breezy==3.0.1 | ||
338 | 179 | bson==0.3.3 | 181 | bson==0.3.3 |
339 | 180 | # lp:~launchpad/bzr/lp | 182 | # lp:~launchpad/bzr/lp |
340 | 181 | bzr==2.6.0.lp.4 | 183 | bzr==2.6.0.lp.4 |
341 | 182 | celery==4.1.1 | 184 | celery==4.1.1 |
342 | 183 | Chameleon==2.11 | 185 | Chameleon==2.11 |
343 | 186 | configobj==5.0.6 | ||
344 | 184 | constantly==15.1.0 | 187 | constantly==15.1.0 |
345 | 185 | cookies==2.2.1 | 188 | cookies==2.2.1 |
346 | 186 | cryptography==2.7 | 189 | cryptography==2.7 |
347 | @@ -197,6 +200,7 @@ eggtestinfo==0.3 | |||
348 | 197 | elementtree==1.2.6-20050316 | 200 | elementtree==1.2.6-20050316 |
349 | 198 | enum34==1.1.6 | 201 | enum34==1.1.6 |
350 | 199 | epydoc==3.0.1 | 202 | epydoc==3.0.1 |
351 | 203 | fastimport==0.9.8 | ||
352 | 200 | feedparser==5.2.1 | 204 | feedparser==5.2.1 |
353 | 201 | feedvalidator==0.0.0DEV-r1049 | 205 | feedvalidator==0.0.0DEV-r1049 |
354 | 202 | FormEncode==1.2.4 | 206 | FormEncode==1.2.4 |
355 | @@ -310,6 +314,7 @@ vine==1.1.4 | |||
356 | 310 | virtualenv-tools3==2.0.0 | 314 | virtualenv-tools3==2.0.0 |
357 | 311 | wadllib==1.3.2 | 315 | wadllib==1.3.2 |
358 | 312 | waitress==1.3.1 | 316 | waitress==1.3.1 |
359 | 317 | webencodings==0.5.1 | ||
360 | 313 | WebOb==1.8.5 | 318 | WebOb==1.8.5 |
361 | 314 | WebTest==2.0.33 | 319 | WebTest==2.0.33 |
362 | 315 | wheel==0.29.0 | 320 | wheel==0.29.0 |
363 | diff --git a/lib/launchpad_loggerhead/app.py b/lib/launchpad_loggerhead/app.py | |||
364 | index ce24213..cd98725 100644 | |||
365 | --- a/lib/launchpad_loggerhead/app.py | |||
366 | +++ b/lib/launchpad_loggerhead/app.py | |||
367 | @@ -8,13 +8,13 @@ import urllib | |||
368 | 8 | import urlparse | 8 | import urlparse |
369 | 9 | import xmlrpclib | 9 | import xmlrpclib |
370 | 10 | 10 | ||
372 | 11 | from bzrlib import ( | 11 | from breezy import ( |
373 | 12 | errors, | 12 | errors, |
374 | 13 | lru_cache, | 13 | lru_cache, |
375 | 14 | urlutils, | 14 | urlutils, |
376 | 15 | ) | 15 | ) |
379 | 16 | from bzrlib.transport import get_transport | 16 | from breezy.transport import get_transport |
380 | 17 | from bzrlib.url_policy_open import open_only_scheme | 17 | from breezy.url_policy_open import open_only_scheme |
381 | 18 | from loggerhead.apps import ( | 18 | from loggerhead.apps import ( |
382 | 19 | favicon_app, | 19 | favicon_app, |
383 | 20 | static_app, | 20 | static_app, |
384 | diff --git a/lib/launchpad_loggerhead/wsgi.py b/lib/launchpad_loggerhead/wsgi.py | |||
385 | index e8822b1..ca95aef 100644 | |||
386 | --- a/lib/launchpad_loggerhead/wsgi.py | |||
387 | +++ b/lib/launchpad_loggerhead/wsgi.py | |||
388 | @@ -153,16 +153,16 @@ class LoggerheadApplication(Application): | |||
389 | 153 | cfg.update(self.options) | 153 | cfg.update(self.options) |
390 | 154 | return cfg | 154 | return cfg |
391 | 155 | 155 | ||
394 | 156 | def _load_bzr_plugins(self): | 156 | def _load_brz_plugins(self): |
395 | 157 | from bzrlib.plugin import load_plugins | 157 | from breezy.plugin import load_plugins |
396 | 158 | load_plugins() | 158 | load_plugins() |
397 | 159 | 159 | ||
400 | 160 | import bzrlib.plugins | 160 | import breezy.plugins |
401 | 161 | if getattr(bzrlib.plugins, "loom", None) is None: | 161 | if getattr(breezy.plugins, "loom", None) is None: |
402 | 162 | log.error("Loom plugin loading failed.") | 162 | log.error("Loom plugin loading failed.") |
403 | 163 | 163 | ||
404 | 164 | def load(self): | 164 | def load(self): |
406 | 165 | self._load_bzr_plugins() | 165 | self._load_brz_plugins() |
407 | 166 | 166 | ||
408 | 167 | with open(os.path.join( | 167 | with open(os.path.join( |
409 | 168 | config.root, config.codebrowse.secret_path)) as secret_file: | 168 | config.root, config.codebrowse.secret_path)) as secret_file: |
410 | diff --git a/lib/lp/app/browser/stringformatter.py b/lib/lp/app/browser/stringformatter.py | |||
411 | index 1198a83..57b8eaf 100644 | |||
412 | --- a/lib/lp/app/browser/stringformatter.py | |||
413 | +++ b/lib/lp/app/browser/stringformatter.py | |||
414 | @@ -21,7 +21,7 @@ from itertools import izip_longest | |||
415 | 21 | import re | 21 | import re |
416 | 22 | import sys | 22 | import sys |
417 | 23 | 23 | ||
419 | 24 | from bzrlib.patches import hunk_from_header | 24 | from breezy.patches import hunk_from_header |
420 | 25 | from lxml import html | 25 | from lxml import html |
421 | 26 | import markdown | 26 | import markdown |
422 | 27 | from zope.component import getUtility | 27 | from zope.component import getUtility |
423 | diff --git a/lib/lp/code/browser/bazaar.py b/lib/lp/code/browser/bazaar.py | |||
424 | index 26b34dc..305c740 100644 | |||
425 | --- a/lib/lp/code/browser/bazaar.py | |||
426 | +++ b/lib/lp/code/browser/bazaar.py | |||
427 | @@ -12,7 +12,7 @@ __all__ = [ | |||
428 | 12 | 12 | ||
429 | 13 | from datetime import datetime | 13 | from datetime import datetime |
430 | 14 | 14 | ||
432 | 15 | import bzrlib | 15 | import breezy |
433 | 16 | from zope.component import getUtility | 16 | from zope.component import getUtility |
434 | 17 | 17 | ||
435 | 18 | from lp.code.enums import CodeImportReviewStatus | 18 | from lp.code.enums import CodeImportReviewStatus |
436 | @@ -51,8 +51,8 @@ class BazaarApplicationView(LaunchpadView): | |||
437 | 51 | review_status=CodeImportReviewStatus.REVIEWED).count() | 51 | review_status=CodeImportReviewStatus.REVIEWED).count() |
438 | 52 | 52 | ||
439 | 53 | @property | 53 | @property |
442 | 54 | def bzr_version(self): | 54 | def brz_version(self): |
443 | 55 | return bzrlib.__version__ | 55 | return breezy.__version__ |
444 | 56 | 56 | ||
445 | 57 | def _precacheViewPermissions(self, branches): | 57 | def _precacheViewPermissions(self, branches): |
446 | 58 | """Precache the launchpad.View permissions on the branches.""" | 58 | """Precache the launchpad.View permissions on the branches.""" |
447 | diff --git a/lib/lp/code/browser/sourcepackagerecipe.py b/lib/lp/code/browser/sourcepackagerecipe.py | |||
448 | index a16f29b..d712879 100644 | |||
449 | --- a/lib/lp/code/browser/sourcepackagerecipe.py | |||
450 | +++ b/lib/lp/code/browser/sourcepackagerecipe.py | |||
451 | @@ -17,7 +17,7 @@ __all__ = [ | |||
452 | 17 | 17 | ||
453 | 18 | import itertools | 18 | import itertools |
454 | 19 | 19 | ||
456 | 20 | from bzrlib.plugins.builder.recipe import ( | 20 | from breezy.plugins.builder.recipe import ( |
457 | 21 | ForbiddenInstructionError, | 21 | ForbiddenInstructionError, |
458 | 22 | RecipeParseError, | 22 | RecipeParseError, |
459 | 23 | ) | 23 | ) |
460 | diff --git a/lib/lp/code/bzr.py b/lib/lp/code/bzr.py | |||
461 | index 10683e1..fe1a7d8 100644 | |||
462 | --- a/lib/lp/code/bzr.py | |||
463 | +++ b/lib/lp/code/bzr.py | |||
464 | @@ -24,53 +24,53 @@ import lp.codehosting | |||
465 | 24 | # Silence lint warning. | 24 | # Silence lint warning. |
466 | 25 | lp.codehosting | 25 | lp.codehosting |
467 | 26 | 26 | ||
469 | 27 | from bzrlib.branch import ( | 27 | from breezy.branch import UnstackableBranchFormat |
470 | 28 | from breezy.bzr.branch import ( | ||
471 | 28 | BranchReferenceFormat, | 29 | BranchReferenceFormat, |
472 | 29 | BzrBranchFormat6, | 30 | BzrBranchFormat6, |
473 | 30 | BzrBranchFormat7, | 31 | BzrBranchFormat7, |
474 | 31 | ) | 32 | ) |
477 | 32 | from bzrlib.branchfmt.fullhistory import BzrBranchFormat5 | 33 | from breezy.bzr.bzrdir import ( |
476 | 33 | from bzrlib.bzrdir import ( | ||
478 | 34 | BzrDirMetaFormat1, | 34 | BzrDirMetaFormat1, |
479 | 35 | BzrDirMetaFormat1Colo, | 35 | BzrDirMetaFormat1Colo, |
480 | 36 | ) | 36 | ) |
482 | 37 | from bzrlib.errors import ( | 37 | from breezy.bzr.fullhistory import BzrBranchFormat5 |
483 | 38 | from breezy.bzr.groupcompress_repo import RepositoryFormat2a | ||
484 | 39 | from breezy.bzr.knitpack_repo import ( | ||
485 | 40 | RepositoryFormatKnitPack1, | ||
486 | 41 | RepositoryFormatKnitPack3, | ||
487 | 42 | RepositoryFormatKnitPack4, | ||
488 | 43 | RepositoryFormatKnitPack5, | ||
489 | 44 | ) | ||
490 | 45 | from breezy.bzr.knitrepo import ( | ||
491 | 46 | RepositoryFormatKnit1, | ||
492 | 47 | RepositoryFormatKnit3, | ||
493 | 48 | RepositoryFormatKnit4, | ||
494 | 49 | ) | ||
495 | 50 | from breezy.errors import ( | ||
496 | 38 | NotStacked, | 51 | NotStacked, |
497 | 39 | NoSuchRevision, | 52 | NoSuchRevision, |
498 | 40 | UnstackableBranchFormat, | ||
499 | 41 | ) | 53 | ) |
501 | 42 | from bzrlib.plugins.loom.branch import ( | 54 | from breezy.plugins.loom.branch import ( |
502 | 43 | BzrBranchLoomFormat1, | 55 | BzrBranchLoomFormat1, |
503 | 44 | BzrBranchLoomFormat6, | 56 | BzrBranchLoomFormat6, |
504 | 45 | ) | 57 | ) |
507 | 46 | from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4 | 58 | from breezy.plugins.weave_fmt.branch import BzrBranchFormat4 |
508 | 47 | from bzrlib.plugins.weave_fmt.bzrdir import ( | 59 | from breezy.plugins.weave_fmt.bzrdir import ( |
509 | 48 | BzrDirFormat4, | 60 | BzrDirFormat4, |
510 | 49 | BzrDirFormat5, | 61 | BzrDirFormat5, |
511 | 50 | BzrDirFormat6, | 62 | BzrDirFormat6, |
512 | 51 | ) | 63 | ) |
514 | 52 | from bzrlib.plugins.weave_fmt.repository import ( | 64 | from breezy.plugins.weave_fmt.repository import ( |
515 | 53 | RepositoryFormat4, | 65 | RepositoryFormat4, |
516 | 54 | RepositoryFormat5, | 66 | RepositoryFormat5, |
517 | 55 | RepositoryFormat6, | 67 | RepositoryFormat6, |
518 | 56 | RepositoryFormat7, | 68 | RepositoryFormat7, |
519 | 57 | ) | 69 | ) |
528 | 58 | from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a | 70 | from breezy.revision import ( |
521 | 59 | from bzrlib.repofmt.knitpack_repo import ( | ||
522 | 60 | RepositoryFormatKnitPack1, | ||
523 | 61 | RepositoryFormatKnitPack3, | ||
524 | 62 | RepositoryFormatKnitPack4, | ||
525 | 63 | RepositoryFormatKnitPack5, | ||
526 | 64 | ) | ||
527 | 65 | from bzrlib.revision import ( | ||
529 | 66 | is_null, | 71 | is_null, |
530 | 67 | NULL_REVISION, | 72 | NULL_REVISION, |
531 | 68 | ) | 73 | ) |
532 | 69 | from bzrlib.repofmt.knitrepo import ( | ||
533 | 70 | RepositoryFormatKnit1, | ||
534 | 71 | RepositoryFormatKnit3, | ||
535 | 72 | RepositoryFormatKnit4, | ||
536 | 73 | ) | ||
537 | 74 | from lazr.enum import ( | 74 | from lazr.enum import ( |
538 | 75 | DBEnumeratedType, | 75 | DBEnumeratedType, |
539 | 76 | DBItem, | 76 | DBItem, |
540 | @@ -305,7 +305,7 @@ def get_branch_formats(bzr_branch): | |||
541 | 305 | 305 | ||
542 | 306 | :returns: tuple of (ControlFormat, BranchFormat, RepositoryFormat) | 306 | :returns: tuple of (ControlFormat, BranchFormat, RepositoryFormat) |
543 | 307 | """ | 307 | """ |
545 | 308 | control_string = bzr_branch.bzrdir._format.get_format_string() | 308 | control_string = bzr_branch.controldir._format.get_format_string() |
546 | 309 | branch_string = bzr_branch._format.get_format_string() | 309 | branch_string = bzr_branch._format.get_format_string() |
547 | 310 | repository_string = bzr_branch.repository._format.get_format_string() | 310 | repository_string = bzr_branch.repository._format.get_format_string() |
548 | 311 | return (ControlFormat.get_enum(control_string), | 311 | return (ControlFormat.get_enum(control_string), |
549 | diff --git a/lib/lp/code/configure.zcml b/lib/lp/code/configure.zcml | |||
550 | index 0ae4a3c..0a3537e 100644 | |||
551 | --- a/lib/lp/code/configure.zcml | |||
552 | +++ b/lib/lp/code/configure.zcml | |||
553 | @@ -1191,19 +1191,19 @@ | |||
554 | 1191 | /> | 1191 | /> |
555 | 1192 | </class> | 1192 | </class> |
556 | 1193 | <class | 1193 | <class |
558 | 1194 | class="bzrlib.plugins.builder.recipe.BaseRecipeBranch"> | 1194 | class="breezy.plugins.builder.recipe.BaseRecipeBranch"> |
559 | 1195 | <allow attributes="name url revspec revid child_branches deb_version __str__" /> | 1195 | <allow attributes="name url revspec revid child_branches deb_version __str__" /> |
560 | 1196 | </class> | 1196 | </class> |
561 | 1197 | <class | 1197 | <class |
563 | 1198 | class="bzrlib.plugins.builder.recipe.RecipeBranch"> | 1198 | class="breezy.plugins.builder.recipe.RecipeBranch"> |
564 | 1199 | <allow attributes="name url revspec revid child_branches __str__" /> | 1199 | <allow attributes="name url revspec revid child_branches __str__" /> |
565 | 1200 | </class> | 1200 | </class> |
566 | 1201 | <class | 1201 | <class |
568 | 1202 | class="bzrlib.plugins.builder.recipe.MergeInstruction"> | 1202 | class="breezy.plugins.builder.recipe.MergeInstruction"> |
569 | 1203 | <allow attributes="as_tuple recipe_branch nest_path" /> | 1203 | <allow attributes="as_tuple recipe_branch nest_path" /> |
570 | 1204 | </class> | 1204 | </class> |
571 | 1205 | <class | 1205 | <class |
573 | 1206 | class="bzrlib.plugins.builder.recipe.NestInstruction"> | 1206 | class="breezy.plugins.builder.recipe.NestInstruction"> |
574 | 1207 | <allow attributes="as_tuple recipe_branch nest_path" /> | 1207 | <allow attributes="as_tuple recipe_branch nest_path" /> |
575 | 1208 | </class> | 1208 | </class> |
576 | 1209 | 1209 | ||
577 | diff --git a/lib/lp/code/errors.py b/lib/lp/code/errors.py | |||
578 | index 22f6e16..c68da65 100644 | |||
579 | --- a/lib/lp/code/errors.py | |||
580 | +++ b/lib/lp/code/errors.py | |||
581 | @@ -66,7 +66,7 @@ __all__ = [ | |||
582 | 66 | 66 | ||
583 | 67 | import httplib | 67 | import httplib |
584 | 68 | 68 | ||
586 | 69 | from bzrlib.plugins.builder.recipe import RecipeParseError | 69 | from breezy.plugins.builder.recipe import RecipeParseError |
587 | 70 | from lazr.restful.declarations import error_status | 70 | from lazr.restful.declarations import error_status |
588 | 71 | import six | 71 | import six |
589 | 72 | 72 | ||
590 | diff --git a/lib/lp/code/interfaces/branch.py b/lib/lp/code/interfaces/branch.py | |||
591 | index 2d20376..29d5fdf 100644 | |||
592 | --- a/lib/lp/code/interfaces/branch.py | |||
593 | +++ b/lib/lp/code/interfaces/branch.py | |||
594 | @@ -512,7 +512,7 @@ class IBranchView(IHasOwner, IHasBranchTarget, IHasMergeProposals, | |||
595 | 512 | 512 | ||
596 | 513 | They are ordered with the most recent revision first, and the list | 513 | They are ordered with the most recent revision first, and the list |
597 | 514 | only contains those in the "leftmost tree", or in other words | 514 | only contains those in the "leftmost tree", or in other words |
599 | 515 | the revisions that match the revision history from bzrlib for this | 515 | the revisions that match the revision history from breezy for this |
600 | 516 | branch. | 516 | branch. |
601 | 517 | 517 | ||
602 | 518 | The revisions are listed as tuples of (`BranchRevision`, `Revision`). | 518 | The revisions are listed as tuples of (`BranchRevision`, `Revision`). |
603 | @@ -719,7 +719,7 @@ class IBranchView(IHasOwner, IHasBranchTarget, IHasMergeProposals, | |||
604 | 719 | """Construct a URL for this branch in codebrowse. | 719 | """Construct a URL for this branch in codebrowse. |
605 | 720 | 720 | ||
606 | 721 | :param extras: Zero or more path segments that will be joined onto the | 721 | :param extras: Zero or more path segments that will be joined onto the |
608 | 722 | end of the URL (with `bzrlib.urlutils.join`). | 722 | end of the URL (with `breezy.urlutils.join`). |
609 | 723 | """ | 723 | """ |
610 | 724 | 724 | ||
611 | 725 | browse_source_url = Attribute( | 725 | browse_source_url = Attribute( |
612 | @@ -993,7 +993,7 @@ class IBranchView(IHasOwner, IHasBranchTarget, IHasMergeProposals, | |||
613 | 993 | :return: tuple of three items. | 993 | :return: tuple of three items. |
614 | 994 | 1. Ancestry set of bzr revision-ids. | 994 | 1. Ancestry set of bzr revision-ids. |
615 | 995 | 2. History list of bzr revision-ids. Similar to the result of | 995 | 2. History list of bzr revision-ids. Similar to the result of |
617 | 996 | bzrlib.Branch.revision_history(). | 996 | breezy.Branch.revision_history(). |
618 | 997 | 3. Dictionnary mapping bzr bzr revision-ids to the database ids of | 997 | 3. Dictionnary mapping bzr bzr revision-ids to the database ids of |
619 | 998 | the corresponding BranchRevision rows for this branch. | 998 | the corresponding BranchRevision rows for this branch. |
620 | 999 | """ | 999 | """ |
621 | @@ -1012,7 +1012,7 @@ class IBranchView(IHasOwner, IHasBranchTarget, IHasMergeProposals, | |||
622 | 1012 | You can only call this if a server returned by `get_ro_server` or | 1012 | You can only call this if a server returned by `get_ro_server` or |
623 | 1013 | `get_rw_server` is running. | 1013 | `get_rw_server` is running. |
624 | 1014 | 1014 | ||
626 | 1015 | :raise bzrlib.url_policy_open.BadUrl: If the branch is stacked | 1015 | :raise breezy.url_policy_open.BadUrl: If the branch is stacked |
627 | 1016 | on or a reference to an unacceptable URL. | 1016 | on or a reference to an unacceptable URL. |
628 | 1017 | """ | 1017 | """ |
629 | 1018 | 1018 | ||
630 | diff --git a/lib/lp/code/interfaces/tests/test_branch.py b/lib/lp/code/interfaces/tests/test_branch.py | |||
631 | index af02ded..2eaab2f 100644 | |||
632 | --- a/lib/lp/code/interfaces/tests/test_branch.py | |||
633 | +++ b/lib/lp/code/interfaces/tests/test_branch.py | |||
634 | @@ -5,9 +5,9 @@ | |||
635 | 5 | 5 | ||
636 | 6 | __metaclass__ = type | 6 | __metaclass__ = type |
637 | 7 | 7 | ||
641 | 8 | from bzrlib.branch import format_registry as branch_format_registry | 8 | from breezy.branch import format_registry as branch_format_registry |
642 | 9 | from bzrlib.bzrdir import BzrProber | 9 | from breezy.bzr import BzrProber |
643 | 10 | from bzrlib.repository import format_registry as repo_format_registry | 10 | from breezy.repository import format_registry as repo_format_registry |
644 | 11 | 11 | ||
645 | 12 | from lp.code.bzr import ( | 12 | from lp.code.bzr import ( |
646 | 13 | BranchFormat, | 13 | BranchFormat, |
647 | @@ -27,21 +27,21 @@ class TestFormatSupport(TestCase): | |||
648 | 27 | """ | 27 | """ |
649 | 28 | 28 | ||
650 | 29 | def test_control_format_complement(self): | 29 | def test_control_format_complement(self): |
652 | 30 | self.bzrlib_is_subset(BzrProber.formats.keys(), ControlFormat) | 30 | self.breezy_is_subset(BzrProber.formats.keys(), ControlFormat) |
653 | 31 | 31 | ||
654 | 32 | def test_branch_format_complement(self): | 32 | def test_branch_format_complement(self): |
656 | 33 | self.bzrlib_is_subset(branch_format_registry.keys(), BranchFormat) | 33 | self.breezy_is_subset(branch_format_registry.keys(), BranchFormat) |
657 | 34 | 34 | ||
658 | 35 | def test_repository_format_complement(self): | 35 | def test_repository_format_complement(self): |
660 | 36 | self.bzrlib_is_subset(repo_format_registry.keys(), RepositoryFormat) | 36 | self.breezy_is_subset(repo_format_registry.keys(), RepositoryFormat) |
661 | 37 | 37 | ||
665 | 38 | def bzrlib_is_subset(self, bzrlib_formats, launchpad_enum): | 38 | def breezy_is_subset(self, breezy_formats, launchpad_enum): |
666 | 39 | """Ensure the bzr format marker list is a subset of launchpad.""" | 39 | """Ensure the Breezy format marker list is a subset of Launchpad.""" |
667 | 40 | bzrlib_format_strings = set(bzrlib_formats) | 40 | breezy_format_strings = set(breezy_formats) |
668 | 41 | launchpad_format_strings = set(format.title for format | 41 | launchpad_format_strings = set(format.title for format |
669 | 42 | in launchpad_enum.items) | 42 | in launchpad_enum.items) |
670 | 43 | self.assertEqual( | 43 | self.assertEqual( |
672 | 44 | set(), bzrlib_format_strings.difference(launchpad_format_strings)) | 44 | set(), breezy_format_strings.difference(launchpad_format_strings)) |
673 | 45 | 45 | ||
674 | 46 | def test_repositoryDescriptions(self): | 46 | def test_repositoryDescriptions(self): |
675 | 47 | self.checkDescriptions(RepositoryFormat) | 47 | self.checkDescriptions(RepositoryFormat) |
676 | diff --git a/lib/lp/code/mail/codereviewcomment.py b/lib/lp/code/mail/codereviewcomment.py | |||
677 | index 62706be..760d923 100644 | |||
678 | --- a/lib/lp/code/mail/codereviewcomment.py | |||
679 | +++ b/lib/lp/code/mail/codereviewcomment.py | |||
680 | @@ -10,7 +10,7 @@ __all__ = [ | |||
681 | 10 | 'CodeReviewCommentMailer', | 10 | 'CodeReviewCommentMailer', |
682 | 11 | ] | 11 | ] |
683 | 12 | 12 | ||
685 | 13 | from bzrlib.patches import BinaryPatch | 13 | from breezy.patches import BinaryPatch |
686 | 14 | from zope.component import getUtility | 14 | from zope.component import getUtility |
687 | 15 | from zope.security.proxy import removeSecurityProxy | 15 | from zope.security.proxy import removeSecurityProxy |
688 | 16 | 16 | ||
689 | @@ -174,9 +174,9 @@ def format_comment(comment): | |||
690 | 174 | """Returns a list of correctly formatted comment(s).""" | 174 | """Returns a list of correctly formatted comment(s).""" |
691 | 175 | comment_lines = [] | 175 | comment_lines = [] |
692 | 176 | if comment is not None: | 176 | if comment is not None: |
694 | 177 | comment_lines.append('') | 177 | comment_lines.append(b'') |
695 | 178 | comment_lines.extend(comment.splitlines()) | 178 | comment_lines.extend(comment.splitlines()) |
697 | 179 | comment_lines.append('') | 179 | comment_lines.append(b'') |
698 | 180 | return comment_lines | 180 | return comment_lines |
699 | 181 | 181 | ||
700 | 182 | 182 | ||
701 | @@ -201,7 +201,7 @@ def build_inline_comments_section(comments, diff_text): | |||
702 | 201 | 201 | ||
703 | 202 | if isinstance(patch, dict) and 'dirty_head' in patch: | 202 | if isinstance(patch, dict) and 'dirty_head' in patch: |
704 | 203 | for line in patch['dirty_head']: | 203 | for line in patch['dirty_head']: |
706 | 204 | dirty_head.append(u'> %s' % line.rstrip('\n')) | 204 | dirty_head.append(b'> %s' % line.rstrip(b'\n')) |
707 | 205 | line_count += 1 # inc for dirty headers | 205 | line_count += 1 # inc for dirty headers |
708 | 206 | comment = comments.get(str(line_count)) | 206 | comment = comments.get(str(line_count)) |
709 | 207 | if comment: | 207 | if comment: |
710 | @@ -213,7 +213,7 @@ def build_inline_comments_section(comments, diff_text): | |||
711 | 213 | if type(patch) is BinaryPatch: | 213 | if type(patch) is BinaryPatch: |
712 | 214 | if dirty_comment: | 214 | if dirty_comment: |
713 | 215 | result_lines.extend(dirty_head) | 215 | result_lines.extend(dirty_head) |
715 | 216 | result_lines.append(u'> %s' % str(patch).rstrip('\n')) | 216 | result_lines.append(b'> %s' % patch.as_bytes().rstrip(b'\n')) |
716 | 217 | line_count += 1 | 217 | line_count += 1 |
717 | 218 | comment = comments.get(str(line_count)) | 218 | comment = comments.get(str(line_count)) |
718 | 219 | if comment: | 219 | if comment: |
719 | @@ -224,7 +224,7 @@ def build_inline_comments_section(comments, diff_text): | |||
720 | 224 | line_count += 1 # inc patch headers | 224 | line_count += 1 # inc patch headers |
721 | 225 | comment = comments.get(str(line_count)) | 225 | comment = comments.get(str(line_count)) |
722 | 226 | 226 | ||
724 | 227 | patch_lines.append('> {0}'.format(ph)) | 227 | patch_lines.append(b'> %s' % ph) |
725 | 228 | if comment: | 228 | if comment: |
726 | 229 | patch_lines.extend(format_comment(comment)) | 229 | patch_lines.extend(format_comment(comment)) |
727 | 230 | patch_comment = True | 230 | patch_comment = True |
728 | @@ -236,8 +236,7 @@ def build_inline_comments_section(comments, diff_text): | |||
729 | 236 | 236 | ||
730 | 237 | # add context line (hunk header) | 237 | # add context line (hunk header) |
731 | 238 | line_count += 1 # inc hunk context line | 238 | line_count += 1 # inc hunk context line |
734 | 239 | hunk_lines.append(u'> %s' % hunk.get_header().rstrip('\n').decode( | 239 | hunk_lines.append(b'> %s' % hunk.get_header().rstrip(b'\n')) |
733 | 240 | 'utf-8', 'replace')) | ||
735 | 241 | 240 | ||
736 | 242 | # comment for context line (hunk header) | 241 | # comment for context line (hunk header) |
737 | 243 | comment = comments.get(str(line_count)) | 242 | comment = comments.get(str(line_count)) |
738 | @@ -248,11 +247,9 @@ def build_inline_comments_section(comments, diff_text): | |||
739 | 248 | for hunk_line in hunk.lines: | 247 | for hunk_line in hunk.lines: |
740 | 249 | # A single HunkLine can actually represent multiple | 248 | # A single HunkLine can actually represent multiple |
741 | 250 | # lines in the "No newline at end of file" case. | 249 | # lines in the "No newline at end of file" case. |
744 | 251 | hunk_line = str(hunk_line) | 250 | for line in hunk_line.as_bytes().splitlines(): |
743 | 252 | for line in hunk_line.splitlines(): | ||
745 | 253 | line_count += 1 # inc hunk lines | 251 | line_count += 1 # inc hunk lines |
748 | 254 | hunk_lines.append(u'> %s' % line.rstrip('\n').decode( | 252 | hunk_lines.append(b'> %s' % line.rstrip(b'\n')) |
747 | 255 | 'utf-8', 'replace')) | ||
749 | 256 | comment = comments.get(str(line_count)) | 253 | comment = comments.get(str(line_count)) |
750 | 257 | if comment: | 254 | if comment: |
751 | 258 | hunk_lines.extend(format_comment(comment)) | 255 | hunk_lines.extend(format_comment(comment)) |
752 | @@ -270,5 +267,5 @@ def build_inline_comments_section(comments, diff_text): | |||
753 | 270 | elif dirty_comment: | 267 | elif dirty_comment: |
754 | 271 | result_lines.extend(dirty_head) | 268 | result_lines.extend(dirty_head) |
755 | 272 | 269 | ||
757 | 273 | result_text = '\n'.join(result_lines) | 270 | result_text = b'\n'.join(result_lines).decode('UTF-8', errors='replace') |
758 | 274 | return '\n\nDiff comments:\n\n%s\n\n' % result_text | 271 | return '\n\nDiff comments:\n\n%s\n\n' % result_text |
759 | diff --git a/lib/lp/code/mail/patches.py b/lib/lp/code/mail/patches.py | |||
760 | index 5b5ccac..11e655d 100644 | |||
761 | --- a/lib/lp/code/mail/patches.py | |||
762 | +++ b/lib/lp/code/mail/patches.py | |||
763 | @@ -1,4 +1,4 @@ | |||
765 | 1 | # This file was partially cloned from bzr-2.6.0-lp-3 (bzrlib.patches) and | 1 | # This file was partially cloned from breezy 3.0.0 (breezy.patches) and |
766 | 2 | # customised for LP. | 2 | # customised for LP. |
767 | 3 | # | 3 | # |
768 | 4 | # Copyright (C) 2005-2010 Aaron Bentley, Canonical Ltd | 4 | # Copyright (C) 2005-2010 Aaron Bentley, Canonical Ltd |
769 | @@ -20,7 +20,7 @@ | |||
770 | 20 | 20 | ||
771 | 21 | from __future__ import absolute_import | 21 | from __future__ import absolute_import |
772 | 22 | 22 | ||
774 | 23 | from bzrlib.patches import ( | 23 | from breezy.patches import ( |
775 | 24 | binary_files_re, | 24 | binary_files_re, |
776 | 25 | hunk_from_header, | 25 | hunk_from_header, |
777 | 26 | parse_patch, | 26 | parse_patch, |
778 | @@ -50,10 +50,10 @@ def iter_file_patch(iter_lines, allow_dirty=False, keep_dirty=False): | |||
779 | 50 | beginning = True | 50 | beginning = True |
780 | 51 | in_git_patch = False | 51 | in_git_patch = False |
781 | 52 | 52 | ||
783 | 53 | dirty_headers = ('=== ', 'diff ', 'index ') | 53 | dirty_headers = (b'=== ', b'diff ', b'index ') |
784 | 54 | for line in iter_lines: | 54 | for line in iter_lines: |
785 | 55 | # preserve bzr modified/added headers and blank lines | 55 | # preserve bzr modified/added headers and blank lines |
787 | 56 | if line.startswith(dirty_headers) or not line.strip('\n'): | 56 | if line.startswith(dirty_headers) or not line.strip(b'\n'): |
788 | 57 | if len(saved_lines) > 0: | 57 | if len(saved_lines) > 0: |
789 | 58 | if keep_dirty and len(dirty_head) > 0: | 58 | if keep_dirty and len(dirty_head) > 0: |
790 | 59 | yield {'saved_lines': saved_lines, | 59 | yield {'saved_lines': saved_lines, |
791 | @@ -63,7 +63,7 @@ def iter_file_patch(iter_lines, allow_dirty=False, keep_dirty=False): | |||
792 | 63 | yield saved_lines | 63 | yield saved_lines |
793 | 64 | in_git_patch = False | 64 | in_git_patch = False |
794 | 65 | saved_lines = [] | 65 | saved_lines = [] |
796 | 66 | if line.startswith('diff --git'): | 66 | if line.startswith(b'diff --git'): |
797 | 67 | in_git_patch = True | 67 | in_git_patch = True |
798 | 68 | dirty_head.append(line) | 68 | dirty_head.append(line) |
799 | 69 | continue | 69 | continue |
800 | @@ -73,14 +73,14 @@ def iter_file_patch(iter_lines, allow_dirty=False, keep_dirty=False): | |||
801 | 73 | # in the patch before the next "diff" header line can do so. | 73 | # in the patch before the next "diff" header line can do so. |
802 | 74 | dirty_head.append(line) | 74 | dirty_head.append(line) |
803 | 75 | continue | 75 | continue |
805 | 76 | if line.startswith('*** '): | 76 | if line.startswith(b'*** '): |
806 | 77 | continue | 77 | continue |
808 | 78 | if line.startswith('#'): | 78 | if line.startswith(b'#'): |
809 | 79 | continue | 79 | continue |
810 | 80 | elif orig_range > 0: | 80 | elif orig_range > 0: |
812 | 81 | if line.startswith('-') or line.startswith(' '): | 81 | if line.startswith(b'-') or line.startswith(b' '): |
813 | 82 | orig_range -= 1 | 82 | orig_range -= 1 |
815 | 83 | elif line.startswith('--- ') or regex.match(line): | 83 | elif line.startswith(b'--- ') or regex.match(line): |
816 | 84 | if allow_dirty and beginning: | 84 | if allow_dirty and beginning: |
817 | 85 | # Patches can have "junk" at the beginning | 85 | # Patches can have "junk" at the beginning |
818 | 86 | # Stripping junk from the end of patches is handled when we | 86 | # Stripping junk from the end of patches is handled when we |
819 | @@ -95,7 +95,7 @@ def iter_file_patch(iter_lines, allow_dirty=False, keep_dirty=False): | |||
820 | 95 | yield saved_lines | 95 | yield saved_lines |
821 | 96 | in_git_patch = False | 96 | in_git_patch = False |
822 | 97 | saved_lines = [] | 97 | saved_lines = [] |
824 | 98 | elif line.startswith('@@'): | 98 | elif line.startswith(b'@@'): |
825 | 99 | hunk = hunk_from_header(line) | 99 | hunk = hunk_from_header(line) |
826 | 100 | orig_range = hunk.orig_range | 100 | orig_range = hunk.orig_range |
827 | 101 | saved_lines.append(line) | 101 | saved_lines.append(line) |
828 | @@ -116,12 +116,11 @@ def parse_patches(iter_lines, allow_dirty=False, keep_dirty=False): | |||
829 | 116 | :kwarg keep_dirty: If True, returns a dict of patches with dirty headers. | 116 | :kwarg keep_dirty: If True, returns a dict of patches with dirty headers. |
830 | 117 | Default False. | 117 | Default False. |
831 | 118 | ''' | 118 | ''' |
832 | 119 | patches = [] | ||
833 | 120 | for patch_lines in iter_file_patch(iter_lines, allow_dirty, keep_dirty): | 119 | for patch_lines in iter_file_patch(iter_lines, allow_dirty, keep_dirty): |
834 | 121 | if 'dirty_head' in patch_lines: | 120 | if 'dirty_head' in patch_lines: |
838 | 122 | patches.append({'patch': parse_patch( | 121 | yield { |
839 | 123 | patch_lines['saved_lines'], allow_dirty), | 122 | 'patch': parse_patch(patch_lines['saved_lines'], allow_dirty), |
840 | 124 | 'dirty_head': patch_lines['dirty_head']}) | 123 | 'dirty_head': patch_lines['dirty_head'], |
841 | 124 | } | ||
842 | 125 | else: | 125 | else: |
845 | 126 | patches.append(parse_patch(patch_lines, allow_dirty)) | 126 | yield parse_patch(patch_lines, allow_dirty) |
844 | 127 | return patches | ||
846 | diff --git a/lib/lp/code/model/branch.py b/lib/lp/code/model/branch.py | |||
847 | index 691b0c9..c95247a 100644 | |||
848 | --- a/lib/lp/code/model/branch.py | |||
849 | +++ b/lib/lp/code/model/branch.py | |||
850 | @@ -14,9 +14,9 @@ import json | |||
851 | 14 | import operator | 14 | import operator |
852 | 15 | import os.path | 15 | import os.path |
853 | 16 | 16 | ||
857 | 17 | from bzrlib import urlutils | 17 | from breezy import urlutils |
858 | 18 | from bzrlib.revision import NULL_REVISION | 18 | from breezy.revision import NULL_REVISION |
859 | 19 | from bzrlib.url_policy_open import open_only_scheme | 19 | from breezy.url_policy_open import open_only_scheme |
860 | 20 | from lazr.lifecycle.event import ObjectCreatedEvent | 20 | from lazr.lifecycle.event import ObjectCreatedEvent |
861 | 21 | import pytz | 21 | import pytz |
862 | 22 | import six | 22 | import six |
863 | diff --git a/lib/lp/code/model/branchjob.py b/lib/lp/code/model/branchjob.py | |||
864 | index 38a961f..8cf99c9 100644 | |||
865 | --- a/lib/lp/code/model/branchjob.py | |||
866 | +++ b/lib/lp/code/model/branchjob.py | |||
867 | @@ -19,20 +19,20 @@ import shutil | |||
868 | 19 | from StringIO import StringIO | 19 | from StringIO import StringIO |
869 | 20 | import tempfile | 20 | import tempfile |
870 | 21 | 21 | ||
874 | 22 | from bzrlib.branch import Branch as BzrBranch | 22 | from breezy.branch import Branch as BzrBranch |
875 | 23 | from bzrlib.diff import show_diff_trees | 23 | from breezy.diff import show_diff_trees |
876 | 24 | from bzrlib.errors import ( | 24 | from breezy.errors import ( |
877 | 25 | NoSuchFile, | 25 | NoSuchFile, |
878 | 26 | NotBranchError, | 26 | NotBranchError, |
879 | 27 | ) | 27 | ) |
881 | 28 | from bzrlib.log import ( | 28 | from breezy.log import ( |
882 | 29 | log_formatter, | 29 | log_formatter, |
883 | 30 | show_log, | 30 | show_log, |
884 | 31 | ) | 31 | ) |
889 | 32 | from bzrlib.revision import NULL_REVISION | 32 | from breezy.revision import NULL_REVISION |
890 | 33 | from bzrlib.revisionspec import RevisionInfo | 33 | from breezy.revisionspec import RevisionInfo |
891 | 34 | from bzrlib.transport import get_transport | 34 | from breezy.transport import get_transport |
892 | 35 | from bzrlib.upgrade import upgrade | 35 | from breezy.upgrade import upgrade |
893 | 36 | from lazr.delegates import delegate_to | 36 | from lazr.delegates import delegate_to |
894 | 37 | from lazr.enum import ( | 37 | from lazr.enum import ( |
895 | 38 | DBEnumeratedType, | 38 | DBEnumeratedType, |
896 | @@ -533,7 +533,7 @@ class RevisionsAddedJob(BranchJobDerived): | |||
897 | 533 | repository = self.bzr_branch.repository | 533 | repository = self.bzr_branch.repository |
898 | 534 | added_revisions = repository.get_graph().find_unique_ancestors( | 534 | added_revisions = repository.get_graph().find_unique_ancestors( |
899 | 535 | self.last_revision_id, [self.last_scanned_id]) | 535 | self.last_revision_id, [self.last_scanned_id]) |
901 | 536 | # Avoid hitting the database since bzrlib makes it easy to check. | 536 | # Avoid hitting the database since breezy makes it easy to check. |
902 | 537 | # There are possibly more efficient ways to get the mainline | 537 | # There are possibly more efficient ways to get the mainline |
903 | 538 | # revisions, but this is simple and it works. | 538 | # revisions, but this is simple and it works. |
904 | 539 | history = branch_revision_history(self.bzr_branch) | 539 | history = branch_revision_history(self.bzr_branch) |
905 | @@ -625,7 +625,7 @@ class RevisionsAddedJob(BranchJobDerived): | |||
906 | 625 | """Determine which revisions were merged by this revision. | 625 | """Determine which revisions were merged by this revision. |
907 | 626 | 626 | ||
908 | 627 | :param revision_id: ID of the revision to examine. | 627 | :param revision_id: ID of the revision to examine. |
910 | 628 | :param graph: a bzrlib.graph.Graph. | 628 | :param graph: a breezy.graph.Graph. |
911 | 629 | :return: a set of revision IDs. | 629 | :return: a set of revision IDs. |
912 | 630 | """ | 630 | """ |
913 | 631 | parents = graph.get_parent_map([revision_id])[revision_id] | 631 | parents = graph.get_parent_map([revision_id])[revision_id] |
914 | @@ -901,7 +901,7 @@ class RosettaUploadJob(BranchJobDerived): | |||
915 | 901 | continue | 901 | continue |
916 | 902 | file_id, (from_path, to_path) = changed_file[:2] | 902 | file_id, (from_path, to_path) = changed_file[:2] |
917 | 903 | changed_files.append(( | 903 | changed_files.append(( |
919 | 904 | to_path, to_tree.get_file_text(file_id))) | 904 | to_path, to_tree.get_file_text(to_path))) |
920 | 905 | finally: | 905 | finally: |
921 | 906 | from_tree.unlock() | 906 | from_tree.unlock() |
922 | 907 | finally: | 907 | finally: |
923 | diff --git a/lib/lp/code/model/branchlookup.py b/lib/lp/code/model/branchlookup.py | |||
924 | index 18d8744..b0012e7 100644 | |||
925 | --- a/lib/lp/code/model/branchlookup.py | |||
926 | +++ b/lib/lp/code/model/branchlookup.py | |||
927 | @@ -9,7 +9,7 @@ __metaclass__ = type | |||
928 | 9 | __all__ = [] | 9 | __all__ = [] |
929 | 10 | 10 | ||
930 | 11 | 11 | ||
932 | 12 | from bzrlib.urlutils import escape | 12 | from breezy.urlutils import escape |
933 | 13 | from lazr.enum import DBItem | 13 | from lazr.enum import DBItem |
934 | 14 | from lazr.uri import ( | 14 | from lazr.uri import ( |
935 | 15 | InvalidURIError, | 15 | InvalidURIError, |
936 | diff --git a/lib/lp/code/model/diff.py b/lib/lp/code/model/diff.py | |||
937 | index ac8d525..500dd5c 100644 | |||
938 | --- a/lib/lp/code/model/diff.py | |||
939 | +++ b/lib/lp/code/model/diff.py | |||
940 | @@ -16,14 +16,14 @@ from operator import attrgetter | |||
941 | 16 | import sys | 16 | import sys |
942 | 17 | from uuid import uuid1 | 17 | from uuid import uuid1 |
943 | 18 | 18 | ||
948 | 19 | from bzrlib import trace | 19 | from breezy import trace |
949 | 20 | from bzrlib.diff import show_diff_trees | 20 | from breezy.diff import show_diff_trees |
950 | 21 | from bzrlib.merge import Merge3Merger | 21 | from breezy.merge import Merge3Merger |
951 | 22 | from bzrlib.patches import ( | 22 | from breezy.patches import ( |
952 | 23 | parse_patches, | 23 | parse_patches, |
953 | 24 | Patch, | 24 | Patch, |
954 | 25 | ) | 25 | ) |
956 | 26 | from bzrlib.plugins.difftacular.generate_diff import diff_ignore_branches | 26 | from breezy.plugins.difftacular.generate_diff import diff_ignore_branches |
957 | 27 | from lazr.delegates import delegate_to | 27 | from lazr.delegates import delegate_to |
958 | 28 | import simplejson | 28 | import simplejson |
959 | 29 | from sqlobject import ( | 29 | from sqlobject import ( |
960 | diff --git a/lib/lp/code/model/directbranchcommit.py b/lib/lp/code/model/directbranchcommit.py | |||
961 | index 4dd4d46..0b7a902 100644 | |||
962 | --- a/lib/lp/code/model/directbranchcommit.py | |||
963 | +++ b/lib/lp/code/model/directbranchcommit.py | |||
964 | @@ -12,9 +12,9 @@ __all__ = [ | |||
965 | 12 | 12 | ||
966 | 13 | import os.path | 13 | import os.path |
967 | 14 | 14 | ||
971 | 15 | from bzrlib.generate_ids import gen_file_id | 15 | from breezy.bzr.generate_ids import gen_file_id |
972 | 16 | from bzrlib.revision import NULL_REVISION | 16 | from breezy.revision import NULL_REVISION |
973 | 17 | from bzrlib.transform import ( | 17 | from breezy.transform import ( |
974 | 18 | ROOT_PARENT, | 18 | ROOT_PARENT, |
975 | 19 | TransformPreview, | 19 | TransformPreview, |
976 | 20 | ) | 20 | ) |
977 | @@ -226,10 +226,11 @@ class DirectBranchCommit: | |||
978 | 226 | if rev_id == NULL_REVISION: | 226 | if rev_id == NULL_REVISION: |
979 | 227 | if list(self.transform_preview.iter_changes()) == []: | 227 | if list(self.transform_preview.iter_changes()) == []: |
980 | 228 | return | 228 | return |
981 | 229 | self.transform_preview.fixup_new_roots() | ||
982 | 229 | committer_id = self.getBzrCommitterID() | 230 | committer_id = self.getBzrCommitterID() |
983 | 230 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 231 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
984 | 231 | # required to generate the revision-id. | 232 | # required to generate the revision-id. |
986 | 232 | with override_environ(BZR_EMAIL=committer_id): | 233 | with override_environ(BRZ_EMAIL=committer_id): |
987 | 233 | new_rev_id = self.transform_preview.commit( | 234 | new_rev_id = self.transform_preview.commit( |
988 | 234 | self.bzrbranch, commit_message, self.merge_parents, | 235 | self.bzrbranch, commit_message, self.merge_parents, |
989 | 235 | committer=committer_id) | 236 | committer=committer_id) |
990 | diff --git a/lib/lp/code/model/gitrepository.py b/lib/lp/code/model/gitrepository.py | |||
991 | index 93a2d16..14c09a4 100644 | |||
992 | --- a/lib/lp/code/model/gitrepository.py | |||
993 | +++ b/lib/lp/code/model/gitrepository.py | |||
994 | @@ -27,7 +27,7 @@ from itertools import ( | |||
995 | 27 | from operator import attrgetter | 27 | from operator import attrgetter |
996 | 28 | from urllib import quote_plus | 28 | from urllib import quote_plus |
997 | 29 | 29 | ||
999 | 30 | from bzrlib import urlutils | 30 | from breezy import urlutils |
1000 | 31 | from lazr.enum import DBItem | 31 | from lazr.enum import DBItem |
1001 | 32 | from lazr.lifecycle.event import ObjectModifiedEvent | 32 | from lazr.lifecycle.event import ObjectModifiedEvent |
1002 | 33 | from lazr.lifecycle.snapshot import Snapshot | 33 | from lazr.lifecycle.snapshot import Snapshot |
1003 | diff --git a/lib/lp/code/model/revision.py b/lib/lp/code/model/revision.py | |||
1004 | index 119ac41..4895ebb 100644 | |||
1005 | --- a/lib/lp/code/model/revision.py | |||
1006 | +++ b/lib/lp/code/model/revision.py | |||
1007 | @@ -16,7 +16,7 @@ from datetime import ( | |||
1008 | 16 | ) | 16 | ) |
1009 | 17 | import email | 17 | import email |
1010 | 18 | 18 | ||
1012 | 19 | from bzrlib.revision import NULL_REVISION | 19 | from breezy.revision import NULL_REVISION |
1013 | 20 | import pytz | 20 | import pytz |
1014 | 21 | from sqlobject import ( | 21 | from sqlobject import ( |
1015 | 22 | BoolCol, | 22 | BoolCol, |
1016 | @@ -322,7 +322,7 @@ class RevisionSet: | |||
1017 | 322 | This works around a bug in Python that causes datetime.fromtimestamp | 322 | This works around a bug in Python that causes datetime.fromtimestamp |
1018 | 323 | to raise an exception if it is given a negative, fractional timestamp. | 323 | to raise an exception if it is given a negative, fractional timestamp. |
1019 | 324 | 324 | ||
1021 | 325 | :param timestamp: A timestamp from a bzrlib.revision.Revision | 325 | :param timestamp: A timestamp from a breezy.revision.Revision |
1022 | 326 | :type timestamp: float | 326 | :type timestamp: float |
1023 | 327 | 327 | ||
1024 | 328 | :return: A datetime corresponding to the given timestamp. | 328 | :return: A datetime corresponding to the given timestamp. |
1025 | diff --git a/lib/lp/code/model/sourcepackagerecipedata.py b/lib/lp/code/model/sourcepackagerecipedata.py | |||
1026 | index a30b3c2..e0801bf 100644 | |||
1027 | --- a/lib/lp/code/model/sourcepackagerecipedata.py | |||
1028 | +++ b/lib/lp/code/model/sourcepackagerecipedata.py | |||
1029 | @@ -13,7 +13,7 @@ __all__ = ['SourcePackageRecipeData'] | |||
1030 | 13 | 13 | ||
1031 | 14 | import re | 14 | import re |
1032 | 15 | 15 | ||
1034 | 16 | from bzrlib.plugins.builder.recipe import ( | 16 | from breezy.plugins.builder.recipe import ( |
1035 | 17 | BaseRecipeBranch, | 17 | BaseRecipeBranch, |
1036 | 18 | MergeInstruction, | 18 | MergeInstruction, |
1037 | 19 | NestInstruction, | 19 | NestInstruction, |
1038 | diff --git a/lib/lp/code/model/tests/test_branch.py b/lib/lp/code/model/tests/test_branch.py | |||
1039 | index ecad508..2bd0b62 100644 | |||
1040 | --- a/lib/lp/code/model/tests/test_branch.py | |||
1041 | +++ b/lib/lp/code/model/tests/test_branch.py | |||
1042 | @@ -13,10 +13,10 @@ from datetime import ( | |||
1043 | 13 | ) | 13 | ) |
1044 | 14 | import json | 14 | import json |
1045 | 15 | 15 | ||
1050 | 16 | from bzrlib.branch import Branch | 16 | from breezy.branch import Branch |
1051 | 17 | from bzrlib.bzrdir import BzrDir | 17 | from breezy.bzr.bzrdir import BzrDir |
1052 | 18 | from bzrlib.revision import NULL_REVISION | 18 | from breezy.revision import NULL_REVISION |
1053 | 19 | from bzrlib.url_policy_open import BadUrl | 19 | from breezy.url_policy_open import BadUrl |
1054 | 20 | from pytz import UTC | 20 | from pytz import UTC |
1055 | 21 | from sqlobject import SQLObjectNotFound | 21 | from sqlobject import SQLObjectNotFound |
1056 | 22 | from storm.exceptions import LostObjectError | 22 | from storm.exceptions import LostObjectError |
1057 | @@ -2257,7 +2257,7 @@ class TestRevisionHistory(TestCaseWithFactory): | |||
1058 | 2257 | def test_tip_revision_when_no_revisions(self): | 2257 | def test_tip_revision_when_no_revisions(self): |
1059 | 2258 | # When a branch has no revisions but does have Bazaar data, its tip | 2258 | # When a branch has no revisions but does have Bazaar data, its tip |
1060 | 2259 | # revision is None and its last_scanned_id is | 2259 | # revision is None and its last_scanned_id is |
1062 | 2260 | # bzrlib.revision.NULL_REVISION. | 2260 | # breezy.revision.NULL_REVISION. |
1063 | 2261 | branch = self.factory.makeBranch() | 2261 | branch = self.factory.makeBranch() |
1064 | 2262 | branch.updateScannedDetails(None, 0) | 2262 | branch.updateScannedDetails(None, 0) |
1065 | 2263 | self.assertEqual(NULL_REVISION, branch.last_scanned_id) | 2263 | self.assertEqual(NULL_REVISION, branch.last_scanned_id) |
1066 | @@ -3276,7 +3276,7 @@ class TestGetBzrBranch(TestCaseWithFactory): | |||
1067 | 3276 | db_branch, tree = self.create_branch_and_tree() | 3276 | db_branch, tree = self.create_branch_and_tree() |
1068 | 3277 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 3277 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1069 | 3278 | # required to generate the revision-id. | 3278 | # required to generate the revision-id. |
1071 | 3279 | with override_environ(BZR_EMAIL='me@example.com'): | 3279 | with override_environ(BRZ_EMAIL='me@example.com'): |
1072 | 3280 | revid = tree.commit('') | 3280 | revid = tree.commit('') |
1073 | 3281 | bzr_branch = db_branch.getBzrBranch() | 3281 | bzr_branch = db_branch.getBzrBranch() |
1074 | 3282 | self.assertEqual(revid, bzr_branch.last_revision()) | 3282 | self.assertEqual(revid, bzr_branch.last_revision()) |
1075 | diff --git a/lib/lp/code/model/tests/test_branchjob.py b/lib/lp/code/model/tests/test_branchjob.py | |||
1076 | index 66badbf..0c4a893 100644 | |||
1077 | --- a/lib/lp/code/model/tests/test_branchjob.py | |||
1078 | +++ b/lib/lp/code/model/tests/test_branchjob.py | |||
1079 | @@ -11,11 +11,11 @@ import datetime | |||
1080 | 11 | import os | 11 | import os |
1081 | 12 | import shutil | 12 | import shutil |
1082 | 13 | 13 | ||
1088 | 14 | from bzrlib import errors as bzr_errors | 14 | from breezy import errors as bzr_errors |
1089 | 15 | from bzrlib.branch import Branch | 15 | from breezy.branch import Branch |
1090 | 16 | from bzrlib.bzrdir import BzrDir | 16 | from breezy.bzr.bzrdir import BzrDir |
1091 | 17 | from bzrlib.revision import NULL_REVISION | 17 | from breezy.revision import NULL_REVISION |
1092 | 18 | from bzrlib.transport import get_transport | 18 | from breezy.transport import get_transport |
1093 | 19 | from fixtures import MockPatch | 19 | from fixtures import MockPatch |
1094 | 20 | import pytz | 20 | import pytz |
1095 | 21 | from sqlobject import SQLObjectNotFound | 21 | from sqlobject import SQLObjectNotFound |
1096 | @@ -149,7 +149,7 @@ class TestBranchScanJob(TestCaseWithFactory): | |||
1097 | 149 | db_branch, bzr_tree = self.create_branch_and_tree() | 149 | db_branch, bzr_tree = self.create_branch_and_tree() |
1098 | 150 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 150 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1099 | 151 | # required to generate the revision-id. | 151 | # required to generate the revision-id. |
1101 | 152 | with override_environ(BZR_EMAIL='me@example.com'): | 152 | with override_environ(BRZ_EMAIL='me@example.com'): |
1102 | 153 | bzr_tree.commit('First commit', rev_id=b'rev1') | 153 | bzr_tree.commit('First commit', rev_id=b'rev1') |
1103 | 154 | bzr_tree.commit('Second commit', rev_id=b'rev2') | 154 | bzr_tree.commit('Second commit', rev_id=b'rev2') |
1104 | 155 | bzr_tree.commit('Third commit', rev_id=b'rev3') | 155 | bzr_tree.commit('Third commit', rev_id=b'rev3') |
1105 | @@ -177,7 +177,7 @@ class TestBranchScanJob(TestCaseWithFactory): | |||
1106 | 177 | db_branch, bzr_tree = self.create_branch_and_tree() | 177 | db_branch, bzr_tree = self.create_branch_and_tree() |
1107 | 178 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 178 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1108 | 179 | # required to generate the revision-id. | 179 | # required to generate the revision-id. |
1110 | 180 | with override_environ(BZR_EMAIL='me@example.com'): | 180 | with override_environ(BRZ_EMAIL='me@example.com'): |
1111 | 181 | bzr_tree.commit('First commit', rev_id=b'rev1') | 181 | bzr_tree.commit('First commit', rev_id=b'rev1') |
1112 | 182 | LaunchpadZopelessLayer.commit() | 182 | LaunchpadZopelessLayer.commit() |
1113 | 183 | 183 | ||
1114 | @@ -198,7 +198,7 @@ class TestBranchScanJob(TestCaseWithFactory): | |||
1115 | 198 | private_bug = self.factory.makeBug( | 198 | private_bug = self.factory.makeBug( |
1116 | 199 | target=product, information_type=InformationType.USERDATA) | 199 | target=product, information_type=InformationType.USERDATA) |
1117 | 200 | bug_line = b'https://launchpad.net/bugs/%s fixed' % private_bug.id | 200 | bug_line = b'https://launchpad.net/bugs/%s fixed' % private_bug.id |
1119 | 201 | with override_environ(BZR_EMAIL='me@example.com'): | 201 | with override_environ(BRZ_EMAIL='me@example.com'): |
1120 | 202 | bzr_tree.commit( | 202 | bzr_tree.commit( |
1121 | 203 | 'First commit', rev_id=b'rev1', revprops={b'bugs': bug_line}) | 203 | 'First commit', rev_id=b'rev1', revprops={b'bugs': bug_line}) |
1122 | 204 | job = BranchScanJob.create(db_branch) | 204 | job = BranchScanJob.create(db_branch) |
1123 | @@ -314,7 +314,7 @@ class TestBranchUpgradeJob(TestCaseWithFactory): | |||
1124 | 314 | db_branch, tree = self.create_branch_and_tree() | 314 | db_branch, tree = self.create_branch_and_tree() |
1125 | 315 | branch2 = BzrDir.create_branch_convenience('.') | 315 | branch2 = BzrDir.create_branch_convenience('.') |
1126 | 316 | tree.branch.set_stacked_on_url(branch2.base) | 316 | tree.branch.set_stacked_on_url(branch2.base) |
1128 | 317 | branch2.bzrdir.destroy_branch() | 317 | branch2.controldir.destroy_branch() |
1129 | 318 | # Create BranchUpgradeJob manually, because we're trying to upgrade a | 318 | # Create BranchUpgradeJob manually, because we're trying to upgrade a |
1130 | 319 | # branch that doesn't need upgrading. | 319 | # branch that doesn't need upgrading. |
1131 | 320 | requester = self.factory.makePerson() | 320 | requester = self.factory.makePerson() |
1132 | @@ -463,7 +463,7 @@ class TestRevisionsAddedJob(TestCaseWithFactory): | |||
1133 | 463 | try: | 463 | try: |
1134 | 464 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 464 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1135 | 465 | # required to generate the revision-id. | 465 | # required to generate the revision-id. |
1137 | 466 | with override_environ(BZR_EMAIL='me@example.com'): | 466 | with override_environ(BRZ_EMAIL='me@example.com'): |
1138 | 467 | tree.commit('rev1', rev_id=b'rev1') | 467 | tree.commit('rev1', rev_id=b'rev1') |
1139 | 468 | tree.commit('rev2', rev_id=b'rev2') | 468 | tree.commit('rev2', rev_id=b'rev2') |
1140 | 469 | tree.commit('rev3', rev_id=b'rev3') | 469 | tree.commit('rev3', rev_id=b'rev3') |
1141 | @@ -492,7 +492,7 @@ class TestRevisionsAddedJob(TestCaseWithFactory): | |||
1142 | 492 | tree.add_parent_tree_id(b'rev3') | 492 | tree.add_parent_tree_id(b'rev3') |
1143 | 493 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 493 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1144 | 494 | # required to generate the revision-id. | 494 | # required to generate the revision-id. |
1146 | 495 | with override_environ(BZR_EMAIL='me@example.com'): | 495 | with override_environ(BRZ_EMAIL='me@example.com'): |
1147 | 496 | tree.commit('rev3a', rev_id=b'rev3a') | 496 | tree.commit('rev3a', rev_id=b'rev3a') |
1148 | 497 | self.updateDBRevisions(branch, tree.branch, [b'rev3', b'rev3a']) | 497 | self.updateDBRevisions(branch, tree.branch, [b'rev3', b'rev3a']) |
1149 | 498 | job = RevisionsAddedJob.create(branch, 'rev1', 'rev3', '') | 498 | job = RevisionsAddedJob.create(branch, 'rev1', 'rev3', '') |
1150 | @@ -533,7 +533,7 @@ class TestRevisionsAddedJob(TestCaseWithFactory): | |||
1151 | 533 | self.addCleanup(tree.unlock) | 533 | self.addCleanup(tree.unlock) |
1152 | 534 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 534 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1153 | 535 | # required to generate the revision-id. | 535 | # required to generate the revision-id. |
1155 | 536 | with override_environ(BZR_EMAIL='me@example.com'): | 536 | with override_environ(BRZ_EMAIL='me@example.com'): |
1156 | 537 | tree.commit( | 537 | tree.commit( |
1157 | 538 | 'rev1', rev_id=b'rev1', timestamp=1000, timezone=0, | 538 | 'rev1', rev_id=b'rev1', timestamp=1000, timezone=0, |
1158 | 539 | committer='J. Random Hacker <jrandom@example.org>') | 539 | committer='J. Random Hacker <jrandom@example.org>') |
1159 | @@ -552,14 +552,14 @@ class TestRevisionsAddedJob(TestCaseWithFactory): | |||
1160 | 552 | tree.branch.nick = 'nicholas' | 552 | tree.branch.nick = 'nicholas' |
1161 | 553 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 553 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1162 | 554 | # required to generate the revision-id. | 554 | # required to generate the revision-id. |
1164 | 555 | with override_environ(BZR_EMAIL='me@example.com'): | 555 | with override_environ(BRZ_EMAIL='me@example.com'): |
1165 | 556 | tree.commit('rev1') | 556 | tree.commit('rev1') |
1167 | 557 | tree2 = tree.bzrdir.sprout('tree2').open_workingtree() | 557 | tree2 = tree.controldir.sprout('tree2').open_workingtree() |
1168 | 558 | tree2.commit('rev2a', rev_id=b'rev2a-id', committer='foo@') | 558 | tree2.commit('rev2a', rev_id=b'rev2a-id', committer='foo@') |
1169 | 559 | tree2.commit('rev3', rev_id=b'rev3-id', | 559 | tree2.commit('rev3', rev_id=b'rev3-id', |
1170 | 560 | authors=['bar@', 'baz@blaine.com']) | 560 | authors=['bar@', 'baz@blaine.com']) |
1171 | 561 | tree.merge_from_branch(tree2.branch) | 561 | tree.merge_from_branch(tree2.branch) |
1173 | 562 | tree3 = tree.bzrdir.sprout('tree3').open_workingtree() | 562 | tree3 = tree.controldir.sprout('tree3').open_workingtree() |
1174 | 563 | tree3.commit('rev2b', rev_id=b'rev2b-id', committer='qux@') | 563 | tree3.commit('rev2b', rev_id=b'rev2b-id', committer='qux@') |
1175 | 564 | tree.merge_from_branch(tree3.branch, force=True) | 564 | tree.merge_from_branch(tree3.branch, force=True) |
1176 | 565 | if include_ghost: | 565 | if include_ghost: |
1177 | @@ -808,17 +808,17 @@ class TestRevisionsAddedJob(TestCaseWithFactory): | |||
1178 | 808 | self.useBzrBranches(direct_database=True) | 808 | self.useBzrBranches(direct_database=True) |
1179 | 809 | db_branch, tree = self.create_branch_and_tree() | 809 | db_branch, tree = self.create_branch_and_tree() |
1180 | 810 | first_revision = b'rev-1' | 810 | first_revision = b'rev-1' |
1182 | 811 | tree.bzrdir.root_transport.put_bytes('hello.txt', 'Hello World\n') | 811 | tree.controldir.root_transport.put_bytes('hello.txt', b'Hello World\n') |
1183 | 812 | tree.add('hello.txt') | 812 | tree.add('hello.txt') |
1184 | 813 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 813 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1185 | 814 | # required to generate the revision-id. | 814 | # required to generate the revision-id. |
1187 | 815 | with override_environ(BZR_EMAIL='me@example.com'): | 815 | with override_environ(BRZ_EMAIL='me@example.com'): |
1188 | 816 | tree.commit( | 816 | tree.commit( |
1189 | 817 | rev_id=first_revision, message="Log message", | 817 | rev_id=first_revision, message="Log message", |
1190 | 818 | committer="Joe Bloggs <joe@example.com>", | 818 | committer="Joe Bloggs <joe@example.com>", |
1191 | 819 | timestamp=1000000000.0, timezone=0) | 819 | timestamp=1000000000.0, timezone=0) |
1194 | 820 | tree.bzrdir.root_transport.put_bytes( | 820 | tree.controldir.root_transport.put_bytes( |
1195 | 821 | 'hello.txt', 'Hello World\n\nFoo Bar\n') | 821 | 'hello.txt', b'Hello World\n\nFoo Bar\n') |
1196 | 822 | second_revision = b'rev-2' | 822 | second_revision = b'rev-2' |
1197 | 823 | tree.commit( | 823 | tree.commit( |
1198 | 824 | rev_id=second_revision, message="Extended contents", | 824 | rev_id=second_revision, message="Extended contents", |
1199 | @@ -864,7 +864,7 @@ class TestRevisionsAddedJob(TestCaseWithFactory): | |||
1200 | 864 | rev_id = b'rev-1' | 864 | rev_id = b'rev-1' |
1201 | 865 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 865 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1202 | 866 | # required to generate the revision-id. | 866 | # required to generate the revision-id. |
1204 | 867 | with override_environ(BZR_EMAIL='me@example.com'): | 867 | with override_environ(BRZ_EMAIL='me@example.com'): |
1205 | 868 | tree.commit( | 868 | tree.commit( |
1206 | 869 | rev_id=rev_id, message="Non ASCII: \xe9", | 869 | rev_id=rev_id, message="Non ASCII: \xe9", |
1207 | 870 | committer="Non ASCII: \xed", timestamp=1000000000.0, | 870 | committer="Non ASCII: \xed", timestamp=1000000000.0, |
1208 | @@ -971,8 +971,9 @@ class TestRosettaUploadJob(TestCaseWithFactory): | |||
1209 | 971 | except IndexError: | 971 | except IndexError: |
1210 | 972 | file_content = self.factory.getUniqueString() | 972 | file_content = self.factory.getUniqueString() |
1211 | 973 | dname = os.path.dirname(file_name) | 973 | dname = os.path.dirname(file_name) |
1214 | 974 | self.tree.bzrdir.root_transport.clone(dname).create_prefix() | 974 | self.tree.controldir.root_transport.clone(dname).create_prefix() |
1215 | 975 | self.tree.bzrdir.root_transport.put_bytes(file_name, file_content) | 975 | self.tree.controldir.root_transport.put_bytes( |
1216 | 976 | file_name, file_content) | ||
1217 | 976 | if len(files) > 0: | 977 | if len(files) > 0: |
1218 | 977 | self.tree.smart_add( | 978 | self.tree.smart_add( |
1219 | 978 | [self.tree.abspath(file_pair[0]) for file_pair in files]) | 979 | [self.tree.abspath(file_pair[0]) for file_pair in files]) |
1220 | @@ -980,7 +981,7 @@ class TestRosettaUploadJob(TestCaseWithFactory): | |||
1221 | 980 | commit_message = self.factory.getUniqueString('commit') | 981 | commit_message = self.factory.getUniqueString('commit') |
1222 | 981 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 982 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1223 | 982 | # required to generate the revision-id. | 983 | # required to generate the revision-id. |
1225 | 983 | with override_environ(BZR_EMAIL='me@example.com'): | 984 | with override_environ(BRZ_EMAIL='me@example.com'): |
1226 | 984 | revision_id = self.tree.commit(commit_message) | 985 | revision_id = self.tree.commit(commit_message) |
1227 | 985 | self.branch.last_scanned_id = revision_id | 986 | self.branch.last_scanned_id = revision_id |
1228 | 986 | self.branch.last_mirrored_id = revision_id | 987 | self.branch.last_mirrored_id = revision_id |
1229 | @@ -1076,7 +1077,7 @@ class TestRosettaUploadJob(TestCaseWithFactory): | |||
1230 | 1076 | # An empty POT cannot be uploaded, if if the product series is | 1077 | # An empty POT cannot be uploaded, if if the product series is |
1231 | 1077 | # configured for template import. | 1078 | # configured for template import. |
1232 | 1078 | entries = self._runJobWithFile( | 1079 | entries = self._runJobWithFile( |
1234 | 1079 | TranslationsBranchImportMode.IMPORT_TEMPLATES, 'empty.pot', '') | 1080 | TranslationsBranchImportMode.IMPORT_TEMPLATES, 'empty.pot', b'') |
1235 | 1080 | self.assertEqual(entries, []) | 1081 | self.assertEqual(entries, []) |
1236 | 1081 | 1082 | ||
1237 | 1082 | def test_upload_hidden_pot(self): | 1083 | def test_upload_hidden_pot(self): |
1238 | @@ -1103,7 +1104,7 @@ class TestRosettaUploadJob(TestCaseWithFactory): | |||
1239 | 1103 | def test_upload_pot_content(self): | 1104 | def test_upload_pot_content(self): |
1240 | 1104 | # The content of the uploaded file is stored in the librarian. | 1105 | # The content of the uploaded file is stored in the librarian. |
1241 | 1105 | # The uploader of a POT is the series owner. | 1106 | # The uploader of a POT is the series owner. |
1243 | 1106 | POT_CONTENT = "pot content\n" | 1107 | POT_CONTENT = b"pot content\n" |
1244 | 1107 | self._runJobWithFile( | 1108 | self._runJobWithFile( |
1245 | 1108 | TranslationsBranchImportMode.IMPORT_TEMPLATES, | 1109 | TranslationsBranchImportMode.IMPORT_TEMPLATES, |
1246 | 1109 | 'foo.pot', POT_CONTENT) | 1110 | 'foo.pot', POT_CONTENT) |
1247 | diff --git a/lib/lp/code/model/tests/test_branchmergeproposaljobs.py b/lib/lp/code/model/tests/test_branchmergeproposaljobs.py | |||
1248 | index 8f1fcca..9836caf 100644 | |||
1249 | --- a/lib/lp/code/model/tests/test_branchmergeproposaljobs.py | |||
1250 | +++ b/lib/lp/code/model/tests/test_branchmergeproposaljobs.py | |||
1251 | @@ -190,7 +190,7 @@ class TestMergeProposalNeedsReviewEmailJobBzr( | |||
1252 | 190 | target_branch, tree = self.create_branch_and_tree() | 190 | target_branch, tree = self.create_branch_and_tree() |
1253 | 191 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 191 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1254 | 192 | # required to generate the revision-id. | 192 | # required to generate the revision-id. |
1256 | 193 | with override_environ(BZR_EMAIL='me@example.com'): | 193 | with override_environ(BRZ_EMAIL='me@example.com'): |
1257 | 194 | tree.commit('test') | 194 | tree.commit('test') |
1258 | 195 | source_branch = self.factory.makeProductBranch( | 195 | source_branch = self.factory.makeProductBranch( |
1259 | 196 | product=target_branch.product) | 196 | product=target_branch.product) |
1260 | @@ -212,7 +212,7 @@ class TestMergeProposalNeedsReviewEmailJobBzr( | |||
1261 | 212 | tree = self.create_branch_and_tree(db_branch=bmp.target_branch)[1] | 212 | tree = self.create_branch_and_tree(db_branch=bmp.target_branch)[1] |
1262 | 213 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 213 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1263 | 214 | # required to generate the revision-id. | 214 | # required to generate the revision-id. |
1265 | 215 | with override_environ(BZR_EMAIL='me@example.com'): | 215 | with override_environ(BRZ_EMAIL='me@example.com'): |
1266 | 216 | tree.commit('Initial commit') | 216 | tree.commit('Initial commit') |
1267 | 217 | self.createBzrBranch(bmp.source_branch, tree.branch) | 217 | self.createBzrBranch(bmp.source_branch, tree.branch) |
1268 | 218 | self.factory.makeRevisionsForBranch(bmp.source_branch, count=1) | 218 | self.factory.makeRevisionsForBranch(bmp.source_branch, count=1) |
1269 | diff --git a/lib/lp/code/model/tests/test_diff.py b/lib/lp/code/model/tests/test_diff.py | |||
1270 | index f082a8e..f4ec2ce 100644 | |||
1271 | --- a/lib/lp/code/model/tests/test_diff.py | |||
1272 | +++ b/lib/lp/code/model/tests/test_diff.py | |||
1273 | @@ -12,8 +12,8 @@ from difflib import unified_diff | |||
1274 | 12 | import logging | 12 | import logging |
1275 | 13 | from textwrap import dedent | 13 | from textwrap import dedent |
1276 | 14 | 14 | ||
1279 | 15 | from bzrlib import trace | 15 | from breezy import trace |
1280 | 16 | from bzrlib.patches import ( | 16 | from breezy.patches import ( |
1281 | 17 | InsertLine, | 17 | InsertLine, |
1282 | 18 | parse_patches, | 18 | parse_patches, |
1283 | 19 | RemoveLine, | 19 | RemoveLine, |
1284 | @@ -565,7 +565,7 @@ class TestPreviewDiff(DiffTestCase): | |||
1285 | 565 | reload(trace) | 565 | reload(trace) |
1286 | 566 | bmp, source_rev_id, target_rev_id = self.createExampleBzrMerge() | 566 | bmp, source_rev_id, target_rev_id = self.createExampleBzrMerge() |
1287 | 567 | handler = RecordLister() | 567 | handler = RecordLister() |
1289 | 568 | logger = logging.getLogger('bzr') | 568 | logger = logging.getLogger('brz') |
1290 | 569 | logger.addHandler(handler) | 569 | logger.addHandler(handler) |
1291 | 570 | try: | 570 | try: |
1292 | 571 | PreviewDiff.fromBranchMergeProposal(bmp) | 571 | PreviewDiff.fromBranchMergeProposal(bmp) |
1293 | diff --git a/lib/lp/code/model/tests/test_gitref.py b/lib/lp/code/model/tests/test_gitref.py | |||
1294 | index 2152b03..9b546fe 100644 | |||
1295 | --- a/lib/lp/code/model/tests/test_gitref.py | |||
1296 | +++ b/lib/lp/code/model/tests/test_gitref.py | |||
1297 | @@ -14,7 +14,7 @@ from datetime import ( | |||
1298 | 14 | import hashlib | 14 | import hashlib |
1299 | 15 | import json | 15 | import json |
1300 | 16 | 16 | ||
1302 | 17 | from bzrlib import urlutils | 17 | from breezy import urlutils |
1303 | 18 | import pytz | 18 | import pytz |
1304 | 19 | import responses | 19 | import responses |
1305 | 20 | from storm.store import Store | 20 | from storm.store import Store |
1306 | diff --git a/lib/lp/code/model/tests/test_gitrepository.py b/lib/lp/code/model/tests/test_gitrepository.py | |||
1307 | index f1a80ed..e7615f3 100644 | |||
1308 | --- a/lib/lp/code/model/tests/test_gitrepository.py | |||
1309 | +++ b/lib/lp/code/model/tests/test_gitrepository.py | |||
1310 | @@ -20,7 +20,7 @@ from functools import partial | |||
1311 | 20 | import hashlib | 20 | import hashlib |
1312 | 21 | import json | 21 | import json |
1313 | 22 | 22 | ||
1315 | 23 | from bzrlib import urlutils | 23 | from breezy import urlutils |
1316 | 24 | from fixtures import MockPatch | 24 | from fixtures import MockPatch |
1317 | 25 | from lazr.lifecycle.event import ObjectModifiedEvent | 25 | from lazr.lifecycle.event import ObjectModifiedEvent |
1318 | 26 | from pymacaroons import Macaroon | 26 | from pymacaroons import Macaroon |
1319 | diff --git a/lib/lp/code/model/tests/test_sourcepackagerecipe.py b/lib/lp/code/model/tests/test_sourcepackagerecipe.py | |||
1320 | index aa950f2..fd47336 100644 | |||
1321 | --- a/lib/lp/code/model/tests/test_sourcepackagerecipe.py | |||
1322 | +++ b/lib/lp/code/model/tests/test_sourcepackagerecipe.py | |||
1323 | @@ -13,7 +13,7 @@ from datetime import ( | |||
1324 | 13 | ) | 13 | ) |
1325 | 14 | import textwrap | 14 | import textwrap |
1326 | 15 | 15 | ||
1328 | 16 | from bzrlib.plugins.builder.recipe import ForbiddenInstructionError | 16 | from breezy.plugins.builder.recipe import ForbiddenInstructionError |
1329 | 17 | from pytz import UTC | 17 | from pytz import UTC |
1330 | 18 | from storm.locals import Store | 18 | from storm.locals import Store |
1331 | 19 | from testtools.matchers import Equals | 19 | from testtools.matchers import Equals |
1332 | diff --git a/lib/lp/code/scripts/tests/test_scan_branches.py b/lib/lp/code/scripts/tests/test_scan_branches.py | |||
1333 | index ddaeea8..4f5783f 100644 | |||
1334 | --- a/lib/lp/code/scripts/tests/test_scan_branches.py | |||
1335 | +++ b/lib/lp/code/scripts/tests/test_scan_branches.py | |||
1336 | @@ -39,7 +39,7 @@ class TestScanBranches(TestCaseWithFactory): | |||
1337 | 39 | target, target_tree = self.create_branch_and_tree(db_branch=db_branch) | 39 | target, target_tree = self.create_branch_and_tree(db_branch=db_branch) |
1338 | 40 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 40 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1339 | 41 | # required to generate the revision-id. | 41 | # required to generate the revision-id. |
1341 | 42 | with override_environ(BZR_EMAIL='me@example.com'): | 42 | with override_environ(BRZ_EMAIL='me@example.com'): |
1342 | 43 | target_tree.commit('First commit', rev_id='rev1') | 43 | target_tree.commit('First commit', rev_id='rev1') |
1343 | 44 | target_tree.commit('Second commit', rev_id='rev2') | 44 | target_tree.commit('Second commit', rev_id='rev2') |
1344 | 45 | target_tree.commit('Third commit', rev_id='rev3') | 45 | target_tree.commit('Third commit', rev_id='rev3') |
1345 | diff --git a/lib/lp/code/scripts/tests/test_sendbranchmail.py b/lib/lp/code/scripts/tests/test_sendbranchmail.py | |||
1346 | index bee4c9f..e7e983d 100644 | |||
1347 | --- a/lib/lp/code/scripts/tests/test_sendbranchmail.py | |||
1348 | +++ b/lib/lp/code/scripts/tests/test_sendbranchmail.py | |||
1349 | @@ -32,12 +32,12 @@ class TestSendbranchmail(TestCaseWithFactory): | |||
1350 | 32 | BranchSubscriptionDiffSize.WHOLEDIFF, | 32 | BranchSubscriptionDiffSize.WHOLEDIFF, |
1351 | 33 | CodeReviewNotificationLevel.FULL, | 33 | CodeReviewNotificationLevel.FULL, |
1352 | 34 | branch.registrant) | 34 | branch.registrant) |
1355 | 35 | transport = tree.bzrdir.root_transport | 35 | transport = tree.controldir.root_transport |
1356 | 36 | transport.put_bytes('foo', 'bar') | 36 | transport.put_bytes('foo', b'bar') |
1357 | 37 | tree.add('foo') | 37 | tree.add('foo') |
1358 | 38 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 38 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1359 | 39 | # required to generate the revision-id. | 39 | # required to generate the revision-id. |
1361 | 40 | with override_environ(BZR_EMAIL='me@example.com'): | 40 | with override_environ(BRZ_EMAIL='me@example.com'): |
1362 | 41 | tree.commit('Added foo.', rev_id='rev1') | 41 | tree.commit('Added foo.', rev_id='rev1') |
1363 | 42 | return branch, tree | 42 | return branch, tree |
1364 | 43 | 43 | ||
1365 | @@ -65,10 +65,10 @@ class TestSendbranchmail(TestCaseWithFactory): | |||
1366 | 65 | """RevisionsAddedJobs are run by sendbranchmail.""" | 65 | """RevisionsAddedJobs are run by sendbranchmail.""" |
1367 | 66 | self.useBzrBranches() | 66 | self.useBzrBranches() |
1368 | 67 | branch, tree = self.createBranch() | 67 | branch, tree = self.createBranch() |
1370 | 68 | tree.bzrdir.root_transport.put_bytes('foo', 'baz') | 68 | tree.controldir.root_transport.put_bytes('foo', b'baz') |
1371 | 69 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 69 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
1372 | 70 | # required to generate the revision-id. | 70 | # required to generate the revision-id. |
1374 | 71 | with override_environ(BZR_EMAIL='me@example.com'): | 71 | with override_environ(BRZ_EMAIL='me@example.com'): |
1375 | 72 | tree.commit('Added foo.', rev_id='rev2') | 72 | tree.commit('Added foo.', rev_id='rev2') |
1376 | 73 | job = RevisionsAddedJob.create( | 73 | job = RevisionsAddedJob.create( |
1377 | 74 | branch, 'rev1', 'rev2', 'from@example.org') | 74 | branch, 'rev1', 'rev2', 'from@example.org') |
1378 | diff --git a/lib/lp/code/scripts/tests/test_upgrade_branches.py b/lib/lp/code/scripts/tests/test_upgrade_branches.py | |||
1379 | index a349d90..b95dc8b 100644 | |||
1380 | --- a/lib/lp/code/scripts/tests/test_upgrade_branches.py | |||
1381 | +++ b/lib/lp/code/scripts/tests/test_upgrade_branches.py | |||
1382 | @@ -4,7 +4,7 @@ | |||
1383 | 4 | """Test the upgrade_branches script.""" | 4 | """Test the upgrade_branches script.""" |
1384 | 5 | 5 | ||
1385 | 6 | 6 | ||
1387 | 7 | from bzrlib.branch import Branch as BzrBranch | 7 | from breezy.branch import Branch as BzrBranch |
1388 | 8 | import transaction | 8 | import transaction |
1389 | 9 | 9 | ||
1390 | 10 | from lp.code.model.branch import ( | 10 | from lp.code.model.branch import ( |
1391 | diff --git a/lib/lp/code/stories/branches/xx-bazaar-home.txt b/lib/lp/code/stories/branches/xx-bazaar-home.txt | |||
1392 | index ec8c20e..5b90cca 100644 | |||
1393 | --- a/lib/lp/code/stories/branches/xx-bazaar-home.txt | |||
1394 | +++ b/lib/lp/code/stories/branches/xx-bazaar-home.txt | |||
1395 | @@ -1,15 +1,15 @@ | |||
1396 | 1 | The Launchpad Code front page | 1 | The Launchpad Code front page |
1397 | 2 | ============================= | 2 | ============================= |
1398 | 3 | 3 | ||
1401 | 4 | First we manually set the Bazaar version, so that this document will not need | 4 | First we manually set the Breezy version, so that this document will not need |
1402 | 5 | updating when Launchpad upgrades Bazaar. | 5 | updating when Launchpad upgrades Breezy. |
1403 | 6 | 6 | ||
1407 | 7 | >>> import bzrlib | 7 | >>> import breezy |
1408 | 8 | >>> bzrlib_version = bzrlib.__version__ | 8 | >>> breezy_version = breezy.__version__ |
1409 | 9 | >>> bzrlib.__version__ = '0.92.0' | 9 | >>> breezy.__version__ = '3.0.0' |
1410 | 10 | 10 | ||
1411 | 11 | 11 | ||
1413 | 12 | Check that the Bazaar home page works. | 12 | Check that the Code home page works. |
1414 | 13 | 13 | ||
1415 | 14 | >>> browser.open('http://code.launchpad.test/') | 14 | >>> browser.open('http://code.launchpad.test/') |
1416 | 15 | >>> footer = find_tag_by_id(browser.contents, 'application-footer') | 15 | >>> footer = find_tag_by_id(browser.contents, 'application-footer') |
1417 | @@ -18,12 +18,12 @@ Check that the Bazaar home page works. | |||
1418 | 18 | 30 branches registered in | 18 | 30 branches registered in |
1419 | 19 | 6 projects | 19 | 6 projects |
1420 | 20 | 1 imported branches | 20 | 1 imported branches |
1422 | 21 | Launchpad uses Bazaar 0.92.0. | 21 | Launchpad uses Breezy 3.0.0. |
1423 | 22 | 22 | ||
1424 | 23 | 23 | ||
1426 | 24 | Restore the original Bazaar version: | 24 | Restore the original Breezy version: |
1427 | 25 | 25 | ||
1429 | 26 | >>> bzrlib.__version__ = bzrlib_version | 26 | >>> breezy.__version__ = breezy_version |
1430 | 27 | 27 | ||
1431 | 28 | 28 | ||
1432 | 29 | The main code home page now has a subset of the project tag cloud, | 29 | The main code home page now has a subset of the project tag cloud, |
1433 | diff --git a/lib/lp/code/stories/webservice/xx-branch.txt b/lib/lp/code/stories/webservice/xx-branch.txt | |||
1434 | index f198608..18c3ea0 100644 | |||
1435 | --- a/lib/lp/code/stories/webservice/xx-branch.txt | |||
1436 | +++ b/lib/lp/code/stories/webservice/xx-branch.txt | |||
1437 | @@ -3,7 +3,7 @@ Introduction | |||
1438 | 3 | 3 | ||
1439 | 4 | Launchpad provides two ways to programmatically interact with your | 4 | Launchpad provides two ways to programmatically interact with your |
1440 | 5 | branches. You can either interact with the branches themselves using | 5 | branches. You can either interact with the branches themselves using |
1442 | 6 | `bzrlib`, or you can use Launchpad's webservice APIs to explore | 6 | `breezy`, or you can use Launchpad's webservice APIs to explore |
1443 | 7 | information about the branches and how they relate to the rest of | 7 | information about the branches and how they relate to the rest of |
1444 | 8 | the things on Launchpad. | 8 | the things on Launchpad. |
1445 | 9 | 9 | ||
1446 | diff --git a/lib/lp/code/templates/bazaar-index.pt b/lib/lp/code/templates/bazaar-index.pt | |||
1447 | index cdd9bcd..b3ae707 100644 | |||
1448 | --- a/lib/lp/code/templates/bazaar-index.pt | |||
1449 | +++ b/lib/lp/code/templates/bazaar-index.pt | |||
1450 | @@ -128,8 +128,8 @@ | |||
1451 | 128 | </a> | 128 | </a> |
1452 | 129 | </div> | 129 | </div> |
1453 | 130 | <div> | 130 | <div> |
1456 | 131 | Launchpad uses <a href="http://bazaar.canonical.com/">Bazaar</a> | 131 | Launchpad uses <a href="https://www.breezy-vcs.org/">Breezy</a> |
1457 | 132 | <tal:version tal:content="view/bzr_version">2.0</tal:version>. | 132 | <tal:version tal:content="view/brz_version">3.0.0</tal:version>. |
1458 | 133 | </div> | 133 | </div> |
1459 | 134 | </div> | 134 | </div> |
1460 | 135 | 135 | ||
1461 | diff --git a/lib/lp/code/tests/helpers.py b/lib/lp/code/tests/helpers.py | |||
1462 | index 1b9f7d7..2955528 100644 | |||
1463 | --- a/lib/lp/code/tests/helpers.py | |||
1464 | +++ b/lib/lp/code/tests/helpers.py | |||
1465 | @@ -26,7 +26,7 @@ from datetime import timedelta | |||
1466 | 26 | from difflib import unified_diff | 26 | from difflib import unified_diff |
1467 | 27 | from itertools import count | 27 | from itertools import count |
1468 | 28 | 28 | ||
1470 | 29 | from bzrlib.plugins.builder.recipe import RecipeParser | 29 | from breezy.plugins.builder.recipe import RecipeParser |
1471 | 30 | import fixtures | 30 | import fixtures |
1472 | 31 | import transaction | 31 | import transaction |
1473 | 32 | from zope.component import getUtility | 32 | from zope.component import getUtility |
1474 | diff --git a/lib/lp/code/tests/test_bzr.py b/lib/lp/code/tests/test_bzr.py | |||
1475 | index 37afc6c..6a62463 100644 | |||
1476 | --- a/lib/lp/code/tests/test_bzr.py | |||
1477 | +++ b/lib/lp/code/tests/test_bzr.py | |||
1478 | @@ -7,12 +7,13 @@ from __future__ import absolute_import, print_function, unicode_literals | |||
1479 | 7 | 7 | ||
1480 | 8 | __metaclass__ = type | 8 | __metaclass__ = type |
1481 | 9 | 9 | ||
1485 | 10 | from bzrlib.errors import NoSuchRevision | 10 | from breezy.errors import NoSuchRevision |
1486 | 11 | from bzrlib.revision import NULL_REVISION | 11 | from breezy.revision import NULL_REVISION |
1487 | 12 | from bzrlib.tests import ( | 12 | from breezy.tests import ( |
1488 | 13 | TestCaseInTempDir, | 13 | TestCaseInTempDir, |
1489 | 14 | TestCaseWithTransport, | 14 | TestCaseWithTransport, |
1490 | 15 | ) | 15 | ) |
1491 | 16 | import six | ||
1492 | 16 | 17 | ||
1493 | 17 | from lp.code.bzr import ( | 18 | from lp.code.bzr import ( |
1494 | 18 | branch_revision_history, | 19 | branch_revision_history, |
1495 | @@ -49,7 +50,7 @@ class TestGetBranchFormats(TestCaseInTempDir): | |||
1496 | 49 | 50 | ||
1497 | 50 | def test_get_branch_format_2a(self): | 51 | def test_get_branch_format_2a(self): |
1498 | 51 | # Test the 2a branch format. | 52 | # Test the 2a branch format. |
1500 | 52 | branch = self.make_branch('test', '2a') | 53 | branch = self.make_branch('test', six.ensure_str('2a')) |
1501 | 53 | formats = get_branch_formats(branch) | 54 | formats = get_branch_formats(branch) |
1502 | 54 | self.assertEqual(ControlFormat.BZR_METADIR_1, formats[0]) | 55 | self.assertEqual(ControlFormat.BZR_METADIR_1, formats[0]) |
1503 | 55 | self.assertEqual(BranchFormat.BZR_BRANCH_7, formats[1]) | 56 | self.assertEqual(BranchFormat.BZR_BRANCH_7, formats[1]) |
1504 | @@ -57,7 +58,7 @@ class TestGetBranchFormats(TestCaseInTempDir): | |||
1505 | 57 | 58 | ||
1506 | 58 | def test_get_branch_format_1_9(self): | 59 | def test_get_branch_format_1_9(self): |
1507 | 59 | # Test the 1.9 branch format. | 60 | # Test the 1.9 branch format. |
1509 | 60 | branch = self.make_branch('test', '1.9') | 61 | branch = self.make_branch('test', six.ensure_str('1.9')) |
1510 | 61 | formats = get_branch_formats(branch) | 62 | formats = get_branch_formats(branch) |
1511 | 62 | self.assertEqual(ControlFormat.BZR_METADIR_1, formats[0]) | 63 | self.assertEqual(ControlFormat.BZR_METADIR_1, formats[0]) |
1512 | 63 | self.assertEqual(BranchFormat.BZR_BRANCH_7, formats[1]) | 64 | self.assertEqual(BranchFormat.BZR_BRANCH_7, formats[1]) |
1513 | @@ -65,7 +66,7 @@ class TestGetBranchFormats(TestCaseInTempDir): | |||
1514 | 65 | 66 | ||
1515 | 66 | def test_get_branch_format_packs(self): | 67 | def test_get_branch_format_packs(self): |
1516 | 67 | # Test the packs branch format. | 68 | # Test the packs branch format. |
1518 | 68 | branch = self.make_branch('test', 'pack-0.92') | 69 | branch = self.make_branch('test', six.ensure_str('pack-0.92')) |
1519 | 69 | formats = get_branch_formats(branch) | 70 | formats = get_branch_formats(branch) |
1520 | 70 | self.assertEqual(ControlFormat.BZR_METADIR_1, formats[0]) | 71 | self.assertEqual(ControlFormat.BZR_METADIR_1, formats[0]) |
1521 | 71 | self.assertEqual(BranchFormat.BZR_BRANCH_6, formats[1]) | 72 | self.assertEqual(BranchFormat.BZR_BRANCH_6, formats[1]) |
1522 | @@ -73,7 +74,7 @@ class TestGetBranchFormats(TestCaseInTempDir): | |||
1523 | 73 | 74 | ||
1524 | 74 | def test_get_branch_format_knits(self): | 75 | def test_get_branch_format_knits(self): |
1525 | 75 | # Test the knits branch format. | 76 | # Test the knits branch format. |
1527 | 76 | branch = self.make_branch('test', 'knit') | 77 | branch = self.make_branch('test', six.ensure_str('knit')) |
1528 | 77 | formats = get_branch_formats(branch) | 78 | formats = get_branch_formats(branch) |
1529 | 78 | self.assertEqual(ControlFormat.BZR_METADIR_1, formats[0]) | 79 | self.assertEqual(ControlFormat.BZR_METADIR_1, formats[0]) |
1530 | 79 | self.assertEqual(BranchFormat.BZR_BRANCH_5, formats[1]) | 80 | self.assertEqual(BranchFormat.BZR_BRANCH_5, formats[1]) |
1531 | @@ -89,7 +90,7 @@ class TestBranchRevisionHistory(TestCaseWithTransport): | |||
1532 | 89 | 90 | ||
1533 | 90 | def test_some_commits(self): | 91 | def test_some_commits(self): |
1534 | 91 | branch = self.make_branch('test') | 92 | branch = self.make_branch('test') |
1536 | 92 | tree = branch.bzrdir.create_workingtree() | 93 | tree = branch.controldir.create_workingtree() |
1537 | 93 | tree.commit('acommit', rev_id=b'A') | 94 | tree.commit('acommit', rev_id=b'A') |
1538 | 94 | tree.commit('bcommit', rev_id=b'B') | 95 | tree.commit('bcommit', rev_id=b'B') |
1539 | 95 | tree.commit('ccommit', rev_id=b'C') | 96 | tree.commit('ccommit', rev_id=b'C') |
1540 | @@ -109,7 +110,7 @@ class TestGetAncestry(TestCaseWithTransport): | |||
1541 | 109 | def test_some(self): | 110 | def test_some(self): |
1542 | 110 | # Verify ancestors are included. | 111 | # Verify ancestors are included. |
1543 | 111 | branch = self.make_branch('test') | 112 | branch = self.make_branch('test') |
1545 | 112 | tree = branch.bzrdir.create_workingtree() | 113 | tree = branch.controldir.create_workingtree() |
1546 | 113 | tree.commit('msg a', rev_id=b'A') | 114 | tree.commit('msg a', rev_id=b'A') |
1547 | 114 | tree.commit('msg b', rev_id=b'B') | 115 | tree.commit('msg b', rev_id=b'B') |
1548 | 115 | tree.commit('msg c', rev_id=b'C') | 116 | tree.commit('msg c', rev_id=b'C') |
1549 | @@ -123,7 +124,7 @@ class TestGetAncestry(TestCaseWithTransport): | |||
1550 | 123 | def test_children(self): | 124 | def test_children(self): |
1551 | 124 | # Verify non-mainline children are included. | 125 | # Verify non-mainline children are included. |
1552 | 125 | branch = self.make_branch('test') | 126 | branch = self.make_branch('test') |
1554 | 126 | tree = branch.bzrdir.create_workingtree() | 127 | tree = branch.controldir.create_workingtree() |
1555 | 127 | tree.commit('msg a', rev_id=b'A') | 128 | tree.commit('msg a', rev_id=b'A') |
1556 | 128 | branch.generate_revision_history(NULL_REVISION) | 129 | branch.generate_revision_history(NULL_REVISION) |
1557 | 129 | tree.set_parent_ids([]) | 130 | tree.set_parent_ids([]) |
1558 | diff --git a/lib/lp/code/xmlrpc/branch.py b/lib/lp/code/xmlrpc/branch.py | |||
1559 | index ed0ce23..bd45c11 100644 | |||
1560 | --- a/lib/lp/code/xmlrpc/branch.py | |||
1561 | +++ b/lib/lp/code/xmlrpc/branch.py | |||
1562 | @@ -12,7 +12,7 @@ __all__ = [ | |||
1563 | 12 | 12 | ||
1564 | 13 | from xmlrpclib import Fault | 13 | from xmlrpclib import Fault |
1565 | 14 | 14 | ||
1567 | 15 | from bzrlib import urlutils | 15 | from breezy import urlutils |
1568 | 16 | from zope.component import getUtility | 16 | from zope.component import getUtility |
1569 | 17 | from zope.interface import ( | 17 | from zope.interface import ( |
1570 | 18 | implementer, | 18 | implementer, |
1571 | diff --git a/lib/lp/code/xmlrpc/codehosting.py b/lib/lp/code/xmlrpc/codehosting.py | |||
1572 | index 107b1e6..3c09e78 100644 | |||
1573 | --- a/lib/lp/code/xmlrpc/codehosting.py | |||
1574 | +++ b/lib/lp/code/xmlrpc/codehosting.py | |||
1575 | @@ -13,7 +13,7 @@ __all__ = [ | |||
1576 | 13 | 13 | ||
1577 | 14 | import datetime | 14 | import datetime |
1578 | 15 | 15 | ||
1580 | 16 | from bzrlib.urlutils import ( | 16 | from breezy.urlutils import ( |
1581 | 17 | escape, | 17 | escape, |
1582 | 18 | unescape, | 18 | unescape, |
1583 | 19 | ) | 19 | ) |
1584 | diff --git a/lib/lp/code/xmlrpc/tests/test_branch.py b/lib/lp/code/xmlrpc/tests/test_branch.py | |||
1585 | index 5b75b28..d035177 100644 | |||
1586 | --- a/lib/lp/code/xmlrpc/tests/test_branch.py | |||
1587 | +++ b/lib/lp/code/xmlrpc/tests/test_branch.py | |||
1588 | @@ -8,7 +8,7 @@ __metaclass__ = type | |||
1589 | 8 | import os | 8 | import os |
1590 | 9 | import xmlrpclib | 9 | import xmlrpclib |
1591 | 10 | 10 | ||
1593 | 11 | from bzrlib import urlutils | 11 | from breezy import urlutils |
1594 | 12 | from lazr.uri import URI | 12 | from lazr.uri import URI |
1595 | 13 | from zope.security.proxy import removeSecurityProxy | 13 | from zope.security.proxy import removeSecurityProxy |
1596 | 14 | 14 | ||
1597 | diff --git a/lib/lp/code/xmlrpc/tests/test_codehosting.py b/lib/lp/code/xmlrpc/tests/test_codehosting.py | |||
1598 | index 2491adc..c5ec059 100644 | |||
1599 | --- a/lib/lp/code/xmlrpc/tests/test_codehosting.py | |||
1600 | +++ b/lib/lp/code/xmlrpc/tests/test_codehosting.py | |||
1601 | @@ -8,8 +8,8 @@ __metaclass__ = type | |||
1602 | 8 | import datetime | 8 | import datetime |
1603 | 9 | import os | 9 | import os |
1604 | 10 | 10 | ||
1607 | 11 | from bzrlib import bzrdir | 11 | from breezy import controldir |
1608 | 12 | from bzrlib.urlutils import escape | 12 | from breezy.urlutils import escape |
1609 | 13 | import pytz | 13 | import pytz |
1610 | 14 | from testscenarios import ( | 14 | from testscenarios import ( |
1611 | 15 | load_tests_apply_scenarios, | 15 | load_tests_apply_scenarios, |
1612 | @@ -659,7 +659,7 @@ class CodehostingTest(WithScenarios, TestCaseWithFactory): | |||
1613 | 659 | branch, 'next_mirror_time', UTC_NOW) | 659 | branch, 'next_mirror_time', UTC_NOW) |
1614 | 660 | 660 | ||
1615 | 661 | def getFormatStringsForFormatName(self, format_name): | 661 | def getFormatStringsForFormatName(self, format_name): |
1617 | 662 | default_format = bzrdir.format_registry.get(format_name)() | 662 | default_format = controldir.format_registry.get(format_name)() |
1618 | 663 | control_string = default_format.get_format_string() | 663 | control_string = default_format.get_format_string() |
1619 | 664 | branch_string = default_format.get_branch_format().get_format_string() | 664 | branch_string = default_format.get_branch_format().get_format_string() |
1620 | 665 | repository_string = \ | 665 | repository_string = \ |
1621 | diff --git a/lib/lp/codehosting/__init__.py b/lib/lp/codehosting/__init__.py | |||
1622 | index 261a3aa..bd097f9 100644 | |||
1623 | --- a/lib/lp/codehosting/__init__.py | |||
1624 | +++ b/lib/lp/codehosting/__init__.py | |||
1625 | @@ -9,16 +9,21 @@ all plugins in the bzrplugins/ directory underneath the rocketfuel checkout. | |||
1626 | 9 | 9 | ||
1627 | 10 | __metaclass__ = type | 10 | __metaclass__ = type |
1628 | 11 | __all__ = [ | 11 | __all__ = [ |
1630 | 12 | 'get_bzr_path', | 12 | 'get_brz_path', |
1631 | 13 | 'get_BZR_PLUGIN_PATH_for_subprocess', | 13 | 'get_BZR_PLUGIN_PATH_for_subprocess', |
1632 | 14 | ] | 14 | ] |
1633 | 15 | 15 | ||
1634 | 16 | 16 | ||
1635 | 17 | import os | 17 | import os |
1636 | 18 | 18 | ||
1640 | 19 | import bzrlib | 19 | import breezy |
1641 | 20 | from bzrlib.branch import Branch | 20 | from breezy import ui as brz_ui |
1642 | 21 | from bzrlib.plugin import load_plugins | 21 | from breezy.branch import Branch |
1643 | 22 | from breezy.library_state import BzrLibraryState as BrzLibraryState | ||
1644 | 23 | from breezy.plugin import load_plugins as brz_load_plugins | ||
1645 | 24 | # This import is needed so that brz's logger gets registered. | ||
1646 | 25 | import breezy.trace | ||
1647 | 26 | from bzrlib.plugin import load_plugins as bzr_load_plugins | ||
1648 | 22 | # This import is needed so that bzr's logger gets registered. | 27 | # This import is needed so that bzr's logger gets registered. |
1649 | 23 | import bzrlib.trace | 28 | import bzrlib.trace |
1650 | 24 | from zope.security import checker | 29 | from zope.security import checker |
1651 | @@ -26,9 +31,9 @@ from zope.security import checker | |||
1652 | 26 | from lp.services.config import config | 31 | from lp.services.config import config |
1653 | 27 | 32 | ||
1654 | 28 | 33 | ||
1658 | 29 | def get_bzr_path(): | 34 | def get_brz_path(): |
1659 | 30 | """Find the path to the copy of Bazaar for this rocketfuel instance""" | 35 | """Find the path to the copy of Breezy for this rocketfuel instance""" |
1660 | 31 | return os.path.join(config.root, 'bin', 'bzr') | 36 | return os.path.join(config.root, 'bin', 'brz') |
1661 | 32 | 37 | ||
1662 | 33 | 38 | ||
1663 | 34 | def _get_bzr_plugins_path(): | 39 | def _get_bzr_plugins_path(): |
1664 | @@ -48,23 +53,50 @@ def get_BZR_PLUGIN_PATH_for_subprocess(): | |||
1665 | 48 | return ":".join((_get_bzr_plugins_path(), "-site")) | 53 | return ":".join((_get_bzr_plugins_path(), "-site")) |
1666 | 49 | 54 | ||
1667 | 50 | 55 | ||
1669 | 51 | os.environ['BZR_PLUGIN_PATH'] = get_BZR_PLUGIN_PATH_for_subprocess() | 56 | def _get_brz_plugins_path(): |
1670 | 57 | """Find the path to the Breezy plugins for this rocketfuel instance.""" | ||
1671 | 58 | return os.path.join(config.root, 'brzplugins') | ||
1672 | 52 | 59 | ||
1673 | 53 | # We want to have full access to Launchpad's Bazaar plugins throughout the | ||
1674 | 54 | # codehosting package. | ||
1675 | 55 | load_plugins([_get_bzr_plugins_path()]) | ||
1676 | 56 | 60 | ||
1677 | 61 | def get_BRZ_PLUGIN_PATH_for_subprocess(): | ||
1678 | 62 | """Calculate the appropriate value for the BRZ_PLUGIN_PATH environment. | ||
1679 | 63 | |||
1680 | 64 | The '-site' token tells breezy not to include the 'site specific plugins | ||
1681 | 65 | directory' (which is usually something like | ||
1682 | 66 | /usr/lib/pythonX.Y/dist-packages/breezy/plugins/) in the plugin search | ||
1683 | 67 | path, which would be inappropriate for Launchpad, which may have an | ||
1684 | 68 | incompatible version of breezy in its virtualenv. | ||
1685 | 69 | """ | ||
1686 | 70 | return ":".join((_get_brz_plugins_path(), "-site")) | ||
1687 | 57 | 71 | ||
1688 | 58 | def load_bundled_plugin(plugin_name): | ||
1689 | 59 | """Load a plugin bundled with Bazaar.""" | ||
1690 | 60 | from bzrlib.plugin import get_core_plugin_path | ||
1691 | 61 | from bzrlib import plugins | ||
1692 | 62 | if get_core_plugin_path() not in plugins.__path__: | ||
1693 | 63 | plugins.__path__.append(get_core_plugin_path()) | ||
1694 | 64 | __import__("bzrlib.plugins.%s" % plugin_name) | ||
1695 | 65 | 72 | ||
1696 | 73 | # We must explicitly initialize Breezy, as otherwise it will initialize | ||
1697 | 74 | # itself with a terminal-oriented UI. | ||
1698 | 75 | if breezy._global_state is None: | ||
1699 | 76 | brz_state = BrzLibraryState( | ||
1700 | 77 | ui=brz_ui.SilentUIFactory(), trace=breezy.trace.Config()) | ||
1701 | 78 | brz_state._start() | ||
1702 | 66 | 79 | ||
1704 | 67 | load_bundled_plugin("weave_fmt") | 80 | |
1705 | 81 | # XXX cjwatson 2019-06-13: Remove BZR_PLUGIN_PATH and supporting code once | ||
1706 | 82 | # all of Launchpad has been ported to Breezy. | ||
1707 | 83 | os.environ['BZR_PLUGIN_PATH'] = get_BZR_PLUGIN_PATH_for_subprocess() | ||
1708 | 84 | os.environ['BRZ_PLUGIN_PATH'] = get_BRZ_PLUGIN_PATH_for_subprocess() | ||
1709 | 85 | |||
1710 | 86 | # Disable some Breezy plugins that are likely to cause trouble if used on | ||
1711 | 87 | # the server. (Unfortunately there doesn't seem to be a good way to load | ||
1712 | 88 | # only explicitly-specified plugins at the moment.) | ||
1713 | 89 | os.environ['BRZ_DISABLE_PLUGINS'] = ':'.join([ | ||
1714 | 90 | 'cvs', | ||
1715 | 91 | 'darcs', | ||
1716 | 92 | 'email', | ||
1717 | 93 | 'mtn', | ||
1718 | 94 | ]) | ||
1719 | 95 | |||
1720 | 96 | # We want to have full access to Launchpad's Bazaar plugins throughout the | ||
1721 | 97 | # codehosting package. | ||
1722 | 98 | bzr_load_plugins([_get_bzr_plugins_path()]) | ||
1723 | 99 | brz_load_plugins() | ||
1724 | 68 | 100 | ||
1725 | 69 | 101 | ||
1726 | 70 | def dont_wrap_class_and_subclasses(cls): | 102 | def dont_wrap_class_and_subclasses(cls): |
1727 | @@ -75,6 +107,6 @@ def dont_wrap_class_and_subclasses(cls): | |||
1728 | 75 | 107 | ||
1729 | 76 | # Don't wrap Branch or its subclasses in Zope security proxies. Make sure | 108 | # Don't wrap Branch or its subclasses in Zope security proxies. Make sure |
1730 | 77 | # the various LoomBranch classes are present first. | 109 | # the various LoomBranch classes are present first. |
1733 | 78 | import bzrlib.plugins.loom.branch | 110 | import breezy.plugins.loom.branch |
1734 | 79 | bzrlib.plugins.loom.branch | 111 | breezy.plugins.loom.branch |
1735 | 80 | dont_wrap_class_and_subclasses(Branch) | 112 | dont_wrap_class_and_subclasses(Branch) |
1736 | diff --git a/lib/lp/codehosting/bzrutils.py b/lib/lp/codehosting/bzrutils.py | |||
1737 | index 52dcd7b..bd1dc4b 100644 | |||
1738 | --- a/lib/lp/codehosting/bzrutils.py | |||
1739 | +++ b/lib/lp/codehosting/bzrutils.py | |||
1740 | @@ -1,10 +1,10 @@ | |||
1741 | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the |
1742 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
1743 | 3 | 3 | ||
1745 | 4 | """Utilities for dealing with Bazaar. | 4 | """Utilities for dealing with Breezy. |
1746 | 5 | 5 | ||
1747 | 6 | Much of the code in here should be submitted upstream. The rest is code that | 6 | Much of the code in here should be submitted upstream. The rest is code that |
1749 | 7 | integrates between Bazaar's infrastructure and Launchpad's infrastructure. | 7 | integrates between Breezy's infrastructure and Launchpad's infrastructure. |
1750 | 8 | """ | 8 | """ |
1751 | 9 | 9 | ||
1752 | 10 | __metaclass__ = type | 10 | __metaclass__ = type |
1753 | @@ -28,30 +28,30 @@ from contextlib import contextmanager | |||
1754 | 28 | import os | 28 | import os |
1755 | 29 | import sys | 29 | import sys |
1756 | 30 | 30 | ||
1758 | 31 | from bzrlib import ( | 31 | from breezy import ( |
1759 | 32 | config, | 32 | config, |
1760 | 33 | trace, | 33 | trace, |
1761 | 34 | ) | 34 | ) |
1763 | 35 | from bzrlib.errors import ( | 35 | from breezy.branch import UnstackableBranchFormat |
1764 | 36 | from breezy.bzr.remote import ( | ||
1765 | 37 | RemoteBranch, | ||
1766 | 38 | RemoteBzrDir, | ||
1767 | 39 | RemoteRepository, | ||
1768 | 40 | ) | ||
1769 | 41 | from breezy.errors import ( | ||
1770 | 36 | AppendRevisionsOnlyViolation, | 42 | AppendRevisionsOnlyViolation, |
1771 | 37 | ConnectionTimeout, | 43 | ConnectionTimeout, |
1772 | 38 | GhostRevisionsHaveNoRevno, | 44 | GhostRevisionsHaveNoRevno, |
1773 | 39 | NotStacked, | 45 | NotStacked, |
1774 | 40 | UnstackableBranchFormat, | ||
1775 | 41 | UnstackableRepositoryFormat, | 46 | UnstackableRepositoryFormat, |
1776 | 42 | UnsupportedProtocol, | 47 | UnsupportedProtocol, |
1777 | 43 | ) | 48 | ) |
1784 | 44 | from bzrlib.remote import ( | 49 | from breezy.transport import ( |
1779 | 45 | RemoteBranch, | ||
1780 | 46 | RemoteBzrDir, | ||
1781 | 47 | RemoteRepository, | ||
1782 | 48 | ) | ||
1783 | 49 | from bzrlib.transport import ( | ||
1785 | 50 | get_transport, | 50 | get_transport, |
1786 | 51 | register_transport, | 51 | register_transport, |
1787 | 52 | unregister_transport, | 52 | unregister_transport, |
1788 | 53 | ) | 53 | ) |
1790 | 54 | from bzrlib.transport.local import LocalTransport | 54 | from breezy.transport.local import LocalTransport |
1791 | 55 | from lazr.uri import URI | 55 | from lazr.uri import URI |
1792 | 56 | 56 | ||
1793 | 57 | from lp.services.webapp.errorlog import ( | 57 | from lp.services.webapp.errorlog import ( |
1794 | @@ -221,7 +221,7 @@ class HttpAsLocalTransport(LocalTransport): | |||
1795 | 221 | """A LocalTransport that works using http URLs. | 221 | """A LocalTransport that works using http URLs. |
1796 | 222 | 222 | ||
1797 | 223 | We have this because the Launchpad database has constraints on URLs for | 223 | We have this because the Launchpad database has constraints on URLs for |
1799 | 224 | branches, disallowing file:/// URLs. bzrlib itself disallows | 224 | branches, disallowing file:/// URLs. breezy itself disallows |
1800 | 225 | file://localhost/ URLs. | 225 | file://localhost/ URLs. |
1801 | 226 | """ | 226 | """ |
1802 | 227 | 227 | ||
1803 | @@ -287,7 +287,7 @@ def get_vfs_format_classes(branch): | |||
1804 | 287 | if isinstance(repository, RemoteRepository): | 287 | if isinstance(repository, RemoteRepository): |
1805 | 288 | repository._ensure_real() | 288 | repository._ensure_real() |
1806 | 289 | repository = repository._real_repository | 289 | repository = repository._real_repository |
1808 | 290 | bzrdir = branch.bzrdir | 290 | bzrdir = branch.controldir |
1809 | 291 | if isinstance(bzrdir, RemoteBzrDir): | 291 | if isinstance(bzrdir, RemoteBzrDir): |
1810 | 292 | bzrdir._ensure_real() | 292 | bzrdir._ensure_real() |
1811 | 293 | bzrdir = bzrdir._real_bzrdir | 293 | bzrdir = bzrdir._real_bzrdir |
1812 | @@ -325,7 +325,7 @@ def get_branch_info(branch): | |||
1813 | 325 | # XXX: Aaron Bentley 2008-06-13 | 325 | # XXX: Aaron Bentley 2008-06-13 |
1814 | 326 | # Bazaar does not provide a public API for learning about | 326 | # Bazaar does not provide a public API for learning about |
1815 | 327 | # format markers. Fix this in Bazaar, then here. | 327 | # format markers. Fix this in Bazaar, then here. |
1817 | 328 | info['control_string'] = branch.bzrdir._format.get_format_string() | 328 | info['control_string'] = branch.controldir._format.get_format_string() |
1818 | 329 | info['branch_string'] = branch._format.get_format_string() | 329 | info['branch_string'] = branch._format.get_format_string() |
1819 | 330 | info['repository_string'] = branch.repository._format.get_format_string() | 330 | info['repository_string'] = branch.repository._format.get_format_string() |
1820 | 331 | return info | 331 | return info |
1821 | diff --git a/lib/lp/codehosting/codeimport/tests/test_worker.py b/lib/lp/codehosting/codeimport/tests/test_worker.py | |||
1822 | index 8bb5b7f..b414030 100644 | |||
1823 | --- a/lib/lp/codehosting/codeimport/tests/test_worker.py | |||
1824 | +++ b/lib/lp/codehosting/codeimport/tests/test_worker.py | |||
1825 | @@ -438,7 +438,7 @@ class TestImportDataStore(WorkerTest): | |||
1826 | 438 | remote_name = '%08x.tar.gz' % (source_details.target_id,) | 438 | remote_name = '%08x.tar.gz' % (source_details.target_id,) |
1827 | 439 | local_name = '%s.tar.gz' % (self.factory.getUniqueString(),) | 439 | local_name = '%s.tar.gz' % (self.factory.getUniqueString(),) |
1828 | 440 | transport = self.get_transport() | 440 | transport = self.get_transport() |
1830 | 441 | transport.put_bytes(remote_name, '') | 441 | transport.put_bytes(remote_name, b'') |
1831 | 442 | store = ImportDataStore(transport, source_details) | 442 | store = ImportDataStore(transport, source_details) |
1832 | 443 | ret = store.fetch(local_name) | 443 | ret = store.fetch(local_name) |
1833 | 444 | self.assertTrue(ret) | 444 | self.assertTrue(ret) |
1834 | @@ -496,7 +496,7 @@ class TestImportDataStore(WorkerTest): | |||
1835 | 496 | local_name = '%s.tar.gz' % (self.factory.getUniqueString(),) | 496 | local_name = '%s.tar.gz' % (self.factory.getUniqueString(),) |
1836 | 497 | subdir_name = self.factory.getUniqueString() | 497 | subdir_name = self.factory.getUniqueString() |
1837 | 498 | source_details = self.factory.makeCodeImportSourceDetails() | 498 | source_details = self.factory.makeCodeImportSourceDetails() |
1839 | 499 | get_transport('.').put_bytes(local_name, '') | 499 | get_transport('.').put_bytes(local_name, b'') |
1840 | 500 | transport = self.get_transport() | 500 | transport = self.get_transport() |
1841 | 501 | store = ImportDataStore(transport.clone(subdir_name), source_details) | 501 | store = ImportDataStore(transport.clone(subdir_name), source_details) |
1842 | 502 | store.put(local_name) | 502 | store.put(local_name) |
1843 | diff --git a/lib/lp/codehosting/inmemory.py b/lib/lp/codehosting/inmemory.py | |||
1844 | index bab222f..2873314 100644 | |||
1845 | --- a/lib/lp/codehosting/inmemory.py | |||
1846 | +++ b/lib/lp/codehosting/inmemory.py | |||
1847 | @@ -12,7 +12,7 @@ __all__ = [ | |||
1848 | 12 | import operator | 12 | import operator |
1849 | 13 | from xmlrpclib import Fault | 13 | from xmlrpclib import Fault |
1850 | 14 | 14 | ||
1852 | 15 | from bzrlib.urlutils import ( | 15 | from breezy.urlutils import ( |
1853 | 16 | escape, | 16 | escape, |
1854 | 17 | unescape, | 17 | unescape, |
1855 | 18 | ) | 18 | ) |
1856 | diff --git a/lib/lp/codehosting/puller/scheduler.py b/lib/lp/codehosting/puller/scheduler.py | |||
1857 | index acbf014..35dd65b 100644 | |||
1858 | --- a/lib/lp/codehosting/puller/scheduler.py | |||
1859 | +++ b/lib/lp/codehosting/puller/scheduler.py | |||
1860 | @@ -320,7 +320,7 @@ class PullerMaster: | |||
1861 | 320 | self.default_stacked_on_url] | 320 | self.default_stacked_on_url] |
1862 | 321 | self.logger.debug("executing %s", command) | 321 | self.logger.debug("executing %s", command) |
1863 | 322 | env = os.environ.copy() | 322 | env = os.environ.copy() |
1865 | 323 | env['BZR_EMAIL'] = get_lock_id_for_branch_id(self.branch_id) | 323 | env['BRZ_EMAIL'] = get_lock_id_for_branch_id(self.branch_id) |
1866 | 324 | reactor.spawnProcess(protocol, interpreter, command, env=env) | 324 | reactor.spawnProcess(protocol, interpreter, command, env=env) |
1867 | 325 | return deferred | 325 | return deferred |
1868 | 326 | 326 | ||
1869 | diff --git a/lib/lp/codehosting/puller/tests/__init__.py b/lib/lp/codehosting/puller/tests/__init__.py | |||
1870 | index 716e2f5..59223a3 100644 | |||
1871 | --- a/lib/lp/codehosting/puller/tests/__init__.py | |||
1872 | +++ b/lib/lp/codehosting/puller/tests/__init__.py | |||
1873 | @@ -10,13 +10,13 @@ import shutil | |||
1874 | 10 | import socket | 10 | import socket |
1875 | 11 | from StringIO import StringIO | 11 | from StringIO import StringIO |
1876 | 12 | 12 | ||
1879 | 13 | from bzrlib.tests import TestCaseWithTransport | 13 | from breezy.tests import TestCaseWithTransport |
1880 | 14 | from bzrlib.tests.http_server import ( | 14 | from breezy.tests.http_server import ( |
1881 | 15 | HttpServer, | 15 | HttpServer, |
1882 | 16 | TestingHTTPServer, | 16 | TestingHTTPServer, |
1883 | 17 | TestingThreadingHTTPServer, | 17 | TestingThreadingHTTPServer, |
1884 | 18 | ) | 18 | ) |
1886 | 19 | from bzrlib.url_policy_open import AcceptAnythingPolicy | 19 | from breezy.url_policy_open import AcceptAnythingPolicy |
1887 | 20 | 20 | ||
1888 | 21 | from lp.codehosting.puller.worker import ( | 21 | from lp.codehosting.puller.worker import ( |
1889 | 22 | BranchMirrorer, | 22 | BranchMirrorer, |
1890 | diff --git a/lib/lp/codehosting/puller/tests/test_acceptance.py b/lib/lp/codehosting/puller/tests/test_acceptance.py | |||
1891 | index f835b65..305e52b 100644 | |||
1892 | --- a/lib/lp/codehosting/puller/tests/test_acceptance.py | |||
1893 | +++ b/lib/lp/codehosting/puller/tests/test_acceptance.py | |||
1894 | @@ -13,15 +13,15 @@ from subprocess import ( | |||
1895 | 13 | Popen, | 13 | Popen, |
1896 | 14 | ) | 14 | ) |
1897 | 15 | 15 | ||
1903 | 16 | from bzrlib import errors | 16 | from breezy import errors |
1904 | 17 | from bzrlib.branch import Branch | 17 | from breezy.branch import Branch |
1905 | 18 | from bzrlib.bzrdir import BzrDir | 18 | from breezy.bzr.bzrdir import BzrDir |
1906 | 19 | from bzrlib.upgrade import upgrade | 19 | from breezy.upgrade import upgrade |
1907 | 20 | from bzrlib.urlutils import ( | 20 | from breezy.urlutils import ( |
1908 | 21 | join as urljoin, | 21 | join as urljoin, |
1909 | 22 | local_path_from_url, | 22 | local_path_from_url, |
1910 | 23 | ) | 23 | ) |
1912 | 24 | from bzrlib.workingtree import WorkingTree | 24 | from breezy.workingtree import WorkingTree |
1913 | 25 | from fixtures import TempDir | 25 | from fixtures import TempDir |
1914 | 26 | import transaction | 26 | import transaction |
1915 | 27 | from zope.component import getUtility | 27 | from zope.component import getUtility |
1916 | @@ -284,7 +284,7 @@ class TestBranchPuller(PullerBranchTestCase, LoomTestMixin): | |||
1917 | 284 | branch_url = urljoin( | 284 | branch_url = urljoin( |
1918 | 285 | config.launchpad.bzr_imports_root_url, '%08x' % db_branch.id) | 285 | config.launchpad.bzr_imports_root_url, '%08x' % db_branch.id) |
1919 | 286 | branch = BzrDir.create_branch_convenience(branch_url) | 286 | branch = BzrDir.create_branch_convenience(branch_url) |
1921 | 287 | tree = branch.bzrdir.open_workingtree() | 287 | tree = branch.controldir.open_workingtree() |
1922 | 288 | tree.commit('rev1') | 288 | tree.commit('rev1') |
1923 | 289 | 289 | ||
1924 | 290 | transaction.commit() | 290 | transaction.commit() |
1925 | diff --git a/lib/lp/codehosting/puller/tests/test_errors.py b/lib/lp/codehosting/puller/tests/test_errors.py | |||
1926 | index 9416799..1819e95 100644 | |||
1927 | --- a/lib/lp/codehosting/puller/tests/test_errors.py | |||
1928 | +++ b/lib/lp/codehosting/puller/tests/test_errors.py | |||
1929 | @@ -11,14 +11,14 @@ import socket | |||
1930 | 11 | import tempfile | 11 | import tempfile |
1931 | 12 | import urllib2 | 12 | import urllib2 |
1932 | 13 | 13 | ||
1934 | 14 | from bzrlib.errors import ( | 14 | from breezy.errors import ( |
1935 | 15 | BzrError, | 15 | BzrError, |
1936 | 16 | NotBranchError, | 16 | NotBranchError, |
1937 | 17 | ParamikoNotPresent, | 17 | ParamikoNotPresent, |
1938 | 18 | UnknownFormatError, | 18 | UnknownFormatError, |
1939 | 19 | UnsupportedFormatError, | 19 | UnsupportedFormatError, |
1940 | 20 | ) | 20 | ) |
1942 | 21 | from bzrlib.url_policy_open import ( | 21 | from breezy.url_policy_open import ( |
1943 | 22 | BranchLoopError, | 22 | BranchLoopError, |
1944 | 23 | BranchReferenceForbidden, | 23 | BranchReferenceForbidden, |
1945 | 24 | ) | 24 | ) |
1946 | diff --git a/lib/lp/codehosting/puller/tests/test_scheduler.py b/lib/lp/codehosting/puller/tests/test_scheduler.py | |||
1947 | index df1d0c9..2b08509 100644 | |||
1948 | --- a/lib/lp/codehosting/puller/tests/test_scheduler.py | |||
1949 | +++ b/lib/lp/codehosting/puller/tests/test_scheduler.py | |||
1950 | @@ -7,12 +7,10 @@ import logging | |||
1951 | 7 | import os | 7 | import os |
1952 | 8 | import textwrap | 8 | import textwrap |
1953 | 9 | 9 | ||
1960 | 10 | from bzrlib.branch import Branch | 10 | from breezy.branch import Branch |
1961 | 11 | from bzrlib.bzrdir import ( | 11 | from breezy.bzr.bzrdir import BzrDir |
1962 | 12 | BzrDir, | 12 | from breezy.controldir import format_registry |
1963 | 13 | format_registry, | 13 | from breezy.urlutils import join as urljoin |
1958 | 14 | ) | ||
1959 | 15 | from bzrlib.urlutils import join as urljoin | ||
1964 | 16 | from testtools.twistedsupport import ( | 14 | from testtools.twistedsupport import ( |
1965 | 17 | assert_fails_with, | 15 | assert_fails_with, |
1966 | 18 | AsynchronousDeferredRunTest, | 16 | AsynchronousDeferredRunTest, |
1967 | @@ -545,7 +543,7 @@ parser = OptionParser() | |||
1968 | 545 | (options, arguments) = parser.parse_args() | 543 | (options, arguments) = parser.parse_args() |
1969 | 546 | (source_url, destination_url, branch_id, unique_name, | 544 | (source_url, destination_url, branch_id, unique_name, |
1970 | 547 | branch_type_name, default_stacked_on_url) = arguments | 545 | branch_type_name, default_stacked_on_url) = arguments |
1972 | 548 | from bzrlib import branch | 546 | from breezy import branch |
1973 | 549 | branch = branch.Branch.open(destination_url) | 547 | branch = branch.Branch.open(destination_url) |
1974 | 550 | protocol = PullerWorkerProtocol(sys.stdout) | 548 | protocol = PullerWorkerProtocol(sys.stdout) |
1975 | 551 | """ | 549 | """ |
1976 | @@ -865,7 +863,7 @@ class TestPullerMasterIntegration(PullerBranchTestCase): | |||
1977 | 865 | # We have to use a custom worker script to lower the time we wait for | 863 | # We have to use a custom worker script to lower the time we wait for |
1978 | 866 | # the lock for (the default is five minutes, too long for a test!) | 864 | # the lock for (the default is five minutes, too long for a test!) |
1979 | 867 | lower_timeout_script = """ | 865 | lower_timeout_script = """ |
1981 | 868 | from bzrlib import lockdir | 866 | from breezy import lockdir |
1982 | 869 | lockdir._DEFAULT_TIMEOUT_SECONDS = 2.0 | 867 | lockdir._DEFAULT_TIMEOUT_SECONDS = 2.0 |
1983 | 870 | from lp.code.enums import BranchType | 868 | from lp.code.enums import BranchType |
1984 | 871 | from lp.codehosting.puller.worker import ( | 869 | from lp.codehosting.puller.worker import ( |
1985 | diff --git a/lib/lp/codehosting/puller/tests/test_worker.py b/lib/lp/codehosting/puller/tests/test_worker.py | |||
1986 | index d6cbaf3..addfcbb 100644 | |||
1987 | --- a/lib/lp/codehosting/puller/tests/test_worker.py | |||
1988 | +++ b/lib/lp/codehosting/puller/tests/test_worker.py | |||
1989 | @@ -8,21 +8,21 @@ __metaclass__ = type | |||
1990 | 8 | import gc | 8 | import gc |
1991 | 9 | from StringIO import StringIO | 9 | from StringIO import StringIO |
1992 | 10 | 10 | ||
1997 | 11 | import bzrlib.branch | 11 | import breezy.branch |
1998 | 12 | from bzrlib.branch import BranchReferenceFormat | 12 | from breezy.bzr.branch import BranchReferenceFormat |
1999 | 13 | from bzrlib.bzrdir import BzrDir | 13 | from breezy.bzr.bzrdir import BzrDir |
2000 | 14 | from bzrlib.errors import ( | 14 | from breezy.errors import ( |
2001 | 15 | IncompatibleRepositories, | 15 | IncompatibleRepositories, |
2002 | 16 | NotBranchError, | 16 | NotBranchError, |
2003 | 17 | NotStacked, | 17 | NotStacked, |
2004 | 18 | ) | 18 | ) |
2007 | 19 | from bzrlib.revision import NULL_REVISION | 19 | from breezy.revision import NULL_REVISION |
2008 | 20 | from bzrlib.tests import ( | 20 | from breezy.tests import ( |
2009 | 21 | TestCaseInTempDir, | 21 | TestCaseInTempDir, |
2010 | 22 | TestCaseWithTransport, | 22 | TestCaseWithTransport, |
2011 | 23 | ) | 23 | ) |
2014 | 24 | from bzrlib.transport import get_transport | 24 | from breezy.transport import get_transport |
2015 | 25 | from bzrlib.url_policy_open import ( | 25 | from breezy.url_policy_open import ( |
2016 | 26 | AcceptAnythingPolicy, | 26 | AcceptAnythingPolicy, |
2017 | 27 | BadUrl, | 27 | BadUrl, |
2018 | 28 | BranchOpener, | 28 | BranchOpener, |
2019 | @@ -124,7 +124,7 @@ class TestPullerWorker(TestCaseWithTransport, PullerWorkerMixin): | |||
2020 | 124 | source_tree.branch.base, self.get_url('dest')) | 124 | source_tree.branch.base, self.get_url('dest')) |
2021 | 125 | source_tree.commit('commit message') | 125 | source_tree.commit('commit message') |
2022 | 126 | to_mirror.mirrorWithoutChecks() | 126 | to_mirror.mirrorWithoutChecks() |
2024 | 127 | mirrored_branch = bzrlib.branch.Branch.open(to_mirror.dest) | 127 | mirrored_branch = breezy.branch.Branch.open(to_mirror.dest) |
2025 | 128 | self.assertEqual( | 128 | self.assertEqual( |
2026 | 129 | source_tree.last_revision(), mirrored_branch.last_revision()) | 129 | source_tree.last_revision(), mirrored_branch.last_revision()) |
2027 | 130 | 130 | ||
2028 | @@ -134,7 +134,7 @@ class TestPullerWorker(TestCaseWithTransport, PullerWorkerMixin): | |||
2029 | 134 | to_mirror = self.makePullerWorker( | 134 | to_mirror = self.makePullerWorker( |
2030 | 135 | source_branch.base, self.get_url('dest')) | 135 | source_branch.base, self.get_url('dest')) |
2031 | 136 | to_mirror.mirrorWithoutChecks() | 136 | to_mirror.mirrorWithoutChecks() |
2033 | 137 | mirrored_branch = bzrlib.branch.Branch.open(to_mirror.dest) | 137 | mirrored_branch = breezy.branch.Branch.open(to_mirror.dest) |
2034 | 138 | self.assertEqual(NULL_REVISION, mirrored_branch.last_revision()) | 138 | self.assertEqual(NULL_REVISION, mirrored_branch.last_revision()) |
2035 | 139 | 139 | ||
2036 | 140 | def testCanMirrorWhenDestDirExists(self): | 140 | def testCanMirrorWhenDestDirExists(self): |
2037 | @@ -150,9 +150,9 @@ class TestPullerWorker(TestCaseWithTransport, PullerWorkerMixin): | |||
2038 | 150 | dest.mkdir('.bzr') | 150 | dest.mkdir('.bzr') |
2039 | 151 | # 'dest' is not a branch. | 151 | # 'dest' is not a branch. |
2040 | 152 | self.assertRaises( | 152 | self.assertRaises( |
2042 | 153 | NotBranchError, bzrlib.branch.Branch.open, to_mirror.dest) | 153 | NotBranchError, breezy.branch.Branch.open, to_mirror.dest) |
2043 | 154 | to_mirror.mirrorWithoutChecks() | 154 | to_mirror.mirrorWithoutChecks() |
2045 | 155 | mirrored_branch = bzrlib.branch.Branch.open(to_mirror.dest) | 155 | mirrored_branch = breezy.branch.Branch.open(to_mirror.dest) |
2046 | 156 | self.assertEqual( | 156 | self.assertEqual( |
2047 | 157 | source_tree.last_revision(), mirrored_branch.last_revision()) | 157 | source_tree.last_revision(), mirrored_branch.last_revision()) |
2048 | 158 | 158 | ||
2049 | @@ -179,7 +179,7 @@ class TestPullerWorker(TestCaseWithTransport, PullerWorkerMixin): | |||
2050 | 179 | source_branch.base, self.get_url('destdir'), | 179 | source_branch.base, self.get_url('destdir'), |
2051 | 180 | policy=PrearrangedStackedBranchPolicy(stack_on.base)) | 180 | policy=PrearrangedStackedBranchPolicy(stack_on.base)) |
2052 | 181 | to_mirror.mirrorWithoutChecks() | 181 | to_mirror.mirrorWithoutChecks() |
2054 | 182 | dest = bzrlib.branch.Branch.open(self.get_url('destdir')) | 182 | dest = breezy.branch.Branch.open(self.get_url('destdir')) |
2055 | 183 | self.assertFalse(dest._format.supports_stacking()) | 183 | self.assertFalse(dest._format.supports_stacking()) |
2056 | 184 | 184 | ||
2057 | 185 | def test_defaultStackedOnBranchIncompatibleMirrorsOK(self): | 185 | def test_defaultStackedOnBranchIncompatibleMirrorsOK(self): |
2058 | @@ -192,7 +192,7 @@ class TestPullerWorker(TestCaseWithTransport, PullerWorkerMixin): | |||
2059 | 192 | source_branch.base, self.get_url('destdir'), | 192 | source_branch.base, self.get_url('destdir'), |
2060 | 193 | policy=PrearrangedStackedBranchPolicy(stack_on.base)) | 193 | policy=PrearrangedStackedBranchPolicy(stack_on.base)) |
2061 | 194 | to_mirror.mirrorWithoutChecks() | 194 | to_mirror.mirrorWithoutChecks() |
2063 | 195 | dest = bzrlib.branch.Branch.open(self.get_url('destdir')) | 195 | dest = breezy.branch.Branch.open(self.get_url('destdir')) |
2064 | 196 | self.assertRaises(NotStacked, dest.get_stacked_on_url) | 196 | self.assertRaises(NotStacked, dest.get_stacked_on_url) |
2065 | 197 | 197 | ||
2066 | 198 | def testCanMirrorWithIncompatibleRepos(self): | 198 | def testCanMirrorWithIncompatibleRepos(self): |
2067 | @@ -212,7 +212,7 @@ class TestPullerWorker(TestCaseWithTransport, PullerWorkerMixin): | |||
2068 | 212 | # IncompatibleRepositories. | 212 | # IncompatibleRepositories. |
2069 | 213 | self.assertRaises( | 213 | self.assertRaises( |
2070 | 214 | IncompatibleRepositories, | 214 | IncompatibleRepositories, |
2072 | 215 | bzrlib.branch.Branch.open, 'dest/stacked') | 215 | breezy.branch.Branch.open, 'dest/stacked') |
2073 | 216 | source_branch = self.make_branch( | 216 | source_branch = self.make_branch( |
2074 | 217 | 'source-branch', format='2a') | 217 | 'source-branch', format='2a') |
2075 | 218 | to_mirror = self.makePullerWorker( | 218 | to_mirror = self.makePullerWorker( |
2076 | @@ -220,7 +220,7 @@ class TestPullerWorker(TestCaseWithTransport, PullerWorkerMixin): | |||
2077 | 220 | # The branch can be mirrored without errors and the destionation | 220 | # The branch can be mirrored without errors and the destionation |
2078 | 221 | # location is upgraded to match the source format. | 221 | # location is upgraded to match the source format. |
2079 | 222 | to_mirror.mirrorWithoutChecks() | 222 | to_mirror.mirrorWithoutChecks() |
2081 | 223 | mirrored_branch = bzrlib.branch.Branch.open(to_mirror.dest) | 223 | mirrored_branch = breezy.branch.Branch.open(to_mirror.dest) |
2082 | 224 | self.assertEqual( | 224 | self.assertEqual( |
2083 | 225 | source_branch.repository._format, | 225 | source_branch.repository._format, |
2084 | 226 | mirrored_branch.repository._format) | 226 | mirrored_branch.repository._format) |
2085 | @@ -286,7 +286,7 @@ class TestReferenceOpener(TestCaseWithTransport): | |||
2086 | 286 | :return: file url to the created pure branch reference. | 286 | :return: file url to the created pure branch reference. |
2087 | 287 | """ | 287 | """ |
2088 | 288 | # XXX DavidAllouche 2007-09-12 bug=139109: | 288 | # XXX DavidAllouche 2007-09-12 bug=139109: |
2090 | 289 | # We do this manually because the bzrlib API does not support creating | 289 | # We do this manually because the breezy API does not support creating |
2091 | 290 | # a branch reference without opening it. | 290 | # a branch reference without opening it. |
2092 | 291 | t = get_transport(self.get_url('.')) | 291 | t = get_transport(self.get_url('.')) |
2093 | 292 | t.mkdir('reference') | 292 | t.mkdir('reference') |
2094 | @@ -314,7 +314,7 @@ class TestReferenceOpener(TestCaseWithTransport): | |||
2095 | 314 | 314 | ||
2096 | 315 | # Open the branch reference and check that the result is indeed the | 315 | # Open the branch reference and check that the result is indeed the |
2097 | 316 | # branch we wanted it to point at. | 316 | # branch we wanted it to point at. |
2099 | 317 | opened_branch = bzrlib.branch.Branch.open(reference_url) | 317 | opened_branch = breezy.branch.Branch.open(reference_url) |
2100 | 318 | self.assertEqual(opened_branch.base, target_branch.base) | 318 | self.assertEqual(opened_branch.base, target_branch.base) |
2101 | 319 | 319 | ||
2102 | 320 | def testFollowReferenceValue(self): | 320 | def testFollowReferenceValue(self): |
2103 | @@ -496,9 +496,9 @@ class TestWorkerProgressReporting(TestCaseWithTransport): | |||
2104 | 496 | def setUp(self): | 496 | def setUp(self): |
2105 | 497 | super(TestWorkerProgressReporting, self).setUp() | 497 | super(TestWorkerProgressReporting, self).setUp() |
2106 | 498 | BranchOpener.install_hook() | 498 | BranchOpener.install_hook() |
2108 | 499 | self.saved_factory = bzrlib.ui.ui_factory | 499 | self.saved_factory = breezy.ui.ui_factory |
2109 | 500 | self.disable_directory_isolation() | 500 | self.disable_directory_isolation() |
2111 | 501 | self.addCleanup(setattr, bzrlib.ui, 'ui_factory', self.saved_factory) | 501 | self.addCleanup(setattr, breezy.ui, 'ui_factory', self.saved_factory) |
2112 | 502 | 502 | ||
2113 | 503 | def getHttpServerForCwd(self): | 503 | def getHttpServerForCwd(self): |
2114 | 504 | """Get an `HttpServer` instance that serves from '.'.""" | 504 | """Get an `HttpServer` instance that serves from '.'.""" |
2115 | @@ -530,7 +530,7 @@ class TestWorkerProgressReporting(TestCaseWithTransport): | |||
2116 | 530 | 530 | ||
2117 | 531 | p = self.StubProtocol() | 531 | p = self.StubProtocol() |
2118 | 532 | install_worker_ui_factory(p) | 532 | install_worker_ui_factory(p) |
2120 | 533 | b2_http = bzrlib.branch.Branch.open( | 533 | b2_http = breezy.branch.Branch.open( |
2121 | 534 | http_server.get_url() + 'some-other-branch') | 534 | http_server.get_url() + 'some-other-branch') |
2122 | 535 | b1.pull(b2_http) | 535 | b1.pull(b2_http) |
2123 | 536 | self.assertSubset([WORKER_ACTIVITY_NETWORK], p.calls) | 536 | self.assertSubset([WORKER_ACTIVITY_NETWORK], p.calls) |
2124 | diff --git a/lib/lp/codehosting/puller/tests/test_worker_formats.py b/lib/lp/codehosting/puller/tests/test_worker_formats.py | |||
2125 | index 3cc8873..b065ffa 100644 | |||
2126 | --- a/lib/lp/codehosting/puller/tests/test_worker_formats.py | |||
2127 | +++ b/lib/lp/codehosting/puller/tests/test_worker_formats.py | |||
2128 | @@ -5,19 +5,19 @@ | |||
2129 | 5 | 5 | ||
2130 | 6 | __metaclass__ = type | 6 | __metaclass__ = type |
2131 | 7 | 7 | ||
2136 | 8 | from bzrlib.branch import Branch | 8 | from breezy.branch import Branch |
2137 | 9 | from bzrlib.bzrdir import BzrDirMetaFormat1 | 9 | from breezy.bzr.bzrdir import BzrDirMetaFormat1 |
2138 | 10 | from bzrlib.plugins.weave_fmt.bzrdir import BzrDirFormat6 | 10 | from breezy.bzr.knitpack_repo import RepositoryFormatKnitPack5 |
2139 | 11 | from bzrlib.plugins.weave_fmt.repository import ( | 11 | from breezy.bzr.knitrepo import RepositoryFormatKnit1 |
2140 | 12 | from breezy.plugins.weave_fmt.bzrdir import BzrDirFormat6 | ||
2141 | 13 | from breezy.plugins.weave_fmt.repository import ( | ||
2142 | 12 | RepositoryFormat6, | 14 | RepositoryFormat6, |
2143 | 13 | RepositoryFormat7, | 15 | RepositoryFormat7, |
2144 | 14 | ) | 16 | ) |
2149 | 15 | from bzrlib.repofmt.knitpack_repo import RepositoryFormatKnitPack5 | 17 | from breezy.tests.per_repository import TestCaseWithRepository |
2150 | 16 | from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1 | 18 | from breezy.url_policy_open import BranchOpener |
2147 | 17 | from bzrlib.tests.per_repository import TestCaseWithRepository | ||
2148 | 18 | from bzrlib.url_policy_open import BranchOpener | ||
2151 | 19 | 19 | ||
2153 | 20 | import lp.codehosting # For bzr plugins. | 20 | import lp.codehosting # For brz plugins. |
2154 | 21 | from lp.codehosting.puller.tests import PullerWorkerMixin | 21 | from lp.codehosting.puller.tests import PullerWorkerMixin |
2155 | 22 | from lp.codehosting.tests.helpers import LoomTestMixin | 22 | from lp.codehosting.tests.helpers import LoomTestMixin |
2156 | 23 | 23 | ||
2157 | @@ -27,7 +27,7 @@ class TestPullerWorkerFormats(TestCaseWithRepository, PullerWorkerMixin, | |||
2158 | 27 | 27 | ||
2159 | 28 | def setUp(self): | 28 | def setUp(self): |
2160 | 29 | TestCaseWithRepository.setUp(self) | 29 | TestCaseWithRepository.setUp(self) |
2162 | 30 | # make_bzrdir relies on this being a relative filesystem path. | 30 | # make_controldir relies on this being a relative filesystem path. |
2163 | 31 | self._source_branch_path = 'source-branch' | 31 | self._source_branch_path = 'source-branch' |
2164 | 32 | BranchOpener.install_hook() | 32 | BranchOpener.install_hook() |
2165 | 33 | self.worker = self.makePullerWorker( | 33 | self.worker = self.makePullerWorker( |
2166 | @@ -39,7 +39,8 @@ class TestPullerWorkerFormats(TestCaseWithRepository, PullerWorkerMixin, | |||
2167 | 39 | """Make a source branch with the given formats.""" | 39 | """Make a source branch with the given formats.""" |
2168 | 40 | if branch_format is not None: | 40 | if branch_format is not None: |
2169 | 41 | bzrdir_format.set_branch_format(branch_format) | 41 | bzrdir_format.set_branch_format(branch_format) |
2171 | 42 | bd = self.make_bzrdir(self._source_branch_path, format=bzrdir_format) | 42 | bd = self.make_controldir( |
2172 | 43 | self._source_branch_path, format=bzrdir_format) | ||
2173 | 43 | repository_format.initialize(bd) | 44 | repository_format.initialize(bd) |
2174 | 44 | branch = bd.create_branch() | 45 | branch = bd.create_branch() |
2175 | 45 | tree = branch.create_checkout('source-checkout') | 46 | tree = branch.create_checkout('source-checkout') |
2176 | @@ -58,8 +59,8 @@ class TestPullerWorkerFormats(TestCaseWithRepository, PullerWorkerMixin, | |||
2177 | 58 | source_branch.repository._format.get_format_description(), | 59 | source_branch.repository._format.get_format_description(), |
2178 | 59 | dest_branch.repository._format.get_format_description()) | 60 | dest_branch.repository._format.get_format_description()) |
2179 | 60 | self.assertEqual( | 61 | self.assertEqual( |
2182 | 61 | source_branch.bzrdir._format.get_format_description(), | 62 | source_branch.controldir._format.get_format_description(), |
2183 | 62 | dest_branch.bzrdir._format.get_format_description()) | 63 | dest_branch.controldir._format.get_format_description()) |
2184 | 63 | 64 | ||
2185 | 64 | def _testMirrorWithFormats(self, repository_format, bzrdir_format): | 65 | def _testMirrorWithFormats(self, repository_format, bzrdir_format): |
2186 | 65 | """Make a branch with certain formats, mirror it and check the mirror. | 66 | """Make a branch with certain formats, mirror it and check the mirror. |
2187 | @@ -85,9 +86,8 @@ class TestPullerWorkerFormats(TestCaseWithRepository, PullerWorkerMixin, | |||
2188 | 85 | self.assertMirrored(branch, mirrored_branch) | 86 | self.assertMirrored(branch, mirrored_branch) |
2189 | 86 | 87 | ||
2190 | 87 | # XXX: JonathanLange 2008-06-25: These next three tests should be | 88 | # XXX: JonathanLange 2008-06-25: These next three tests should be |
2194 | 88 | # implemented against all supported repository formats using bzrlib's test | 89 | # implemented against all supported repository formats using breezy's test |
2195 | 89 | # adaptation APIs. Unfortunately, this API changes between 1.5 and 1.6, so | 90 | # adaptation APIs. |
2193 | 90 | # it'd be a bit silly to do the work now. | ||
2196 | 91 | def testMirrorKnitAsKnit(self): | 91 | def testMirrorKnitAsKnit(self): |
2197 | 92 | # Create a source branch in knit format, and check that the mirror is | 92 | # Create a source branch in knit format, and check that the mirror is |
2198 | 93 | # in knit format. | 93 | # in knit format. |
2199 | diff --git a/lib/lp/codehosting/puller/worker.py b/lib/lp/codehosting/puller/worker.py | |||
2200 | index e0ff5b4..d0ed4ca 100644 | |||
2201 | --- a/lib/lp/codehosting/puller/worker.py | |||
2202 | +++ b/lib/lp/codehosting/puller/worker.py | |||
2203 | @@ -12,22 +12,25 @@ import urllib2 | |||
2204 | 12 | # line below this comment. | 12 | # line below this comment. |
2205 | 13 | import lp.codehosting | 13 | import lp.codehosting |
2206 | 14 | 14 | ||
2208 | 15 | from bzrlib import ( | 15 | from breezy import ( |
2209 | 16 | errors, | 16 | errors, |
2210 | 17 | urlutils, | 17 | urlutils, |
2211 | 18 | ) | 18 | ) |
2216 | 19 | from bzrlib.branch import Branch | 19 | from breezy.branch import ( |
2217 | 20 | from bzrlib.plugins.loom.branch import LoomSupport | 20 | Branch, |
2218 | 21 | from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4 | 21 | UnstackableBranchFormat, |
2219 | 22 | from bzrlib.plugins.weave_fmt.repository import ( | 22 | ) |
2220 | 23 | from breezy.plugins.loom.branch import LoomSupport | ||
2221 | 24 | from breezy.plugins.weave_fmt.branch import BzrBranchFormat4 | ||
2222 | 25 | from breezy.plugins.weave_fmt.repository import ( | ||
2223 | 23 | RepositoryFormat4, | 26 | RepositoryFormat4, |
2224 | 24 | RepositoryFormat5, | 27 | RepositoryFormat5, |
2225 | 25 | RepositoryFormat6, | 28 | RepositoryFormat6, |
2226 | 26 | ) | 29 | ) |
2231 | 27 | from bzrlib.transport import get_transport | 30 | from breezy.transport import get_transport |
2232 | 28 | import bzrlib.ui | 31 | import breezy.ui |
2233 | 29 | from bzrlib.ui import SilentUIFactory | 32 | from breezy.ui import SilentUIFactory |
2234 | 30 | from bzrlib.url_policy_open import ( | 33 | from breezy.url_policy_open import ( |
2235 | 31 | BadUrl, | 34 | BadUrl, |
2236 | 32 | BranchLoopError, | 35 | BranchLoopError, |
2237 | 33 | BranchOpener, | 36 | BranchOpener, |
2238 | @@ -158,7 +161,7 @@ class BranchMirrorerPolicy(BranchOpenPolicy): | |||
2239 | 158 | revision_id = None | 161 | revision_id = None |
2240 | 159 | else: | 162 | else: |
2241 | 160 | revision_id = 'null:' | 163 | revision_id = 'null:' |
2243 | 161 | source_branch.bzrdir.clone_on_transport( | 164 | source_branch.controldir.clone_on_transport( |
2244 | 162 | dest_transport, revision_id=revision_id) | 165 | dest_transport, revision_id=revision_id) |
2245 | 163 | return Branch.open(destination_url) | 166 | return Branch.open(destination_url) |
2246 | 164 | 167 | ||
2247 | @@ -251,7 +254,7 @@ class BranchMirrorer(object): | |||
2248 | 251 | try: | 254 | try: |
2249 | 252 | dest_branch.set_stacked_on_url(stacked_on_url) | 255 | dest_branch.set_stacked_on_url(stacked_on_url) |
2250 | 253 | except (errors.UnstackableRepositoryFormat, | 256 | except (errors.UnstackableRepositoryFormat, |
2252 | 254 | errors.UnstackableBranchFormat, | 257 | UnstackableBranchFormat, |
2253 | 255 | errors.IncompatibleRepositories): | 258 | errors.IncompatibleRepositories): |
2254 | 256 | stacked_on_url = None | 259 | stacked_on_url = None |
2255 | 257 | if stacked_on_url is None: | 260 | if stacked_on_url is None: |
2256 | @@ -448,7 +451,7 @@ class PullerWorker: | |||
2257 | 448 | # XXX: Aaron Bentley 2008-06-13 | 451 | # XXX: Aaron Bentley 2008-06-13 |
2258 | 449 | # Bazaar does not provide a public API for learning about | 452 | # Bazaar does not provide a public API for learning about |
2259 | 450 | # format markers. Fix this in Bazaar, then here. | 453 | # format markers. Fix this in Bazaar, then here. |
2261 | 451 | control_string = dest_branch.bzrdir._format.get_format_string() | 454 | control_string = dest_branch.controldir._format.get_format_string() |
2262 | 452 | if dest_branch._format.__class__ is BzrBranchFormat4: | 455 | if dest_branch._format.__class__ is BzrBranchFormat4: |
2263 | 453 | branch_string = BranchFormat.BZR_BRANCH_4.title | 456 | branch_string = BranchFormat.BZR_BRANCH_4.title |
2264 | 454 | else: | 457 | else: |
2265 | @@ -488,8 +491,10 @@ class PullerWorkerUIFactory(SilentUIFactory): | |||
2266 | 488 | def confirm_action(self, prompt, confirmation_id, args): | 491 | def confirm_action(self, prompt, confirmation_id, args): |
2267 | 489 | """If we're asked to break a lock like a stale lock of ours, say yes. | 492 | """If we're asked to break a lock like a stale lock of ours, say yes. |
2268 | 490 | """ | 493 | """ |
2271 | 491 | assert confirmation_id == 'bzrlib.lockdir.break', \ | 494 | if confirmation_id not in ( |
2272 | 492 | "Didn't expect confirmation id %r" % (confirmation_id,) | 495 | 'bzrlib.lockdir.break', 'breezy.lockdir.break'): |
2273 | 496 | raise AssertionError( | ||
2274 | 497 | "Didn't expect confirmation id %r" % (confirmation_id,)) | ||
2275 | 493 | branch_id = self.puller_worker_protocol.branch_id | 498 | branch_id = self.puller_worker_protocol.branch_id |
2276 | 494 | prompt = prompt % args | 499 | prompt = prompt % args |
2277 | 495 | if get_lock_id_for_branch_id(branch_id) in prompt: | 500 | if get_lock_id_for_branch_id(branch_id) in prompt: |
2278 | @@ -518,7 +523,7 @@ def install_worker_ui_factory(puller_worker_protocol): | |||
2279 | 518 | 2) Break locks if and only if they appear to be stale locks | 523 | 2) Break locks if and only if they appear to be stale locks |
2280 | 519 | created by another puller worker process. | 524 | created by another puller worker process. |
2281 | 520 | """ | 525 | """ |
2283 | 521 | bzrlib.ui.ui_factory = PullerWorkerUIFactory(puller_worker_protocol) | 526 | breezy.ui.ui_factory = PullerWorkerUIFactory(puller_worker_protocol) |
2284 | 522 | 527 | ||
2285 | 523 | 528 | ||
2286 | 524 | class MirroredBranchPolicy(BranchMirrorerPolicy): | 529 | class MirroredBranchPolicy(BranchMirrorerPolicy): |
2287 | @@ -600,7 +605,7 @@ class ImportedBranchPolicy(BranchMirrorerPolicy): | |||
2288 | 600 | Because we control the process that creates import branches, a | 605 | Because we control the process that creates import branches, a |
2289 | 601 | vfs-level copy is safe and more efficient than a bzr fetch. | 606 | vfs-level copy is safe and more efficient than a bzr fetch. |
2290 | 602 | """ | 607 | """ |
2292 | 603 | source_transport = source_branch.bzrdir.root_transport | 608 | source_transport = source_branch.controldir.root_transport |
2293 | 604 | dest_transport = get_transport(destination_url) | 609 | dest_transport = get_transport(destination_url) |
2294 | 605 | while True: | 610 | while True: |
2295 | 606 | # We loop until the remote file list before and after the copy is | 611 | # We loop until the remote file list before and after the copy is |
2296 | diff --git a/lib/lp/codehosting/rewrite.py b/lib/lp/codehosting/rewrite.py | |||
2297 | index c6e204d..f59520b 100644 | |||
2298 | --- a/lib/lp/codehosting/rewrite.py | |||
2299 | +++ b/lib/lp/codehosting/rewrite.py | |||
2300 | @@ -6,7 +6,7 @@ | |||
2301 | 6 | 6 | ||
2302 | 7 | import time | 7 | import time |
2303 | 8 | 8 | ||
2305 | 9 | from bzrlib import urlutils | 9 | from breezy import urlutils |
2306 | 10 | from zope.component import getUtility | 10 | from zope.component import getUtility |
2307 | 11 | from zope.security.interfaces import Unauthorized | 11 | from zope.security.interfaces import Unauthorized |
2308 | 12 | 12 | ||
2309 | diff --git a/lib/lp/codehosting/scanner/buglinks.py b/lib/lp/codehosting/scanner/buglinks.py | |||
2310 | index 539bd93..95d8eaa 100644 | |||
2311 | --- a/lib/lp/codehosting/scanner/buglinks.py | |||
2312 | +++ b/lib/lp/codehosting/scanner/buglinks.py | |||
2313 | @@ -10,7 +10,7 @@ __all__ = [ | |||
2314 | 10 | 10 | ||
2315 | 11 | import urlparse | 11 | import urlparse |
2316 | 12 | 12 | ||
2318 | 13 | from bzrlib.errors import InvalidBugStatus | 13 | from breezy.bugtracker import InvalidBugStatus |
2319 | 14 | from zope.component import getUtility | 14 | from zope.component import getUtility |
2320 | 15 | 15 | ||
2321 | 16 | from lp.app.errors import NotFoundError | 16 | from lp.app.errors import NotFoundError |
2322 | diff --git a/lib/lp/codehosting/scanner/bzrsync.py b/lib/lp/codehosting/scanner/bzrsync.py | |||
2323 | index 0161972..4eab1a9 100755 | |||
2324 | --- a/lib/lp/codehosting/scanner/bzrsync.py | |||
2325 | +++ b/lib/lp/codehosting/scanner/bzrsync.py | |||
2326 | @@ -16,8 +16,8 @@ __all__ = [ | |||
2327 | 16 | 16 | ||
2328 | 17 | import logging | 17 | import logging |
2329 | 18 | 18 | ||
2332 | 19 | from bzrlib.graph import DictParentsProvider | 19 | from breezy.graph import DictParentsProvider |
2333 | 20 | from bzrlib.revision import NULL_REVISION | 20 | from breezy.revision import NULL_REVISION |
2334 | 21 | import pytz | 21 | import pytz |
2335 | 22 | import six | 22 | import six |
2336 | 23 | from storm.locals import Store | 23 | from storm.locals import Store |
2337 | @@ -91,7 +91,7 @@ class BzrSync: | |||
2338 | 91 | self.logger.info(" from %s", bzr_branch.base) | 91 | self.logger.info(" from %s", bzr_branch.base) |
2339 | 92 | # Get the history and ancestry from the branch first, to fail early | 92 | # Get the history and ancestry from the branch first, to fail early |
2340 | 93 | # if something is wrong with the branch. | 93 | # if something is wrong with the branch. |
2342 | 94 | self.logger.info("Retrieving history from bzrlib.") | 94 | self.logger.info("Retrieving history from breezy.") |
2343 | 95 | bzr_history = branch_revision_history(bzr_branch) | 95 | bzr_history = branch_revision_history(bzr_branch) |
2344 | 96 | # The BranchRevision, Revision and RevisionParent tables are only | 96 | # The BranchRevision, Revision and RevisionParent tables are only |
2345 | 97 | # written to by the branch-scanner, so they are not subject to | 97 | # written to by the branch-scanner, so they are not subject to |
2346 | @@ -197,7 +197,7 @@ class BzrSync: | |||
2347 | 197 | 197 | ||
2348 | 198 | def planDatabaseChanges(self, bzr_branch, bzr_history, db_ancestry, | 198 | def planDatabaseChanges(self, bzr_branch, bzr_history, db_ancestry, |
2349 | 199 | db_history): | 199 | db_history): |
2351 | 200 | """Plan database changes to synchronize with bzrlib data. | 200 | """Plan database changes to synchronize with breezy data. |
2352 | 201 | 201 | ||
2353 | 202 | Use the data retrieved by `retrieveDatabaseAncestry` and | 202 | Use the data retrieved by `retrieveDatabaseAncestry` and |
2354 | 203 | `retrieveBranchDetails` to plan the changes to apply to the database. | 203 | `retrieveBranchDetails` to plan the changes to apply to the database. |
2355 | @@ -240,7 +240,7 @@ class BzrSync: | |||
2356 | 240 | def getBazaarRevisions(self, bzr_branch, revisions): | 240 | def getBazaarRevisions(self, bzr_branch, revisions): |
2357 | 241 | """Like ``get_revisions(revisions)`` but filter out ghosts first. | 241 | """Like ``get_revisions(revisions)`` but filter out ghosts first. |
2358 | 242 | 242 | ||
2360 | 243 | :param revisions: the set of Bazaar revision IDs to return bzrlib | 243 | :param revisions: the set of Breezy revision IDs to return breezy |
2361 | 244 | Revision objects for. | 244 | Revision objects for. |
2362 | 245 | """ | 245 | """ |
2363 | 246 | revisions = bzr_branch.repository.get_parent_map(revisions) | 246 | revisions = bzr_branch.repository.get_parent_map(revisions) |
2364 | @@ -249,9 +249,9 @@ class BzrSync: | |||
2365 | 249 | def syncRevisions(self, bzr_branch, bzr_revisions, revids_to_insert): | 249 | def syncRevisions(self, bzr_branch, bzr_revisions, revids_to_insert): |
2366 | 250 | """Import the supplied revisions. | 250 | """Import the supplied revisions. |
2367 | 251 | 251 | ||
2369 | 252 | :param bzr_branch: The Bazaar branch that's being scanned. | 252 | :param bzr_branch: The Breezy branch that's being scanned. |
2370 | 253 | :param bzr_revisions: the revisions to import | 253 | :param bzr_revisions: the revisions to import |
2372 | 254 | :type bzr_revision: bzrlib.revision.Revision | 254 | :type bzr_revision: breezy.revision.Revision |
2373 | 255 | :param revids_to_insert: a dict of revision ids to integer | 255 | :param revids_to_insert: a dict of revision ids to integer |
2374 | 256 | revno. Non-mainline revisions will be mapped to None. | 256 | revno. Non-mainline revisions will be mapped to None. |
2375 | 257 | """ | 257 | """ |
2376 | diff --git a/lib/lp/codehosting/scanner/mergedetection.py b/lib/lp/codehosting/scanner/mergedetection.py | |||
2377 | index db23fdb..0e5dcd5 100644 | |||
2378 | --- a/lib/lp/codehosting/scanner/mergedetection.py | |||
2379 | +++ b/lib/lp/codehosting/scanner/mergedetection.py | |||
2380 | @@ -9,7 +9,7 @@ __all__ = [ | |||
2381 | 9 | 'auto_merge_proposals', | 9 | 'auto_merge_proposals', |
2382 | 10 | ] | 10 | ] |
2383 | 11 | 11 | ||
2385 | 12 | from bzrlib.revision import NULL_REVISION | 12 | from breezy.revision import NULL_REVISION |
2386 | 13 | from zope.component import getUtility | 13 | from zope.component import getUtility |
2387 | 14 | 14 | ||
2388 | 15 | from lp.code.adapters.branch import BranchMergeProposalNoPreviewDiffDelta | 15 | from lp.code.adapters.branch import BranchMergeProposalNoPreviewDiffDelta |
2389 | diff --git a/lib/lp/codehosting/scanner/tests/test_buglinks.py b/lib/lp/codehosting/scanner/tests/test_buglinks.py | |||
2390 | index bfa2981..935af50 100644 | |||
2391 | --- a/lib/lp/codehosting/scanner/tests/test_buglinks.py | |||
2392 | +++ b/lib/lp/codehosting/scanner/tests/test_buglinks.py | |||
2393 | @@ -1,11 +1,11 @@ | |||
2394 | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the |
2395 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
2396 | 3 | 3 | ||
2398 | 4 | """Tests for creating BugBranch items based on Bazaar revisions.""" | 4 | """Tests for creating BugBranch items based on Breezy revisions.""" |
2399 | 5 | 5 | ||
2400 | 6 | __metaclass__ = type | 6 | __metaclass__ = type |
2401 | 7 | 7 | ||
2403 | 8 | from bzrlib.revision import Revision | 8 | from breezy.revision import Revision |
2404 | 9 | from zope.component import getUtility | 9 | from zope.component import getUtility |
2405 | 10 | from zope.event import notify | 10 | from zope.event import notify |
2406 | 11 | 11 | ||
2407 | @@ -192,7 +192,7 @@ class TestBugLinking(BzrSyncTestCase): | |||
2408 | 192 | author = self.factory.getUniqueString() | 192 | author = self.factory.getUniqueString() |
2409 | 193 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 193 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
2410 | 194 | # required to generate the revision-id. | 194 | # required to generate the revision-id. |
2412 | 195 | with override_environ(BZR_EMAIL='me@example.com'): | 195 | with override_environ(BRZ_EMAIL='me@example.com'): |
2413 | 196 | self.bzr_tree.commit( | 196 | self.bzr_tree.commit( |
2414 | 197 | u'common parent', committer=author, rev_id='r1', | 197 | u'common parent', committer=author, rev_id='r1', |
2415 | 198 | allow_pointless=True) | 198 | allow_pointless=True) |
2416 | @@ -253,7 +253,7 @@ class TestSubscription(TestCaseWithFactory): | |||
2417 | 253 | switch_dbuser("branchscanner") | 253 | switch_dbuser("branchscanner") |
2418 | 254 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 254 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
2419 | 255 | # required to generate the revision-id. | 255 | # required to generate the revision-id. |
2421 | 256 | with override_environ(BZR_EMAIL='me@example.com'): | 256 | with override_environ(BRZ_EMAIL='me@example.com'): |
2422 | 257 | revision_id = tree.commit('fix revision', | 257 | revision_id = tree.commit('fix revision', |
2423 | 258 | revprops={ | 258 | revprops={ |
2424 | 259 | 'bugs': 'https://launchpad.net/bugs/%d fixed' % bug.id}) | 259 | 'bugs': 'https://launchpad.net/bugs/%d fixed' % bug.id}) |
2425 | diff --git a/lib/lp/codehosting/scanner/tests/test_bzrsync.py b/lib/lp/codehosting/scanner/tests/test_bzrsync.py | |||
2426 | index 660d101..9ddc355 100644 | |||
2427 | --- a/lib/lp/codehosting/scanner/tests/test_bzrsync.py | |||
2428 | +++ b/lib/lp/codehosting/scanner/tests/test_bzrsync.py | |||
2429 | @@ -8,13 +8,13 @@ import os | |||
2430 | 8 | import random | 8 | import random |
2431 | 9 | import time | 9 | import time |
2432 | 10 | 10 | ||
2434 | 11 | from bzrlib.revision import ( | 11 | from breezy.revision import ( |
2435 | 12 | NULL_REVISION, | 12 | NULL_REVISION, |
2436 | 13 | Revision as BzrRevision, | 13 | Revision as BzrRevision, |
2437 | 14 | ) | 14 | ) |
2441 | 15 | from bzrlib.tests import TestCaseWithTransport | 15 | from breezy.tests import TestCaseWithTransport |
2442 | 16 | from bzrlib.uncommit import uncommit | 16 | from breezy.uncommit import uncommit |
2443 | 17 | from bzrlib.url_policy_open import BranchOpener | 17 | from breezy.url_policy_open import BranchOpener |
2444 | 18 | from fixtures import ( | 18 | from fixtures import ( |
2445 | 19 | FakeLogger, | 19 | FakeLogger, |
2446 | 20 | TempDir, | 20 | TempDir, |
2447 | @@ -191,7 +191,7 @@ class BzrSyncTestCase(TestCaseWithTransport, TestCaseWithFactory): | |||
2448 | 191 | self.bzr_tree.add_pending_merge(*extra_parents) | 191 | self.bzr_tree.add_pending_merge(*extra_parents) |
2449 | 192 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 192 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
2450 | 193 | # required to generate the revision-id. | 193 | # required to generate the revision-id. |
2452 | 194 | with override_environ(BZR_EMAIL='me@example.com'): | 194 | with override_environ(BRZ_EMAIL='me@example.com'): |
2453 | 195 | return self.bzr_tree.commit( | 195 | return self.bzr_tree.commit( |
2454 | 196 | message, committer=committer, rev_id=rev_id, | 196 | message, committer=committer, rev_id=rev_id, |
2455 | 197 | timestamp=timestamp, timezone=timezone, allow_pointless=True, | 197 | timestamp=timestamp, timezone=timezone, allow_pointless=True, |
2456 | @@ -240,7 +240,7 @@ class BzrSyncTestCase(TestCaseWithTransport, TestCaseWithFactory): | |||
2457 | 240 | db_branch=db_branch) | 240 | db_branch=db_branch) |
2458 | 241 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 241 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
2459 | 242 | # required to generate the revision-id. | 242 | # required to generate the revision-id. |
2461 | 243 | with override_environ(BZR_EMAIL='me@example.com'): | 243 | with override_environ(BRZ_EMAIL='me@example.com'): |
2462 | 244 | trunk_tree.commit(u'base revision', rev_id=base_rev_id) | 244 | trunk_tree.commit(u'base revision', rev_id=base_rev_id) |
2463 | 245 | 245 | ||
2464 | 246 | # Branch from the base revision. | 246 | # Branch from the base revision. |
2465 | @@ -572,7 +572,8 @@ class TestPlanDatabaseChanges(BzrSyncTestCase): | |||
2466 | 572 | # deletion anyway. | 572 | # deletion anyway. |
2467 | 573 | rev1_id = self.bzr_tree.commit( | 573 | rev1_id = self.bzr_tree.commit( |
2468 | 574 | 'initial commit', committer='me@example.org') | 574 | 'initial commit', committer='me@example.org') |
2470 | 575 | merge_tree = self.bzr_tree.bzrdir.sprout('merge').open_workingtree() | 575 | merge_tree = self.bzr_tree.controldir.sprout( |
2471 | 576 | 'merge').open_workingtree() | ||
2472 | 576 | merge_id = merge_tree.commit( | 577 | merge_id = merge_tree.commit( |
2473 | 577 | 'mergeable commit', committer='me@example.org') | 578 | 'mergeable commit', committer='me@example.org') |
2474 | 578 | self.bzr_tree.merge_from_branch(merge_tree.branch) | 579 | self.bzr_tree.merge_from_branch(merge_tree.branch) |
2475 | diff --git a/lib/lp/codehosting/scanner/tests/test_email.py b/lib/lp/codehosting/scanner/tests/test_email.py | |||
2476 | index 39ccec3..a403251 100644 | |||
2477 | --- a/lib/lp/codehosting/scanner/tests/test_email.py | |||
2478 | +++ b/lib/lp/codehosting/scanner/tests/test_email.py | |||
2479 | @@ -8,7 +8,7 @@ __metaclass__ = type | |||
2480 | 8 | import email | 8 | import email |
2481 | 9 | import os | 9 | import os |
2482 | 10 | 10 | ||
2484 | 11 | from bzrlib.uncommit import uncommit | 11 | from breezy.uncommit import uncommit |
2485 | 12 | from zope.component import getUtility | 12 | from zope.component import getUtility |
2486 | 13 | from zope.event import notify | 13 | from zope.event import notify |
2487 | 14 | 14 | ||
2488 | diff --git a/lib/lp/codehosting/scanner/tests/test_mergedetection.py b/lib/lp/codehosting/scanner/tests/test_mergedetection.py | |||
2489 | index 3d4508e..c0cb7ad 100644 | |||
2490 | --- a/lib/lp/codehosting/scanner/tests/test_mergedetection.py | |||
2491 | +++ b/lib/lp/codehosting/scanner/tests/test_mergedetection.py | |||
2492 | @@ -7,7 +7,7 @@ __metaclass__ = type | |||
2493 | 7 | 7 | ||
2494 | 8 | import logging | 8 | import logging |
2495 | 9 | 9 | ||
2497 | 10 | from bzrlib.revision import NULL_REVISION | 10 | from breezy.revision import NULL_REVISION |
2498 | 11 | from lazr.lifecycle.event import ObjectModifiedEvent | 11 | from lazr.lifecycle.event import ObjectModifiedEvent |
2499 | 12 | import transaction | 12 | import transaction |
2500 | 13 | from zope.component import getUtility | 13 | from zope.component import getUtility |
2501 | @@ -143,7 +143,7 @@ class TestAutoMergeDetectionForMergeProposals(BzrSyncTestCase): | |||
2502 | 143 | 143 | ||
2503 | 144 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 144 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
2504 | 145 | # required to generate the revision-id. | 145 | # required to generate the revision-id. |
2506 | 146 | with override_environ(BZR_EMAIL='me@example.com'): | 146 | with override_environ(BRZ_EMAIL='me@example.com'): |
2507 | 147 | branch_tree.commit(u'another revision', rev_id='another-rev') | 147 | branch_tree.commit(u'another revision', rev_id='another-rev') |
2508 | 148 | current_proposal_status = proposal.queue_status | 148 | current_proposal_status = proposal.queue_status |
2509 | 149 | self.assertNotEqual( | 149 | self.assertNotEqual( |
2510 | @@ -164,7 +164,7 @@ class TestAutoMergeDetectionForMergeProposals(BzrSyncTestCase): | |||
2511 | 164 | 164 | ||
2512 | 165 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 165 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
2513 | 166 | # required to generate the revision-id. | 166 | # required to generate the revision-id. |
2515 | 167 | with override_environ(BZR_EMAIL='me@example.com'): | 167 | with override_environ(BRZ_EMAIL='me@example.com'): |
2516 | 168 | branch_tree.commit(u'another revision', rev_id='another-rev') | 168 | branch_tree.commit(u'another revision', rev_id='another-rev') |
2517 | 169 | current_proposal_status = proposal.queue_status | 169 | current_proposal_status = proposal.queue_status |
2518 | 170 | self.assertNotEqual( | 170 | self.assertNotEqual( |
2519 | diff --git a/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py b/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py | |||
2520 | index b820539..5f9443f 100644 | |||
2521 | --- a/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py | |||
2522 | +++ b/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py | |||
2523 | @@ -8,7 +8,7 @@ import logging | |||
2524 | 8 | import os | 8 | import os |
2525 | 9 | from os.path import dirname | 9 | from os.path import dirname |
2526 | 10 | 10 | ||
2528 | 11 | from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a | 11 | from breezy.bzr.groupcompress_repo import RepositoryFormat2a |
2529 | 12 | from fixtures import TempDir | 12 | from fixtures import TempDir |
2530 | 13 | import transaction | 13 | import transaction |
2531 | 14 | 14 | ||
2532 | diff --git a/lib/lp/codehosting/sftp.py b/lib/lp/codehosting/sftp.py | |||
2533 | index 4c7e7fb..51d42e7 100644 | |||
2534 | --- a/lib/lp/codehosting/sftp.py | |||
2535 | +++ b/lib/lp/codehosting/sftp.py | |||
2536 | @@ -24,12 +24,12 @@ import errno | |||
2537 | 24 | import os | 24 | import os |
2538 | 25 | import stat | 25 | import stat |
2539 | 26 | 26 | ||
2541 | 27 | from bzrlib import ( | 27 | from breezy import ( |
2542 | 28 | errors as bzr_errors, | 28 | errors as bzr_errors, |
2543 | 29 | osutils, | 29 | osutils, |
2544 | 30 | urlutils, | 30 | urlutils, |
2545 | 31 | ) | 31 | ) |
2547 | 32 | from bzrlib.transport.local import LocalTransport | 32 | from breezy.transport.local import LocalTransport |
2548 | 33 | from lazr.sshserver.sftp import FileIsADirectory | 33 | from lazr.sshserver.sftp import FileIsADirectory |
2549 | 34 | from twisted.conch.interfaces import ( | 34 | from twisted.conch.interfaces import ( |
2550 | 35 | ISFTPFile, | 35 | ISFTPFile, |
2551 | @@ -160,7 +160,7 @@ class TransportSFTPFile: | |||
2552 | 160 | def _truncateFile(self): | 160 | def _truncateFile(self): |
2553 | 161 | """Truncate this file.""" | 161 | """Truncate this file.""" |
2554 | 162 | self._written = True | 162 | self._written = True |
2556 | 163 | return self.transport.put_bytes(self._escaped_path, '') | 163 | return self.transport.put_bytes(self._escaped_path, b'') |
2557 | 164 | 164 | ||
2558 | 165 | @with_sftp_error | 165 | @with_sftp_error |
2559 | 166 | def writeChunk(self, offset, data): | 166 | def writeChunk(self, offset, data): |
2560 | @@ -198,7 +198,7 @@ class TransportSFTPFile: | |||
2561 | 198 | 198 | ||
2562 | 199 | Doing things this way around, by trying to read all the data | 199 | Doing things this way around, by trying to read all the data |
2563 | 200 | requested and then handling the short read error, might be a bit | 200 | requested and then handling the short read error, might be a bit |
2565 | 201 | inefficient, but the bzrlib sftp transport doesn't read past the | 201 | inefficient, but the breezy sftp transport doesn't read past the |
2566 | 202 | end of files, so we don't need to worry too much about performance | 202 | end of files, so we don't need to worry too much about performance |
2567 | 203 | here. | 203 | here. |
2568 | 204 | """ | 204 | """ |
2569 | diff --git a/lib/lp/codehosting/sshserver/session.py b/lib/lp/codehosting/sshserver/session.py | |||
2570 | index 64567fe..91d31e4 100644 | |||
2571 | --- a/lib/lp/codehosting/sshserver/session.py | |||
2572 | +++ b/lib/lp/codehosting/sshserver/session.py | |||
2573 | @@ -26,7 +26,7 @@ from twisted.python import log | |||
2574 | 26 | from zope.event import notify | 26 | from zope.event import notify |
2575 | 27 | from zope.interface import implementer | 27 | from zope.interface import implementer |
2576 | 28 | 28 | ||
2578 | 29 | from lp.codehosting import get_bzr_path | 29 | from lp.codehosting import get_brz_path |
2579 | 30 | from lp.services.config import config | 30 | from lp.services.config import config |
2580 | 31 | 31 | ||
2581 | 32 | 32 | ||
2582 | @@ -141,16 +141,17 @@ class ForkedProcessTransport(process.BaseProcess): | |||
2583 | 141 | 141 | ||
2584 | 142 | :return: The pid, communication directory, and request socket. | 142 | :return: The pid, communication directory, and request socket. |
2585 | 143 | """ | 143 | """ |
2588 | 144 | assert executable == 'bzr', executable # Maybe .endswith() | 144 | assert executable == 'brz', executable # Maybe .endswith() |
2589 | 145 | assert args[0] == 'bzr', args[0] | 145 | assert args[0] == 'brz', args[0] |
2590 | 146 | message = ['fork-env %s\n' % (' '.join(args[1:]),)] | 146 | message = ['fork-env %s\n' % (' '.join(args[1:]),)] |
2591 | 147 | for key, value in environment.iteritems(): | 147 | for key, value in environment.iteritems(): |
2593 | 148 | # XXX: Currently we only pass BZR_EMAIL, should we be passing | 148 | # XXX: Currently we only pass BRZ_EMAIL, should we be passing |
2594 | 149 | # everything else? Note that many won't be handled properly, | 149 | # everything else? Note that many won't be handled properly, |
2595 | 150 | # since the process is already running. | 150 | # since the process is already running. |
2599 | 151 | if key != 'BZR_EMAIL': | 151 | if key in ('BZR_EMAIL', 'BRZ_EMAIL'): |
2600 | 152 | continue | 152 | # Map both of these to BRZ_EMAIL, since we run brz on the |
2601 | 153 | message.append('%s: %s\n' % (key, value)) | 153 | # server. |
2602 | 154 | message.append('BRZ_EMAIL: %s\n' % (value,)) | ||
2603 | 154 | message.append('end\n') | 155 | message.append('end\n') |
2604 | 155 | message = ''.join(message) | 156 | message = ''.join(message) |
2605 | 156 | response, sock = self._sendMessageToService(message) | 157 | response, sock = self._sendMessageToService(message) |
2606 | @@ -418,7 +419,7 @@ class ForkingRestrictedExecOnlySession(RestrictedExecOnlySession): | |||
2607 | 418 | def _simplifyEnvironment(self, env): | 419 | def _simplifyEnvironment(self, env): |
2608 | 419 | """Pull out the bits of the environment we want to pass along.""" | 420 | """Pull out the bits of the environment we want to pass along.""" |
2609 | 420 | env = {} | 421 | env = {} |
2611 | 421 | for env_var in ['BZR_EMAIL']: | 422 | for env_var in ['BRZ_EMAIL']: |
2612 | 422 | if env_var in self.environment: | 423 | if env_var in self.environment: |
2613 | 423 | env[env_var] = self.environment[env_var] | 424 | env[env_var] = self.environment[env_var] |
2614 | 424 | return env | 425 | return env |
2615 | @@ -426,15 +427,15 @@ class ForkingRestrictedExecOnlySession(RestrictedExecOnlySession): | |||
2616 | 426 | def getCommandToFork(self, executable, arguments, env): | 427 | def getCommandToFork(self, executable, arguments, env): |
2617 | 427 | assert executable.endswith('/bin/py') | 428 | assert executable.endswith('/bin/py') |
2618 | 428 | assert arguments[0] == executable | 429 | assert arguments[0] == executable |
2621 | 429 | assert arguments[1].endswith('/bzr') | 430 | assert arguments[1].endswith('/brz') |
2622 | 430 | executable = 'bzr' | 431 | executable = 'brz' |
2623 | 431 | arguments = arguments[1:] | 432 | arguments = arguments[1:] |
2625 | 432 | arguments[0] = 'bzr' | 433 | arguments[0] = 'brz' |
2626 | 433 | env = self._simplifyEnvironment(env) | 434 | env = self._simplifyEnvironment(env) |
2627 | 434 | return executable, arguments, env | 435 | return executable, arguments, env |
2628 | 435 | 436 | ||
2629 | 436 | def _spawn(self, protocol, executable, arguments, env): | 437 | def _spawn(self, protocol, executable, arguments, env): |
2631 | 437 | # When spawning, adapt the idea of "bin/py .../bzr" to just using "bzr" | 438 | # When spawning, adapt the idea of "bin/py .../brz" to just using "brz" |
2632 | 438 | # and the executable | 439 | # and the executable |
2633 | 439 | executable, arguments, env = self.getCommandToFork(executable, | 440 | executable, arguments, env = self.getCommandToFork(executable, |
2634 | 440 | arguments, env) | 441 | arguments, env) |
2635 | @@ -449,16 +450,18 @@ def lookup_command_template(command): | |||
2636 | 449 | :return: Command template | 450 | :return: Command template |
2637 | 450 | :raise ForbiddenCommand: Raised when command isn't allowed | 451 | :raise ForbiddenCommand: Raised when command isn't allowed |
2638 | 451 | """ | 452 | """ |
2640 | 452 | python_command = "%(root)s/bin/py %(bzr)s" % { | 453 | python_command = "%(root)s/bin/py %(brz)s" % { |
2641 | 453 | 'root': config.root, | 454 | 'root': config.root, |
2643 | 454 | 'bzr': get_bzr_path(), | 455 | 'brz': get_brz_path(), |
2644 | 455 | } | 456 | } |
2645 | 456 | args = " lp-serve --inet %(user_id)s" | 457 | args = " lp-serve --inet %(user_id)s" |
2646 | 457 | command_template = python_command + args | 458 | command_template = python_command + args |
2647 | 458 | 459 | ||
2649 | 459 | if command == 'bzr serve --inet --directory=/ --allow-writes': | 460 | if command in ( |
2650 | 461 | 'bzr serve --inet --directory=/ --allow-writes', | ||
2651 | 462 | 'brz serve --inet --directory=/ --allow-writes'): | ||
2652 | 460 | return command_template | 463 | return command_template |
2654 | 461 | # At the moment, only bzr branch serving is allowed. | 464 | # At the moment, only bzr/brz branch serving is allowed. |
2655 | 462 | raise ForbiddenCommand("Not allowed to execute %r." % (command,)) | 465 | raise ForbiddenCommand("Not allowed to execute %r." % (command,)) |
2656 | 463 | 466 | ||
2657 | 464 | 467 | ||
2658 | @@ -469,7 +472,7 @@ def launch_smart_server(avatar): | |||
2659 | 469 | 472 | ||
2660 | 470 | # Extract the hostname from the supermirror root config. | 473 | # Extract the hostname from the supermirror root config. |
2661 | 471 | hostname = urlparse.urlparse(config.codehosting.supermirror_root)[1] | 474 | hostname = urlparse.urlparse(config.codehosting.supermirror_root)[1] |
2663 | 472 | environment['BZR_EMAIL'] = '%s@%s' % (avatar.username, hostname) | 475 | environment['BRZ_EMAIL'] = '%s@%s' % (avatar.username, hostname) |
2664 | 473 | # TODO: Use a FeatureFlag to enable this in a more fine-grained approach. | 476 | # TODO: Use a FeatureFlag to enable this in a more fine-grained approach. |
2665 | 474 | # If the forking daemon has been spawned, then we can use it if the | 477 | # If the forking daemon has been spawned, then we can use it if the |
2666 | 475 | # feature is set to true for the given user, etc. | 478 | # feature is set to true for the given user, etc. |
2667 | diff --git a/lib/lp/codehosting/sshserver/tests/test_session.py b/lib/lp/codehosting/sshserver/tests/test_session.py | |||
2668 | index 7b1ad2f..a212873 100644 | |||
2669 | --- a/lib/lp/codehosting/sshserver/tests/test_session.py | |||
2670 | +++ b/lib/lp/codehosting/sshserver/tests/test_session.py | |||
2671 | @@ -13,8 +13,8 @@ from twisted.internet.process import ProcessExitedAlready | |||
2672 | 13 | from twisted.internet.protocol import ProcessProtocol | 13 | from twisted.internet.protocol import ProcessProtocol |
2673 | 14 | 14 | ||
2674 | 15 | from lp.codehosting import ( | 15 | from lp.codehosting import ( |
2677 | 16 | get_bzr_path, | 16 | get_brz_path, |
2678 | 17 | get_BZR_PLUGIN_PATH_for_subprocess, | 17 | get_BRZ_PLUGIN_PATH_for_subprocess, |
2679 | 18 | ) | 18 | ) |
2680 | 19 | from lp.codehosting.sshserver.daemon import CodehostingAvatar | 19 | from lp.codehosting.sshserver.daemon import CodehostingAvatar |
2681 | 20 | from lp.codehosting.sshserver.session import ( | 20 | from lp.codehosting.sshserver.session import ( |
2682 | @@ -382,18 +382,18 @@ class TestSessionIntegration(AvatarTestCase): | |||
2683 | 382 | "ISession(avatar) doesn't adapt to ExecOnlySession. " | 382 | "ISession(avatar) doesn't adapt to ExecOnlySession. " |
2684 | 383 | "Got %r instead." % (session,)) | 383 | "Got %r instead." % (session,)) |
2685 | 384 | self.assertEqual( | 384 | self.assertEqual( |
2688 | 385 | get_BZR_PLUGIN_PATH_for_subprocess(), | 385 | get_BRZ_PLUGIN_PATH_for_subprocess(), |
2689 | 386 | session.environment['BZR_PLUGIN_PATH']) | 386 | session.environment['BRZ_PLUGIN_PATH']) |
2690 | 387 | self.assertEqual( | 387 | self.assertEqual( |
2691 | 388 | '%s@bazaar.launchpad.test' % self.avatar.username, | 388 | '%s@bazaar.launchpad.test' % self.avatar.username, |
2693 | 389 | session.environment['BZR_EMAIL']) | 389 | session.environment['BRZ_EMAIL']) |
2694 | 390 | 390 | ||
2695 | 391 | executable, arguments = session.getCommandToRun( | 391 | executable, arguments = session.getCommandToRun( |
2696 | 392 | 'bzr serve --inet --directory=/ --allow-writes') | 392 | 'bzr serve --inet --directory=/ --allow-writes') |
2697 | 393 | interpreter = '%s/bin/py' % config.root | 393 | interpreter = '%s/bin/py' % config.root |
2698 | 394 | self.assertEqual(interpreter, executable) | 394 | self.assertEqual(interpreter, executable) |
2699 | 395 | self.assertEqual( | 395 | self.assertEqual( |
2701 | 396 | [interpreter, get_bzr_path(), 'lp-serve', | 396 | [interpreter, get_brz_path(), 'lp-serve', |
2702 | 397 | '--inet', str(self.avatar.user_id)], | 397 | '--inet', str(self.avatar.user_id)], |
2703 | 398 | list(arguments)) | 398 | list(arguments)) |
2704 | 399 | self.assertRaises( | 399 | self.assertRaises( |
2705 | @@ -422,9 +422,9 @@ class TestSessionIntegration(AvatarTestCase): | |||
2706 | 422 | 'bzr serve --inet --directory=/ --allow-writes') | 422 | 'bzr serve --inet --directory=/ --allow-writes') |
2707 | 423 | executable, arguments, env = session.getCommandToFork( | 423 | executable, arguments, env = session.getCommandToFork( |
2708 | 424 | executable, arguments, session.environment) | 424 | executable, arguments, session.environment) |
2710 | 425 | self.assertEqual('bzr', executable) | 425 | self.assertEqual('brz', executable) |
2711 | 426 | self.assertEqual( | 426 | self.assertEqual( |
2713 | 427 | ['bzr', 'lp-serve', | 427 | ['brz', 'lp-serve', |
2714 | 428 | '--inet', str(self.avatar.user_id)], | 428 | '--inet', str(self.avatar.user_id)], |
2715 | 429 | list(arguments)) | 429 | list(arguments)) |
2716 | 430 | 430 | ||
2717 | @@ -436,7 +436,14 @@ class TestLookupCommand(TestCase): | |||
2718 | 436 | 436 | ||
2719 | 437 | def test_bzr(self): | 437 | def test_bzr(self): |
2720 | 438 | self.assertEqual( | 438 | self.assertEqual( |
2722 | 439 | config.root + '/bin/py ' + get_bzr_path() + | 439 | config.root + '/bin/py ' + get_brz_path() + |
2723 | 440 | ' lp-serve --inet %(user_id)s', | 440 | ' lp-serve --inet %(user_id)s', |
2724 | 441 | lookup_command_template( | 441 | lookup_command_template( |
2725 | 442 | 'bzr serve --inet --directory=/ --allow-writes')) | 442 | 'bzr serve --inet --directory=/ --allow-writes')) |
2726 | 443 | |||
2727 | 444 | def test_brz(self): | ||
2728 | 445 | self.assertEqual( | ||
2729 | 446 | config.root + '/bin/py ' + get_brz_path() + | ||
2730 | 447 | ' lp-serve --inet %(user_id)s', | ||
2731 | 448 | lookup_command_template( | ||
2732 | 449 | 'brz serve --inet --directory=/ --allow-writes')) | ||
2733 | diff --git a/lib/lp/codehosting/tests/helpers.py b/lib/lp/codehosting/tests/helpers.py | |||
2734 | index e278e53..71d4a52 100644 | |||
2735 | --- a/lib/lp/codehosting/tests/helpers.py | |||
2736 | +++ b/lib/lp/codehosting/tests/helpers.py | |||
2737 | @@ -15,10 +15,9 @@ __all__ = [ | |||
2738 | 15 | 15 | ||
2739 | 16 | import os | 16 | import os |
2740 | 17 | 17 | ||
2745 | 18 | from bzrlib.bzrdir import BzrDir | 18 | from breezy.errors import FileExists |
2746 | 19 | from bzrlib.errors import FileExists | 19 | from breezy.plugins.loom import branch as loom_branch |
2747 | 20 | from bzrlib.plugins.loom import branch as loom_branch | 20 | from breezy.tests import ( |
2744 | 21 | from bzrlib.tests import ( | ||
2748 | 22 | TestNotApplicable, | 21 | TestNotApplicable, |
2749 | 23 | TestSkipped, | 22 | TestSkipped, |
2750 | 24 | ) | 23 | ) |
2751 | @@ -60,7 +59,7 @@ class LoomTestMixin: | |||
2752 | 60 | loom_branch.loomify(tree.branch) | 59 | loom_branch.loomify(tree.branch) |
2753 | 61 | finally: | 60 | finally: |
2754 | 62 | tree.unlock() | 61 | tree.unlock() |
2756 | 63 | loom_tree = tree.bzrdir.open_workingtree() | 62 | loom_tree = tree.controldir.open_workingtree() |
2757 | 64 | loom_tree.lock_write() | 63 | loom_tree.lock_write() |
2758 | 65 | loom_tree.branch.new_thread('bottom-thread') | 64 | loom_tree.branch.new_thread('bottom-thread') |
2759 | 66 | loom_tree.commit('this is a commit', rev_id='commit-1') | 65 | loom_tree.commit('this is a commit', rev_id='commit-1') |
2760 | @@ -78,7 +77,7 @@ class LoomTestMixin: | |||
2761 | 78 | loom_branch.loomify(tree.branch) | 77 | loom_branch.loomify(tree.branch) |
2762 | 79 | finally: | 78 | finally: |
2763 | 80 | tree.unlock() | 79 | tree.unlock() |
2765 | 81 | loom_tree = tree.bzrdir.open_workingtree() | 80 | loom_tree = tree.controldir.open_workingtree() |
2766 | 82 | loom_tree.lock_write() | 81 | loom_tree.lock_write() |
2767 | 83 | loom_tree.branch.new_thread('bottom-thread') | 82 | loom_tree.branch.new_thread('bottom-thread') |
2768 | 84 | loom_tree.commit('this is a commit', rev_id='commit-1') | 83 | loom_tree.commit('this is a commit', rev_id='commit-1') |
2769 | @@ -100,6 +99,9 @@ def make_bazaar_branch_and_tree(db_branch): | |||
2770 | 100 | 99 | ||
2771 | 101 | def create_branch_with_one_revision(branch_dir, format=None): | 100 | def create_branch_with_one_revision(branch_dir, format=None): |
2772 | 102 | """Create a dummy Bazaar branch at the given directory.""" | 101 | """Create a dummy Bazaar branch at the given directory.""" |
2773 | 102 | # XXX cjwatson 2019-06-13: This still uses bzrlib until such time as the | ||
2774 | 103 | # code import workers are ported to Breezy. | ||
2775 | 104 | from bzrlib.bzrdir import BzrDir | ||
2776 | 103 | if not os.path.exists(branch_dir): | 105 | if not os.path.exists(branch_dir): |
2777 | 104 | os.makedirs(branch_dir) | 106 | os.makedirs(branch_dir) |
2778 | 105 | try: | 107 | try: |
2779 | @@ -124,7 +126,7 @@ def force_stacked_on_url(branch, url): | |||
2780 | 124 | 126 | ||
2781 | 125 | 127 | ||
2782 | 126 | class TestResultWrapper: | 128 | class TestResultWrapper: |
2784 | 127 | """A wrapper for `TestResult` that knows about bzrlib's `TestSkipped`.""" | 129 | """A wrapper for `TestResult` that knows about breezy's `TestSkipped`.""" |
2785 | 128 | 130 | ||
2786 | 129 | def __init__(self, result): | 131 | def __init__(self, result): |
2787 | 130 | self.result = result | 132 | self.result = result |
2788 | diff --git a/lib/lp/codehosting/tests/servers.py b/lib/lp/codehosting/tests/servers.py | |||
2789 | index 99006c0..68c4a73 100644 | |||
2790 | --- a/lib/lp/codehosting/tests/servers.py | |||
2791 | +++ b/lib/lp/codehosting/tests/servers.py | |||
2792 | @@ -15,7 +15,7 @@ import os | |||
2793 | 15 | import shutil | 15 | import shutil |
2794 | 16 | import tempfile | 16 | import tempfile |
2795 | 17 | 17 | ||
2797 | 18 | from bzrlib.transport import ( | 18 | from breezy.transport import ( |
2798 | 19 | get_transport, | 19 | get_transport, |
2799 | 20 | Server, | 20 | Server, |
2800 | 21 | ) | 21 | ) |
2801 | diff --git a/lib/lp/codehosting/tests/test_acceptance.py b/lib/lp/codehosting/tests/test_acceptance.py | |||
2802 | index d840ebf..1b4e1bf 100644 | |||
2803 | --- a/lib/lp/codehosting/tests/test_acceptance.py | |||
2804 | +++ b/lib/lp/codehosting/tests/test_acceptance.py | |||
2805 | @@ -14,11 +14,11 @@ import time | |||
2806 | 14 | import urllib2 | 14 | import urllib2 |
2807 | 15 | import xmlrpclib | 15 | import xmlrpclib |
2808 | 16 | 16 | ||
2814 | 17 | import bzrlib.branch | 17 | import breezy.branch |
2815 | 18 | from bzrlib.tests import TestCaseWithTransport | 18 | from breezy.tests import TestCaseWithTransport |
2816 | 19 | from bzrlib.tests.per_repository import all_repository_format_scenarios | 19 | from breezy.tests.per_repository import all_repository_format_scenarios |
2817 | 20 | from bzrlib.urlutils import local_path_from_url | 20 | from breezy.urlutils import local_path_from_url |
2818 | 21 | from bzrlib.workingtree import WorkingTree | 21 | from breezy.workingtree import WorkingTree |
2819 | 22 | from testscenarios import ( | 22 | from testscenarios import ( |
2820 | 23 | load_tests_apply_scenarios, | 23 | load_tests_apply_scenarios, |
2821 | 24 | WithScenarios, | 24 | WithScenarios, |
2822 | @@ -37,8 +37,8 @@ from lp.code.tests.helpers import ( | |||
2823 | 37 | get_non_existant_source_package_branch_unique_name, | 37 | get_non_existant_source_package_branch_unique_name, |
2824 | 38 | ) | 38 | ) |
2825 | 39 | from lp.codehosting import ( | 39 | from lp.codehosting import ( |
2828 | 40 | get_bzr_path, | 40 | get_brz_path, |
2829 | 41 | get_BZR_PLUGIN_PATH_for_subprocess, | 41 | get_BRZ_PLUGIN_PATH_for_subprocess, |
2830 | 42 | ) | 42 | ) |
2831 | 43 | from lp.codehosting.bzrutils import DenyingServer | 43 | from lp.codehosting.bzrutils import DenyingServer |
2832 | 44 | from lp.codehosting.tests.helpers import LoomTestMixin | 44 | from lp.codehosting.tests.helpers import LoomTestMixin |
2833 | @@ -64,10 +64,10 @@ class ForkingServerForTests(object): | |||
2834 | 64 | self.socket_path = None | 64 | self.socket_path = None |
2835 | 65 | 65 | ||
2836 | 66 | def setUp(self): | 66 | def setUp(self): |
2839 | 67 | bzr_path = get_bzr_path() | 67 | brz_path = get_brz_path() |
2840 | 68 | BZR_PLUGIN_PATH = get_BZR_PLUGIN_PATH_for_subprocess() | 68 | BRZ_PLUGIN_PATH = get_BRZ_PLUGIN_PATH_for_subprocess() |
2841 | 69 | env = os.environ.copy() | 69 | env = os.environ.copy() |
2843 | 70 | env['BZR_PLUGIN_PATH'] = BZR_PLUGIN_PATH | 70 | env['BRZ_PLUGIN_PATH'] = BRZ_PLUGIN_PATH |
2844 | 71 | # TODO: We probably want to use a random disk path for | 71 | # TODO: We probably want to use a random disk path for |
2845 | 72 | # forking_daemon_socket, but we need to update config so that | 72 | # forking_daemon_socket, but we need to update config so that |
2846 | 73 | # the CodeHosting service can find it. | 73 | # the CodeHosting service can find it. |
2847 | @@ -77,7 +77,7 @@ class ForkingServerForTests(object): | |||
2848 | 77 | # settings, we have to somehow pass it a new config-on-disk to | 77 | # settings, we have to somehow pass it a new config-on-disk to |
2849 | 78 | # use. | 78 | # use. |
2850 | 79 | self.socket_path = config.codehosting.forking_daemon_socket | 79 | self.socket_path = config.codehosting.forking_daemon_socket |
2852 | 80 | command = [sys.executable, bzr_path, 'launchpad-forking-service', | 80 | command = [sys.executable, brz_path, 'launchpad-forking-service', |
2853 | 81 | '--path', self.socket_path, '-Derror'] | 81 | '--path', self.socket_path, '-Derror'] |
2854 | 82 | process = subprocess.Popen( | 82 | process = subprocess.Popen( |
2855 | 83 | command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) | 83 | command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) |
2856 | @@ -110,12 +110,12 @@ class ForkingServerForTests(object): | |||
2857 | 110 | print process.stderr.read() | 110 | print process.stderr.read() |
2858 | 111 | print "-" * 70 | 111 | print "-" * 70 |
2859 | 112 | raise RuntimeError( | 112 | raise RuntimeError( |
2863 | 113 | 'Bzr server did not start correctly. See stdout and stderr ' | 113 | 'Breezy server did not start correctly. See stdout and ' |
2864 | 114 | 'reported above. Command was "%s". PYTHONPATH was "%s". ' | 114 | 'stderr reported above. Command was "%s". PYTHONPATH was ' |
2865 | 115 | 'BZR_PLUGIN_PATH was "%s".' % | 115 | '"%s". BRZ_PLUGIN_PATH was "%s".' % |
2866 | 116 | (' '.join(command), | 116 | (' '.join(command), |
2867 | 117 | env.get('PYTHONPATH'), | 117 | env.get('PYTHONPATH'), |
2869 | 118 | env.get('BZR_PLUGIN_PATH'))) | 118 | env.get('BRZ_PLUGIN_PATH'))) |
2870 | 119 | 119 | ||
2871 | 120 | def tearDown(self): | 120 | def tearDown(self): |
2872 | 121 | # SIGTERM is the graceful exit request, potentially we could wait a | 121 | # SIGTERM is the graceful exit request, potentially we could wait a |
2873 | @@ -234,8 +234,8 @@ class SSHTestCase(TestCaseWithTransport, LoomTestMixin, TestCaseWithFactory): | |||
2874 | 234 | """ | 234 | """ |
2875 | 235 | return self.run_bzr_subprocess( | 235 | return self.run_bzr_subprocess( |
2876 | 236 | args, env_changes={ | 236 | args, env_changes={ |
2879 | 237 | 'BZR_SSH': 'paramiko', | 237 | 'BRZ_SSH': 'paramiko', |
2880 | 238 | 'BZR_PLUGIN_PATH': get_BZR_PLUGIN_PATH_for_subprocess() | 238 | 'BRZ_PLUGIN_PATH': get_BRZ_PLUGIN_PATH_for_subprocess() |
2881 | 239 | }, | 239 | }, |
2882 | 240 | allow_plugins=True, retcode=retcode) | 240 | allow_plugins=True, retcode=retcode) |
2883 | 241 | 241 | ||
2884 | @@ -244,7 +244,7 @@ class SSHTestCase(TestCaseWithTransport, LoomTestMixin, TestCaseWithFactory): | |||
2885 | 244 | """ | 244 | """ |
2886 | 245 | output, error = self._run_bzr(args, retcode=3) | 245 | output, error = self._run_bzr(args, retcode=3) |
2887 | 246 | for line in error.splitlines(): | 246 | for line in error.splitlines(): |
2889 | 247 | if line.startswith("bzr: ERROR"): | 247 | if line.startswith("brz: ERROR"): |
2890 | 248 | return line | 248 | return line |
2891 | 249 | raise AssertionError( | 249 | raise AssertionError( |
2892 | 250 | "Didn't find error line in output:\n\n%s\n" % error) | 250 | "Didn't find error line in output:\n\n%s\n" % error) |
2893 | @@ -253,12 +253,12 @@ class SSHTestCase(TestCaseWithTransport, LoomTestMixin, TestCaseWithFactory): | |||
2894 | 253 | """Branch from the given URL to a local directory.""" | 253 | """Branch from the given URL to a local directory.""" |
2895 | 254 | self._run_bzr(['branch', remote_url, local_directory]) | 254 | self._run_bzr(['branch', remote_url, local_directory]) |
2896 | 255 | 255 | ||
2899 | 256 | def get_bzr_path(self): | 256 | def get_brz_path(self): |
2900 | 257 | """See `bzrlib.tests.TestCase.get_bzr_path`. | 257 | """See `breezy.tests.TestCase.get_brz_path`. |
2901 | 258 | 258 | ||
2903 | 259 | We override this to return the 'bzr' executable from sourcecode. | 259 | We override this to return our own 'brz' executable. |
2904 | 260 | """ | 260 | """ |
2906 | 261 | return get_bzr_path() | 261 | return get_brz_path() |
2907 | 262 | 262 | ||
2908 | 263 | def push(self, local_directory, remote_url, extra_args=None): | 263 | def push(self, local_directory, remote_url, extra_args=None): |
2909 | 264 | """Push the local branch to the given URL.""" | 264 | """Push the local branch to the given URL.""" |
2910 | @@ -271,19 +271,19 @@ class SSHTestCase(TestCaseWithTransport, LoomTestMixin, TestCaseWithFactory): | |||
2911 | 271 | """Check that we cannot push from 'local_directory' to 'remote_url'. | 271 | """Check that we cannot push from 'local_directory' to 'remote_url'. |
2912 | 272 | 272 | ||
2913 | 273 | In addition, if a list of messages is supplied as the error_messages | 273 | In addition, if a list of messages is supplied as the error_messages |
2916 | 274 | argument, check that the bzr client printed one of these messages | 274 | argument, check that the brz client printed one of these messages |
2917 | 275 | which shouldn't include the 'bzr: ERROR:' part of the message. | 275 | which shouldn't include the 'brz: ERROR:' part of the message. |
2918 | 276 | 276 | ||
2919 | 277 | :return: The last line of the stderr from the subprocess, which will | 277 | :return: The last line of the stderr from the subprocess, which will |
2921 | 278 | be the 'bzr: ERROR: <repr of Exception>' line. | 278 | be the 'brz: ERROR: <repr of Exception>' line. |
2922 | 279 | """ | 279 | """ |
2923 | 280 | error_line = self._run_bzr_error( | 280 | error_line = self._run_bzr_error( |
2924 | 281 | ['push', '-d', local_directory, remote_url]) | 281 | ['push', '-d', local_directory, remote_url]) |
2926 | 282 | # This will be the will be the 'bzr: ERROR: <repr of Exception>' line. | 282 | # This will be the 'brz: ERROR: <repr of Exception>' line. |
2927 | 283 | if not error_messages: | 283 | if not error_messages: |
2928 | 284 | return error_line | 284 | return error_line |
2929 | 285 | for msg in error_messages: | 285 | for msg in error_messages: |
2931 | 286 | if error_line.startswith('bzr: ERROR: ' + msg): | 286 | if error_line.startswith('brz: ERROR: ' + msg): |
2932 | 287 | return error_line | 287 | return error_line |
2933 | 288 | self.fail( | 288 | self.fail( |
2934 | 289 | "Error message %r didn't match any of those supplied." | 289 | "Error message %r didn't match any of those supplied." |
2935 | @@ -340,11 +340,11 @@ class SmokeTest(WithScenarios, SSHTestCase): | |||
2936 | 340 | """Smoke test for repository support.""" | 340 | """Smoke test for repository support.""" |
2937 | 341 | 341 | ||
2938 | 342 | excluded_scenarios = [ | 342 | excluded_scenarios = [ |
2940 | 343 | # RepositoryFormat4 is not initializable (bzrlib raises TestSkipped | 343 | # RepositoryFormat4 is not initializable (breezy raises TestSkipped |
2941 | 344 | # when you try). | 344 | # when you try). |
2942 | 345 | 'RepositoryFormat4', | 345 | 'RepositoryFormat4', |
2943 | 346 | # Fetching weave formats from the smart server is known to be broken. | 346 | # Fetching weave formats from the smart server is known to be broken. |
2945 | 347 | # See bug 173807 and bzrlib.tests.test_repository. | 347 | # See bug 173807 and breezy.tests.test_repository. |
2946 | 348 | 'RepositoryFormat5', | 348 | 'RepositoryFormat5', |
2947 | 349 | 'RepositoryFormat6', | 349 | 'RepositoryFormat6', |
2948 | 350 | 'RepositoryFormat7', | 350 | 'RepositoryFormat7', |
2949 | @@ -364,14 +364,14 @@ class SmokeTest(WithScenarios, SSHTestCase): | |||
2950 | 364 | self.second_tree = 'second' | 364 | self.second_tree = 'second' |
2951 | 365 | 365 | ||
2952 | 366 | def make_branch_specifying_repo_format(self, relpath, repo_format): | 366 | def make_branch_specifying_repo_format(self, relpath, repo_format): |
2954 | 367 | bd = self.make_bzrdir(relpath, format=self.bzrdir_format) | 367 | bd = self.make_controldir(relpath, format=self.bzrdir_format) |
2955 | 368 | repo_format.initialize(bd) | 368 | repo_format.initialize(bd) |
2956 | 369 | return bd.create_branch() | 369 | return bd.create_branch() |
2957 | 370 | 370 | ||
2958 | 371 | def make_branch_and_tree(self, relpath): | 371 | def make_branch_and_tree(self, relpath): |
2959 | 372 | b = self.make_branch_specifying_repo_format( | 372 | b = self.make_branch_specifying_repo_format( |
2960 | 373 | relpath, self.repository_format) | 373 | relpath, self.repository_format) |
2962 | 374 | return b.bzrdir.create_workingtree() | 374 | return b.controldir.create_workingtree() |
2963 | 375 | 375 | ||
2964 | 376 | def test_smoke(self): | 376 | def test_smoke(self): |
2965 | 377 | # Make a new branch | 377 | # Make a new branch |
2966 | @@ -411,7 +411,7 @@ class AcceptanceTests(WithScenarios, SSHTestCase): | |||
2967 | 411 | error_line = self._run_bzr_error( | 411 | error_line = self._run_bzr_error( |
2968 | 412 | ['cat-revision', '-r', 'branch:' + url]) | 412 | ['cat-revision', '-r', 'branch:' + url]) |
2969 | 413 | self.assertTrue( | 413 | self.assertTrue( |
2971 | 414 | error_line.startswith('bzr: ERROR: Not a branch:'), | 414 | error_line.startswith('brz: ERROR: Not a branch:'), |
2972 | 415 | 'Expected "Not a branch", found %r' % error_line) | 415 | 'Expected "Not a branch", found %r' % error_line) |
2973 | 416 | 416 | ||
2974 | 417 | def makeDatabaseBranch(self, owner_name, product_name, branch_name, | 417 | def makeDatabaseBranch(self, owner_name, product_name, branch_name, |
2975 | @@ -693,7 +693,7 @@ class SmartserverTests(WithScenarios, SSHTestCase): | |||
2976 | 693 | # We can get information from a read-only branch. | 693 | # We can get information from a read-only branch. |
2977 | 694 | ro_branch_url = self.createBazaarBranch( | 694 | ro_branch_url = self.createBazaarBranch( |
2978 | 695 | 'mark', '+junk', 'ro-branch') | 695 | 'mark', '+junk', 'ro-branch') |
2980 | 696 | revision = bzrlib.branch.Branch.open(ro_branch_url).last_revision() | 696 | revision = breezy.branch.Branch.open(ro_branch_url).last_revision() |
2981 | 697 | remote_revision = self.getLastRevision( | 697 | remote_revision = self.getLastRevision( |
2982 | 698 | self.getTransportURL('~mark/+junk/ro-branch')) | 698 | self.getTransportURL('~mark/+junk/ro-branch')) |
2983 | 699 | self.assertEqual(revision, remote_revision) | 699 | self.assertEqual(revision, remote_revision) |
2984 | @@ -715,7 +715,7 @@ class SmartserverTests(WithScenarios, SSHTestCase): | |||
2985 | 715 | # Added to catch bug 126245. | 715 | # Added to catch bug 126245. |
2986 | 716 | ro_branch_url = self.makeMirroredBranch( | 716 | ro_branch_url = self.makeMirroredBranch( |
2987 | 717 | 'testuser', 'firefox', 'mirror') | 717 | 'testuser', 'firefox', 'mirror') |
2989 | 718 | revision = bzrlib.branch.Branch.open(ro_branch_url).last_revision() | 718 | revision = breezy.branch.Branch.open(ro_branch_url).last_revision() |
2990 | 719 | remote_revision = self.getLastRevision( | 719 | remote_revision = self.getLastRevision( |
2991 | 720 | self.getTransportURL('~testuser/firefox/mirror')) | 720 | self.getTransportURL('~testuser/firefox/mirror')) |
2992 | 721 | self.assertEqual(revision, remote_revision) | 721 | self.assertEqual(revision, remote_revision) |
2993 | @@ -724,7 +724,7 @@ class SmartserverTests(WithScenarios, SSHTestCase): | |||
2994 | 724 | # Users should be able to read mirrored branches even if they don't | 724 | # Users should be able to read mirrored branches even if they don't |
2995 | 725 | # own those branches. | 725 | # own those branches. |
2996 | 726 | ro_branch_url = self.makeMirroredBranch('mark', 'firefox', 'mirror') | 726 | ro_branch_url = self.makeMirroredBranch('mark', 'firefox', 'mirror') |
2998 | 727 | revision = bzrlib.branch.Branch.open(ro_branch_url).last_revision() | 727 | revision = breezy.branch.Branch.open(ro_branch_url).last_revision() |
2999 | 728 | remote_revision = self.getLastRevision( | 728 | remote_revision = self.getLastRevision( |
3000 | 729 | self.getTransportURL('~mark/firefox/mirror')) | 729 | self.getTransportURL('~mark/firefox/mirror')) |
3001 | 730 | self.assertEqual(revision, remote_revision) | 730 | self.assertEqual(revision, remote_revision) |
3002 | diff --git a/lib/lp/codehosting/tests/test_bzrlib.py b/lib/lp/codehosting/tests/test_breezy.py | |||
3003 | 731 | similarity index 58% | 731 | similarity index 58% |
3004 | 732 | rename from lib/lp/codehosting/tests/test_bzrlib.py | 732 | rename from lib/lp/codehosting/tests/test_bzrlib.py |
3005 | 733 | rename to lib/lp/codehosting/tests/test_breezy.py | 733 | rename to lib/lp/codehosting/tests/test_breezy.py |
3006 | index 35f44aa..c9cf83d 100644 | |||
3007 | --- a/lib/lp/codehosting/tests/test_bzrlib.py | |||
3008 | +++ b/lib/lp/codehosting/tests/test_breezy.py | |||
3009 | @@ -1,17 +1,17 @@ | |||
3010 | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the |
3011 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
3012 | 3 | 3 | ||
3014 | 4 | """Launchpad specific tests of bzrlib behaviour.""" | 4 | """Launchpad-specific tests of Breezy behaviour.""" |
3015 | 5 | 5 | ||
3016 | 6 | __metaclass__ = type | 6 | __metaclass__ = type |
3017 | 7 | 7 | ||
3018 | 8 | from lp.testing import TestCase | 8 | from lp.testing import TestCase |
3019 | 9 | 9 | ||
3020 | 10 | 10 | ||
3022 | 11 | class TestBzrlib(TestCase): | 11 | class TestBreezy(TestCase): |
3023 | 12 | def test_has_cextensions(self): | 12 | def test_has_cextensions(self): |
3025 | 13 | """Ensure Bazaar C extensions are being used.""" | 13 | """Ensure Breezy C extensions are being used.""" |
3026 | 14 | try: | 14 | try: |
3028 | 15 | import bzrlib._dirstate_helpers_pyx | 15 | import breezy.bzr._dirstate_helpers_pyx |
3029 | 16 | except ImportError: | 16 | except ImportError: |
3031 | 17 | self.fail("Bzr not built with C extensions.") | 17 | self.fail("Breezy not built with C extensions.") |
3032 | diff --git a/lib/lp/codehosting/tests/test_bzrutils.py b/lib/lp/codehosting/tests/test_bzrutils.py | |||
3033 | index e05c14d..a78d35f 100644 | |||
3034 | --- a/lib/lp/codehosting/tests/test_bzrutils.py | |||
3035 | +++ b/lib/lp/codehosting/tests/test_bzrutils.py | |||
3036 | @@ -8,20 +8,23 @@ __metaclass__ = type | |||
3037 | 8 | import gc | 8 | import gc |
3038 | 9 | import sys | 9 | import sys |
3039 | 10 | 10 | ||
3041 | 11 | from bzrlib import ( | 11 | from breezy import ( |
3042 | 12 | errors, | 12 | errors, |
3043 | 13 | trace, | 13 | trace, |
3044 | 14 | ) | 14 | ) |
3050 | 15 | from bzrlib.branch import Branch | 15 | from breezy.branch import ( |
3051 | 16 | from bzrlib.bzrdir import format_registry | 16 | Branch, |
3052 | 17 | from bzrlib.errors import AppendRevisionsOnlyViolation | 17 | UnstackableBranchFormat, |
3053 | 18 | from bzrlib.remote import RemoteBranch | 18 | ) |
3054 | 19 | from bzrlib.tests import ( | 19 | from breezy.bzr.remote import RemoteBranch |
3055 | 20 | from breezy.controldir import format_registry | ||
3056 | 21 | from breezy.errors import AppendRevisionsOnlyViolation | ||
3057 | 22 | from breezy.tests import ( | ||
3058 | 20 | test_server, | 23 | test_server, |
3059 | 21 | TestCaseWithTransport, | 24 | TestCaseWithTransport, |
3060 | 22 | TestNotApplicable, | 25 | TestNotApplicable, |
3061 | 23 | ) | 26 | ) |
3063 | 24 | from bzrlib.tests.per_branch import ( | 27 | from breezy.tests.per_branch import ( |
3064 | 25 | branch_scenarios, | 28 | branch_scenarios, |
3065 | 26 | TestCaseWithControlDir, | 29 | TestCaseWithControlDir, |
3066 | 27 | ) | 30 | ) |
3067 | @@ -80,14 +83,14 @@ class TestGetBranchStackedOnURL(WithScenarios, TestCaseWithControlDir): | |||
3068 | 80 | stacked_branch = self.make_branch('stacked') | 83 | stacked_branch = self.make_branch('stacked') |
3069 | 81 | try: | 84 | try: |
3070 | 82 | stacked_branch.set_stacked_on_url('../stacked-on') | 85 | stacked_branch.set_stacked_on_url('../stacked-on') |
3072 | 83 | except errors.UnstackableBranchFormat: | 86 | except UnstackableBranchFormat: |
3073 | 84 | raise TestNotApplicable('This format does not support stacking.') | 87 | raise TestNotApplicable('This format does not support stacking.') |
3074 | 85 | # Deleting the stacked-on branch ensures that Bazaar will raise an | 88 | # Deleting the stacked-on branch ensures that Bazaar will raise an |
3075 | 86 | # error if it tries to open the stacked-on branch. | 89 | # error if it tries to open the stacked-on branch. |
3076 | 87 | self.get_transport('.').delete_tree('stacked-on') | 90 | self.get_transport('.').delete_tree('stacked-on') |
3077 | 88 | self.assertEqual( | 91 | self.assertEqual( |
3078 | 89 | '../stacked-on', | 92 | '../stacked-on', |
3080 | 90 | get_branch_stacked_on_url(stacked_branch.bzrdir)) | 93 | get_branch_stacked_on_url(stacked_branch.controldir)) |
3081 | 91 | 94 | ||
3082 | 92 | def testGetBranchStackedOnUrlUnstackable(self): | 95 | def testGetBranchStackedOnUrlUnstackable(self): |
3083 | 93 | # get_branch_stacked_on_url raises UnstackableBranchFormat if it's | 96 | # get_branch_stacked_on_url raises UnstackableBranchFormat if it's |
3084 | @@ -97,11 +100,11 @@ class TestGetBranchStackedOnURL(WithScenarios, TestCaseWithControlDir): | |||
3085 | 97 | branch.get_stacked_on_url() | 100 | branch.get_stacked_on_url() |
3086 | 98 | except errors.NotStacked: | 101 | except errors.NotStacked: |
3087 | 99 | raise TestNotApplicable('This format supports stacked branches.') | 102 | raise TestNotApplicable('This format supports stacked branches.') |
3089 | 100 | except errors.UnstackableBranchFormat: | 103 | except UnstackableBranchFormat: |
3090 | 101 | pass | 104 | pass |
3091 | 102 | self.assertRaises( | 105 | self.assertRaises( |
3094 | 103 | errors.UnstackableBranchFormat, | 106 | UnstackableBranchFormat, |
3095 | 104 | get_branch_stacked_on_url, branch.bzrdir) | 107 | get_branch_stacked_on_url, branch.controldir) |
3096 | 105 | 108 | ||
3097 | 106 | def testGetBranchStackedOnUrlNotStacked(self): | 109 | def testGetBranchStackedOnUrlNotStacked(self): |
3098 | 107 | # get_branch_stacked_on_url raises NotStacked if it's called on the | 110 | # get_branch_stacked_on_url raises NotStacked if it's called on the |
3099 | @@ -111,16 +114,16 @@ class TestGetBranchStackedOnURL(WithScenarios, TestCaseWithControlDir): | |||
3100 | 111 | branch.get_stacked_on_url() | 114 | branch.get_stacked_on_url() |
3101 | 112 | except errors.NotStacked: | 115 | except errors.NotStacked: |
3102 | 113 | pass | 116 | pass |
3104 | 114 | except errors.UnstackableBranchFormat: | 117 | except UnstackableBranchFormat: |
3105 | 115 | raise TestNotApplicable( | 118 | raise TestNotApplicable( |
3106 | 116 | 'This format does not support stacked branches') | 119 | 'This format does not support stacked branches') |
3107 | 117 | self.assertRaises( | 120 | self.assertRaises( |
3109 | 118 | errors.NotStacked, get_branch_stacked_on_url, branch.bzrdir) | 121 | errors.NotStacked, get_branch_stacked_on_url, branch.controldir) |
3110 | 119 | 122 | ||
3111 | 120 | def testGetBranchStackedOnUrlNoBranch(self): | 123 | def testGetBranchStackedOnUrlNoBranch(self): |
3112 | 121 | # get_branch_stacked_on_url raises a NotBranchError if it's called on | 124 | # get_branch_stacked_on_url raises a NotBranchError if it's called on |
3113 | 122 | # a bzrdir that's not got a branch. | 125 | # a bzrdir that's not got a branch. |
3115 | 123 | a_bzrdir = self.make_bzrdir('source') | 126 | a_bzrdir = self.make_controldir('source') |
3116 | 124 | if a_bzrdir.has_branch(): | 127 | if a_bzrdir.has_branch(): |
3117 | 125 | raise TestNotApplicable( | 128 | raise TestNotApplicable( |
3118 | 126 | 'This format does not support branchless bzrdirs.') | 129 | 'This format does not support branchless bzrdirs.') |
3119 | diff --git a/lib/lp/codehosting/tests/test_format_comparison.py b/lib/lp/codehosting/tests/test_format_comparison.py | |||
3120 | index 0346af7..de06e64 100644 | |||
3121 | --- a/lib/lp/codehosting/tests/test_format_comparison.py | |||
3122 | +++ b/lib/lp/codehosting/tests/test_format_comparison.py | |||
3123 | @@ -45,7 +45,7 @@ class StubObjectWithFormat: | |||
3124 | 45 | class StubBranch: | 45 | class StubBranch: |
3125 | 46 | """A stub branch object that just has formats.""" | 46 | """A stub branch object that just has formats.""" |
3126 | 47 | def __init__(self, bzrdir_format, repo_format, branch_format): | 47 | def __init__(self, bzrdir_format, repo_format, branch_format): |
3128 | 48 | self.bzrdir = StubObjectWithFormat(bzrdir_format) | 48 | self.controldir = StubObjectWithFormat(bzrdir_format) |
3129 | 49 | self.repository = StubObjectWithFormat(repo_format) | 49 | self.repository = StubObjectWithFormat(repo_format) |
3130 | 50 | self._format = branch_format | 50 | self._format = branch_format |
3131 | 51 | 51 | ||
3132 | diff --git a/lib/lp/codehosting/tests/test_lpserve.py b/lib/lp/codehosting/tests/test_lpserve.py | |||
3133 | index 2655e7e..81294cc 100644 | |||
3134 | --- a/lib/lp/codehosting/tests/test_lpserve.py | |||
3135 | +++ b/lib/lp/codehosting/tests/test_lpserve.py | |||
3136 | @@ -5,10 +5,10 @@ | |||
3137 | 5 | 5 | ||
3138 | 6 | __metaclass__ = type | 6 | __metaclass__ = type |
3139 | 7 | 7 | ||
3144 | 8 | from bzrlib import errors | 8 | from breezy import errors |
3145 | 9 | from bzrlib.plugins.lpserve.test_lpserve import TestCaseWithSubprocess | 9 | from breezy.bzr.smart import medium |
3146 | 10 | from bzrlib.smart import medium | 10 | from breezy.plugins.lpserve.test_lpserve import TestCaseWithSubprocess |
3147 | 11 | from bzrlib.transport import remote | 11 | from breezy.transport import remote |
3148 | 12 | 12 | ||
3149 | 13 | from lp.testing.fixture import CaptureOops | 13 | from lp.testing.fixture import CaptureOops |
3150 | 14 | from lp.testing.layers import LaunchpadLayer | 14 | from lp.testing.layers import LaunchpadLayer |
3151 | @@ -112,8 +112,8 @@ class TestLaunchpadServe(TestCaseWithSubprocess): | |||
3152 | 112 | 112 | ||
3153 | 113 | 113 | ||
3154 | 114 | def test_suite(): | 114 | def test_suite(): |
3157 | 115 | from bzrlib import tests | 115 | from breezy import tests |
3158 | 116 | from bzrlib.plugins import lpserve | 116 | from breezy.plugins import lpserve |
3159 | 117 | 117 | ||
3160 | 118 | loader = tests.TestLoader() | 118 | loader = tests.TestLoader() |
3161 | 119 | suite = loader.loadTestsFromName(__name__) | 119 | suite = loader.loadTestsFromName(__name__) |
3162 | diff --git a/lib/lp/codehosting/tests/test_sftp.py b/lib/lp/codehosting/tests/test_sftp.py | |||
3163 | index 7539dd6..3ea1309 100644 | |||
3164 | --- a/lib/lp/codehosting/tests/test_sftp.py | |||
3165 | +++ b/lib/lp/codehosting/tests/test_sftp.py | |||
3166 | @@ -6,13 +6,13 @@ | |||
3167 | 6 | from contextlib import closing | 6 | from contextlib import closing |
3168 | 7 | import os | 7 | import os |
3169 | 8 | 8 | ||
3171 | 9 | from bzrlib import ( | 9 | from breezy import ( |
3172 | 10 | errors as bzr_errors, | 10 | errors as bzr_errors, |
3173 | 11 | urlutils, | 11 | urlutils, |
3174 | 12 | ) | 12 | ) |
3178 | 13 | from bzrlib.tests import TestCaseInTempDir | 13 | from breezy.tests import TestCaseInTempDir |
3179 | 14 | from bzrlib.transport import get_transport | 14 | from breezy.transport import get_transport |
3180 | 15 | from bzrlib.transport.memory import MemoryTransport | 15 | from breezy.transport.memory import MemoryTransport |
3181 | 16 | from lazr.sshserver.sftp import FileIsADirectory | 16 | from lazr.sshserver.sftp import FileIsADirectory |
3182 | 17 | from testtools.twistedsupport import ( | 17 | from testtools.twistedsupport import ( |
3183 | 18 | assert_fails_with, | 18 | assert_fails_with, |
3184 | @@ -70,7 +70,7 @@ class TestFatLocalTransport(TestCaseInTempDir): | |||
3185 | 70 | def test_writeChunk(self): | 70 | def test_writeChunk(self): |
3186 | 71 | # writeChunk writes a chunk of data to a file at a given offset. | 71 | # writeChunk writes a chunk of data to a file at a given offset. |
3187 | 72 | filename = 'foo' | 72 | filename = 'foo' |
3189 | 73 | self.transport.put_bytes(filename, 'content') | 73 | self.transport.put_bytes(filename, b'content') |
3190 | 74 | self.transport.writeChunk(filename, 1, 'razy') | 74 | self.transport.writeChunk(filename, 1, 'razy') |
3191 | 75 | self.assertEqual('crazynt', self.transport.get_bytes(filename)) | 75 | self.assertEqual('crazynt', self.transport.get_bytes(filename)) |
3192 | 76 | 76 | ||
3193 | @@ -612,7 +612,7 @@ class TestSFTPServer(TestCaseInTempDir, SFTPTestMixin): | |||
3194 | 612 | def test_openDirectoryMemory(self): | 612 | def test_openDirectoryMemory(self): |
3195 | 613 | """openDirectory works on MemoryTransport.""" | 613 | """openDirectory works on MemoryTransport.""" |
3196 | 614 | transport = MemoryTransport() | 614 | transport = MemoryTransport() |
3198 | 615 | transport.put_bytes('hello', 'hello') | 615 | transport.put_bytes('hello', b'hello') |
3199 | 616 | sftp_server = TransportSFTPServer(AsyncTransport(transport)) | 616 | sftp_server = TransportSFTPServer(AsyncTransport(transport)) |
3200 | 617 | deferred = sftp_server.openDirectory('.') | 617 | deferred = sftp_server.openDirectory('.') |
3201 | 618 | 618 | ||
3202 | diff --git a/lib/lp/codehosting/tests/test_upgrade.py b/lib/lp/codehosting/tests/test_upgrade.py | |||
3203 | index 8d53d28..3326d16 100644 | |||
3204 | --- a/lib/lp/codehosting/tests/test_upgrade.py | |||
3205 | +++ b/lib/lp/codehosting/tests/test_upgrade.py | |||
3206 | @@ -7,18 +7,16 @@ __metaclass__ = type | |||
3207 | 7 | import logging | 7 | import logging |
3208 | 8 | from os.path import dirname | 8 | from os.path import dirname |
3209 | 9 | 9 | ||
3217 | 10 | from bzrlib.branch import Branch | 10 | from breezy.branch import Branch |
3218 | 11 | from bzrlib.bzrdir import ( | 11 | from breezy.bzr.bzrdir import BzrDir |
3219 | 12 | BzrDir, | 12 | from breezy.bzr.groupcompress_repo import ( |
3213 | 13 | format_registry, | ||
3214 | 14 | ) | ||
3215 | 15 | from bzrlib.plugins.loom.branch import loomify | ||
3216 | 16 | from bzrlib.repofmt.groupcompress_repo import ( | ||
3220 | 17 | RepositoryFormat2a, | 13 | RepositoryFormat2a, |
3221 | 18 | RepositoryFormat2aSubtree, | 14 | RepositoryFormat2aSubtree, |
3222 | 19 | ) | 15 | ) |
3225 | 20 | from bzrlib.revision import NULL_REVISION | 16 | from breezy.controldir import format_registry |
3226 | 21 | from bzrlib.transport import get_transport | 17 | from breezy.plugins.loom.branch import loomify |
3227 | 18 | from breezy.revision import NULL_REVISION | ||
3228 | 19 | from breezy.transport import get_transport | ||
3229 | 22 | from fixtures import TempDir | 20 | from fixtures import TempDir |
3230 | 23 | 21 | ||
3231 | 24 | from lp.code.bzr import ( | 22 | from lp.code.bzr import ( |
3232 | @@ -51,7 +49,7 @@ class TestUpgrader(TestCaseWithFactory): | |||
3233 | 51 | 'foo', rev_id='prepare-commit', committer='jrandom@example.com') | 49 | 'foo', rev_id='prepare-commit', committer='jrandom@example.com') |
3234 | 52 | if loomify_branch: | 50 | if loomify_branch: |
3235 | 53 | loomify(tree.branch) | 51 | loomify(tree.branch) |
3237 | 54 | bzr_branch = tree.bzrdir.open_branch() | 52 | bzr_branch = tree.controldir.open_branch() |
3238 | 55 | else: | 53 | else: |
3239 | 56 | bzr_branch = tree.branch | 54 | bzr_branch = tree.branch |
3240 | 57 | return self.getUpgrader(bzr_branch, branch) | 55 | return self.getUpgrader(bzr_branch, branch) |
3241 | @@ -76,8 +74,8 @@ class TestUpgrader(TestCaseWithFactory): | |||
3242 | 76 | :param tree: A Bazaar WorkingTree to add a tree to. | 74 | :param tree: A Bazaar WorkingTree to add a tree to. |
3243 | 77 | """ | 75 | """ |
3244 | 78 | sub_branch = BzrDir.create_branch_convenience( | 76 | sub_branch = BzrDir.create_branch_convenience( |
3247 | 79 | tree.bzrdir.root_transport.clone('sub').base) | 77 | tree.controldir.root_transport.clone('sub').base) |
3248 | 80 | tree.add_reference(sub_branch.bzrdir.open_workingtree()) | 78 | tree.add_reference(sub_branch.controldir.open_workingtree()) |
3249 | 81 | tree.commit('added tree reference', committer='jrandom@example.com') | 79 | tree.commit('added tree reference', committer='jrandom@example.com') |
3250 | 82 | 80 | ||
3251 | 83 | def check_branch(self, upgraded, branch_format=BranchFormat.BZR_BRANCH_7, | 81 | def check_branch(self, upgraded, branch_format=BranchFormat.BZR_BRANCH_7, |
3252 | @@ -128,7 +126,7 @@ class TestUpgrader(TestCaseWithFactory): | |||
3253 | 128 | def test_subtree_format_repo_format(self): | 126 | def test_subtree_format_repo_format(self): |
3254 | 129 | """Even subtree formats use 2a if they don't have tree references.""" | 127 | """Even subtree formats use 2a if they don't have tree references.""" |
3255 | 130 | self.useBzrBranches(direct_database=True) | 128 | self.useBzrBranches(direct_database=True) |
3257 | 131 | format = format_registry.make_bzrdir('pack-0.92-subtree') | 129 | format = format_registry.make_controldir('pack-0.92-subtree') |
3258 | 132 | branch, tree = self.create_branch_and_tree(format=format) | 130 | branch, tree = self.create_branch_and_tree(format=format) |
3259 | 133 | upgrader = self.getUpgrader(tree.branch, branch) | 131 | upgrader = self.getUpgrader(tree.branch, branch) |
3260 | 134 | with read_locked(upgrader.bzr_branch): | 132 | with read_locked(upgrader.bzr_branch): |
3261 | @@ -139,7 +137,7 @@ class TestUpgrader(TestCaseWithFactory): | |||
3262 | 139 | def test_tree_reference_repo_format(self): | 137 | def test_tree_reference_repo_format(self): |
3263 | 140 | """Repos with tree references get 2aSubtree.""" | 138 | """Repos with tree references get 2aSubtree.""" |
3264 | 141 | self.useBzrBranches(direct_database=True) | 139 | self.useBzrBranches(direct_database=True) |
3266 | 142 | format = format_registry.make_bzrdir('pack-0.92-subtree') | 140 | format = format_registry.make_controldir('pack-0.92-subtree') |
3267 | 143 | branch, tree = self.create_branch_and_tree(format=format) | 141 | branch, tree = self.create_branch_and_tree(format=format) |
3268 | 144 | upgrader = self.getUpgrader(tree.branch, branch) | 142 | upgrader = self.getUpgrader(tree.branch, branch) |
3269 | 145 | self.addTreeReference(tree) | 143 | self.addTreeReference(tree) |
3270 | @@ -186,7 +184,7 @@ class TestUpgrader(TestCaseWithFactory): | |||
3271 | 186 | def test_has_tree_references(self): | 184 | def test_has_tree_references(self): |
3272 | 187 | """Detects whether repo contains actual tree references.""" | 185 | """Detects whether repo contains actual tree references.""" |
3273 | 188 | self.useBzrBranches(direct_database=True) | 186 | self.useBzrBranches(direct_database=True) |
3275 | 189 | format = format_registry.make_bzrdir('pack-0.92-subtree') | 187 | format = format_registry.make_controldir('pack-0.92-subtree') |
3276 | 190 | branch, tree = self.create_branch_and_tree(format=format) | 188 | branch, tree = self.create_branch_and_tree(format=format) |
3277 | 191 | upgrader = self.getUpgrader(tree.branch, branch) | 189 | upgrader = self.getUpgrader(tree.branch, branch) |
3278 | 192 | with read_locked(tree.branch.repository): | 190 | with read_locked(tree.branch.repository): |
3279 | @@ -198,11 +196,11 @@ class TestUpgrader(TestCaseWithFactory): | |||
3280 | 198 | def test_use_subtree_format_for_tree_references(self): | 196 | def test_use_subtree_format_for_tree_references(self): |
3281 | 199 | """Subtree references cause RepositoryFormat2aSubtree to be used.""" | 197 | """Subtree references cause RepositoryFormat2aSubtree to be used.""" |
3282 | 200 | self.useBzrBranches(direct_database=True) | 198 | self.useBzrBranches(direct_database=True) |
3284 | 201 | format = format_registry.make_bzrdir('pack-0.92-subtree') | 199 | format = format_registry.make_controldir('pack-0.92-subtree') |
3285 | 202 | branch, tree = self.create_branch_and_tree(format=format) | 200 | branch, tree = self.create_branch_and_tree(format=format) |
3286 | 203 | sub_branch = BzrDir.create_branch_convenience( | 201 | sub_branch = BzrDir.create_branch_convenience( |
3289 | 204 | tree.bzrdir.root_transport.clone('sub').base, format=format) | 202 | tree.controldir.root_transport.clone('sub').base, format=format) |
3290 | 205 | tree.add_reference(sub_branch.bzrdir.open_workingtree()) | 203 | tree.add_reference(sub_branch.controldir.open_workingtree()) |
3291 | 206 | tree.commit('added tree reference', committer='jrandom@example.org') | 204 | tree.commit('added tree reference', committer='jrandom@example.org') |
3292 | 207 | upgrader = self.getUpgrader(tree.branch, branch) | 205 | upgrader = self.getUpgrader(tree.branch, branch) |
3293 | 208 | with read_locked(tree.branch): | 206 | with read_locked(tree.branch): |
3294 | diff --git a/lib/lp/codehosting/upgrade.py b/lib/lp/codehosting/upgrade.py | |||
3295 | index 43e592f..2159871 100755 | |||
3296 | --- a/lib/lp/codehosting/upgrade.py | |||
3297 | +++ b/lib/lp/codehosting/upgrade.py | |||
3298 | @@ -18,18 +18,16 @@ import os | |||
3299 | 18 | from shutil import rmtree | 18 | from shutil import rmtree |
3300 | 19 | from tempfile import mkdtemp | 19 | from tempfile import mkdtemp |
3301 | 20 | 20 | ||
3308 | 21 | from bzrlib.bzrdir import ( | 21 | from breezy.bzr.bzrdir import BzrDir |
3309 | 22 | BzrDir, | 22 | from breezy.bzr.groupcompress_repo import RepositoryFormat2aSubtree |
3310 | 23 | format_registry, | 23 | from breezy.controldir import format_registry |
3311 | 24 | ) | 24 | from breezy.errors import UpToDateFormat |
3312 | 25 | from bzrlib.errors import UpToDateFormat | 25 | from breezy.plugins.loom import ( |
3307 | 26 | from bzrlib.plugins.loom import ( | ||
3313 | 27 | NotALoom, | 26 | NotALoom, |
3314 | 28 | require_loom_branch, | 27 | require_loom_branch, |
3315 | 29 | ) | 28 | ) |
3319 | 30 | from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2aSubtree | 29 | from breezy.upgrade import upgrade |
3320 | 31 | from bzrlib.upgrade import upgrade | 30 | from breezy.url_policy_open import ( |
3318 | 32 | from bzrlib.url_policy_open import ( | ||
3321 | 33 | BranchOpener, | 31 | BranchOpener, |
3322 | 34 | SingleSchemePolicy, | 32 | SingleSchemePolicy, |
3323 | 35 | ) | 33 | ) |
3324 | @@ -75,7 +73,7 @@ class Upgrader: | |||
3325 | 75 | :param branch: The bzr branch to upgrade | 73 | :param branch: The bzr branch to upgrade |
3326 | 76 | :return: A Metadir format instance. | 74 | :return: A Metadir format instance. |
3327 | 77 | """ | 75 | """ |
3329 | 78 | format = format_registry.make_bzrdir('2a') | 76 | format = format_registry.make_controldir('2a') |
3330 | 79 | try: | 77 | try: |
3331 | 80 | require_loom_branch(self.bzr_branch) | 78 | require_loom_branch(self.bzr_branch) |
3332 | 81 | except NotALoom: | 79 | except NotALoom: |
3333 | @@ -205,5 +203,5 @@ class Upgrader: | |||
3334 | 205 | def mirror_branch(self, bzr_branch, target_bd): | 203 | def mirror_branch(self, bzr_branch, target_bd): |
3335 | 206 | """Mirror the actual branch from a bzr_branch to a target bzrdir.""" | 204 | """Mirror the actual branch from a bzr_branch to a target bzrdir.""" |
3336 | 207 | target = target_bd.get_branch_transport(bzr_branch._format) | 205 | target = target_bd.get_branch_transport(bzr_branch._format) |
3338 | 208 | source = bzr_branch.bzrdir.get_branch_transport(bzr_branch._format) | 206 | source = bzr_branch.controldir.get_branch_transport(bzr_branch._format) |
3339 | 209 | source.copy_tree_to_transport(target) | 207 | source.copy_tree_to_transport(target) |
3340 | diff --git a/lib/lp/codehosting/vfs/branchfs.py b/lib/lp/codehosting/vfs/branchfs.py | |||
3341 | index a928855..92d4b3f 100644 | |||
3342 | --- a/lib/lp/codehosting/vfs/branchfs.py | |||
3343 | +++ b/lib/lp/codehosting/vfs/branchfs.py | |||
3344 | @@ -29,7 +29,7 @@ the `IBranchFileSystem` interface and passing what that returns to a | |||
3345 | 29 | `ITransportDispatch` object. | 29 | `ITransportDispatch` object. |
3346 | 30 | 30 | ||
3347 | 31 | We hook the `LaunchpadServer` into Bazaar by implementing a | 31 | We hook the `LaunchpadServer` into Bazaar by implementing a |
3349 | 32 | `AsyncVirtualTransport`, a `bzrlib.transport.Transport` that wraps all of its | 32 | `AsyncVirtualTransport`, a `breezy.transport.Transport` that wraps all of its |
3350 | 33 | operations so that they are translated by an object that implements | 33 | operations so that they are translated by an object that implements |
3351 | 34 | `translateVirtualPath`. See transport.py for more information. | 34 | `translateVirtualPath`. See transport.py for more information. |
3352 | 35 | 35 | ||
3353 | @@ -58,20 +58,18 @@ import os.path | |||
3354 | 58 | import sys | 58 | import sys |
3355 | 59 | import xmlrpclib | 59 | import xmlrpclib |
3356 | 60 | 60 | ||
3364 | 61 | from bzrlib import urlutils | 61 | from breezy import urlutils |
3365 | 62 | from bzrlib.bzrdir import ( | 62 | from breezy.bzr.bzrdir import BzrDir |
3366 | 63 | BzrDir, | 63 | from breezy.bzr.smart.request import jail_info |
3367 | 64 | BzrDirFormat, | 64 | from breezy.config import TransportConfig |
3368 | 65 | ) | 65 | from breezy.controldir import ControlDirFormat |
3369 | 66 | from bzrlib.config import TransportConfig | 66 | from breezy.errors import ( |
3363 | 67 | from bzrlib.errors import ( | ||
3370 | 68 | NoSuchFile, | 67 | NoSuchFile, |
3371 | 69 | PermissionDenied, | 68 | PermissionDenied, |
3372 | 70 | TransportNotPossible, | 69 | TransportNotPossible, |
3373 | 71 | ) | 70 | ) |
3377 | 72 | from bzrlib.smart.request import jail_info | 71 | from breezy.transport import get_transport |
3378 | 73 | from bzrlib.transport import get_transport | 72 | from breezy.transport.memory import MemoryServer |
3376 | 74 | from bzrlib.transport.memory import MemoryServer | ||
3379 | 75 | from lazr.uri import URI | 73 | from lazr.uri import URI |
3380 | 76 | import six | 74 | import six |
3381 | 77 | from twisted.internet import ( | 75 | from twisted.internet import ( |
3382 | @@ -224,7 +222,7 @@ class ITransportDispatch(Interface): | |||
3383 | 224 | 222 | ||
3384 | 225 | :return: A transport and a path on that transport that point to a | 223 | :return: A transport and a path on that transport that point to a |
3385 | 226 | place that matches the one described in transport_tuple. | 224 | place that matches the one described in transport_tuple. |
3387 | 227 | :rtype: (`bzrlib.transport.Transport`, str) | 225 | :rtype: (`breezy.transport.Transport`, str) |
3388 | 228 | """ | 226 | """ |
3389 | 229 | 227 | ||
3390 | 230 | 228 | ||
3391 | @@ -333,7 +331,7 @@ class TransportDispatch: | |||
3392 | 333 | transport = get_transport(memory_server.get_url()) | 331 | transport = get_transport(memory_server.get_url()) |
3393 | 334 | if default_stack_on == '': | 332 | if default_stack_on == '': |
3394 | 335 | return transport | 333 | return transport |
3396 | 336 | format = BzrDirFormat.get_default_format() | 334 | format = ControlDirFormat.get_default_format() |
3397 | 337 | bzrdir = format.initialize_on_transport(transport) | 335 | bzrdir = format.initialize_on_transport(transport) |
3398 | 338 | bzrdir.get_config().set_default_stack_on( | 336 | bzrdir.get_config().set_default_stack_on( |
3399 | 339 | urlutils.unescape(default_stack_on)) | 337 | urlutils.unescape(default_stack_on)) |
3400 | diff --git a/lib/lp/codehosting/vfs/tests/test_branchfs.py b/lib/lp/codehosting/vfs/tests/test_branchfs.py | |||
3401 | index 30c08d4..eba8732 100644 | |||
3402 | --- a/lib/lp/codehosting/vfs/tests/test_branchfs.py | |||
3403 | +++ b/lib/lp/codehosting/vfs/tests/test_branchfs.py | |||
3404 | @@ -12,29 +12,27 @@ from StringIO import StringIO | |||
3405 | 12 | import sys | 12 | import sys |
3406 | 13 | import xmlrpclib | 13 | import xmlrpclib |
3407 | 14 | 14 | ||
3414 | 15 | from bzrlib import errors | 15 | from breezy import errors |
3415 | 16 | from bzrlib.bzrdir import ( | 16 | from breezy.bzr.bzrdir import BzrDir |
3416 | 17 | BzrDir, | 17 | from breezy.controldir import format_registry |
3417 | 18 | format_registry, | 18 | from breezy.tests import ( |
3412 | 19 | ) | ||
3413 | 20 | from bzrlib.tests import ( | ||
3418 | 21 | TestCase as BzrTestCase, | 19 | TestCase as BzrTestCase, |
3419 | 22 | TestCaseInTempDir, | 20 | TestCaseInTempDir, |
3420 | 23 | TestCaseWithTransport, | 21 | TestCaseWithTransport, |
3421 | 24 | ) | 22 | ) |
3423 | 25 | from bzrlib.transport import ( | 23 | from breezy.transport import ( |
3424 | 26 | _get_protocol_handlers, | 24 | _get_protocol_handlers, |
3425 | 27 | get_transport, | 25 | get_transport, |
3426 | 28 | register_transport, | 26 | register_transport, |
3427 | 29 | Server, | 27 | Server, |
3428 | 30 | unregister_transport, | 28 | unregister_transport, |
3429 | 31 | ) | 29 | ) |
3432 | 32 | from bzrlib.transport.chroot import ChrootTransport | 30 | from breezy.transport.chroot import ChrootTransport |
3433 | 33 | from bzrlib.transport.memory import ( | 31 | from breezy.transport.memory import ( |
3434 | 34 | MemoryServer, | 32 | MemoryServer, |
3435 | 35 | MemoryTransport, | 33 | MemoryTransport, |
3436 | 36 | ) | 34 | ) |
3438 | 37 | from bzrlib.urlutils import ( | 35 | from breezy.urlutils import ( |
3439 | 38 | escape, | 36 | escape, |
3440 | 39 | local_path_to_url, | 37 | local_path_to_url, |
3441 | 40 | ) | 38 | ) |
3442 | @@ -142,7 +140,7 @@ class TestTransportDispatch(TestCase): | |||
3443 | 142 | default_stack_on='/~foo/bar/baz') | 140 | default_stack_on='/~foo/bar/baz') |
3444 | 143 | self.assertRaises( | 141 | self.assertRaises( |
3445 | 144 | errors.TransportNotPossible, | 142 | errors.TransportNotPossible, |
3447 | 145 | transport.put_bytes, '.bzr/control.conf', 'data') | 143 | transport.put_bytes, '.bzr/control.conf', b'data') |
3448 | 146 | 144 | ||
3449 | 147 | def test_control_conf_with_stacking(self): | 145 | def test_control_conf_with_stacking(self): |
3450 | 148 | transport = self.factory._makeControlTransport( | 146 | transport = self.factory._makeControlTransport( |
3451 | @@ -159,7 +157,7 @@ class TestTransportDispatch(TestCase): | |||
3452 | 159 | transport = self.factory._makeBranchTransport(id=5, writable=False) | 157 | transport = self.factory._makeBranchTransport(id=5, writable=False) |
3453 | 160 | self.assertRaises( | 158 | self.assertRaises( |
3454 | 161 | errors.TransportNotPossible, transport.put_bytes, | 159 | errors.TransportNotPossible, transport.put_bytes, |
3456 | 162 | '.bzr/README', 'data') | 160 | '.bzr/README', b'data') |
3457 | 163 | 161 | ||
3458 | 164 | def test_writable_implies_writable(self): | 162 | def test_writable_implies_writable(self): |
3459 | 165 | transport = self.factory._makeBranchTransport(id=5, writable=True) | 163 | transport = self.factory._makeBranchTransport(id=5, writable=True) |
3460 | @@ -559,7 +557,7 @@ class LaunchpadTransportTests: | |||
3461 | 559 | transport.put_bytes, | 557 | transport.put_bytes, |
3462 | 560 | '~%s/%s/.bzr/control.conf' % ( | 558 | '~%s/%s/.bzr/control.conf' % ( |
3463 | 561 | branch.owner.name, branch.product.name), | 559 | branch.owner.name, branch.product.name), |
3465 | 562 | 'hello nurse!') | 560 | b'hello nurse!') |
3466 | 563 | 561 | ||
3467 | 564 | def _makeOnBackingTransport(self, branch): | 562 | def _makeOnBackingTransport(self, branch): |
3468 | 565 | """Make directories for 'branch' on the backing transport. | 563 | """Make directories for 'branch' on the backing transport. |
3469 | @@ -578,7 +576,7 @@ class LaunchpadTransportTests: | |||
3470 | 578 | branch = self.factory.makeAnyBranch( | 576 | branch = self.factory.makeAnyBranch( |
3471 | 579 | branch_type=BranchType.HOSTED, owner=self.requester) | 577 | branch_type=BranchType.HOSTED, owner=self.requester) |
3472 | 580 | backing_transport = self._makeOnBackingTransport(branch) | 578 | backing_transport = self._makeOnBackingTransport(branch) |
3474 | 581 | backing_transport.put_bytes('hello.txt', 'Hello World!') | 579 | backing_transport.put_bytes('hello.txt', b'Hello World!') |
3475 | 582 | deferred = self._ensureDeferred( | 580 | deferred = self._ensureDeferred( |
3476 | 583 | transport.get_bytes, '%s/.bzr/hello.txt' % branch.unique_name) | 581 | transport.get_bytes, '%s/.bzr/hello.txt' % branch.unique_name) |
3477 | 584 | return deferred.addCallback(self.assertEqual, 'Hello World!') | 582 | return deferred.addCallback(self.assertEqual, 'Hello World!') |
3478 | @@ -589,7 +587,7 @@ class LaunchpadTransportTests: | |||
3479 | 589 | branch = self.factory.makeAnyBranch( | 587 | branch = self.factory.makeAnyBranch( |
3480 | 590 | branch_type=BranchType.HOSTED, owner=self.requester) | 588 | branch_type=BranchType.HOSTED, owner=self.requester) |
3481 | 591 | backing_transport = self._makeOnBackingTransport(branch) | 589 | backing_transport = self._makeOnBackingTransport(branch) |
3483 | 592 | backing_transport.put_bytes('hello.txt', 'Hello World!') | 590 | backing_transport.put_bytes('hello.txt', b'Hello World!') |
3484 | 593 | url = escape('%s/.bzr/hello.txt' % branch.unique_name) | 591 | url = escape('%s/.bzr/hello.txt' % branch.unique_name) |
3485 | 594 | transport = self.getTransport() | 592 | transport = self.getTransport() |
3486 | 595 | deferred = self._ensureDeferred(transport.get_bytes, url) | 593 | deferred = self._ensureDeferred(transport.get_bytes, url) |
3487 | @@ -601,7 +599,7 @@ class LaunchpadTransportTests: | |||
3488 | 601 | branch = self.factory.makeAnyBranch( | 599 | branch = self.factory.makeAnyBranch( |
3489 | 602 | branch_type=BranchType.HOSTED, owner=self.requester) | 600 | branch_type=BranchType.HOSTED, owner=self.requester) |
3490 | 603 | backing_transport = self._makeOnBackingTransport(branch) | 601 | backing_transport = self._makeOnBackingTransport(branch) |
3492 | 604 | data = 'Hello World!' | 602 | data = b'Hello World!' |
3493 | 605 | backing_transport.put_bytes('hello.txt', data) | 603 | backing_transport.put_bytes('hello.txt', data) |
3494 | 606 | transport = self.getTransport() | 604 | transport = self.getTransport() |
3495 | 607 | deferred = self._ensureDeferred( | 605 | deferred = self._ensureDeferred( |
3496 | @@ -622,7 +620,7 @@ class LaunchpadTransportTests: | |||
3497 | 622 | backing_transport = self._makeOnBackingTransport(branch) | 620 | backing_transport = self._makeOnBackingTransport(branch) |
3498 | 623 | deferred = self._ensureDeferred( | 621 | deferred = self._ensureDeferred( |
3499 | 624 | transport.put_bytes, | 622 | transport.put_bytes, |
3501 | 625 | '%s/.bzr/goodbye.txt' % branch.unique_name, "Goodbye") | 623 | '%s/.bzr/goodbye.txt' % branch.unique_name, b"Goodbye") |
3502 | 626 | 624 | ||
3503 | 627 | def check_bytes_written(ignored): | 625 | def check_bytes_written(ignored): |
3504 | 628 | self.assertEqual( | 626 | self.assertEqual( |
3505 | @@ -659,7 +657,7 @@ class LaunchpadTransportTests: | |||
3506 | 659 | branch = self.factory.makeAnyBranch( | 657 | branch = self.factory.makeAnyBranch( |
3507 | 660 | branch_type=BranchType.HOSTED, owner=self.requester) | 658 | branch_type=BranchType.HOSTED, owner=self.requester) |
3508 | 661 | backing_transport = self._makeOnBackingTransport(branch) | 659 | backing_transport = self._makeOnBackingTransport(branch) |
3510 | 662 | backing_transport.put_bytes('hello.txt', 'Hello World!') | 660 | backing_transport.put_bytes('hello.txt', b'Hello World!') |
3511 | 663 | transport = transport.clone('~%s' % branch.owner.name) | 661 | transport = transport.clone('~%s' % branch.owner.name) |
3512 | 664 | deferred = self._ensureDeferred( | 662 | deferred = self._ensureDeferred( |
3513 | 665 | transport.get_bytes, | 663 | transport.get_bytes, |
3514 | @@ -696,7 +694,7 @@ class LaunchpadTransportTests: | |||
3515 | 696 | branch = self.factory.makeAnyBranch( | 694 | branch = self.factory.makeAnyBranch( |
3516 | 697 | branch_type=BranchType.HOSTED, owner=self.requester) | 695 | branch_type=BranchType.HOSTED, owner=self.requester) |
3517 | 698 | backing_transport = self._makeOnBackingTransport(branch) | 696 | backing_transport = self._makeOnBackingTransport(branch) |
3519 | 699 | backing_transport.put_bytes('hello.txt', 'Hello World!') | 697 | backing_transport.put_bytes('hello.txt', b'Hello World!') |
3520 | 700 | 698 | ||
3521 | 701 | transport = self.getTransport().clone(branch.unique_name) | 699 | transport = self.getTransport().clone(branch.unique_name) |
3522 | 702 | 700 | ||
3523 | @@ -735,7 +733,7 @@ class LaunchpadTransportTests: | |||
3524 | 735 | branch = self.factory.makeAnyBranch( | 733 | branch = self.factory.makeAnyBranch( |
3525 | 736 | branch_type=BranchType.HOSTED, owner=self.requester) | 734 | branch_type=BranchType.HOSTED, owner=self.requester) |
3526 | 737 | backing_transport = self._makeOnBackingTransport(branch) | 735 | backing_transport = self._makeOnBackingTransport(branch) |
3528 | 738 | backing_transport.put_bytes('hello.txt', 'Hello World!') | 736 | backing_transport.put_bytes('hello.txt', b'Hello World!') |
3529 | 739 | transport = self.getTransport().clone(branch.unique_name) | 737 | transport = self.getTransport().clone(branch.unique_name) |
3530 | 740 | backing_transport = self.backing_transport.clone( | 738 | backing_transport = self.backing_transport.clone( |
3531 | 741 | branch_to_path(branch)) | 739 | branch_to_path(branch)) |
3532 | @@ -985,7 +983,7 @@ class TestBranchChangedNotification(TestCaseWithTransport): | |||
3533 | 985 | 983 | ||
3534 | 986 | def assertFormatStringsPassed(self, branch): | 984 | def assertFormatStringsPassed(self, branch): |
3535 | 987 | self.assertEqual(1, len(self._branch_changed_log)) | 985 | self.assertEqual(1, len(self._branch_changed_log)) |
3537 | 988 | control_string = branch.bzrdir._format.get_format_string() | 986 | control_string = branch.controldir._format.get_format_string() |
3538 | 989 | branch_string = branch._format.get_format_string() | 987 | branch_string = branch._format.get_format_string() |
3539 | 990 | repository_string = branch.repository._format.get_format_string() | 988 | repository_string = branch.repository._format.get_format_string() |
3540 | 991 | self.assertEqual( | 989 | self.assertEqual( |
3541 | @@ -1130,7 +1128,7 @@ class TestLaunchpadTransportReadOnly(BzrTestCase): | |||
3542 | 1130 | self.requester.id, codehosting_api, backing_transport) | 1128 | self.requester.id, codehosting_api, backing_transport) |
3543 | 1131 | self.lp_transport = get_transport(self.lp_server.get_url()) | 1129 | self.lp_transport = get_transport(self.lp_server.get_url()) |
3544 | 1132 | self.lp_transport.mkdir(os.path.dirname(self.writable_file)) | 1130 | self.lp_transport.mkdir(os.path.dirname(self.writable_file)) |
3546 | 1133 | self.lp_transport.put_bytes(self.writable_file, 'Hello World!') | 1131 | self.lp_transport.put_bytes(self.writable_file, b'Hello World!') |
3547 | 1134 | 1132 | ||
3548 | 1135 | def _setUpMemoryServer(self): | 1133 | def _setUpMemoryServer(self): |
3549 | 1136 | memory_server = MemoryServer() | 1134 | memory_server = MemoryServer() |
3550 | diff --git a/lib/lp/codehosting/vfs/tests/test_filesystem.py b/lib/lp/codehosting/vfs/tests/test_filesystem.py | |||
3551 | index 467ec2a..3e03e94 100644 | |||
3552 | --- a/lib/lp/codehosting/vfs/tests/test_filesystem.py | |||
3553 | +++ b/lib/lp/codehosting/vfs/tests/test_filesystem.py | |||
3554 | @@ -7,12 +7,12 @@ __metaclass__ = type | |||
3555 | 7 | 7 | ||
3556 | 8 | import stat | 8 | import stat |
3557 | 9 | 9 | ||
3564 | 10 | from bzrlib import errors | 10 | from breezy import errors |
3565 | 11 | from bzrlib.bzrdir import BzrDir | 11 | from breezy.bzr.bzrdir import BzrDir |
3566 | 12 | from bzrlib.tests import TestCaseWithTransport | 12 | from breezy.tests import TestCaseWithTransport |
3567 | 13 | from bzrlib.transport import get_transport | 13 | from breezy.transport import get_transport |
3568 | 14 | from bzrlib.transport.memory import MemoryTransport | 14 | from breezy.transport.memory import MemoryTransport |
3569 | 15 | from bzrlib.urlutils import escape | 15 | from breezy.urlutils import escape |
3570 | 16 | 16 | ||
3571 | 17 | from lp.code.interfaces.branchtarget import IBranchTarget | 17 | from lp.code.interfaces.branchtarget import IBranchTarget |
3572 | 18 | from lp.code.interfaces.codehosting import branch_id_alias | 18 | from lp.code.interfaces.codehosting import branch_id_alias |
3573 | @@ -218,7 +218,7 @@ class TestFilesystem(TestCaseWithTransport): | |||
3574 | 218 | transport.mkdir(branch_path) | 218 | transport.mkdir(branch_path) |
3575 | 219 | self.assertRaises( | 219 | self.assertRaises( |
3576 | 220 | errors.PermissionDenied, | 220 | errors.PermissionDenied, |
3578 | 221 | transport.put_bytes, '%s/README' % branch_path, 'Hello!') | 221 | transport.put_bytes, '%s/README' % branch_path, b'Hello!') |
3579 | 222 | 222 | ||
3580 | 223 | def test_rename_to_non_bzr_directory_fails(self): | 223 | def test_rename_to_non_bzr_directory_fails(self): |
3581 | 224 | # Users cannot create an allowed directory (e.g. '.bzr' or | 224 | # Users cannot create an allowed directory (e.g. '.bzr' or |
3582 | @@ -296,7 +296,7 @@ class TestFilesystem(TestCaseWithTransport): | |||
3583 | 296 | # unescape(path).encode('utf-8') != path. | 296 | # unescape(path).encode('utf-8') != path. |
3584 | 297 | path = '%41%42%43' | 297 | path = '%41%42%43' |
3585 | 298 | escaped_path = escape(path) | 298 | escaped_path = escape(path) |
3587 | 299 | content = 'content' | 299 | content = b'content' |
3588 | 300 | transport.put_bytes(escaped_path, content) | 300 | transport.put_bytes(escaped_path, content) |
3589 | 301 | 301 | ||
3590 | 302 | # We can use the escaped path to reach the file. | 302 | # We can use the escaped path to reach the file. |
3591 | diff --git a/lib/lp/codehosting/vfs/tests/test_transport.py b/lib/lp/codehosting/vfs/tests/test_transport.py | |||
3592 | index e4bc291..45c155a 100644 | |||
3593 | --- a/lib/lp/codehosting/vfs/tests/test_transport.py | |||
3594 | +++ b/lib/lp/codehosting/vfs/tests/test_transport.py | |||
3595 | @@ -5,14 +5,14 @@ | |||
3596 | 5 | 5 | ||
3597 | 6 | __metaclass__ = type | 6 | __metaclass__ = type |
3598 | 7 | 7 | ||
3601 | 8 | from bzrlib.tests import per_transport | 8 | from breezy.tests import per_transport |
3602 | 9 | from bzrlib.transport import ( | 9 | from breezy.transport import ( |
3603 | 10 | chroot, | 10 | chroot, |
3604 | 11 | get_transport, | 11 | get_transport, |
3605 | 12 | Transport, | 12 | Transport, |
3606 | 13 | ) | 13 | ) |
3609 | 14 | from bzrlib.transport.local import LocalTransport | 14 | from breezy.transport.local import LocalTransport |
3610 | 15 | from bzrlib.urlutils import local_path_to_url | 15 | from breezy.urlutils import local_path_to_url |
3611 | 16 | 16 | ||
3612 | 17 | from lp.codehosting.inmemory import InMemoryFrontend | 17 | from lp.codehosting.inmemory import InMemoryFrontend |
3613 | 18 | from lp.codehosting.tests.helpers import TestResultWrapper | 18 | from lp.codehosting.tests.helpers import TestResultWrapper |
3614 | diff --git a/lib/lp/codehosting/vfs/tests/test_transport_extensions.py b/lib/lp/codehosting/vfs/tests/test_transport_extensions.py | |||
3615 | index 31c07a1..56b587f 100644 | |||
3616 | --- a/lib/lp/codehosting/vfs/tests/test_transport_extensions.py | |||
3617 | +++ b/lib/lp/codehosting/vfs/tests/test_transport_extensions.py | |||
3618 | @@ -5,7 +5,7 @@ | |||
3619 | 5 | 5 | ||
3620 | 6 | __metaclass__ = type | 6 | __metaclass__ = type |
3621 | 7 | 7 | ||
3623 | 8 | from bzrlib.transport.memory import MemoryTransport | 8 | from breezy.transport.memory import MemoryTransport |
3624 | 9 | 9 | ||
3625 | 10 | from lp.codehosting.vfs.transport import get_readonly_transport | 10 | from lp.codehosting.vfs.transport import get_readonly_transport |
3626 | 11 | from lp.testing import TestCase | 11 | from lp.testing import TestCase |
3627 | diff --git a/lib/lp/codehosting/vfs/transport.py b/lib/lp/codehosting/vfs/transport.py | |||
3628 | index db67847..f53b49a 100644 | |||
3629 | --- a/lib/lp/codehosting/vfs/transport.py | |||
3630 | +++ b/lib/lp/codehosting/vfs/transport.py | |||
3631 | @@ -5,7 +5,7 @@ | |||
3632 | 5 | 5 | ||
3633 | 6 | The code hosting filesystem is implemented using Bazaar transports. This | 6 | The code hosting filesystem is implemented using Bazaar transports. This |
3634 | 7 | module contains utilities for implementing virtual filesystems using | 7 | module contains utilities for implementing virtual filesystems using |
3636 | 8 | bzrlib.transport classes. | 8 | breezy.transport classes. |
3637 | 9 | """ | 9 | """ |
3638 | 10 | 10 | ||
3639 | 11 | __metaclass__ = type | 11 | __metaclass__ = type |
3640 | @@ -19,14 +19,14 @@ __all__ = [ | |||
3641 | 19 | ] | 19 | ] |
3642 | 20 | 20 | ||
3643 | 21 | 21 | ||
3646 | 22 | from bzrlib import urlutils | 22 | from breezy import urlutils |
3647 | 23 | from bzrlib.errors import ( | 23 | from breezy.errors import ( |
3648 | 24 | BzrError, | 24 | BzrError, |
3649 | 25 | InProcessTransport, | 25 | InProcessTransport, |
3650 | 26 | NoSuchFile, | 26 | NoSuchFile, |
3651 | 27 | TransportNotPossible, | 27 | TransportNotPossible, |
3652 | 28 | ) | 28 | ) |
3654 | 29 | from bzrlib.transport import ( | 29 | from breezy.transport import ( |
3655 | 30 | chroot, | 30 | chroot, |
3656 | 31 | get_transport, | 31 | get_transport, |
3657 | 32 | register_transport, | 32 | register_transport, |
3658 | @@ -113,7 +113,7 @@ class AsyncVirtualTransport(Transport): | |||
3659 | 113 | This method is called as an errback by `_call`. Use it to translate | 113 | This method is called as an errback by `_call`. Use it to translate |
3660 | 114 | errors from the server into something that users of the transport | 114 | errors from the server into something that users of the transport |
3661 | 115 | might expect. This could include translating vfs-specific errors into | 115 | might expect. This could include translating vfs-specific errors into |
3663 | 116 | bzrlib errors (e.g. "couldn\'t translate" into `NoSuchFile`) or | 116 | breezy errors (e.g. "couldn\'t translate" into `NoSuchFile`) or |
3664 | 117 | translating underlying paths into virtual paths. | 117 | translating underlying paths into virtual paths. |
3665 | 118 | 118 | ||
3666 | 119 | :param failure: A `twisted.python.failure.Failure`. | 119 | :param failure: A `twisted.python.failure.Failure`. |
3667 | @@ -276,105 +276,105 @@ class SynchronousAdapter(Transport): | |||
3668 | 276 | return self._async_transport.set_segment_parameter(name, value) | 276 | return self._async_transport.set_segment_parameter(name, value) |
3669 | 277 | 277 | ||
3670 | 278 | def clone(self, offset=None): | 278 | def clone(self, offset=None): |
3672 | 279 | """See `bzrlib.transport.Transport`.""" | 279 | """See `breezy.transport.Transport`.""" |
3673 | 280 | cloned_async = self._async_transport.clone(offset) | 280 | cloned_async = self._async_transport.clone(offset) |
3674 | 281 | return SynchronousAdapter(cloned_async) | 281 | return SynchronousAdapter(cloned_async) |
3675 | 282 | 282 | ||
3676 | 283 | def external_url(self): | 283 | def external_url(self): |
3678 | 284 | """See `bzrlib.transport.Transport`.""" | 284 | """See `breezy.transport.Transport`.""" |
3679 | 285 | raise InProcessTransport(self) | 285 | raise InProcessTransport(self) |
3680 | 286 | 286 | ||
3681 | 287 | def abspath(self, relpath): | 287 | def abspath(self, relpath): |
3683 | 288 | """See `bzrlib.transport.Transport`.""" | 288 | """See `breezy.transport.Transport`.""" |
3684 | 289 | return self._async_transport.abspath(relpath) | 289 | return self._async_transport.abspath(relpath) |
3685 | 290 | 290 | ||
3686 | 291 | def append_file(self, relpath, f, mode=None): | 291 | def append_file(self, relpath, f, mode=None): |
3688 | 292 | """See `bzrlib.transport.Transport`.""" | 292 | """See `breezy.transport.Transport`.""" |
3689 | 293 | return extract_result( | 293 | return extract_result( |
3690 | 294 | self._async_transport.append_file(relpath, f, mode)) | 294 | self._async_transport.append_file(relpath, f, mode)) |
3691 | 295 | 295 | ||
3692 | 296 | def delete(self, relpath): | 296 | def delete(self, relpath): |
3694 | 297 | """See `bzrlib.transport.Transport`.""" | 297 | """See `breezy.transport.Transport`.""" |
3695 | 298 | return extract_result(self._async_transport.delete(relpath)) | 298 | return extract_result(self._async_transport.delete(relpath)) |
3696 | 299 | 299 | ||
3697 | 300 | def delete_tree(self, relpath): | 300 | def delete_tree(self, relpath): |
3699 | 301 | """See `bzrlib.transport.Transport`.""" | 301 | """See `breezy.transport.Transport`.""" |
3700 | 302 | return extract_result(self._async_transport.delete_tree(relpath)) | 302 | return extract_result(self._async_transport.delete_tree(relpath)) |
3701 | 303 | 303 | ||
3702 | 304 | def get(self, relpath): | 304 | def get(self, relpath): |
3704 | 305 | """See `bzrlib.transport.Transport`.""" | 305 | """See `breezy.transport.Transport`.""" |
3705 | 306 | return extract_result(self._async_transport.get(relpath)) | 306 | return extract_result(self._async_transport.get(relpath)) |
3706 | 307 | 307 | ||
3707 | 308 | def get_bytes(self, relpath): | 308 | def get_bytes(self, relpath): |
3709 | 309 | """See `bzrlib.transport.Transport`.""" | 309 | """See `breezy.transport.Transport`.""" |
3710 | 310 | return extract_result(self._async_transport.get_bytes(relpath)) | 310 | return extract_result(self._async_transport.get_bytes(relpath)) |
3711 | 311 | 311 | ||
3712 | 312 | def has(self, relpath): | 312 | def has(self, relpath): |
3714 | 313 | """See `bzrlib.transport.Transport`.""" | 313 | """See `breezy.transport.Transport`.""" |
3715 | 314 | return extract_result(self._async_transport.has(relpath)) | 314 | return extract_result(self._async_transport.has(relpath)) |
3716 | 315 | 315 | ||
3717 | 316 | def iter_files_recursive(self): | 316 | def iter_files_recursive(self): |
3719 | 317 | """See `bzrlib.transport.Transport`.""" | 317 | """See `breezy.transport.Transport`.""" |
3720 | 318 | return extract_result( | 318 | return extract_result( |
3721 | 319 | self._async_transport.iter_files_recursive()) | 319 | self._async_transport.iter_files_recursive()) |
3722 | 320 | 320 | ||
3723 | 321 | def listable(self): | 321 | def listable(self): |
3725 | 322 | """See `bzrlib.transport.Transport`.""" | 322 | """See `breezy.transport.Transport`.""" |
3726 | 323 | return extract_result(self._async_transport.listable()) | 323 | return extract_result(self._async_transport.listable()) |
3727 | 324 | 324 | ||
3728 | 325 | def list_dir(self, relpath): | 325 | def list_dir(self, relpath): |
3730 | 326 | """See `bzrlib.transport.Transport`.""" | 326 | """See `breezy.transport.Transport`.""" |
3731 | 327 | return extract_result(self._async_transport.list_dir(relpath)) | 327 | return extract_result(self._async_transport.list_dir(relpath)) |
3732 | 328 | 328 | ||
3733 | 329 | def lock_read(self, relpath): | 329 | def lock_read(self, relpath): |
3735 | 330 | """See `bzrlib.transport.Transport`.""" | 330 | """See `breezy.transport.Transport`.""" |
3736 | 331 | return extract_result(self._async_transport.lock_read(relpath)) | 331 | return extract_result(self._async_transport.lock_read(relpath)) |
3737 | 332 | 332 | ||
3738 | 333 | def lock_write(self, relpath): | 333 | def lock_write(self, relpath): |
3740 | 334 | """See `bzrlib.transport.Transport`.""" | 334 | """See `breezy.transport.Transport`.""" |
3741 | 335 | return extract_result(self._async_transport.lock_write(relpath)) | 335 | return extract_result(self._async_transport.lock_write(relpath)) |
3742 | 336 | 336 | ||
3743 | 337 | def mkdir(self, relpath, mode=None): | 337 | def mkdir(self, relpath, mode=None): |
3745 | 338 | """See `bzrlib.transport.Transport`.""" | 338 | """See `breezy.transport.Transport`.""" |
3746 | 339 | return extract_result(self._async_transport.mkdir(relpath, mode)) | 339 | return extract_result(self._async_transport.mkdir(relpath, mode)) |
3747 | 340 | 340 | ||
3748 | 341 | def open_write_stream(self, relpath, mode=None): | 341 | def open_write_stream(self, relpath, mode=None): |
3750 | 342 | """See `bzrlib.transport.Transport`.""" | 342 | """See `breezy.transport.Transport`.""" |
3751 | 343 | return extract_result( | 343 | return extract_result( |
3752 | 344 | self._async_transport.open_write_stream(relpath, mode)) | 344 | self._async_transport.open_write_stream(relpath, mode)) |
3753 | 345 | 345 | ||
3754 | 346 | def put_file(self, relpath, f, mode=None): | 346 | def put_file(self, relpath, f, mode=None): |
3756 | 347 | """See `bzrlib.transport.Transport`.""" | 347 | """See `breezy.transport.Transport`.""" |
3757 | 348 | return extract_result( | 348 | return extract_result( |
3758 | 349 | self._async_transport.put_file(relpath, f, mode)) | 349 | self._async_transport.put_file(relpath, f, mode)) |
3759 | 350 | 350 | ||
3760 | 351 | def local_realPath(self, relpath): | 351 | def local_realPath(self, relpath): |
3762 | 352 | """See `bzrlib.transport.Transport`.""" | 352 | """See `lp.codehosting.sftp.FatLocalTransport`.""" |
3763 | 353 | return extract_result( | 353 | return extract_result( |
3764 | 354 | self._async_transport.local_realPath(relpath)) | 354 | self._async_transport.local_realPath(relpath)) |
3765 | 355 | 355 | ||
3766 | 356 | def readv(self, relpath, offsets, adjust_for_latency=False, | 356 | def readv(self, relpath, offsets, adjust_for_latency=False, |
3767 | 357 | upper_limit=None): | 357 | upper_limit=None): |
3769 | 358 | """See `bzrlib.transport.Transport`.""" | 358 | """See `breezy.transport.Transport`.""" |
3770 | 359 | return extract_result( | 359 | return extract_result( |
3771 | 360 | self._async_transport.readv( | 360 | self._async_transport.readv( |
3772 | 361 | relpath, offsets, adjust_for_latency, upper_limit)) | 361 | relpath, offsets, adjust_for_latency, upper_limit)) |
3773 | 362 | 362 | ||
3774 | 363 | def rename(self, rel_from, rel_to): | 363 | def rename(self, rel_from, rel_to): |
3776 | 364 | """See `bzrlib.transport.Transport`.""" | 364 | """See `breezy.transport.Transport`.""" |
3777 | 365 | return extract_result( | 365 | return extract_result( |
3778 | 366 | self._async_transport.rename(rel_from, rel_to)) | 366 | self._async_transport.rename(rel_from, rel_to)) |
3779 | 367 | 367 | ||
3780 | 368 | def rmdir(self, relpath): | 368 | def rmdir(self, relpath): |
3782 | 369 | """See `bzrlib.transport.Transport`.""" | 369 | """See `breezy.transport.Transport`.""" |
3783 | 370 | return extract_result(self._async_transport.rmdir(relpath)) | 370 | return extract_result(self._async_transport.rmdir(relpath)) |
3784 | 371 | 371 | ||
3785 | 372 | def stat(self, relpath): | 372 | def stat(self, relpath): |
3787 | 373 | """See `bzrlib.transport.Transport`.""" | 373 | """See `breezy.transport.Transport`.""" |
3788 | 374 | return extract_result(self._async_transport.stat(relpath)) | 374 | return extract_result(self._async_transport.stat(relpath)) |
3789 | 375 | 375 | ||
3790 | 376 | def writeChunk(self, relpath, offset, data): | 376 | def writeChunk(self, relpath, offset, data): |
3792 | 377 | """See `bzrlib.transport.Transport`.""" | 377 | """See `lp.codehosting.sftp.FatLocalTransport`.""" |
3793 | 378 | return extract_result( | 378 | return extract_result( |
3794 | 379 | self._async_transport.writeChunk(relpath, offset, data)) | 379 | self._async_transport.writeChunk(relpath, offset, data)) |
3795 | 380 | 380 | ||
3796 | @@ -394,7 +394,7 @@ class AsyncVirtualServer(Server): | |||
3797 | 394 | 394 | ||
3798 | 395 | :param scheme: The URL scheme to use. | 395 | :param scheme: The URL scheme to use. |
3799 | 396 | """ | 396 | """ |
3801 | 397 | # bzrlib's Server class does not have a constructor, so we cannot | 397 | # breezy's Server class does not have a constructor, so we cannot |
3802 | 398 | # safely upcall it. | 398 | # safely upcall it. |
3803 | 399 | self._scheme = scheme | 399 | self._scheme = scheme |
3804 | 400 | self._is_started = False | 400 | self._is_started = False |
3805 | diff --git a/lib/lp/scripts/runlaunchpad.py b/lib/lp/scripts/runlaunchpad.py | |||
3806 | index 60332e6..b66e26f 100644 | |||
3807 | --- a/lib/lp/scripts/runlaunchpad.py | |||
3808 | +++ b/lib/lp/scripts/runlaunchpad.py | |||
3809 | @@ -202,13 +202,13 @@ class ForkingSessionService(Service): | |||
3810 | 202 | # service. | 202 | # service. |
3811 | 203 | if not self.should_launch: | 203 | if not self.should_launch: |
3812 | 204 | return | 204 | return |
3815 | 205 | from lp.codehosting import get_bzr_path | 205 | from lp.codehosting import get_brz_path |
3816 | 206 | command = [config.root + '/bin/py', get_bzr_path(), | 206 | command = [config.root + '/bin/py', get_brz_path(), |
3817 | 207 | 'launchpad-forking-service', | 207 | 'launchpad-forking-service', |
3818 | 208 | '--path', config.codehosting.forking_daemon_socket, | 208 | '--path', config.codehosting.forking_daemon_socket, |
3819 | 209 | ] | 209 | ] |
3820 | 210 | env = dict(os.environ) | 210 | env = dict(os.environ) |
3822 | 211 | env['BZR_PLUGIN_PATH'] = config.root + '/bzrplugins' | 211 | env['BRZ_PLUGIN_PATH'] = config.root + '/brzplugins' |
3823 | 212 | logfile = self.logfile | 212 | logfile = self.logfile |
3824 | 213 | if logfile == '-': | 213 | if logfile == '-': |
3825 | 214 | # This process uses a different logging infrastructure from the | 214 | # This process uses a different logging infrastructure from the |
3826 | @@ -216,7 +216,7 @@ class ForkingSessionService(Service): | |||
3827 | 216 | # as the logfile. So we just ignore this setting. | 216 | # as the logfile. So we just ignore this setting. |
3828 | 217 | pass | 217 | pass |
3829 | 218 | else: | 218 | else: |
3831 | 219 | env['BZR_LOG'] = logfile | 219 | env['BRZ_LOG'] = logfile |
3832 | 220 | process = subprocess.Popen(command, env=env, stdin=subprocess.PIPE) | 220 | process = subprocess.Popen(command, env=env, stdin=subprocess.PIPE) |
3833 | 221 | self.addCleanup(stop_process, process) | 221 | self.addCleanup(stop_process, process) |
3834 | 222 | process.stdin.close() | 222 | process.stdin.close() |
3835 | diff --git a/lib/lp/testing/__init__.py b/lib/lp/testing/__init__.py | |||
3836 | index f4277be..c3cf774 100644 | |||
3837 | --- a/lib/lp/testing/__init__.py | |||
3838 | +++ b/lib/lp/testing/__init__.py | |||
3839 | @@ -81,12 +81,13 @@ import tempfile | |||
3840 | 81 | import time | 81 | import time |
3841 | 82 | import unittest | 82 | import unittest |
3842 | 83 | 83 | ||
3846 | 84 | from bzrlib import trace | 84 | from breezy import trace |
3847 | 85 | from bzrlib.bzrdir import ( | 85 | from breezy.controldir import ( |
3848 | 86 | BzrDir, | 86 | ControlDir, |
3849 | 87 | format_registry, | 87 | format_registry, |
3850 | 88 | ) | 88 | ) |
3852 | 89 | from bzrlib.transport import get_transport | 89 | from breezy.transport import get_transport |
3853 | 90 | from bzrlib import trace as bzr_trace | ||
3854 | 90 | import fixtures | 91 | import fixtures |
3855 | 91 | from lazr.restful.testing.tales import test_tales | 92 | from lazr.restful.testing.tales import test_tales |
3856 | 92 | from lazr.restful.testing.webservice import FakeRequest | 93 | from lazr.restful.testing.webservice import FakeRequest |
3857 | @@ -846,11 +847,12 @@ class TestCaseWithFactory(TestCase): | |||
3858 | 846 | self._use_bzr_branch_called = False | 847 | self._use_bzr_branch_called = False |
3859 | 847 | # XXX: JonathanLange 2010-12-24 bug=694140: Because of Launchpad's | 848 | # XXX: JonathanLange 2010-12-24 bug=694140: Because of Launchpad's |
3860 | 848 | # messing with global log state (see | 849 | # messing with global log state (see |
3864 | 849 | # lp.services.scripts.logger), trace._bzr_logger does not | 850 | # lp.services.scripts.logger), trace._brz_logger does not |
3865 | 850 | # necessarily equal logging.getLogger('bzr'), so we have to explicitly | 851 | # necessarily equal logging.getLogger('brz'), so we have to explicitly |
3866 | 851 | # make it so in order to avoid "No handlers for "bzr" logger' | 852 | # make it so in order to avoid "No handlers for "brz" logger' |
3867 | 852 | # messages. | 853 | # messages. |
3869 | 853 | trace._bzr_logger = logging.getLogger('bzr') | 854 | trace._brz_logger = logging.getLogger('brz') |
3870 | 855 | bzr_trace._bzr_logger = logging.getLogger('bzr') | ||
3871 | 854 | 856 | ||
3872 | 855 | def getUserBrowser(self, url=None, user=None): | 857 | def getUserBrowser(self, url=None, user=None): |
3873 | 856 | """Return a Browser logged in as a fresh user, maybe opened at `url`. | 858 | """Return a Browser logged in as a fresh user, maybe opened at `url`. |
3874 | @@ -887,8 +889,7 @@ class TestCaseWithFactory(TestCase): | |||
3875 | 887 | """ | 889 | """ |
3876 | 888 | if format is not None and isinstance(format, basestring): | 890 | if format is not None and isinstance(format, basestring): |
3877 | 889 | format = format_registry.get(format)() | 891 | format = format_registry.get(format)() |
3880 | 890 | return BzrDir.create_branch_convenience( | 892 | return ControlDir.create_branch_convenience(branch_url, format=format) |
3879 | 891 | branch_url, format=format) | ||
3881 | 892 | 893 | ||
3882 | 893 | def create_branch_and_tree(self, tree_location=None, product=None, | 894 | def create_branch_and_tree(self, tree_location=None, product=None, |
3883 | 894 | db_branch=None, format=None, | 895 | db_branch=None, format=None, |
3884 | @@ -948,6 +949,7 @@ class TestCaseWithFactory(TestCase): | |||
3885 | 948 | self.useTempDir() | 949 | self.useTempDir() |
3886 | 949 | # Avoid leaking local user configuration into tests. | 950 | # Avoid leaking local user configuration into tests. |
3887 | 950 | self.useContext(override_environ( | 951 | self.useContext(override_environ( |
3888 | 952 | BRZ_HOME=os.getcwd(), BRZ_EMAIL=None, | ||
3889 | 951 | BZR_HOME=os.getcwd(), BZR_EMAIL=None, EMAIL=None, | 953 | BZR_HOME=os.getcwd(), BZR_EMAIL=None, EMAIL=None, |
3890 | 952 | )) | 954 | )) |
3891 | 953 | 955 | ||
3892 | @@ -1405,7 +1407,7 @@ def map_branch_contents(branch): | |||
3893 | 1405 | for entry in entries: | 1407 | for entry in entries: |
3894 | 1406 | file_path, file_name, file_type = entry[:3] | 1408 | file_path, file_name, file_type = entry[:3] |
3895 | 1407 | if file_type == 'file': | 1409 | if file_type == 'file': |
3897 | 1408 | stored_file = tree.get_file_by_path(file_path) | 1410 | stored_file = tree.get_file(file_path) |
3898 | 1409 | contents[file_path] = stored_file.read() | 1411 | contents[file_path] = stored_file.read() |
3899 | 1410 | finally: | 1412 | finally: |
3900 | 1411 | tree.unlock() | 1413 | tree.unlock() |
3901 | diff --git a/lib/lp/testing/factory.py b/lib/lp/testing/factory.py | |||
3902 | index f0310f3..a03bdfd 100644 | |||
3903 | --- a/lib/lp/testing/factory.py | |||
3904 | +++ b/lib/lp/testing/factory.py | |||
3905 | @@ -46,8 +46,8 @@ from types import InstanceType | |||
3906 | 46 | import uuid | 46 | import uuid |
3907 | 47 | import warnings | 47 | import warnings |
3908 | 48 | 48 | ||
3911 | 49 | from bzrlib.plugins.builder.recipe import BaseRecipeBranch | 49 | from breezy.plugins.builder.recipe import BaseRecipeBranch |
3912 | 50 | from bzrlib.revision import Revision as BzrRevision | 50 | from breezy.revision import Revision as BzrRevision |
3913 | 51 | from cryptography.utils import int_to_bytes | 51 | from cryptography.utils import int_to_bytes |
3914 | 52 | from lazr.jobrunner.jobrunner import SuspendJobException | 52 | from lazr.jobrunner.jobrunner import SuspendJobException |
3915 | 53 | import pytz | 53 | import pytz |
3916 | @@ -3036,7 +3036,7 @@ class BareLaunchpadObjectFactory(ObjectFactory): | |||
3917 | 3036 | If no branches are passed, return a recipe text that references an | 3036 | If no branches are passed, return a recipe text that references an |
3918 | 3037 | arbitrary branch. | 3037 | arbitrary branch. |
3919 | 3038 | """ | 3038 | """ |
3921 | 3039 | from bzrlib.plugins.builder.recipe import RecipeParser | 3039 | from breezy.plugins.builder.recipe import RecipeParser |
3922 | 3040 | parser = RecipeParser(self.makeRecipeText(*branches)) | 3040 | parser = RecipeParser(self.makeRecipeText(*branches)) |
3923 | 3041 | return parser.parse() | 3041 | return parser.parse() |
3924 | 3042 | 3042 | ||
3925 | diff --git a/lib/lp/translations/browser/productseries.py b/lib/lp/translations/browser/productseries.py | |||
3926 | index a5a6588..499e515 100644 | |||
3927 | --- a/lib/lp/translations/browser/productseries.py | |||
3928 | +++ b/lib/lp/translations/browser/productseries.py | |||
3929 | @@ -18,7 +18,7 @@ __all__ = [ | |||
3930 | 18 | 18 | ||
3931 | 19 | import os.path | 19 | import os.path |
3932 | 20 | 20 | ||
3934 | 21 | from bzrlib.revision import NULL_REVISION | 21 | from breezy.revision import NULL_REVISION |
3935 | 22 | from zope.component import getUtility | 22 | from zope.component import getUtility |
3936 | 23 | from zope.publisher.browser import FileUpload | 23 | from zope.publisher.browser import FileUpload |
3937 | 24 | 24 | ||
3938 | diff --git a/lib/lp/translations/pottery/detect_intltool.py b/lib/lp/translations/pottery/detect_intltool.py | |||
3939 | index ae7d8e3..81eb352 100644 | |||
3940 | --- a/lib/lp/translations/pottery/detect_intltool.py | |||
3941 | +++ b/lib/lp/translations/pottery/detect_intltool.py | |||
3942 | @@ -26,7 +26,7 @@ def is_intltool_structure(tree): | |||
3943 | 26 | 26 | ||
3944 | 27 | Currently this just checks for the existence of POTFILES.in. | 27 | Currently this just checks for the existence of POTFILES.in. |
3945 | 28 | 28 | ||
3947 | 29 | :param tree: A bzrlib.Tree object to search for the intltool structure. | 29 | :param tree: A breezy.Tree object to search for the intltool structure. |
3948 | 30 | :returns: True if signs of an intltool structure were found. | 30 | :returns: True if signs of an intltool structure were found. |
3949 | 31 | """ | 31 | """ |
3950 | 32 | with read_lock_tree(tree): | 32 | with read_lock_tree(tree): |
3951 | diff --git a/lib/lp/translations/pottery/tests/test_detect_intltool.py b/lib/lp/translations/pottery/tests/test_detect_intltool.py | |||
3952 | index 152fb8a..cc0d5d7 100644 | |||
3953 | --- a/lib/lp/translations/pottery/tests/test_detect_intltool.py | |||
3954 | +++ b/lib/lp/translations/pottery/tests/test_detect_intltool.py | |||
3955 | @@ -7,7 +7,7 @@ import errno | |||
3956 | 7 | import os | 7 | import os |
3957 | 8 | import tarfile | 8 | import tarfile |
3958 | 9 | 9 | ||
3960 | 10 | from bzrlib.bzrdir import BzrDir | 10 | from breezy.controldir import ControlDir |
3961 | 11 | 11 | ||
3962 | 12 | from lp.testing import TestCase | 12 | from lp.testing import TestCase |
3963 | 13 | from lp.translations.pottery.detect_intltool import is_intltool_structure | 13 | from lp.translations.pottery.detect_intltool import is_intltool_structure |
3964 | @@ -56,7 +56,7 @@ class SetupTestPackageMixin: | |||
3965 | 56 | class TestDetectIntltoolInBzrTree(TestCase, SetupTestPackageMixin): | 56 | class TestDetectIntltoolInBzrTree(TestCase, SetupTestPackageMixin): |
3966 | 57 | 57 | ||
3967 | 58 | def prepare_tree(self): | 58 | def prepare_tree(self): |
3969 | 59 | return BzrDir.create_standalone_workingtree(".") | 59 | return ControlDir.create_standalone_workingtree(".") |
3970 | 60 | 60 | ||
3971 | 61 | def test_detect_intltool_structure(self): | 61 | def test_detect_intltool_structure(self): |
3972 | 62 | # Detect a simple intltool structure. | 62 | # Detect a simple intltool structure. |
3973 | diff --git a/lib/lp/translations/scripts/tests/test_translations_to_branch.py b/lib/lp/translations/scripts/tests/test_translations_to_branch.py | |||
3974 | index ec201fe..248b2e0 100644 | |||
3975 | --- a/lib/lp/translations/scripts/tests/test_translations_to_branch.py | |||
3976 | +++ b/lib/lp/translations/scripts/tests/test_translations_to_branch.py | |||
3977 | @@ -7,7 +7,7 @@ import datetime | |||
3978 | 7 | import re | 7 | import re |
3979 | 8 | from textwrap import dedent | 8 | from textwrap import dedent |
3980 | 9 | 9 | ||
3982 | 10 | from bzrlib.errors import NotBranchError | 10 | from breezy.errors import NotBranchError |
3983 | 11 | import pytz | 11 | import pytz |
3984 | 12 | from testtools.matchers import MatchesRegex | 12 | from testtools.matchers import MatchesRegex |
3985 | 13 | import transaction | 13 | import transaction |
3986 | @@ -193,7 +193,7 @@ class TestExportTranslationsToBranch(TestCaseWithFactory): | |||
3987 | 193 | self.assertTrue("GruesomeException" in message) | 193 | self.assertTrue("GruesomeException" in message) |
3988 | 194 | 194 | ||
3989 | 195 | def test_exportToBranches_handles_unpushed_branches(self): | 195 | def test_exportToBranches_handles_unpushed_branches(self): |
3991 | 196 | # bzrlib raises NotBranchError when accessing a nonexistent | 196 | # breezy raises NotBranchError when accessing a nonexistent |
3992 | 197 | # branch. The exporter deals with that by calling | 197 | # branch. The exporter deals with that by calling |
3993 | 198 | # _handleUnpushedBranch. | 198 | # _handleUnpushedBranch. |
3994 | 199 | exporter = ExportTranslationsToBranch(test_args=[]) | 199 | exporter = ExportTranslationsToBranch(test_args=[]) |
3995 | diff --git a/lib/lp/translations/scripts/translations_to_branch.py b/lib/lp/translations/scripts/translations_to_branch.py | |||
3996 | index 973b45f..5f7a64f 100644 | |||
3997 | --- a/lib/lp/translations/scripts/translations_to_branch.py | |||
3998 | +++ b/lib/lp/translations/scripts/translations_to_branch.py | |||
3999 | @@ -17,8 +17,8 @@ import os.path | |||
4000 | 17 | # line below this comment. | 17 | # line below this comment. |
4001 | 18 | import lp.codehosting | 18 | import lp.codehosting |
4002 | 19 | 19 | ||
4005 | 20 | from bzrlib.errors import NotBranchError | 20 | from breezy.errors import NotBranchError |
4006 | 21 | from bzrlib.revision import NULL_REVISION | 21 | from breezy.revision import NULL_REVISION |
4007 | 22 | import pytz | 22 | import pytz |
4008 | 23 | from storm.expr import ( | 23 | from storm.expr import ( |
4009 | 24 | And, | 24 | And, |
4010 | diff --git a/lib/lp/translations/tests/test_rosetta_branches_script.py b/lib/lp/translations/tests/test_rosetta_branches_script.py | |||
4011 | index 1d332d4..1d140cd 100644 | |||
4012 | --- a/lib/lp/translations/tests/test_rosetta_branches_script.py | |||
4013 | +++ b/lib/lp/translations/tests/test_rosetta_branches_script.py | |||
4014 | @@ -9,7 +9,7 @@ provisions to handle Bazaar branches. | |||
4015 | 9 | 9 | ||
4016 | 10 | __metaclass__ = type | 10 | __metaclass__ = type |
4017 | 11 | 11 | ||
4019 | 12 | from bzrlib.revision import NULL_REVISION | 12 | from breezy.revision import NULL_REVISION |
4020 | 13 | import transaction | 13 | import transaction |
4021 | 14 | from zope.component import getUtility | 14 | from zope.component import getUtility |
4022 | 15 | 15 | ||
4023 | @@ -43,11 +43,11 @@ class TestRosettaBranchesScript(TestCaseWithFactory): | |||
4024 | 43 | self.useBzrBranches() | 43 | self.useBzrBranches() |
4025 | 44 | pot_content = self.factory.getUniqueString() | 44 | pot_content = self.factory.getUniqueString() |
4026 | 45 | branch, tree = self.create_branch_and_tree() | 45 | branch, tree = self.create_branch_and_tree() |
4028 | 46 | tree.bzrdir.root_transport.put_bytes(pot_path, pot_content) | 46 | tree.controldir.root_transport.put_bytes(pot_path, pot_content) |
4029 | 47 | tree.add(pot_path) | 47 | tree.add(pot_path) |
4030 | 48 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is | 48 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
4031 | 49 | # required to generate the revision-id. | 49 | # required to generate the revision-id. |
4033 | 50 | with override_environ(BZR_EMAIL='me@example.com'): | 50 | with override_environ(BRZ_EMAIL='me@example.com'): |
4034 | 51 | revision_id = tree.commit("first commit") | 51 | revision_id = tree.commit("first commit") |
4035 | 52 | branch.last_scanned_id = revision_id | 52 | branch.last_scanned_id = revision_id |
4036 | 53 | branch.last_mirrored_id = revision_id | 53 | branch.last_mirrored_id = revision_id |
4037 | diff --git a/lib/lp_sitecustomize.py b/lib/lp_sitecustomize.py | |||
4038 | index 67c0030..d23cd74 100644 | |||
4039 | --- a/lib/lp_sitecustomize.py | |||
4040 | +++ b/lib/lp_sitecustomize.py | |||
4041 | @@ -77,11 +77,12 @@ def silence_amqp_logger(): | |||
4042 | 77 | amqp_logger.propagate = False | 77 | amqp_logger.propagate = False |
4043 | 78 | 78 | ||
4044 | 79 | 79 | ||
4050 | 80 | def silence_bzr_logger(): | 80 | def silence_bzr_loggers(): |
4051 | 81 | """Install the NullHandler on the bzr logger to silence logs.""" | 81 | """Install the NullHandler on the bzr/brz loggers to silence logs.""" |
4052 | 82 | bzr_logger = logging.getLogger('bzr') | 82 | for logger_name in ('bzr', 'brz'): |
4053 | 83 | bzr_logger.addHandler(logging.NullHandler()) | 83 | logger = logging.getLogger(logger_name) |
4054 | 84 | bzr_logger.propagate = False | 84 | logger.addHandler(logging.NullHandler()) |
4055 | 85 | logger.propagate = False | ||
4056 | 85 | 86 | ||
4057 | 86 | 87 | ||
4058 | 87 | def silence_swiftclient_logger(): | 88 | def silence_swiftclient_logger(): |
4059 | @@ -154,7 +155,7 @@ def customize_logger(): | |||
4060 | 154 | logging between tests. | 155 | logging between tests. |
4061 | 155 | """ | 156 | """ |
4062 | 156 | silence_amqp_logger() | 157 | silence_amqp_logger() |
4064 | 157 | silence_bzr_logger() | 158 | silence_bzr_loggers() |
4065 | 158 | silence_zcml_logger() | 159 | silence_zcml_logger() |
4066 | 159 | silence_transaction_logger() | 160 | silence_transaction_logger() |
4067 | 160 | silence_swiftclient_logger() | 161 | silence_swiftclient_logger() |
4068 | @@ -185,3 +186,9 @@ def main(instance_name=None): | |||
4069 | 185 | # through actually using itertools.groupby. | 186 | # through actually using itertools.groupby. |
4070 | 186 | grouper = type(list(itertools.groupby([0]))[0][1]) | 187 | grouper = type(list(itertools.groupby([0]))[0][1]) |
4071 | 187 | checker.BasicTypes[grouper] = checker._iteratorChecker | 188 | checker.BasicTypes[grouper] = checker._iteratorChecker |
4072 | 189 | |||
4073 | 190 | # XXX 2019-09-17: git must be disabled until codeimport is upgraded, | ||
4074 | 191 | # since the required dulwich versions for our current version of bzr-git | ||
4075 | 192 | # and for Breezy are incompatible in both directions. | ||
4076 | 193 | import types | ||
4077 | 194 | sys.modules['breezy.git'] = types.ModuleType('breezy.git') | ||
4078 | diff --git a/scripts/mirror-branch.py b/scripts/mirror-branch.py | |||
4079 | index a493cf0..90f8cef 100755 | |||
4080 | --- a/scripts/mirror-branch.py | |||
4081 | +++ b/scripts/mirror-branch.py | |||
4082 | @@ -33,7 +33,7 @@ import os | |||
4083 | 33 | import resource | 33 | import resource |
4084 | 34 | import sys | 34 | import sys |
4085 | 35 | 35 | ||
4087 | 36 | import bzrlib.repository | 36 | import breezy.repository |
4088 | 37 | 37 | ||
4089 | 38 | from lp.code.enums import BranchType | 38 | from lp.code.enums import BranchType |
4090 | 39 | from lp.codehosting.puller.worker import ( | 39 | from lp.codehosting.puller.worker import ( |
4091 | @@ -54,24 +54,7 @@ def shut_up_deprecation_warning(): | |||
4092 | 54 | # XXX DavidAllouche 2006-01-29: | 54 | # XXX DavidAllouche 2006-01-29: |
4093 | 55 | # Quick hack to disable the deprecation warning for old repository | 55 | # Quick hack to disable the deprecation warning for old repository |
4094 | 56 | # formats. | 56 | # formats. |
4113 | 57 | bzrlib.repository._deprecation_warning_done = True | 57 | breezy.repository._deprecation_warning_done = True |
4096 | 58 | |||
4097 | 59 | |||
4098 | 60 | def force_bzr_to_use_urllib(): | ||
4099 | 61 | # These lines prevent bzr from using pycurl to connect to http: urls. We | ||
4100 | 62 | # want this for two reasons: | ||
4101 | 63 | # 1) pycurl rejects self signed certificates, which prevents a significant | ||
4102 | 64 | # number of mirror branchs from updating, and | ||
4103 | 65 | # 2) the script sometimes hangs inside pycurl, preventing all mirrors from | ||
4104 | 66 | # being updated until the script is restarted. | ||
4105 | 67 | # There is no test for this (it would involve a great number of moving | ||
4106 | 68 | # parts) but it has been verified to work on production. Also see | ||
4107 | 69 | # https://bugs.launchpad.net/bzr/+bug/82086 | ||
4108 | 70 | from bzrlib.transport import register_lazy_transport | ||
4109 | 71 | register_lazy_transport('http://', 'bzrlib.transport.http._urllib', | ||
4110 | 72 | 'HttpTransport_urllib') | ||
4111 | 73 | register_lazy_transport('https://', 'bzrlib.transport.http._urllib', | ||
4112 | 74 | 'HttpTransport_urllib') | ||
4114 | 75 | 58 | ||
4115 | 76 | 59 | ||
4116 | 77 | if __name__ == '__main__': | 60 | if __name__ == '__main__': |
4117 | @@ -86,7 +69,6 @@ if __name__ == '__main__': | |||
4118 | 86 | section_name = 'supermirror_%s_puller' % branch_type_map[branch_type] | 69 | section_name = 'supermirror_%s_puller' % branch_type_map[branch_type] |
4119 | 87 | globalErrorUtility.configure(section_name) | 70 | globalErrorUtility.configure(section_name) |
4120 | 88 | shut_up_deprecation_warning() | 71 | shut_up_deprecation_warning() |
4121 | 89 | force_bzr_to_use_urllib() | ||
4122 | 90 | 72 | ||
4123 | 91 | resource.setrlimit(resource.RLIMIT_AS, (1500000000, 1500000000)) | 73 | resource.setrlimit(resource.RLIMIT_AS, (1500000000, 1500000000)) |
4124 | 92 | 74 | ||
4125 | diff --git a/scripts/update-stacked-on.py b/scripts/update-stacked-on.py | |||
4126 | index 41e11fa..dda181d 100755 | |||
4127 | --- a/scripts/update-stacked-on.py | |||
4128 | +++ b/scripts/update-stacked-on.py | |||
4129 | @@ -23,9 +23,10 @@ import _pythonpath | |||
4130 | 23 | from collections import namedtuple | 23 | from collections import namedtuple |
4131 | 24 | import sys | 24 | import sys |
4132 | 25 | 25 | ||
4136 | 26 | from bzrlib import errors | 26 | from breezy import errors |
4137 | 27 | from bzrlib.bzrdir import BzrDir | 27 | from breezy.branch import UnstackableBranchFormat |
4138 | 28 | from bzrlib.config import TransportConfig | 28 | from breezy.bzr.bzrdir import BzrDir |
4139 | 29 | from breezy.config import TransportConfig | ||
4140 | 29 | 30 | ||
4141 | 30 | from lp.code.interfaces.codehosting import branch_id_alias | 31 | from lp.code.interfaces.codehosting import branch_id_alias |
4142 | 31 | from lp.codehosting.bzrutils import get_branch_stacked_on_url | 32 | from lp.codehosting.bzrutils import get_branch_stacked_on_url |
4143 | @@ -109,7 +110,7 @@ class UpdateStackedBranches(LaunchpadScript): | |||
4144 | 109 | self.logger.warn( | 110 | self.logger.warn( |
4145 | 110 | "Branch for %r at %r is not stacked at all. Giving up." | 111 | "Branch for %r at %r is not stacked at all. Giving up." |
4146 | 111 | % (branch_id, bzr_branch_url)) | 112 | % (branch_id, bzr_branch_url)) |
4148 | 112 | except errors.UnstackableBranchFormat: | 113 | except UnstackableBranchFormat: |
4149 | 113 | self.logger.error( | 114 | self.logger.error( |
4150 | 114 | "Branch for %r at %r is unstackable. Giving up." | 115 | "Branch for %r at %r is unstackable. Giving up." |
4151 | 115 | % (branch_id, bzr_branch_url)) | 116 | % (branch_id, bzr_branch_url)) |
4152 | diff --git a/setup.py b/setup.py | |||
4153 | index 2f9ab7a..3f7b6b3 100644 | |||
4154 | --- a/setup.py | |||
4155 | +++ b/setup.py | |||
4156 | @@ -149,6 +149,7 @@ setup( | |||
4157 | 149 | 'backports.lzma', | 149 | 'backports.lzma', |
4158 | 150 | 'BeautifulSoup', | 150 | 'BeautifulSoup', |
4159 | 151 | 'beautifulsoup4[lxml]', | 151 | 'beautifulsoup4[lxml]', |
4160 | 152 | 'breezy', | ||
4161 | 152 | 'bzr', | 153 | 'bzr', |
4162 | 153 | 'celery', | 154 | 'celery', |
4163 | 154 | 'cssselect', | 155 | 'cssselect', |
4164 | @@ -283,6 +284,7 @@ setup( | |||
4165 | 283 | 'zope.vocabularyregistry', | 284 | 'zope.vocabularyregistry', |
4166 | 284 | # Loggerhead dependencies. These should be removed once | 285 | # Loggerhead dependencies. These should be removed once |
4167 | 285 | # bug 383360 is fixed and we include it as a source dist. | 286 | # bug 383360 is fixed and we include it as a source dist. |
4168 | 287 | 'bleach', | ||
4169 | 286 | 'Paste', | 288 | 'Paste', |
4170 | 287 | 'PasteDeploy', | 289 | 'PasteDeploy', |
4171 | 288 | 'SimpleTAL', | 290 | 'SimpleTAL', |
4172 | diff --git a/utilities/create-lp-wadl-and-apidoc.py b/utilities/create-lp-wadl-and-apidoc.py | |||
4173 | index 808c991..4894943 100755 | |||
4174 | --- a/utilities/create-lp-wadl-and-apidoc.py | |||
4175 | +++ b/utilities/create-lp-wadl-and-apidoc.py | |||
4176 | @@ -18,8 +18,8 @@ import os | |||
4177 | 18 | import subprocess | 18 | import subprocess |
4178 | 19 | import sys | 19 | import sys |
4179 | 20 | 20 | ||
4182 | 21 | import bzrlib | 21 | import breezy |
4183 | 22 | from bzrlib.branch import Branch | 22 | from breezy.branch import Branch |
4184 | 23 | from lazr.restful.interfaces import IWebServiceConfiguration | 23 | from lazr.restful.interfaces import IWebServiceConfiguration |
4185 | 24 | from z3c.ptcompat import PageTemplateFile | 24 | from z3c.ptcompat import PageTemplateFile |
4186 | 25 | from zope.component import getUtility | 25 | from zope.component import getUtility |
4187 | @@ -144,7 +144,7 @@ def main(directory, force=False): | |||
4188 | 144 | ["git", "log", "-1", "--format=%ct", "HEAD"], | 144 | ["git", "log", "-1", "--format=%ct", "HEAD"], |
4189 | 145 | universal_newlines=True)) | 145 | universal_newlines=True)) |
4190 | 146 | else: | 146 | else: |
4192 | 147 | with bzrlib.initialize(): | 147 | with breezy.get_global_state(): |
4193 | 148 | branch = Branch.open(top) | 148 | branch = Branch.open(top) |
4194 | 149 | timestamp = branch.repository.get_revision( | 149 | timestamp = branch.repository.get_revision( |
4195 | 150 | branch.last_revision()).timestamp | 150 | branch.last_revision()).timestamp |
4196 | diff --git a/utilities/sourcedeps.cache b/utilities/sourcedeps.cache | |||
4197 | index 1360489..59ec12b 100644 | |||
4198 | --- a/utilities/sourcedeps.cache | |||
4199 | +++ b/utilities/sourcedeps.cache | |||
4200 | @@ -1,16 +1,16 @@ | |||
4201 | 1 | { | 1 | { |
4205 | 2 | "bzr-builder": [ | 2 | "brz-builder": [ |
4206 | 3 | 70, | 3 | 180, |
4207 | 4 | "launchpad@pqm.canonical.com-20111114140506-6bmt9isw6lcud7yt" | 4 | "jelmer@jelmer.uk-20180624153632-1f0weftl0pawz6wj" |
4208 | 5 | ], | ||
4209 | 6 | "brz-loom": [ | ||
4210 | 7 | 166, | ||
4211 | 8 | "jelmer@jelmer.uk-20190822193925-ydrq7fgdi78lpgm7" | ||
4212 | 5 | ], | 9 | ], |
4213 | 6 | "bzr-git": [ | 10 | "bzr-git": [ |
4214 | 7 | 280, | 11 | 280, |
4215 | 8 | "launchpad@pqm.canonical.com-20171222005919-u98ut0f5z2g618um" | 12 | "launchpad@pqm.canonical.com-20171222005919-u98ut0f5z2g618um" |
4216 | 9 | ], | 13 | ], |
4217 | 10 | "bzr-loom": [ | ||
4218 | 11 | 55, | ||
4219 | 12 | "launchpad@pqm.canonical.com-20120830090804-cg49kky93htwax7s" | ||
4220 | 13 | ], | ||
4221 | 14 | "bzr-svn": [ | 14 | "bzr-svn": [ |
4222 | 15 | 2725, | 15 | 2725, |
4223 | 16 | "launchpad@pqm.canonical.com-20130816045016-wzr810hu2z459t4y" | 16 | "launchpad@pqm.canonical.com-20130816045016-wzr810hu2z459t4y" |
4224 | @@ -24,8 +24,8 @@ | |||
4225 | 24 | "cjwatson@canonical.com-20190614154330-091l9edcnubsjmsx" | 24 | "cjwatson@canonical.com-20190614154330-091l9edcnubsjmsx" |
4226 | 25 | ], | 25 | ], |
4227 | 26 | "loggerhead": [ | 26 | "loggerhead": [ |
4230 | 27 | 493, | 27 | 494, |
4231 | 28 | "cjwatson@canonical.com-20190621112125-3aaxj3hrmty19lr6" | 28 | "cjwatson@canonical.com-20190919081036-q1symc2h2iedtlh3" |
4232 | 29 | ], | 29 | ], |
4233 | 30 | "mailman": [ | 30 | "mailman": [ |
4234 | 31 | 977, | 31 | 977, |
4235 | diff --git a/utilities/sourcedeps.conf b/utilities/sourcedeps.conf | |||
4236 | index d1dc1df..f21c98f 100644 | |||
4237 | --- a/utilities/sourcedeps.conf | |||
4238 | +++ b/utilities/sourcedeps.conf | |||
4239 | @@ -7,13 +7,13 @@ | |||
4240 | 7 | #### DEPRECATED. NO NEW ITEMS. NO NO NO NO NO NONONONONO | 7 | #### DEPRECATED. NO NEW ITEMS. NO NO NO NO NO NONONONONO |
4241 | 8 | ######################################################### | 8 | ######################################################### |
4242 | 9 | 9 | ||
4244 | 10 | bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=70 | 10 | brz-builder lp:~jelmer/brz-builder/trunk;revno=180 |
4245 | 11 | brz-loom lp:~jelmer/brz-loom/trunk;revno=166 | ||
4246 | 11 | bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=280 | 12 | bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=280 |
4247 | 12 | bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=55 | ||
4248 | 13 | bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2725 | 13 | bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2725 |
4249 | 14 | cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=433 | 14 | cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=433 |
4250 | 15 | difftacular lp:~launchpad/difftacular/trunk;revno=11 | 15 | difftacular lp:~launchpad/difftacular/trunk;revno=11 |
4252 | 16 | loggerhead lp:~loggerhead-team/loggerhead/trunk-rich;revno=493 | 16 | loggerhead lp:~loggerhead-team/loggerhead/trunk-rich;revno=494 |
4253 | 17 | mailman lp:~launchpad-pqm/mailman/2.1;revno=977 | 17 | mailman lp:~launchpad-pqm/mailman/2.1;revno=977 |
4254 | 18 | old_xmlplus lp:~launchpad-pqm/dtdparser/trunk;revno=4 | 18 | old_xmlplus lp:~launchpad-pqm/dtdparser/trunk;revno=4 |
4255 | 19 | pygettextpo lp:~launchpad-pqm/pygettextpo/trunk;revno=25 | 19 | pygettextpo lp:~launchpad-pqm/pygettextpo/trunk;revno=25 |
looks good.