← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jelmer/launchpad/bzr-2.4b4 into lp:launchpad/db-devel

 

Jelmer Vernooij has proposed merging lp:~jelmer/launchpad/bzr-2.4b4 into lp:launchpad/db-devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #301472 in Launchpad itself: "need a way to uninstall a hook"
  https://bugs.launchpad.net/launchpad/+bug/301472

For more details, see:
https://code.launchpad.net/~jelmer/launchpad/bzr-2.4b4/+merge/71468

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 this branch originally proposed bzr 2.4b5 into lp:launchpad rather than lp:launchpad/db-devel, and I have fixed several minor issues since originally proposing this branch for merging.
-- 
https://code.launchpad.net/~jelmer/launchpad/bzr-2.4b4/+merge/71468
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jelmer/launchpad/bzr-2.4b4 into lp:launchpad/db-devel.
=== modified file 'lib/lp/code/bzr.py'
--- lib/lp/code/bzr.py	2011-06-02 19:27:36 +0000
+++ lib/lp/code/bzr.py	2011-08-14 02:30:39 +0000
@@ -20,39 +20,39 @@
 
 from bzrlib.branch import (
     BranchReferenceFormat,
-    BzrBranchFormat4,
     BzrBranchFormat5,
     BzrBranchFormat6,
     BzrBranchFormat7,
     )
-from bzrlib.bzrdir import (
+from bzrlib.bzrdir import BzrDirMetaFormat1
+from bzrlib.plugins.loom.branch import (
+    BzrBranchLoomFormat1,
+    BzrBranchLoomFormat6,
+    )
+from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
+from bzrlib.plugins.weave_fmt.bzrdir import (
     BzrDirFormat4,
     BzrDirFormat5,
     BzrDirFormat6,
-    BzrDirMetaFormat1,
     )
-from bzrlib.plugins.loom.branch import (
-    BzrBranchLoomFormat1,
-    BzrBranchLoomFormat6,
+from bzrlib.plugins.weave_fmt.repository import (
+    RepositoryFormat4,
+    RepositoryFormat5,
+    RepositoryFormat6,
+    RepositoryFormat7,
     )
 from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a
+from bzrlib.repofmt.knitpack_repo import (
+    RepositoryFormatKnitPack1,
+    RepositoryFormatKnitPack3,
+    RepositoryFormatKnitPack4,
+    RepositoryFormatKnitPack5,
+    )
 from bzrlib.repofmt.knitrepo import (
     RepositoryFormatKnit1,
     RepositoryFormatKnit3,
     RepositoryFormatKnit4,
     )
-from bzrlib.repofmt.pack_repo import (
-    RepositoryFormatKnitPack1,
-    RepositoryFormatKnitPack3,
-    RepositoryFormatKnitPack4,
-    RepositoryFormatKnitPack5,
-    )
-from bzrlib.repofmt.weaverepo import (
-    RepositoryFormat4,
-    RepositoryFormat5,
-    RepositoryFormat6,
-    RepositoryFormat7,
-    )
 from lazr.enum import (
     DBEnumeratedType,
     DBItem,

=== modified file 'lib/lp/code/interfaces/tests/test_branch.py'
--- lib/lp/code/interfaces/tests/test_branch.py	2011-08-12 11:37:08 +0000
+++ lib/lp/code/interfaces/tests/test_branch.py	2011-08-14 02:30:39 +0000
@@ -5,7 +5,15 @@
 
 __metaclass__ = type
 
+<<<<<<< TREE
 from bzrlib.branch import BranchFormat as BzrBranchFormat
+=======
+import lp.codehosting # For plugins
+
+from bzrlib.branch import (
+    format_registry as branch_format_registry,
+    )
+>>>>>>> MERGE-SOURCE
 from bzrlib.bzrdir import BzrProber
 from bzrlib.repository import format_registry as repo_format_registry
 
@@ -26,10 +34,10 @@
     """
 
     def test_control_format_complement(self):
-        self.bzrlib_is_subset(BzrProber._formats.keys(), ControlFormat)
+        self.bzrlib_is_subset(BzrProber.formats.keys(), ControlFormat)
 
     def test_branch_format_complement(self):
-        self.bzrlib_is_subset(BzrBranchFormat._formats.keys(), BranchFormat)
+        self.bzrlib_is_subset(branch_format_registry.keys(), BranchFormat)
 
     def test_repository_format_complement(self):
         self.bzrlib_is_subset(repo_format_registry.keys(), RepositoryFormat)

=== modified file 'lib/lp/code/model/tests/test_branchjob.py'
--- lib/lp/code/model/tests/test_branchjob.py	2011-08-12 11:37:08 +0000
+++ lib/lp/code/model/tests/test_branchjob.py	2011-08-14 02:30:39 +0000
@@ -16,7 +16,7 @@
     BzrBranchFormat7,
     )
 from bzrlib.bzrdir import BzrDirMetaFormat1
-from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack6
+from bzrlib.repofmt.knitpack_repo import RepositoryFormatKnitPack6
 from bzrlib.revision import NULL_REVISION
 from bzrlib.transport import get_transport
 import pytz

=== modified file 'lib/lp/codehosting/__init__.py'
--- lib/lp/codehosting/__init__.py	2011-03-30 15:16:35 +0000
+++ lib/lp/codehosting/__init__.py	2011-08-14 02:30:39 +0000
@@ -70,15 +70,13 @@
     __import__("bzrlib.plugins.%s" % plugin_name)
 
 
-def remove_hook(self, hook):
-    """Remove the hook from the HookPoint"""
-    self._callbacks.remove(hook)
-    for name, value in self._callback_names.iteritems():
-        if value is hook:
-            del self._callback_names[name]
-
-
-# XXX: JonathanLange 2011-03-30 bug=301472: Monkeypatch: Branch.hooks is a
-# list in bzr 1.13, so it supports remove.  It is a HookPoint in bzr 1.14, so
-# add HookPoint.remove.
-hooks.HookPoint.remove = remove_hook
+def load_bundled_plugin(plugin_name):
+    """Load a plugin bundled with Bazaar."""
+    from bzrlib.plugin import get_core_plugin_path
+    from bzrlib import plugins
+    if get_core_plugin_path() not in plugins.__path__:
+        plugins.__path__.append(get_core_plugin_path())
+    __import__("bzrlib.plugins.%s" % plugin_name)
+
+
+load_bundled_plugin("weave_fmt")

=== modified file 'lib/lp/codehosting/codeimport/worker.py'
--- lib/lp/codehosting/codeimport/worker.py	2011-08-02 11:28:46 +0000
+++ lib/lp/codehosting/codeimport/worker.py	2011-08-14 02:30:39 +0000
@@ -32,13 +32,13 @@
 from bzrlib.errors import (
     ConnectionError,
     InvalidEntryName,
+    NoRepositoryPresent,
     NoSuchFile,
-    NoRepositoryPresent,
     NotBranchError,
     )
 from bzrlib.transport import get_transport
+from bzrlib.upgrade import upgrade
 import bzrlib.ui
-from bzrlib.upgrade import upgrade
 from bzrlib.urlutils import (
     join as urljoin,
     local_path_from_url,

=== modified file 'lib/lp/codehosting/puller/tests/test_scheduler.py'
--- lib/lp/codehosting/puller/tests/test_scheduler.py	2011-08-12 11:37:08 +0000
+++ lib/lp/codehosting/puller/tests/test_scheduler.py	2011-08-14 02:30:39 +0000
@@ -767,7 +767,7 @@
         branch.lock_write()
         protocol.mirrorFailed('a', 'b')
         protocol.sendEvent(
-            'lock_id', branch.control_files._lock.peek()['user'])
+            'lock_id', branch.control_files._lock.peek().get('user'))
         sys.stdout.flush()
         branch.unlock()
         """

=== modified file 'lib/lp/codehosting/puller/tests/test_worker_formats.py'
--- lib/lp/codehosting/puller/tests/test_worker_formats.py	2011-08-12 11:37:08 +0000
+++ lib/lp/codehosting/puller/tests/test_worker_formats.py	2011-08-14 02:30:39 +0000
@@ -5,17 +5,20 @@
 
 __metaclass__ = type
 
+<<<<<<< TREE
+=======
+import lp.codehosting # for bzr plugins
+
+>>>>>>> MERGE-SOURCE
 from bzrlib.branch import Branch
-from bzrlib.bzrdir import (
-    BzrDirFormat6,
-    BzrDirMetaFormat1,
-    )
-from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
-from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack5
-from bzrlib.repofmt.weaverepo import (
+from bzrlib.bzrdir import BzrDirMetaFormat1
+from bzrlib.plugins.weave_fmt.bzrdir import BzrDirFormat6
+from bzrlib.plugins.weave_fmt.repository import (
     RepositoryFormat6,
     RepositoryFormat7,
     )
+from bzrlib.repofmt.knitpack_repo import RepositoryFormatKnitPack5
+from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
 from bzrlib.tests.per_repository import TestCaseWithRepository
 
 from lp.codehosting.puller.tests import PullerWorkerMixin

=== modified file 'lib/lp/codehosting/puller/worker.py'
--- lib/lp/codehosting/puller/worker.py	2011-08-06 18:13:13 +0000
+++ lib/lp/codehosting/puller/worker.py	2011-08-14 02:30:39 +0000
@@ -8,15 +8,15 @@
 import sys
 import urllib2
 
+import lp.codehosting # to load bzr plugins
+
 from bzrlib import (
     errors,
     urlutils,
     )
-from bzrlib.branch import (
-    Branch,
-    BzrBranchFormat4,
-    )
-from bzrlib.repofmt.weaverepo import (
+from bzrlib.branch import Branch
+from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
+from bzrlib.plugins.weave_fmt.repository import (
     RepositoryFormat4,
     RepositoryFormat5,
     RepositoryFormat6,

=== modified file 'lib/lp/codehosting/safe_open.py'
--- lib/lp/codehosting/safe_open.py	2011-08-09 14:59:08 +0000
+++ lib/lp/codehosting/safe_open.py	2011-08-14 02:30:39 +0000
@@ -208,11 +208,8 @@
         try:
             return callable(*args, **kw)
         finally:
-            # XXX 2008-11-24 MichaelHudson, bug=301472: This is the hacky way
-            # to remove a hook.  The linked bug report asks for an API to do
-            # it.
-            Branch.hooks['transform_fallback_location'].remove(
-                self.transformFallbackLocationHook)
+            Branch.hooks.uninstall_named_hook('transform_fallback_location',
+                'SafeBranchOpener.transformFallbackLocationHook')
             # We reset _seen_urls here to avoid multiple calls to open giving
             # spurious loop exceptions.
             self._seen_urls = set()

=== modified file 'lib/lp/codehosting/tests/test_safe_open.py'
--- lib/lp/codehosting/tests/test_safe_open.py	2011-08-09 15:05:18 +0000
+++ lib/lp/codehosting/tests/test_safe_open.py	2011-08-14 02:30:39 +0000
@@ -27,7 +27,7 @@
 from bzrlib.bzrdir import (
     BzrDirMetaFormat1,
     )
-from bzrlib.repofmt.pack_repo import RepositoryFormatKnitPack1
+from bzrlib.repofmt.knitpack_repo import RepositoryFormatKnitPack1
 from bzrlib.tests import (
     TestCaseWithTransport,
     )

=== modified file 'lib/lp/translations/scripts/translations_to_branch.py'
--- lib/lp/translations/scripts/translations_to_branch.py	2011-05-27 13:36:02 +0000
+++ lib/lp/translations/scripts/translations_to_branch.py	2011-08-14 02:30:39 +0000
@@ -14,6 +14,7 @@
 import os.path
 
 from bzrlib.errors import NotBranchError
+from bzrlib.revision import NULL_REVISION
 import pytz
 from storm.expr import (
     And,
@@ -157,7 +158,9 @@
 
         revno, current_rev = branch.last_revision_info()
         repository = branch.repository
-        for rev_id in repository.iter_reverse_revision_history(current_rev):
+        graph = repository.get_graph()
+        for rev_id in graph.iter_lefthand_ancestry(
+                current_rev, (NULL_REVISION, )):
             revision = repository.get_revision(rev_id)
             revision_date = self._getRevisionTime(revision)
             if self._isTranslationsCommit(revision):

=== modified file 'utilities/sourcedeps.cache'
--- utilities/sourcedeps.cache	2011-08-12 10:21:42 +0000
+++ utilities/sourcedeps.cache	2011-08-14 02:30:39 +0000
@@ -1,4 +1,8 @@
 {
+    "bzr-builder": [
+        68, 
+        "launchpad@xxxxxxxxxxxxxxxxx-20101123183213-777lz46xgagn1deg"
+    ], 
     "testresources": [
         16, 
         "robertc@xxxxxxxxxxxxxxxxx-20050911111209-ee5da49011cf936a"
@@ -27,41 +31,37 @@
         24, 
         "launchpad@xxxxxxxxxxxxxxxxx-20100601182722-wo7h2fh0fvyw3aaq"
     ], 
+    "lpreview": [
+        23, 
+        "launchpad@xxxxxxxxxxxxxxxxx-20090720061538-euyh68ifavhy0pi8"
+    ], 
     "bzr-git": [
         259, 
         "launchpad@xxxxxxxxxxxxxxxxx-20110601140035-gl5merbechngjw5s"
     ], 
-    "loggerhead": [
-        454, 
-        "gavin@xxxxxxxxxxx-20110811101303-ka12yvnq2p48e2t8"
-    ], 
-    "bzr-builder": [
-        68, 
-        "launchpad@xxxxxxxxxxxxxxxxx-20101123183213-777lz46xgagn1deg"
-    ], 
     "bzr-loom": [
-        49, 
-        "launchpad@xxxxxxxxxxxxxxxxx-20110601122412-54vo3k8yae9i2zve"
+        50, 
+        "launchpad@xxxxxxxxxxxxxxxxx-20110722102404-hl1z8uzhhwiol34l"
     ], 
     "old_xmlplus": [
         4, 
         "sinzui-20090526164636-1swugzupwvjgomo4"
     ], 
-    "lpreview": [
-        23, 
-        "launchpad@xxxxxxxxxxxxxxxxx-20090720061538-euyh68ifavhy0pi8"
+    "loggerhead": [
+        454, 
+        "gavin@xxxxxxxxxxx-20110811101303-ka12yvnq2p48e2t8"
     ], 
     "difftacular": [
         6, 
         "aaron@xxxxxxxxxxxxxxxx-20100715135013-uoi3q430urx9gwb8"
     ], 
     "bzr-svn": [
-        2715, 
-        "launchpad@xxxxxxxxxxxxxxxxx-20110810144016-m5f5pbnrpkbz04v3"
+        2716, 
+        "launchpad@xxxxxxxxxxxxxxxxx-20110813142415-1izlitsieztuzkly"
     ], 
     "bzr-hg": [
-        286, 
-        "launchpad@xxxxxxxxxxxxxxxxx-20110608121012-ukbfdj6izm8n72tp"
+        287, 
+        "launchpad@xxxxxxxxxxxxxxxxx-20110722151205-zvse1g7ghie2snt2"
     ], 
     "dulwich": [
         426, 

=== modified file 'utilities/sourcedeps.conf'
--- utilities/sourcedeps.conf	2011-08-11 10:25:07 +0000
+++ utilities/sourcedeps.conf	2011-08-14 02:30:39 +0000
@@ -1,8 +1,8 @@
 bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=68
 bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=259
-bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=286
-bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=49
-bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2715
+bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=287
+bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=50
+bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2716
 cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=432
 dulwich lp:~launchpad-pqm/dulwich/devel;revno=426
 difftacular lp:difftacular;revno=6

=== modified file 'versions.cfg'
--- versions.cfg	2011-08-12 06:40:54 +0000
+++ versions.cfg	2011-08-14 02:30:39 +0000
@@ -7,7 +7,7 @@
 ampoule = 0.2.0
 amqplib = 0.6.1
 BeautifulSoup = 3.1.0.1
-bzr = 2.3.3
+bzr = 2.4.1dev-r6032
 chameleon.core = 1.0b35
 chameleon.zpt = 1.0b17
 ClientForm = 0.2.10