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

Proposed by Qwerty Chouskie on 2016-06-13
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 2016-06-13 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.

+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 on 2013-10-22

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
1=== modified file 'mapping.py'
2--- mapping.py 2013-09-02 00:54:58 +0000
3+++ mapping.py 2016-06-13 02:50:14 +0000
4@@ -333,7 +333,11 @@
5 if commit is None:
6 raise AssertionError("Commit object can't be None")
7 if commit.extra:
8- raise UnknownCommitExtra(commit, [item[0] for item in commit.extra])
9+ for (extra_key, extra_value) in commit.extra:
10+ if extra_key == "gpgsig":
11+ pass
12+ else:
13+ raise UnknownCommitExtra(commit, [item[0] for item in commit.extra])
14 rev = ForeignRevision(commit.id, self,
15 self.revision_id_foreign_to_bzr(commit.id))
16 rev.git_metadata = None
17
18=== modified file 'tests/test_mapping.py'
19--- tests/test_mapping.py 2012-03-26 20:48:24 +0000
20+++ tests/test_mapping.py 2016-06-13 02:50:14 +0000
21@@ -186,8 +186,10 @@
22 c.commit_timezone = 60 * 5
23 c.author_timezone = 60 * 3
24 c.author = "Author"
25+ c.extra.append(("gpgsig", "cryptostuff"))
26+ mapping = BzrGitMappingv1()
27+ mapping.import_commit(c, mapping.revision_id_foreign_to_bzr)
28 c.extra.append(("iamextra", "foo"))
29- mapping = BzrGitMappingv1()
30 self.assertRaises(UnknownCommitExtra, mapping.import_commit, c,
31 mapping.revision_id_foreign_to_bzr)
32

Subscribers

People subscribed via source and target branches

to all changes: