launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #03805
[Merge] lp:~jelmer/launchpad/newer-bzr into lp:launchpad
Jelmer Vernooij has proposed merging lp:~jelmer/launchpad/newer-bzr into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #660790 in Launchpad itself: "tag support in mercurial imports"
https://bugs.launchpad.net/launchpad/+bug/660790
Bug #670870 in Launchpad itself: "bzr crashed with ValueError in convert_converted_from()"
https://bugs.launchpad.net/launchpad/+bug/670870
Bug #674581 in Launchpad itself: "Sourceforge Mercurial Import Fails"
https://bugs.launchpad.net/launchpad/+bug/674581
Bug #688459 in Launchpad itself: "RootMissing error on branch"
https://bugs.launchpad.net/launchpad/+bug/688459
Bug #691994 in Launchpad itself: "recursive removing of empty directories doesn't work"
https://bugs.launchpad.net/launchpad/+bug/691994
Bug #709539 in Launchpad itself: "launchpad doesn't accept branches in format developer-subtree (development format 8)"
https://bugs.launchpad.net/launchpad/+bug/709539
For more details, see:
https://code.launchpad.net/~jelmer/launchpad/newer-bzr/+merge/63157
Update the versions of Bazaar, bzr-hg, bzr-svn, bzr-git and bzr-loom used on Launchpad to newer versions (from bzr 2.2.1 to bzr 2.3.3 and trunk versions of the plugins).
This should fix a number of bugs in the importers (linked to the branch), and bring all of the bug fixes
--
https://code.launchpad.net/~jelmer/launchpad/newer-bzr/+merge/63157
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jelmer/launchpad/newer-bzr into lp:launchpad.
=== modified file 'lib/canonical/config/schema-lazr.conf'
--- lib/canonical/config/schema-lazr.conf 2011-05-06 13:55:19 +0000
+++ lib/canonical/config/schema-lazr.conf 2011-06-01 19:14:30 +0000
@@ -522,6 +522,8 @@
# Import only this many revisions from svn (via bzr-svn) at once.
svn_revisions_import_limit: 5000
+# Import only this many revisions from hg at once.
+hg_revisions_import_limit: 5000
[codeimportdispatcher]
# The directory where the code import worker should be directed to
=== modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py'
--- lib/lp/codehosting/codeimport/tests/test_worker.py 2011-05-17 12:59:37 +0000
+++ lib/lp/codehosting/codeimport/tests/test_worker.py 2011-06-01 19:14:30 +0000
@@ -1000,19 +1000,9 @@
worker = self.makeImportWorker(source_details)
self.assertRaises(NotBranchError, worker.run)
-
-class PartialTest:
- """A test case for incremental imports.
-
- When all foreign branch plugins support incremental imports, this can go
- into PullingImportWorkerTests. For now though, bzr-hg still lacks the
- needed support.
- """
-
def test_partial(self):
# Only config.codeimport.revisions_import_limit will be imported in a
- # given run. When bzr-svn and bzr-hg support revision import limits,
- # this test case can be moved up to PullingImportWorkerTests.
+ # given run.
worker = self.makeImportWorker(self.makeSourceDetails(
'trunk', [('README', 'Original contents')]))
self.makeForeignCommit(worker.source_details)
@@ -1021,6 +1011,7 @@
'codeimport',
git_revisions_import_limit=self.foreign_commit_count-1,
svn_revisions_import_limit=self.foreign_commit_count-1,
+ hg_revisions_import_limit=self.foreign_commit_count-1,
)
self.assertEqual(
CodeImportWorkerExitCode.SUCCESS_PARTIAL, worker.run())
@@ -1028,9 +1019,8 @@
CodeImportWorkerExitCode.SUCCESS, worker.run())
-
class TestGitImport(WorkerTest, TestActualImportMixin,
- PullingImportWorkerTests, PartialTest):
+ PullingImportWorkerTests):
rcstype = 'git'
@@ -1132,8 +1122,7 @@
class TestBzrSvnImport(WorkerTest, SubversionImportHelpers,
- TestActualImportMixin, PullingImportWorkerTests,
- PartialTest):
+ TestActualImportMixin, PullingImportWorkerTests):
rcstype = 'bzr-svn'
=== modified file 'lib/lp/codehosting/codeimport/worker.py'
--- lib/lp/codehosting/codeimport/worker.py 2011-05-19 09:49:46 +0000
+++ lib/lp/codehosting/codeimport/worker.py 2011-06-01 19:14:30 +0000
@@ -545,24 +545,20 @@
class PullingImportWorker(ImportWorker):
"""An import worker for imports that can be done by a bzr plugin.
- Subclasses need to implement `format_classes`.
+ Subclasses need to implement `probers`.
"""
needs_bzr_tree = False
@property
- def format_classes(self):
- """The format classes that should be tried for this import."""
+ def probers(self):
+ """The probers that should be tried for this import."""
raise NotImplementedError
- def getExtraPullArgs(self):
- """Return extra arguments to `InterBranch.pull`.
-
- This method only really exists because only bzr-git and bzr-svn
- support the 'limit' argument to this method. When bzr-hg plugin does
- too, this method can go away.
+ def getRevisionLimit(self):
+ """Return maximum number of revisions to fetch (None for no limit).
"""
- return {}
+ return None
def _doImport(self):
self._logger.info("Starting job.")
@@ -574,9 +570,10 @@
"Getting exising bzr branch from central store.")
bazaar_branch = self.getBazaarBranch()
transport = get_transport(self.source_details.url)
- for format_class in self.format_classes:
+ for prober_kls in self.probers:
+ prober = prober_kls()
try:
- format = format_class.probe_transport(transport)
+ format = prober.probe_transport(transport)
break
except NotBranchError:
pass
@@ -586,19 +583,19 @@
remote_branch_tip = remote_branch.last_revision()
inter_branch = InterBranch.get(remote_branch, bazaar_branch)
self._logger.info("Importing branch.")
- pull_result = inter_branch.pull(
- overwrite=True, **self.getExtraPullArgs())
+ inter_branch.fetch(limit=self.getRevisionLimit())
+ if bazaar_branch.repository.has_revision(remote_branch_tip):
+ pull_result = inter_branch.pull(overwrite=True)
+ if pull_result.old_revid != pull_result.new_revid:
+ result = CodeImportWorkerExitCode.SUCCESS
+ else:
+ result = CodeImportWorkerExitCode.SUCCESS_NOCHANGE
+ else:
+ result = CodeImportWorkerExitCode.SUCCESS_PARTIAL
self._logger.info("Pushing local import branch to central store.")
self.pushBazaarBranch(bazaar_branch)
- last_imported_revison = bazaar_branch.last_revision()
self._logger.info("Job complete.")
- if last_imported_revison == remote_branch_tip:
- if pull_result.old_revid != pull_result.new_revid:
- return CodeImportWorkerExitCode.SUCCESS
- else:
- return CodeImportWorkerExitCode.SUCCESS_NOCHANGE
- else:
- return CodeImportWorkerExitCode.SUCCESS_PARTIAL
+ return result
finally:
bzrlib.ui.ui_factory = saved_factory
@@ -610,16 +607,15 @@
"""
@property
- def format_classes(self):
- """See `PullingImportWorker.opening_format`."""
- # We only return LocalGitBzrDirFormat for tests.
+ def probers(self):
+ """See `PullingImportWorker.probers`."""
from bzrlib.plugins.git import (
- LocalGitBzrDirFormat, RemoteGitBzrDirFormat)
- return [LocalGitBzrDirFormat, RemoteGitBzrDirFormat]
+ LocalGitProber, RemoteGitProber)
+ return [LocalGitProber, RemoteGitProber]
- def getExtraPullArgs(self):
- """See `PullingImportWorker.getExtraPullArgs`."""
- return {'limit': config.codeimport.git_revisions_import_limit}
+ def getRevisionLimit(self):
+ """See `PullingImportWorker.getRevisionLimit`."""
+ return config.codeimport.git_revisions_import_limit
def getBazaarBranch(self):
"""See `ImportWorker.getBazaarBranch`.
@@ -666,11 +662,14 @@
"""
@property
- def format_classes(self):
- """See `PullingImportWorker.opening_format`."""
- # We only return HgLocalRepository for tests.
- from bzrlib.plugins.hg import HgBzrDirFormat
- return [HgBzrDirFormat]
+ def probers(self):
+ """See `PullingImportWorker.probers`."""
+ from bzrlib.plugins.hg import HgProber
+ return [HgProber]
+
+ def getRevisionLimit(self):
+ """See `PullingImportWorker.getRevisionLimit`."""
+ return config.codeimport.hg_revisions_import_limit
def getBazaarBranch(self):
"""See `ImportWorker.getBazaarBranch`.
@@ -714,12 +713,12 @@
class BzrSvnImportWorker(PullingImportWorker):
"""An import worker for importing Subversion via bzr-svn."""
- def getExtraPullArgs(self):
- """See `PullingImportWorker.getExtraPullArgs`."""
- return {'limit': config.codeimport.svn_revisions_import_limit}
+ def getRevisionLimit(self):
+ """See `PullingImportWorker.getRevisionLimit`."""
+ return config.codeimport.svn_revisions_import_limit
@property
- def format_classes(self):
- """See `PullingImportWorker.opening_format`."""
- from bzrlib.plugins.svn.format import SvnRemoteFormat
- return [SvnRemoteFormat]
+ def probers(self):
+ """See `PullingImportWorker.probers`."""
+ from bzrlib.plugins.svn import SvnRemoteProber
+ return [SvnRemoteProber]
=== modified file 'lib/lp/codehosting/puller/tests/__init__.py'
--- lib/lp/codehosting/puller/tests/__init__.py 2010-08-20 20:31:18 +0000
+++ lib/lp/codehosting/puller/tests/__init__.py 2011-06-01 19:14:30 +0000
@@ -12,8 +12,10 @@
from bzrlib import urlutils
from bzrlib.tests import (
+ TestCaseWithTransport,
+ )
+from bzrlib.tests.http_server import (
HttpServer,
- TestCaseWithTransport,
)
from bzrlib.tests.http_server import (
TestingHTTPServer,
=== modified file 'lib/lp/codehosting/tests/test_bzrutils.py'
--- lib/lp/codehosting/tests/test_bzrutils.py 2010-08-20 20:31:18 +0000
+++ lib/lp/codehosting/tests/test_bzrutils.py 2011-06-01 19:14:30 +0000
@@ -31,7 +31,7 @@
)
from bzrlib.tests.per_branch import (
branch_scenarios,
- TestCaseWithBzrDir,
+ TestCaseWithControlDir,
)
from bzrlib.transport import chroot
from lazr.uri import URI
@@ -51,7 +51,7 @@
from lp.codehosting.tests.helpers import TestResultWrapper
-class TestGetBranchStackedOnURL(TestCaseWithBzrDir):
+class TestGetBranchStackedOnURL(TestCaseWithControlDir):
"""Tests for get_branch_stacked_on_url()."""
def __str__(self):
@@ -63,7 +63,7 @@
# test are dropped, so the daemon threads serving those branches can
# exit.
gc.collect()
- TestCaseWithBzrDir.tearDown(self)
+ TestCaseWithControlDir.tearDown(self)
def run(self, result=None):
"""Run the test, with the result wrapped so that it knows about skips.
=== modified file 'utilities/sourcedeps.cache'
--- utilities/sourcedeps.cache 2011-05-24 17:13:58 +0000
+++ utilities/sourcedeps.cache 2011-06-01 19:14:30 +0000
@@ -1,8 +1,4 @@
{
- "bzr-builder": [
- 68,
- "launchpad@xxxxxxxxxxxxxxxxx-20101123183213-777lz46xgagn1deg"
- ],
"testresources": [
16,
"robertc@xxxxxxxxxxxxxxxxx-20050911111209-ee5da49011cf936a"
@@ -20,8 +16,8 @@
"launchpad@xxxxxxxxxxxxxxxxx-20100325120516-q8to5dx3gga4wlvi"
],
"subvertpy": [
- 2042,
- "launchpad@xxxxxxxxxxxxxxxxx-20100727083620-u93rikomkjfj82dw"
+ 2043,
+ "launchpad@xxxxxxxxxxxxxxxxx-20110520175118-iovx148eje6qt7jt"
],
"python-debian": [
186,
@@ -31,40 +27,44 @@
24,
"launchpad@xxxxxxxxxxxxxxxxx-20100601182722-wo7h2fh0fvyw3aaq"
],
- "lpreview": [
- 23,
- "launchpad@xxxxxxxxxxxxxxxxx-20090720061538-euyh68ifavhy0pi8"
- ],
"bzr-git": [
- 258,
- "launchpad@xxxxxxxxxxxxxxxxx-20100812210320-i61pvvvo9mjo2wp7"
+ 259,
+ "launchpad@xxxxxxxxxxxxxxxxx-20110601140035-gl5merbechngjw5s"
+ ],
+ "loggerhead": [
+ 445,
+ "john@xxxxxxxxxxxxxxxxx-20110325141442-536j4be3x0c464zy"
+ ],
+ "bzr-builder": [
+ 68,
+ "launchpad@xxxxxxxxxxxxxxxxx-20101123183213-777lz46xgagn1deg"
],
"bzr-loom": [
- 48,
- "launchpad@xxxxxxxxxxxxxxxxx-20100806142619-4huubp7dmz6ax9j2"
+ 49,
+ "launchpad@xxxxxxxxxxxxxxxxx-20110601122412-54vo3k8yae9i2zve"
],
"old_xmlplus": [
4,
"sinzui-20090526164636-1swugzupwvjgomo4"
],
- "loggerhead": [
- 445,
- "john@xxxxxxxxxxxxxxxxx-20110325141442-536j4be3x0c464zy"
+ "lpreview": [
+ 23,
+ "launchpad@xxxxxxxxxxxxxxxxx-20090720061538-euyh68ifavhy0pi8"
],
"difftacular": [
6,
"aaron@xxxxxxxxxxxxxxxx-20100715135013-uoi3q430urx9gwb8"
],
"bzr-svn": [
- 2710,
- "launchpad@xxxxxxxxxxxxxxxxx-20100830004921-6c4hehto20axdkn6"
+ 2712,
+ "launchpad@xxxxxxxxxxxxxxxxx-20110601185515-xaik1gqvhtr5jiph"
],
"bzr-hg": [
- 283,
- "launchpad@xxxxxxxxxxxxxxxxx-20100814010415-lzqc5jufq5u1hd44"
+ 285,
+ "launchpad@xxxxxxxxxxxxxxxxx-20110601185713-cy6wd1u0iim2m9am"
],
"dulwich": [
- 424,
- "launchpad@xxxxxxxxxxxxxxxxx-20100812211021-x1uaubka3ael1j62"
+ 426,
+ "launchpad@xxxxxxxxxxxxxxxxx-20110520175715-e90dzs8os0kotbm9"
]
}
\ No newline at end of file
=== modified file 'utilities/sourcedeps.conf'
--- utilities/sourcedeps.conf 2011-04-21 01:13:19 +0000
+++ utilities/sourcedeps.conf 2011-06-01 19:14:30 +0000
@@ -1,10 +1,10 @@
bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=68
-bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=258
-bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=283
-bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=48
-bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2710
+bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=259
+bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=285
+bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=49
+bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2712
cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=432
-dulwich lp:~launchpad-pqm/dulwich/devel;revno=424
+dulwich lp:~launchpad-pqm/dulwich/devel;revno=426
difftacular lp:difftacular;revno=6
loggerhead lp:~loggerhead-team/loggerhead/trunk-rich;revno=445
lpreview lp:~launchpad-pqm/bzr-lpreview/devel;revno=23
@@ -12,6 +12,6 @@
old_xmlplus lp:~launchpad-pqm/dtdparser/trunk;revno=4
pygettextpo lp:~launchpad-pqm/pygettextpo/trunk;revno=24
pygpgme lp:~launchpad-pqm/pygpgme/devel;revno=49
-subvertpy lp:~launchpad-pqm/subvertpy/trunk;revno=2042
+subvertpy lp:~launchpad-pqm/subvertpy/trunk;revno=2043
python-debian lp:~launchpad-pqm/python-debian/devel;revno=186
testresources lp:~launchpad-pqm/testresources/dev;revno=16
=== modified file 'versions.cfg'
--- versions.cfg 2011-05-19 10:48:22 +0000
+++ versions.cfg 2011-06-01 19:14:30 +0000
@@ -6,8 +6,7 @@
ampoule = 0.2.0
BeautifulSoup = 3.1.0.1
-# from lp:~launchpad/bzr/2.2-lp
-bzr = 2.2.2-lp-2
+bzr = 2.3.3
chameleon.core = 1.0b35
chameleon.zpt = 1.0b17
ClientForm = 0.2.10
Follow ups