Merge lp:~mwhudson/launchpad/incremental-bzr-svn-imports into lp:launchpad

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~mwhudson/launchpad/incremental-bzr-svn-imports
Merge into: lp:launchpad
Diff against target: 108 lines (+35/-19)
3 files modified
lib/lp/codehosting/codeimport/tests/test_worker.py (+28/-16)
lib/lp/codehosting/codeimport/worker.py (+6/-2)
utilities/sourcedeps.conf (+1/-1)
To merge this branch: bzr merge lp:~mwhudson/launchpad/incremental-bzr-svn-imports
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+21209@code.launchpad.net

Commit message

Move to a newer bzr-svn and start doing incremental bzr-svn imports

Description of the change

Hi,

This branch moves us to using a newer bzr-svn and does incremental bzr-svn imports.

Cheers,
mwh

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Well that looks easy. I bet the bzr-svn branch was bigger.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py'
--- lib/lp/codehosting/codeimport/tests/test_worker.py 2010-02-23 22:37:03 +0000
+++ lib/lp/codehosting/codeimport/tests/test_worker.py 2010-03-12 02:35:28 +0000
@@ -896,8 +896,33 @@
896 self.assertRaises(NotBranchError, worker.run)896 self.assertRaises(NotBranchError, worker.run)
897897
898898
899class PartialTest:
900 """A test case for incremental imports.
901
902 When all foreign branch plugins support incremental imports, this can go
903 into PullingImportWorkerTests. For now though, bzr-hg still lacks the
904 needed support.
905 """
906
907 def test_partial(self):
908 # Only config.codeimport.revisions_import_limit will be imported in a
909 # given run. When bzr-svn and bzr-hg support revision import limits,
910 # this test case can be moved up to PullingImportWorkerTests.
911 worker = self.makeImportWorker(self.makeSourceDetails(
912 'trunk', [('README', 'Original contents')]))
913 self.makeForeignCommit(worker.source_details)
914 self.assertTrue(self.foreign_commit_count > 1)
915 self.pushConfig(
916 'codeimport', revisions_import_limit=self.foreign_commit_count-1)
917 self.assertEqual(
918 CodeImportWorkerExitCode.SUCCESS_PARTIAL, worker.run())
919 self.assertEqual(
920 CodeImportWorkerExitCode.SUCCESS, worker.run())
921
922
923
899class TestGitImport(WorkerTest, TestActualImportMixin,924class TestGitImport(WorkerTest, TestActualImportMixin,
900 PullingImportWorkerTests):925 PullingImportWorkerTests, PartialTest):
901926
902 rcstype = 'git'927 rcstype = 'git'
903928
@@ -950,20 +975,6 @@
950 return self.factory.makeCodeImportSourceDetails(975 return self.factory.makeCodeImportSourceDetails(
951 rcstype='git', url=repository_path)976 rcstype='git', url=repository_path)
952977
953 def test_partial(self):
954 # Only config.codeimport.revisions_import_limit will be imported in a
955 # given run. When bzr-svn and bzr-hg support revision import limits,
956 # this test case can be moved up to PullingImportWorkerTests.
957 worker = self.makeImportWorker(self.makeSourceDetails(
958 'trunk', [('README', 'Original contents')]))
959 self.makeForeignCommit(worker.source_details)
960 self.assertTrue(self.foreign_commit_count > 1)
961 self.pushConfig(
962 'codeimport', revisions_import_limit=self.foreign_commit_count-1)
963 self.assertEqual(
964 CodeImportWorkerExitCode.SUCCESS_PARTIAL, worker.run())
965 self.assertEqual(
966 CodeImportWorkerExitCode.SUCCESS, worker.run())
967978
968979
969class TestMercurialImport(WorkerTest, TestActualImportMixin,980class TestMercurialImport(WorkerTest, TestActualImportMixin,
@@ -1018,7 +1029,8 @@
10181029
10191030
1020class TestBzrSvnImport(WorkerTest, SubversionImportHelpers,1031class TestBzrSvnImport(WorkerTest, SubversionImportHelpers,
1021 TestActualImportMixin, PullingImportWorkerTests):1032 TestActualImportMixin, PullingImportWorkerTests,
1033 PartialTest):
10221034
1023 rcstype = 'bzr-svn'1035 rcstype = 'bzr-svn'
10241036
10251037
=== modified file 'lib/lp/codehosting/codeimport/worker.py'
--- lib/lp/codehosting/codeimport/worker.py 2010-02-23 21:26:40 +0000
+++ lib/lp/codehosting/codeimport/worker.py 2010-03-12 02:35:28 +0000
@@ -524,8 +524,8 @@
524 def getExtraPullArgs(self):524 def getExtraPullArgs(self):
525 """Return extra arguments to `InterBranch.pull`.525 """Return extra arguments to `InterBranch.pull`.
526526
527 This method only really exists because only bzr-git supports the527 This method only really exists because only bzr-git and bzr-svn
528 'limit' argument to this method. When bzr-svn and bzr-hg plugin do528 support the 'limit' argument to this method. When bzr-hg plugin does
529 too, this method can go away.529 too, this method can go away.
530 """530 """
531 return {}531 return {}
@@ -652,6 +652,10 @@
652class BzrSvnImportWorker(PullingImportWorker):652class BzrSvnImportWorker(PullingImportWorker):
653 """An import worker for importing Subversion via bzr-svn."""653 """An import worker for importing Subversion via bzr-svn."""
654654
655 def getExtraPullArgs(self):
656 """See `PullingImportWorker.getExtraPullArgs`."""
657 return {'limit': config.codeimport.revisions_import_limit}
658
655 @property659 @property
656 def format_classes(self):660 def format_classes(self):
657 """See `PullingImportWorker.opening_format`."""661 """See `PullingImportWorker.opening_format`."""
658662
=== modified file 'utilities/sourcedeps.conf'
--- utilities/sourcedeps.conf 2010-03-04 20:19:39 +0000
+++ utilities/sourcedeps.conf 2010-03-12 02:35:28 +0000
@@ -2,7 +2,7 @@
2bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=2512bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=251
3bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=2813bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=281
4bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=474bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=47
5bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=27075bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2708
6cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=4306cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=430
7dulwich lp:~launchpad-pqm/dulwich/devel;revno=4177dulwich lp:~launchpad-pqm/dulwich/devel;revno=417
8launchpad-loggerhead lp:~launchpad-pqm/launchpad-loggerhead/devel;revno=548launchpad-loggerhead lp:~launchpad-pqm/launchpad-loggerhead/devel;revno=54