Merge lp:~simon-marchi/bzr-git/devel into lp:bzr-git

Proposed by Qwerty Chouskie
Status: Needs review
Proposed branch: lp:~simon-marchi/bzr-git/devel
Merge into: lp:bzr-git
Diff against target: 31 lines (+8/-2)
2 files modified
mapping.py (+5/-1)
tests/test_mapping.py (+3/-1)
To merge this branch: bzr merge lp:~simon-marchi/bzr-git/devel
Reviewer Review Type Date Requested Status
konstin Pending
Review via email: mp+297144@code.launchpad.net

Commit message

Description of the change

See https://bugs.launchpad.net/ubuntu/+source/bzr-git/+bug/1084403/comments/20
I do not claim credit for this code, just found it.

To post a comment you must log in.
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

+1 for merging this one, I can't test but I really would like to see the bug fixed.

Unmerged revisions

1629. By Simon Marchi

Ignore gpgsig fields when importing git commits

tests/test_mapping.py is modified accordingly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mapping.py'
--- mapping.py 2013-09-02 00:54:58 +0000
+++ mapping.py 2016-06-13 02:50:14 +0000
@@ -333,7 +333,11 @@
333 if commit is None:333 if commit is None:
334 raise AssertionError("Commit object can't be None")334 raise AssertionError("Commit object can't be None")
335 if commit.extra:335 if commit.extra:
336 raise UnknownCommitExtra(commit, [item[0] for item in commit.extra])336 for (extra_key, extra_value) in commit.extra:
337 if extra_key == "gpgsig":
338 pass
339 else:
340 raise UnknownCommitExtra(commit, [item[0] for item in commit.extra])
337 rev = ForeignRevision(commit.id, self,341 rev = ForeignRevision(commit.id, self,
338 self.revision_id_foreign_to_bzr(commit.id))342 self.revision_id_foreign_to_bzr(commit.id))
339 rev.git_metadata = None343 rev.git_metadata = None
340344
=== modified file 'tests/test_mapping.py'
--- tests/test_mapping.py 2012-03-26 20:48:24 +0000
+++ tests/test_mapping.py 2016-06-13 02:50:14 +0000
@@ -186,8 +186,10 @@
186 c.commit_timezone = 60 * 5186 c.commit_timezone = 60 * 5
187 c.author_timezone = 60 * 3187 c.author_timezone = 60 * 3
188 c.author = "Author"188 c.author = "Author"
189 c.extra.append(("gpgsig", "cryptostuff"))
190 mapping = BzrGitMappingv1()
191 mapping.import_commit(c, mapping.revision_id_foreign_to_bzr)
189 c.extra.append(("iamextra", "foo"))192 c.extra.append(("iamextra", "foo"))
190 mapping = BzrGitMappingv1()
191 self.assertRaises(UnknownCommitExtra, mapping.import_commit, c,193 self.assertRaises(UnknownCommitExtra, mapping.import_commit, c,
192 mapping.revision_id_foreign_to_bzr)194 mapping.revision_id_foreign_to_bzr)
193195

Subscribers

People subscribed via source and target branches

to all changes: