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
1=== modified file 'lib/lp/codehosting/codeimport/tests/servers.py'
2--- lib/lp/codehosting/codeimport/tests/servers.py 2010-02-01 04:15:51 +0000
3+++ lib/lp/codehosting/codeimport/tests/servers.py 2010-08-18 14:18:47 +0000
4@@ -22,6 +22,7 @@
5 import time
6
7 import CVS
8+from dulwich.repo import Repo as GitRepo
9 import pysvn
10 import svn_oo
11
12@@ -199,11 +200,11 @@
13 self.repo_url = repo_url
14
15 def makeRepo(self, tree_contents):
16- from bzrlib.plugins.git.tests import GitBranchBuilder, run_git
17+ from bzrlib.plugins.git.tests import GitBranchBuilder
18 wd = os.getcwd()
19 try:
20 os.chdir(self.repo_url)
21- run_git('init')
22+ GitRepo.init(".")
23 builder = GitBranchBuilder()
24 for filename, contents in tree_contents:
25 builder.set_file(filename, contents, False)
26
27=== modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py'
28--- lib/lp/codehosting/codeimport/tests/test_worker.py 2010-08-04 15:59:53 +0000
29+++ lib/lp/codehosting/codeimport/tests/test_worker.py 2010-08-18 14:18:47 +0000
30@@ -23,6 +23,8 @@
31
32 from CVS import Repository, tree as CVSTree
33
34+from dulwich.repo import Repo as GitRepo
35+
36 from canonical.config import config
37 from canonical.launchpad.scripts.logger import QuietFakeLogger
38 from canonical.testing import BaseLayer
39@@ -1027,15 +1029,10 @@
40
41 def makeForeignCommit(self, source_details):
42 """Change the foreign tree, generating exactly one commit."""
43- from bzrlib.plugins.git.tests import run_git
44- wd = os.getcwd()
45- os.chdir(source_details.url)
46- try:
47- run_git('config', 'user.name', 'Joe Random Hacker')
48- run_git('commit', '-m', 'dsadas')
49- self.foreign_commit_count += 1
50- finally:
51- os.chdir(wd)
52+ repo = GitRepo(source_details.url)
53+ repo.do_commit(message=self.factory.getUniqueString(),
54+ committer="Joe Random Hacker <joe@example.com>")
55+ self.foreign_commit_count += 1
56
57 def makeSourceDetails(self, branch_name, files):
58 """Make a Git `CodeImportSourceDetails` pointing at a real Git repo.
59
60=== modified file 'utilities/sourcedeps.conf'
61--- utilities/sourcedeps.conf 2010-08-17 04:40:01 +0000
62+++ utilities/sourcedeps.conf 2010-08-18 14:18:47 +0000
63@@ -1,10 +1,10 @@
64 bzr-builder lp:~launchpad-pqm/bzr-builder/trunk;revno=65
65-bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=257
66+bzr-git lp:~launchpad-pqm/bzr-git/devel;revno=258
67 bzr-hg lp:~launchpad-pqm/bzr-hg/devel;revno=282
68 bzr-loom lp:~launchpad-pqm/bzr-loom/trunk;revno=48
69 bzr-svn lp:~launchpad-pqm/bzr-svn/devel;revno=2709
70 cscvs lp:~launchpad-pqm/launchpad-cscvs/devel;revno=432
71-dulwich lp:~launchpad-pqm/dulwich/devel;revno=423
72+dulwich lp:~launchpad-pqm/dulwich/devel;revno=424
73 loggerhead lp:~launchpad-pqm/loggerhead/devel;revno=176
74 lpreview lp:~launchpad-pqm/bzr-lpreview/devel;revno=23
75 mailman lp:~launchpad-pqm/mailman/2.1;revno=976