Merge lp:~jelmer/launchpad/update-bzr-git into lp:launchpad

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 11386
Proposed branch: lp:~jelmer/launchpad/update-bzr-git
Merge into: lp:launchpad
Diff against target: 75 lines (+11/-13)
3 files modified
lib/lp/codehosting/codeimport/tests/servers.py (+3/-2)
lib/lp/codehosting/codeimport/tests/test_worker.py (+6/-9)
utilities/sourcedeps.conf (+2/-2)
To merge this branch: bzr merge lp:~jelmer/launchpad/update-bzr-git
Reviewer Review Type Date Requested Status
Māris Fogels (community) Approve
Tim Penhey (community) Approve
Launchpad code reviewers code Pending
Review via email: mp+32527@code.launchpad.net

Commit message

Update to newer versions of dulwich and bzr-git.

Description of the change

Update the versions of bzr-git and dulwich used.

This fixes two bugs, which should get ~15 of the 35 currently failing imports working again (the rest are probably caused by the remote host no longer existing, running a git server or the remote branch having disappeared).

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) :
review: Approve
Revision history for this message
Māris Fogels (mars) wrote :

As stated on IRC, the test fixes look ok, but I recommend moving the import statements up to the top of the file, and using .getUniqueString() for the message instead of 'dsadsa'.

Good to go, r=mars

Maris

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/servers.py'
--- lib/lp/codehosting/codeimport/tests/servers.py 2010-02-01 04:15:51 +0000
+++ lib/lp/codehosting/codeimport/tests/servers.py 2010-08-18 14:18:47 +0000
@@ -22,6 +22,7 @@
22import time22import time
2323
24import CVS24import CVS
25from dulwich.repo import Repo as GitRepo
25import pysvn26import pysvn
26import svn_oo27import svn_oo
2728
@@ -199,11 +200,11 @@
199 self.repo_url = repo_url200 self.repo_url = repo_url
200201
201 def makeRepo(self, tree_contents):202 def makeRepo(self, tree_contents):
202 from bzrlib.plugins.git.tests import GitBranchBuilder, run_git203 from bzrlib.plugins.git.tests import GitBranchBuilder
203 wd = os.getcwd()204 wd = os.getcwd()
204 try:205 try:
205 os.chdir(self.repo_url)206 os.chdir(self.repo_url)
206 run_git('init')207 GitRepo.init(".")
207 builder = GitBranchBuilder()208 builder = GitBranchBuilder()
208 for filename, contents in tree_contents:209 for filename, contents in tree_contents:
209 builder.set_file(filename, contents, False)210 builder.set_file(filename, contents, False)
210211
=== modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py'
--- lib/lp/codehosting/codeimport/tests/test_worker.py 2010-08-04 15:59:53 +0000
+++ lib/lp/codehosting/codeimport/tests/test_worker.py 2010-08-18 14:18:47 +0000
@@ -23,6 +23,8 @@
2323
24from CVS import Repository, tree as CVSTree24from CVS import Repository, tree as CVSTree
2525
26from dulwich.repo import Repo as GitRepo
27
26from canonical.config import config28from canonical.config import config
27from canonical.launchpad.scripts.logger import QuietFakeLogger29from canonical.launchpad.scripts.logger import QuietFakeLogger
28from canonical.testing import BaseLayer30from canonical.testing import BaseLayer
@@ -1027,15 +1029,10 @@
10271029
1028 def makeForeignCommit(self, source_details):1030 def makeForeignCommit(self, source_details):
1029 """Change the foreign tree, generating exactly one commit."""1031 """Change the foreign tree, generating exactly one commit."""
1030 from bzrlib.plugins.git.tests import run_git1032 repo = GitRepo(source_details.url)
1031 wd = os.getcwd()1033 repo.do_commit(message=self.factory.getUniqueString(),
1032 os.chdir(source_details.url)1034 committer="Joe Random Hacker <joe@example.com>")
1033 try:1035 self.foreign_commit_count += 1
1034 run_git('config', 'user.name', 'Joe Random Hacker')
1035 run_git('commit', '-m', 'dsadas')
1036 self.foreign_commit_count += 1
1037 finally:
1038 os.chdir(wd)
10391036
1040 def makeSourceDetails(self, branch_name, files):1037 def makeSourceDetails(self, branch_name, files):
1041 """Make a Git `CodeImportSourceDetails` pointing at a real Git repo.1038 """Make a Git `CodeImportSourceDetails` pointing at a real Git repo.
10421039
=== modified file 'utilities/sourcedeps.conf'
--- utilities/sourcedeps.conf 2010-08-17 04:40:01 +0000
+++ utilities/sourcedeps.conf 2010-08-18 14:18:47 +0000
@@ -1,10 +1,10 @@
1bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=651bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=65
2bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=2572bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=258
3bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=2823bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=282
4bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=484bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=48
5bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=27095bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2709
6cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=4326cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=432
7dulwich lp:~launchpad-pqm/dulwich/devel;revno=4237dulwich lp:~launchpad-pqm/dulwich/devel;revno=424
8loggerhead lp:~launchpad-pqm/loggerhead/devel;revno=1768loggerhead lp:~launchpad-pqm/loggerhead/devel;revno=176
9lpreview lp:~launchpad-pqm/bzr-lpreview/devel;revno=239lpreview lp:~launchpad-pqm/bzr-lpreview/devel;revno=23
10mailman lp:~launchpad-pqm/mailman/2.1;revno=97610mailman lp:~launchpad-pqm/mailman/2.1;revno=976