Merge lp:~cjwatson/launchpad/mp-job-new-revision-author into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18395
Proposed branch: lp:~cjwatson/launchpad/mp-job-new-revision-author
Merge into: lp:launchpad
Diff against target: 32 lines (+6/-1)
2 files modified
database/schema/security.cfg (+1/-1)
lib/lp/code/model/tests/test_branchmergeproposaljobs.py (+5/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad/mp-job-new-revision-author
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+324641@code.launchpad.net

Commit message

Fix crash when scanning a Git-based MP when we need to link a new RevisionAuthor to an existing Person.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/schema/security.cfg'
2--- database/schema/security.cfg 2017-05-19 15:52:35 +0000
3+++ database/schema/security.cfg 2017-05-25 17:35:24 +0000
4@@ -2009,7 +2009,7 @@
5 public.productseries = SELECT
6 public.project = SELECT
7 public.revision = SELECT
8-public.revisionauthor = SELECT, INSERT
9+public.revisionauthor = SELECT, INSERT, UPDATE
10 public.seriessourcepackagebranch = SELECT
11 public.sourcepackagename = SELECT
12 public.structuralsubscription = SELECT
13
14=== modified file 'lib/lp/code/model/tests/test_branchmergeproposaljobs.py'
15--- lib/lp/code/model/tests/test_branchmergeproposaljobs.py 2017-05-19 15:52:35 +0000
16+++ lib/lp/code/model/tests/test_branchmergeproposaljobs.py 2017-05-25 17:35:24 +0000
17@@ -272,10 +272,15 @@
18 subscriber = self.factory.makePerson()
19 bug.default_bugtask.target.addSubscription(subscriber, subscriber)
20 bmp, _, _, patch = self.createExampleGitMerge()
21+ committer = self.factory.makePerson()
22 self.hosting_fixture.getLog.result = [
23 {
24 u"sha1": unicode(hashlib.sha1("tip").hexdigest()),
25 u"message": u"Fix upside-down messages\n\nLP: #%d" % bug.id,
26+ u"committer": {
27+ u"name": committer.display_name,
28+ u"email": committer.preferredemail.email,
29+ },
30 },
31 ]
32 job = UpdatePreviewDiffJob.create(bmp)