Merge lp:~jelmer/launchpad/bzr-2.4b4 into lp:launchpad

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 13845
Proposed branch: lp:~jelmer/launchpad/bzr-2.4b4
Merge into: lp:launchpad
Diff against target: 294 lines (+59/-54)
13 files modified
lib/lp/code/bzr.py (+18/-18)
lib/lp/code/interfaces/tests/test_branch.py (+7/-3)
lib/lp/code/model/tests/test_branchjob.py (+1/-1)
lib/lp/codehosting/__init__.py (+10/-12)
lib/lp/codehosting/codeimport/worker.py (+1/-1)
lib/lp/codehosting/puller/tests/test_scheduler.py (+1/-1)
lib/lp/codehosting/puller/tests/test_worker_formats.py (+7/-7)
lib/lp/codehosting/puller/worker.py (+5/-5)
lib/lp/codehosting/tests/test_safe_open.py (+1/-1)
lib/lp/translations/scripts/translations_to_branch.py (+4/-1)
utilities/sourcedeps.cache (+2/-2)
utilities/sourcedeps.conf (+1/-1)
versions.cfg (+1/-1)
To merge this branch: bzr merge lp:~jelmer/launchpad/bzr-2.4b4
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Launchpad code reviewers Pending
Review via email: mp+71624@code.launchpad.net

This proposal supersedes a proposal from 2011-07-22.

Commit message

[r=gmb] Update bzr to version 2.4.0.

Description of the change

Update to a newer upstream version of bzr, bzr 2.4.0.

This brings all of the goodness of the 2.4 series of bzr, including a number of performance improvements.

It might help with bug 690021.

It adds a server side hook for error logging in servers, the bzr side of bug 274578.

It fixes merging into an empty tree, which is one of the causes of bug 595328.

Resubmitting because I have fixed several minor issues since originally proposing this branch for merging.

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote : Posted in a previous version of this proposal

Other than a few multi-line imports look like they should be single-line
imports instead this branch looks good.

review: Approve (code)
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Posted in a previous version of this proposal

This is currently stalled.

It turns out that bzr-loom is broken with bzr 2.4 b4, so we'll have to get that fixed (in bzr or bzr-loom) and then get that version merged as well.

Revision history for this message
Benji York (benji) wrote : Posted in a previous version of this proposal

This looks good.

review: Approve (code)
Revision history for this message
Martin Pool (mbp) wrote : Posted in a previous version of this proposal

After this is merged, please merge https://bugs.launchpad.net/launchpad/+bug/721166 too, or ping me to do it.

Revision history for this message
Graham Binns (gmb) wrote :

Minor stylistic nitpick, otherwise this looks good:

236 + Branch.hooks.uninstall_named_hook('transform_fallback_location',
237 + 'SafeBranchOpener.transformFallbackLocationHook')

Would be better written as:

            Branch.hooks.uninstall_named_hook(
                'transform_fallback_location',
                'SafeBranchOpener.transformFallbackLocationHook')

review: Approve (code)
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This seems to be working on staging, where it's been living for a week without problems. I think it's ready to hit devel, so I'm going to run it through ec2 and land it there.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/code/bzr.py'
2--- lib/lp/code/bzr.py 2011-06-02 19:27:36 +0000
3+++ lib/lp/code/bzr.py 2011-09-01 11:05:00 +0000
4@@ -20,39 +20,39 @@
5
6 from bzrlib.branch import (
7 BranchReferenceFormat,
8- BzrBranchFormat4,
9 BzrBranchFormat5,
10 BzrBranchFormat6,
11 BzrBranchFormat7,
12 )
13-from bzrlib.bzrdir import (
14+from bzrlib.bzrdir import BzrDirMetaFormat1
15+from bzrlib.plugins.loom.branch import (
16+ BzrBranchLoomFormat1,
17+ BzrBranchLoomFormat6,
18+ )
19+from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
20+from bzrlib.plugins.weave_fmt.bzrdir import (
21 BzrDirFormat4,
22 BzrDirFormat5,
23 BzrDirFormat6,
24- BzrDirMetaFormat1,
25 )
26-from bzrlib.plugins.loom.branch import (
27- BzrBranchLoomFormat1,
28- BzrBranchLoomFormat6,
29+from bzrlib.plugins.weave_fmt.repository import (
30+ RepositoryFormat4,
31+ RepositoryFormat5,
32+ RepositoryFormat6,
33+ RepositoryFormat7,
34 )
35 from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a
36+from bzrlib.repofmt.knitpack_repo import (
37+ RepositoryFormatKnitPack1,
38+ RepositoryFormatKnitPack3,
39+ RepositoryFormatKnitPack4,
40+ RepositoryFormatKnitPack5,
41+ )
42 from bzrlib.repofmt.knitrepo import (
43 RepositoryFormatKnit1,
44 RepositoryFormatKnit3,
45 RepositoryFormatKnit4,
46 )
47-from bzrlib.repofmt.pack_repo import (
48- RepositoryFormatKnitPack1,
49- RepositoryFormatKnitPack3,
50- RepositoryFormatKnitPack4,
51- RepositoryFormatKnitPack5,
52- )
53-from bzrlib.repofmt.weaverepo import (
54- RepositoryFormat4,
55- RepositoryFormat5,
56- RepositoryFormat6,
57- RepositoryFormat7,
58- )
59 from lazr.enum import (
60 DBEnumeratedType,
61 DBItem,
62
63=== modified file 'lib/lp/code/interfaces/tests/test_branch.py'
64--- lib/lp/code/interfaces/tests/test_branch.py 2011-08-12 11:37:08 +0000
65+++ lib/lp/code/interfaces/tests/test_branch.py 2011-09-01 11:05:00 +0000
66@@ -5,7 +5,11 @@
67
68 __metaclass__ = type
69
70-from bzrlib.branch import BranchFormat as BzrBranchFormat
71+import lp.codehosting # For plugins
72+
73+from bzrlib.branch import (
74+ format_registry as branch_format_registry,
75+ )
76 from bzrlib.bzrdir import BzrProber
77 from bzrlib.repository import format_registry as repo_format_registry
78
79@@ -26,10 +30,10 @@
80 """
81
82 def test_control_format_complement(self):
83- self.bzrlib_is_subset(BzrProber._formats.keys(), ControlFormat)
84+ self.bzrlib_is_subset(BzrProber.formats.keys(), ControlFormat)
85
86 def test_branch_format_complement(self):
87- self.bzrlib_is_subset(BzrBranchFormat._formats.keys(), BranchFormat)
88+ self.bzrlib_is_subset(branch_format_registry.keys(), BranchFormat)
89
90 def test_repository_format_complement(self):
91 self.bzrlib_is_subset(repo_format_registry.keys(), RepositoryFormat)
92
93=== modified file 'lib/lp/code/model/tests/test_branchjob.py'
94--- lib/lp/code/model/tests/test_branchjob.py 2011-08-22 18:43:18 +0000
95+++ lib/lp/code/model/tests/test_branchjob.py 2011-09-01 11:05:00 +0000
96@@ -19,7 +19,7 @@
97 BzrDir,
98 BzrDirMetaFormat1,
99 )
100-from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack6
101+from bzrlib.repofmt.knitpack_repo import RepositoryFormatKnitPack6
102 from bzrlib.revision import NULL_REVISION
103 from bzrlib.transport import get_transport
104 import pytz
105
106=== modified file 'lib/lp/codehosting/__init__.py'
107--- lib/lp/codehosting/__init__.py 2011-03-30 15:16:35 +0000
108+++ lib/lp/codehosting/__init__.py 2011-09-01 11:05:00 +0000
109@@ -70,15 +70,13 @@
110 __import__("bzrlib.plugins.%s" % plugin_name)
111
112
113-def remove_hook(self, hook):
114- """Remove the hook from the HookPoint"""
115- self._callbacks.remove(hook)
116- for name, value in self._callback_names.iteritems():
117- if value is hook:
118- del self._callback_names[name]
119-
120-
121-# XXX: JonathanLange 2011-03-30 bug=301472: Monkeypatch: Branch.hooks is a
122-# list in bzr 1.13, so it supports remove. It is a HookPoint in bzr 1.14, so
123-# add HookPoint.remove.
124-hooks.HookPoint.remove = remove_hook
125+def load_bundled_plugin(plugin_name):
126+ """Load a plugin bundled with Bazaar."""
127+ from bzrlib.plugin import get_core_plugin_path
128+ from bzrlib import plugins
129+ if get_core_plugin_path() not in plugins.__path__:
130+ plugins.__path__.append(get_core_plugin_path())
131+ __import__("bzrlib.plugins.%s" % plugin_name)
132+
133+
134+load_bundled_plugin("weave_fmt")
135
136=== modified file 'lib/lp/codehosting/codeimport/worker.py'
137--- lib/lp/codehosting/codeimport/worker.py 2011-08-28 08:36:14 +0000
138+++ lib/lp/codehosting/codeimport/worker.py 2011-09-01 11:05:00 +0000
139@@ -39,8 +39,8 @@
140 NotBranchError,
141 )
142 from bzrlib.transport import get_transport
143+from bzrlib.upgrade import upgrade
144 import bzrlib.ui
145-from bzrlib.upgrade import upgrade
146 from bzrlib.urlutils import (
147 join as urljoin,
148 local_path_from_url,
149
150=== modified file 'lib/lp/codehosting/puller/tests/test_scheduler.py'
151--- lib/lp/codehosting/puller/tests/test_scheduler.py 2011-08-17 04:56:56 +0000
152+++ lib/lp/codehosting/puller/tests/test_scheduler.py 2011-09-01 11:05:00 +0000
153@@ -767,7 +767,7 @@
154 branch.lock_write()
155 protocol.mirrorFailed('a', 'b')
156 protocol.sendEvent(
157- 'lock_id', branch.control_files._lock.peek()['user'])
158+ 'lock_id', branch.control_files._lock.peek().get('user'))
159 sys.stdout.flush()
160 branch.unlock()
161 """
162
163=== modified file 'lib/lp/codehosting/puller/tests/test_worker_formats.py'
164--- lib/lp/codehosting/puller/tests/test_worker_formats.py 2011-08-17 01:04:36 +0000
165+++ lib/lp/codehosting/puller/tests/test_worker_formats.py 2011-09-01 11:05:00 +0000
166@@ -5,17 +5,17 @@
167
168 __metaclass__ = type
169
170+import lp.codehosting # for bzr plugins
171+
172 from bzrlib.branch import Branch
173-from bzrlib.bzrdir import (
174- BzrDirFormat6,
175- BzrDirMetaFormat1,
176- )
177-from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
178-from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack5
179-from bzrlib.repofmt.weaverepo import (
180+from bzrlib.bzrdir import BzrDirMetaFormat1
181+from bzrlib.plugins.weave_fmt.bzrdir import BzrDirFormat6
182+from bzrlib.plugins.weave_fmt.repository import (
183 RepositoryFormat6,
184 RepositoryFormat7,
185 )
186+from bzrlib.repofmt.knitpack_repo import RepositoryFormatKnitPack5
187+from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
188 from bzrlib.tests.per_repository import TestCaseWithRepository
189
190 from lp.codehosting.puller.tests import PullerWorkerMixin
191
192=== modified file 'lib/lp/codehosting/puller/worker.py'
193--- lib/lp/codehosting/puller/worker.py 2011-08-28 08:36:14 +0000
194+++ lib/lp/codehosting/puller/worker.py 2011-09-01 11:05:00 +0000
195@@ -8,17 +8,17 @@
196 import sys
197 import urllib2
198
199+import lp.codehosting # to load bzr plugins
200+
201 from bzrlib import (
202 errors,
203 urlutils,
204 )
205-from bzrlib.branch import (
206- Branch,
207- BzrBranchFormat4,
208- )
209+from bzrlib.branch import Branch
210 from bzrlib.bzrdir import BzrDir
211 from bzrlib.plugins.loom.branch import LoomSupport
212-from bzrlib.repofmt.weaverepo import (
213+from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
214+from bzrlib.plugins.weave_fmt.repository import (
215 RepositoryFormat4,
216 RepositoryFormat5,
217 RepositoryFormat6,
218
219=== modified file 'lib/lp/codehosting/tests/test_safe_open.py'
220--- lib/lp/codehosting/tests/test_safe_open.py 2011-08-28 08:36:14 +0000
221+++ lib/lp/codehosting/tests/test_safe_open.py 2011-09-01 11:05:00 +0000
222@@ -15,7 +15,7 @@
223 BzrDir,
224 BzrDirMetaFormat1,
225 )
226-from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack1
227+from bzrlib.repofmt.knitpack_repo import RepositoryFormatKnitPack1
228 from bzrlib.tests import TestCaseWithTransport
229 from bzrlib.transport import chroot
230 from lazr.uri import URI
231
232=== modified file 'lib/lp/translations/scripts/translations_to_branch.py'
233--- lib/lp/translations/scripts/translations_to_branch.py 2011-05-27 13:36:02 +0000
234+++ lib/lp/translations/scripts/translations_to_branch.py 2011-09-01 11:05:00 +0000
235@@ -14,6 +14,7 @@
236 import os.path
237
238 from bzrlib.errors import NotBranchError
239+from bzrlib.revision import NULL_REVISION
240 import pytz
241 from storm.expr import (
242 And,
243@@ -157,7 +158,9 @@
244
245 revno, current_rev = branch.last_revision_info()
246 repository = branch.repository
247- for rev_id in repository.iter_reverse_revision_history(current_rev):
248+ graph = repository.get_graph()
249+ for rev_id in graph.iter_lefthand_ancestry(
250+ current_rev, (NULL_REVISION, )):
251 revision = repository.get_revision(rev_id)
252 revision_date = self._getRevisionTime(revision)
253 if self._isTranslationsCommit(revision):
254
255=== modified file 'utilities/sourcedeps.cache'
256--- utilities/sourcedeps.cache 2011-08-30 00:07:34 +0000
257+++ utilities/sourcedeps.cache 2011-09-01 11:05:00 +0000
258@@ -40,8 +40,8 @@
259 "launchpad@pqm.canonical.com-20110601140035-gl5merbechngjw5s"
260 ],
261 "bzr-loom": [
262- 49,
263- "launchpad@pqm.canonical.com-20110601122412-54vo3k8yae9i2zve"
264+ 50,
265+ "launchpad@pqm.canonical.com-20110722102404-hl1z8uzhhwiol34l"
266 ],
267 "old_xmlplus": [
268 4,
269
270=== modified file 'utilities/sourcedeps.conf'
271--- utilities/sourcedeps.conf 2011-08-25 12:25:24 +0000
272+++ utilities/sourcedeps.conf 2011-09-01 11:05:00 +0000
273@@ -1,7 +1,7 @@
274 bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=68
275 bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=259
276 bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=290
277-bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=49
278+bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=50
279 bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2717
280 cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=432
281 dulwich lp:~launchpad-pqm/dulwich/devel;revno=426
282
283=== modified file 'versions.cfg'
284--- versions.cfg 2011-08-25 10:11:02 +0000
285+++ versions.cfg 2011-09-01 11:05:00 +0000
286@@ -7,7 +7,7 @@
287 ampoule = 0.2.0
288 amqplib = 0.6.1
289 BeautifulSoup = 3.1.0.1
290-bzr = 2.3.3
291+bzr = 2.4.1dev-r6032
292 Chameleon = 2.4.0
293 ClientForm = 0.2.10
294 cssutils = 0.9.6