mozreview: print more diff info; r=smacleod draft
authorGregory Szorc <gps@mozilla.com>
Thu, 07 Jan 2016 16:59:17 -0800
changeset 6706 941aecdaad4b8e570f03c896bd45a61f524c6e68
parent 6705 c157d16ca73641125cfc07d011fc9bc50edbad75
child 6707 6c164172d1ecdf2c8b0acc20eda349716f78be5e
push id513
push usergszorc@mozilla.com
push dateWed, 13 Jan 2016 02:13:15 +0000
reviewerssmacleod
mozreview: print more diff info; r=smacleod As part of changing how review requests are submitted, I ran into trouble getting diffs and diffsets to transition properly. To help me debug, this commit adds dumping of diff state from the published review request along with a few other fields to the dumped review request output.
hgext/reviewboard/tests/test-commits-added.t
hgext/reviewboard/tests/test-commits-deleted-no-obsolescence.t
hgext/reviewboard/tests/test-commits-deleted-obsolescence.t
hgext/reviewboard/tests/test-operation-prevention.t
hgext/reviewboard/tests/test-push-http.t
hgext/reviewboard/tests/test-review-request-approval.t
hgext/reviewboard/tests/test-review-request-closed-discarded.t
hgext/reviewboard/tests/test-review-request-closed-submitted.t
hgext/reviewboard/tests/test-review-request-delete-draft.t
hgext/reviewboard/tests/test-specify-reviewers.t
hgext/reviewboard/tests/test-unicode.t
pylib/mozreviewbots/tests/test-eslintbot-noop.t
pylib/mozreviewbots/tests/test-pylintbot-line-adjustment.t
pylib/mozreviewbots/tests/test-snarkbot.t
testing/vcttesting/reviewboard/mach_commands.py
--- a/hgext/reviewboard/tests/test-commits-added.t
+++ b/hgext/reviewboard/tests/test-commits-added.t
@@ -92,16 +92,17 @@ The parent review should have its descri
   target_people: []
   extra_data:
     p2rb: true
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.unpublished_rids: '[2, 3, 4]'
+  diffs: []
   approved: false
   approval_failure: The review request is not public.
   draft:
     bugs:
     - '1'
     commit: bz://1/mynick
     summary: bz://1/mynick
     description: This is the parent review request
@@ -116,16 +117,18 @@ The parent review should have its descri
       p2rb.identifier: bz://1/mynick
       p2rb.is_squashed: true
       p2rb.reviewer_map: '{"3": [], "2": []}'
       p2rb.unpublished_rids: '[]'
     diffs:
     - id: 4
       revision: 1
       base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+      name: diff
+      extra: {}
       patch:
       - diff --git a/foo b/foo
       - '--- a/foo'
       - +++ b/foo
       - '@@ -1,1 +1,1 @@'
       - -foo0
       - +foo3
       - ''
--- a/hgext/reviewboard/tests/test-commits-deleted-no-obsolescence.t
+++ b/hgext/reviewboard/tests/test-commits-deleted-no-obsolescence.t
@@ -126,16 +126,54 @@ Review request 6 should be added to the 
       3], ["d751d4c04967ba4ec08425f618ba8d2c1b9d161a", 4], ["98dd6a7335dbea4bd3d2f2d1662fd6db45f1ddfb",
       5], ["76088734e3cba33be80930be14e7cd1e9ee474be", 6]]'
     p2rb.discard_on_publish_rids: '[6]'
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - diff --git a/foo5 b/foo5
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo5
+    - '@@ -0,0 +1,1 @@'
+    - +foo5
+    - ''
   approved: false
   approval_failure: Commit 6bd3fbee3dfaa83a6fe253b5a9bdc625a5d0be0e is not approved.
   draft:
     bugs:
     - '1'
     commit: bz://1/mynick
     summary: bz://1/mynick
     description: This is the parent review request
@@ -152,16 +190,18 @@ Review request 6 should be added to the 
       p2rb.identifier: bz://1/mynick
       p2rb.is_squashed: true
       p2rb.reviewer_map: '{}'
       p2rb.unpublished_rids: '[]'
     diffs:
     - id: 7
       revision: 2
       base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+      name: diff
+      extra: {}
       patch:
       - diff --git a/foo1 b/foo1
       - new file mode 100644
       - '--- /dev/null'
       - +++ b/foo1
       - '@@ -0,0 +1,1 @@'
       - +foo1
       - diff --git a/foo2 b/foo2
@@ -201,16 +241,30 @@ Review 6 should be marked as discarded
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 76088734e3cba33be80930be14e7cd1e9ee474be
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 6
+    revision: 1
+    base_commit_id: 98dd6a7335dbea4bd3d2f2d1662fd6db45f1ddfb
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo5 b/foo5
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo5
+    - '@@ -0,0 +1,1 @@'
+    - +foo5
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Dropping the first commit should shuffle all the reviews down the line.
 NOTE: If we ever employ heuristic matching on the server, this test
 likely gets invalidated.
 
   $ hg -q rebase -s 2 -d 0
@@ -257,16 +311,30 @@ The first commit was rewritten (we assum
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 6bd3fbee3dfaa83a6fe253b5a9bdc625a5d0be0e
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
   draft:
     bugs:
     - '1'
     commit: null
     summary: Bug 1 - Foo 2
     description: Bug 1 - Foo 2
@@ -277,16 +345,18 @@ The first commit was rewritten (we assum
       p2rb.commit_id: 7050183d97d5f601da86fb313dd8783ccf1ade18
       p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
       p2rb.identifier: bz://1/mynick
       p2rb.is_squashed: false
     diffs:
     - id: 9
       revision: 2
       base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+      name: diff
+      extra: {}
       patch:
       - diff --git a/foo2 b/foo2
       - new file mode 100644
       - '--- /dev/null'
       - +++ b/foo2
       - '@@ -0,0 +1,1 @@'
       - +foo2
       - ''
@@ -314,16 +384,85 @@ request is published.
       3], ["d751d4c04967ba4ec08425f618ba8d2c1b9d161a", 4], ["98dd6a7335dbea4bd3d2f2d1662fd6db45f1ddfb",
       5]]'
     p2rb.discard_on_publish_rids: '[5]'
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - diff --git a/foo5 b/foo5
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo5
+    - '@@ -0,0 +1,1 @@'
+    - +foo5
+    - ''
+  - id: 7
+    revision: 2
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - ''
   approved: false
   approval_failure: Commit 6bd3fbee3dfaa83a6fe253b5a9bdc625a5d0be0e is not approved.
   draft:
     bugs:
     - '1'
     commit: bz://1/mynick
     summary: bz://1/mynick
     description: This is the parent review request
@@ -339,16 +478,18 @@ request is published.
       p2rb.identifier: bz://1/mynick
       p2rb.is_squashed: true
       p2rb.reviewer_map: '{"3": [], "2": [], "5": [], "4": []}'
       p2rb.unpublished_rids: '[]'
     diffs:
     - id: 8
       revision: 3
       base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+      name: diff
+      extra: {}
       patch:
       - diff --git a/foo2 b/foo2
       - new file mode 100644
       - '--- /dev/null'
       - +++ b/foo2
       - '@@ -0,0 +1,1 @@'
       - +foo2
       - diff --git a/foo3 b/foo3
--- a/hgext/reviewboard/tests/test-commits-deleted-obsolescence.t
+++ b/hgext/reviewboard/tests/test-commits-deleted-obsolescence.t
@@ -132,16 +132,54 @@ on publish.
       3], ["d751d4c04967ba4ec08425f618ba8d2c1b9d161a", 4], ["98dd6a7335dbea4bd3d2f2d1662fd6db45f1ddfb",
       5], ["76088734e3cba33be80930be14e7cd1e9ee474be", 6]]'
     p2rb.discard_on_publish_rids: '[6]'
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - diff --git a/foo5 b/foo5
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo5
+    - '@@ -0,0 +1,1 @@'
+    - +foo5
+    - ''
   approved: false
   approval_failure: Commit 6bd3fbee3dfaa83a6fe253b5a9bdc625a5d0be0e is not approved.
   draft:
     bugs:
     - '1'
     commit: bz://1/mynick
     summary: bz://1/mynick
     description: This is the parent review request
@@ -158,16 +196,18 @@ on publish.
       p2rb.identifier: bz://1/mynick
       p2rb.is_squashed: true
       p2rb.reviewer_map: '{}'
       p2rb.unpublished_rids: '[]'
     diffs:
     - id: 7
       revision: 2
       base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+      name: diff
+      extra: {}
       patch:
       - diff --git a/foo1 b/foo1
       - new file mode 100644
       - '--- /dev/null'
       - +++ b/foo1
       - '@@ -0,0 +1,1 @@'
       - +foo1
       - diff --git a/foo2 b/foo2
@@ -213,16 +253,85 @@ The parent review should have dropped th
       3], ["d751d4c04967ba4ec08425f618ba8d2c1b9d161a", 4], ["98dd6a7335dbea4bd3d2f2d1662fd6db45f1ddfb",
       5]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - diff --git a/foo5 b/foo5
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo5
+    - '@@ -0,0 +1,1 @@'
+    - +foo5
+    - ''
+  - id: 7
+    revision: 2
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - ''
   approved: false
   approval_failure: Commit 6bd3fbee3dfaa83a6fe253b5a9bdc625a5d0be0e is not approved.
 
 Review 6 should be marked as discarded
 
   $ rbmanage dumpreview 6
   id: 6
   status: discarded
@@ -236,16 +345,30 @@ Review 6 should be marked as discarded
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 76088734e3cba33be80930be14e7cd1e9ee474be
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 6
+    revision: 1
+    base_commit_id: 98dd6a7335dbea4bd3d2f2d1662fd6db45f1ddfb
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo5 b/foo5
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo5
+    - '@@ -0,0 +1,1 @@'
+    - +foo5
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Dropping the first commit should drop its review. Subsequent reviews should
 be preserved.
 
   $ hg -q rebase -s dfe48634934b -d 0
   $ hg push
@@ -297,16 +420,85 @@ on publish.
       3], ["d751d4c04967ba4ec08425f618ba8d2c1b9d161a", 4], ["98dd6a7335dbea4bd3d2f2d1662fd6db45f1ddfb",
       5]]'
     p2rb.discard_on_publish_rids: '[2]'
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - diff --git a/foo5 b/foo5
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo5
+    - '@@ -0,0 +1,1 @@'
+    - +foo5
+    - ''
+  - id: 7
+    revision: 2
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - ''
   approved: false
   approval_failure: Commit 6bd3fbee3dfaa83a6fe253b5a9bdc625a5d0be0e is not approved.
   draft:
     bugs:
     - '1'
     commit: bz://1/mynick
     summary: bz://1/mynick
     description: This is the parent review request
@@ -322,16 +514,18 @@ on publish.
       p2rb.identifier: bz://1/mynick
       p2rb.is_squashed: true
       p2rb.reviewer_map: '{"3": [], "2": [], "5": [], "4": []}'
       p2rb.unpublished_rids: '[]'
     diffs:
     - id: 8
       revision: 3
       base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+      name: diff
+      extra: {}
       patch:
       - diff --git a/foo2 b/foo2
       - new file mode 100644
       - '--- /dev/null'
       - +++ b/foo2
       - '@@ -0,0 +1,1 @@'
       - +foo2
       - diff --git a/foo3 b/foo3
@@ -365,16 +559,30 @@ The dropped commit should now be discard
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 6bd3fbee3dfaa83a6fe253b5a9bdc625a5d0be0e
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Try removing a commit in the middle.
 
   $ hg -q rebase -s b5473ad606f4 -d 7050183d97d5
   $ hg push
   pushing to ssh://*:$HGPORT6/test-repo (glob)
@@ -421,15 +629,128 @@ The parent review should have been updat
     p2rb.commits: '[["7050183d97d5f601da86fb313dd8783ccf1ade18", 3], ["2fbc30f77859fa4be2e173866fa71c52d394f2c4",
       5]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{"3": [], "5": [], "4": []}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - diff --git a/foo5 b/foo5
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo5
+    - '@@ -0,0 +1,1 @@'
+    - +foo5
+    - ''
+  - id: 7
+    revision: 2
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - ''
+  - id: 8
+    revision: 3
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo3 b/foo3
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo3
+    - '@@ -0,0 +1,1 @@'
+    - +foo3
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - ''
+  - id: 12
+    revision: 4
+    base_commit_id: 93d9429b41ecf0d2ad8c62b6ea26686dd20330f4
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo2 b/foo2
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo2
+    - '@@ -0,0 +1,1 @@'
+    - +foo2
+    - diff --git a/foo4 b/foo4
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo4
+    - '@@ -0,0 +1,1 @@'
+    - +foo4
+    - ''
   approved: false
   approval_failure: Commit 7050183d97d5f601da86fb313dd8783ccf1ade18 is not approved.
 
 Cleanup
 
   $ mozreview stop
   stopped 10 containers
--- a/hgext/reviewboard/tests/test-operation-prevention.t
+++ b/hgext/reviewboard/tests/test-operation-prevention.t
@@ -49,16 +49,30 @@ Publishing the parent should succeed.
     p2rb.base_commit: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.commits: '[["86a712c7f0187fed4c00b99131838610c76e6cc0", 2]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{"2": []}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
   approved: false
   approval_failure: Commit 86a712c7f0187fed4c00b99131838610c76e6cc0 is not approved.
 
   $ rbmanage dumpreview 2
   id: 2
   status: pending
   public: true
   bugs:
@@ -70,16 +84,30 @@ Publishing the parent should succeed.
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 86a712c7f0187fed4c00b99131838610c76e6cc0
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
   $ cd ..
 
 Cleanup
 
   $ mozreview stop
--- a/hgext/reviewboard/tests/test-push-http.t
+++ b/hgext/reviewboard/tests/test-push-http.t
@@ -351,16 +351,30 @@ Test creating a review via HTTP
     p2rb.commits: '[["9a6457fbda8fb4e5afaa3e0ab831f34a3de285af", 2], ["b41b3bd650cb5b456e611e2eeb77705e4c41cb83",
       3]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 6432ccd4579e0fdc337b6dc55b827cbcc7fee397
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 6432ccd4579e0fdc337b6dc55b827cbcc7fee397
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -user2
+    - +review2
+    - ''
   approved: false
   approval_failure: Commit 9a6457fbda8fb4e5afaa3e0ab831f34a3de285af is not approved.
 
   $ rbmanage dump-user user2
   4:
     avatar_url: http://www.gravatar.com/avatar/* (glob)
     id: 4
     url: /users/user2/
--- a/hgext/reviewboard/tests/test-review-request-approval.t
+++ b/hgext/reviewboard/tests/test-review-request-approval.t
@@ -55,16 +55,30 @@ Create a review request from an L1 user
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 86a712c7f0187fed4c00b99131838610c76e6cc0
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Have an L1 user provide a ship it review which should not grant approval
 
   $ exportbzauth l1b@example.com password
   $ rbmanage create-review 2 --body-top "Ship-it!" --public --ship-it
   created review 1
@@ -83,16 +97,30 @@ Have an L1 user provide a ship it review
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 86a712c7f0187fed4c00b99131838610c76e6cc0
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
   review_count: 1
   reviews:
   - id: 1
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -119,16 +147,30 @@ Have an L3 user provide a ship it review
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 86a712c7f0187fed4c00b99131838610c76e6cc0
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
   approved: true
   approval_failure: null
   review_count: 2
   reviews:
   - id: 1
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -159,16 +201,30 @@ Posting a new review without ship it sho
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 86a712c7f0187fed4c00b99131838610c76e6cc0
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
   review_count: 3
   reviews:
   - id: 1
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -206,16 +262,30 @@ One more ship it should switch it back t
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 86a712c7f0187fed4c00b99131838610c76e6cc0
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
   approved: true
   approval_failure: null
   review_count: 4
   reviews:
   - id: 1
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -261,16 +331,43 @@ Since the author is L1, adding a new dif
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 473206d1f704058758360f38c6fbf9c557bac746
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
+  - id: 4
+    revision: 2
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +modified
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
   review_count: 4
   reviews:
   - id: 1
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -314,16 +411,43 @@ A new ship-it from L3 should give approv
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 473206d1f704058758360f38c6fbf9c557bac746
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
+  - id: 4
+    revision: 2
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +modified
+    - ''
   approved: true
   approval_failure: null
   review_count: 5
   reviews:
   - id: 1
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -378,16 +502,43 @@ Opening issues, even from an L1 user, sh
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 473206d1f704058758360f38c6fbf9c557bac746
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
+  - id: 4
+    revision: 2
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +modified
+    - ''
   approved: false
   approval_failure: The review request has open issues.
   review_count: 6
   reviews:
   - id: 1
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -455,16 +606,43 @@ Fixing the issue should restore approval
   - level3
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 473206d1f704058758360f38c6fbf9c557bac746
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
+  - id: 4
+    revision: 2
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +modified
+    - ''
   approved: true
   approval_failure: null
   review_count: 6
   reviews:
   - id: 1
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -540,16 +718,30 @@ Review requests created by L3 users
   - level1b
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: c1ebcda638274d5217801b7f05e33b848ff39be1
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://2/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 6
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +author2
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Even a ship-it from an L1 user will give approval to an L3 author
 
   $ exportbzauth l1a@example.com password
   $ rbmanage create-review 4 --body-top "Ship-it!" --public --ship-it
   created review 7
@@ -568,16 +760,30 @@ Even a ship-it from an L1 user will give
   - level1b
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: c1ebcda638274d5217801b7f05e33b848ff39be1
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://2/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 6
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +author2
+    - ''
   approved: true
   approval_failure: null
   review_count: 1
   reviews:
   - id: 7
     public: true
     ship_it: true
     body_top: Ship-it!
@@ -607,16 +813,43 @@ ship-its. Posting a new diff should not 
   - level1b
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: bccc4c4e590eeefbb42491f1bb061143a49bdaf8
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://2/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 6
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +author2
+    - ''
+  - id: 8
+    revision: 2
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +modified2
+    - ''
   approved: true
   approval_failure: null
   review_count: 1
   reviews:
   - id: 7
     public: true
     ship_it: true
     body_top: Ship-it!
--- a/hgext/reviewboard/tests/test-review-request-closed-discarded.t
+++ b/hgext/reviewboard/tests/test-review-request-closed-discarded.t
@@ -129,16 +129,30 @@ no Commit ID set.
     p2rb.commits: '[["a92d53c0ffc7df0517397a77980e62332552d812", 2], ["233b570e5356d0c84bcbf0633de446172012b3b3",
       3]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo2
+    - ''
   approved: false
   approval_failure: Commit a92d53c0ffc7df0517397a77980e62332552d812 is not approved.
 
 Child review request with ID 2 should be closed as discarded...
 
   $ rbmanage dumpreview 2
   id: 2
   status: discarded
@@ -152,16 +166,30 @@ Child review request with ID 2 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: a92d53c0ffc7df0517397a77980e62332552d812
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Child review request with ID 3 should be closed as discarded...
 
   $ rbmanage dumpreview 3
   id: 3
   status: discarded
@@ -175,16 +203,30 @@ Child review request with ID 3 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 233b570e5356d0c84bcbf0633de446172012b3b3
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 3
+    revision: 1
+    base_commit_id: a92d53c0ffc7df0517397a77980e62332552d812
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo1
+    - +foo2
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 The review attachment should be marked as obsolete
 
   $ bugzilla dump-bug 1
   Bug 1:
     attachments:
@@ -267,16 +309,30 @@ Commit ID re-instated.
     p2rb.commits: '[["a92d53c0ffc7df0517397a77980e62332552d812", 2], ["233b570e5356d0c84bcbf0633de446172012b3b3",
       3]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo2
+    - ''
   approved: false
   approval_failure: The review request is not public.
   draft:
     bugs:
     - '1'
     commit: bz://1/mynick
     summary: bz://1/mynick
     description: This is the parent review request
@@ -310,16 +366,30 @@ Child review request with ID 2 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: a92d53c0ffc7df0517397a77980e62332552d812
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo1
+    - ''
   approved: false
   approval_failure: The review request is not public.
   draft:
     bugs:
     - '1'
     commit: null
     summary: Bug 1 - Foo 1
     description: Bug 1 - Foo 1
@@ -348,16 +418,30 @@ Child review request with ID 3 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 233b570e5356d0c84bcbf0633de446172012b3b3
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 3
+    revision: 1
+    base_commit_id: a92d53c0ffc7df0517397a77980e62332552d812
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo1
+    - +foo2
+    - ''
   approved: false
   approval_failure: The review request is not public.
   draft:
     bugs:
     - '1'
     commit: null
     summary: Bug 1 - Foo 2
     description: Bug 1 - Foo 2
@@ -454,16 +538,30 @@ Squashed review request should be publis
     p2rb.commits: '[["a92d53c0ffc7df0517397a77980e62332552d812", 2], ["233b570e5356d0c84bcbf0633de446172012b3b3",
       3]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo2
+    - ''
   approved: false
   approval_failure: Commit a92d53c0ffc7df0517397a77980e62332552d812 is not approved.
 
 Child review request with ID 2 should be published.
 
   $ rbmanage dumpreview 2
   id: 2
   status: pending
@@ -477,16 +575,30 @@ Child review request with ID 2 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: a92d53c0ffc7df0517397a77980e62332552d812
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Child review request with ID 3 should be published.
 
   $ rbmanage dumpreview 3
   id: 3
   status: pending
@@ -500,16 +612,30 @@ Child review request with ID 3 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 233b570e5356d0c84bcbf0633de446172012b3b3
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 3
+    revision: 1
+    base_commit_id: a92d53c0ffc7df0517397a77980e62332552d812
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo1
+    - +foo2
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 The attachment for the review request should be unobsoleted
 
   $ bugzilla dump-bug 1
   Bug 1:
     attachments:
--- a/hgext/reviewboard/tests/test-review-request-closed-submitted.t
+++ b/hgext/reviewboard/tests/test-review-request-closed-submitted.t
@@ -73,16 +73,30 @@ Squashed review request with ID 1 should
     p2rb.commits: '[["a92d53c0ffc7df0517397a77980e62332552d812", 2], ["233b570e5356d0c84bcbf0633de446172012b3b3",
       3]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo2
+    - ''
   approved: false
   approval_failure: Commit a92d53c0ffc7df0517397a77980e62332552d812 is not approved.
 
 Child review request with ID 2 should be closed as submitted...
 
   $ rbmanage dumpreview 2
   id: 2
   status: submitted
@@ -96,16 +110,30 @@ Child review request with ID 2 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: a92d53c0ffc7df0517397a77980e62332552d812
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
   $ rbmanage dumpreview 3
   id: 3
   status: submitted
   public: true
   bugs:
@@ -117,16 +145,30 @@ Child review request with ID 2 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 233b570e5356d0c84bcbf0633de446172012b3b3
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 3
+    revision: 1
+    base_commit_id: a92d53c0ffc7df0517397a77980e62332552d812
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo1
+    - +foo2
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Re-opening the parent review request should re-open all of the children.
 
   $ rbmanage reopen 1
 
 Squashed review request with ID 1 should be re-opened...
@@ -149,16 +191,30 @@ Squashed review request with ID 1 should
     p2rb.commits: '[["a92d53c0ffc7df0517397a77980e62332552d812", 2], ["233b570e5356d0c84bcbf0633de446172012b3b3",
       3]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo2
+    - ''
   approved: false
   approval_failure: Commit a92d53c0ffc7df0517397a77980e62332552d812 is not approved.
 
 Child review request with ID 2 should be re-opened...
 
   $ rbmanage dumpreview 2
   id: 2
   status: pending
@@ -172,16 +228,30 @@ Child review request with ID 2 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: a92d53c0ffc7df0517397a77980e62332552d812
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Child review request with ID 3 should be re-opened...
 
   $ rbmanage dumpreview 3
   id: 3
   status: pending
@@ -195,15 +265,29 @@ Child review request with ID 3 should be
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 233b570e5356d0c84bcbf0633de446172012b3b3
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 3
+    revision: 1
+    base_commit_id: a92d53c0ffc7df0517397a77980e62332552d812
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo1
+    - +foo2
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Cleanup
 
   $ mozreview stop
   stopped 10 containers
--- a/hgext/reviewboard/tests/test-review-request-delete-draft.t
+++ b/hgext/reviewboard/tests/test-review-request-delete-draft.t
@@ -81,16 +81,30 @@ We should have a disagreement between pu
     p2rb.base_commit: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.commits: '[["0aca5e4417025c80407d8f7f22864e8d09fbec50", 2]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +foo1
+    - ''
   approved: false
   approval_failure: Commit 0aca5e4417025c80407d8f7f22864e8d09fbec50 is not approved.
   draft:
     bugs:
     - '1'
     commit: bz://1/mynick
     summary: bz://1/mynick
     description: This is the parent review request
@@ -105,16 +119,18 @@ We should have a disagreement between pu
       p2rb.identifier: bz://1/mynick
       p2rb.is_squashed: true
       p2rb.reviewer_map: '{"2": []}'
       p2rb.unpublished_rids: '[]'
     diffs:
     - id: 3
       revision: 2
       base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+      name: diff
+      extra: {}
       patch:
       - diff --git a/foo b/foo
       - '--- a/foo'
       - +++ b/foo
       - '@@ -1,1 +1,1 @@'
       - -foo
       - +foo3
       - ''
@@ -132,16 +148,30 @@ We should have a disagreement between pu
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 0aca5e4417025c80407d8f7f22864e8d09fbec50
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
   draft:
     bugs:
     - '1'
     commit: null
     summary: Bug 1 - Initial commit
     description: Bug 1 - Initial commit
@@ -152,16 +182,18 @@ We should have a disagreement between pu
       p2rb.commit_id: b3be3d464d6b32130006cbdfa82f9f98a3c57a01
       p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
       p2rb.identifier: bz://1/mynick
       p2rb.is_squashed: false
     diffs:
     - id: 4
       revision: 2
       base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+      name: diff
+      extra: {}
       patch:
       - diff --git a/foo b/foo
       - '--- a/foo'
       - +++ b/foo
       - '@@ -1,1 +1,1 @@'
       - -foo
       - +foo3
       - ''
@@ -188,16 +220,30 @@ Discarding the parent review request dra
     p2rb.base_commit: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.commits: '[["0aca5e4417025c80407d8f7f22864e8d09fbec50", 2]]'
     p2rb.discard_on_publish_rids: '[]'
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: true
     p2rb.reviewer_map: '{}'
     p2rb.unpublished_rids: '[]'
+  diffs:
+  - id: 1
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +foo1
+    - ''
   approved: false
   approval_failure: Commit 0aca5e4417025c80407d8f7f22864e8d09fbec50 is not approved.
 
   $ rbmanage dumpreview 2
   id: 2
   status: pending
   public: true
   bugs:
@@ -209,15 +255,29 @@ Discarding the parent review request dra
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 0aca5e4417025c80407d8f7f22864e8d09fbec50
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Cleanup
 
   $ mozreview stop
   stopped 10 containers
--- a/hgext/reviewboard/tests/test-specify-reviewers.t
+++ b/hgext/reviewboard/tests/test-specify-reviewers.t
@@ -222,16 +222,37 @@ Publishing series during push works
   - romulus
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: 2bc874a070cef1ff62b63e28f3d40a81655fec77
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 10
+    revision: 1
+    base_commit_id: 42c4d67a510ecafa656b9410af8a274b7b9e2edb
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,8 +1,9 @@'
+    - ' initial'
+    - ' blah'
+    - ' blah'
+    - ' blah'
+    - ' blah'
+    - ' blah'
+    - ' blah'
+    - ' blah'
+    - +blah
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Amending a commit should also work. This exercises the update_review_request
 code path.
 
   $ echo blah >> foo
   $ hg commit --amend -m 'Bug 1 - Even more stuff; r?romulus, r?remus'
--- a/hgext/reviewboard/tests/test-unicode.t
+++ b/hgext/reviewboard/tests/test-unicode.t
@@ -48,16 +48,30 @@ The globbing is patching over a bug in m
   target_people: []
   extra_data:
     calculated_trophies: true
     p2rb: true
     p2rb.commit_id: f03366314c7798387fcd3e367afaa6ba472feb5d
     p2rb.first_public_ancestor: 3a9f6899ef84c99841f546030b036d0124a863cf
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 3a9f6899ef84c99841f546030b036d0124a863cf
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo
+    - +initial
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
   $ bugzilla dump-bug 1
   Bug 1:
     attachments:
     - attacher: author@example.com
       content_type: text/x-review-board-request
--- a/pylib/mozreviewbots/tests/test-eslintbot-noop.t
+++ b/pylib/mozreviewbots/tests/test-eslintbot-noop.t
@@ -52,15 +52,29 @@ Create a review request that doesn't tou
   description: Bug 1 - No Javascript changes
   target_people: []
   extra_data:
     p2rb: true
     p2rb.commit_id: d69b315f2ab1fd46892adbebcadef52f09449906
     p2rb.first_public_ancestor: dc42edca6edd9dd5a8346b1a881281263d3a10ad
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: dc42edca6edd9dd5a8346b1a881281263d3a10ad
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +irrelevant
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
 
 Cleanup
 
   $ mozreview stop
   stopped 10 containers
--- a/pylib/mozreviewbots/tests/test-pylintbot-line-adjustment.t
+++ b/pylib/mozreviewbots/tests/test-pylintbot-line-adjustment.t
@@ -95,16 +95,76 @@ Line numbers for these failures should b
   description: Bug 1 - Line adjustment minus 1
   target_people: []
   extra_data:
     p2rb: true
     p2rb.commit_id: 5eedd6ade4e72a9bec6dd82ef5b566337a44adcf
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/e121.py b/e121.py
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/e121.py
+    - '@@ -0,0 +1,2 @@'
+    - +sorted(
+    - +  [1, 2])
+    - diff --git a/e122.py b/e122.py
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/e122.py
+    - '@@ -0,0 +1,2 @@'
+    - +sorted(
+    - +[1, 2])
+    - diff --git a/e126.py b/e126.py
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/e126.py
+    - '@@ -0,0 +1,2 @@'
+    - +sorted(
+    - +        [1, 2])
+    - diff --git a/e127.py b/e127.py
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/e127.py
+    - '@@ -0,0 +1,2 @@'
+    - +sorted([1, 2],
+    - +        cmp=None)
+    - diff --git a/e128.py b/e128.py
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/e128.py
+    - '@@ -0,0 +1,2 @@'
+    - +sorted([1, 2],
+    - +    cmp=None)
+    - diff --git a/e131.py b/e131.py
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/e131.py
+    - '@@ -0,0 +1,3 @@'
+    - +l = [
+    - +    1,
+    - +   2]
+    - diff --git a/e301.py b/e301.py
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/e301.py
+    - '@@ -0,0 +1,4 @@'
+    - '+class Foo(object):'
+    - +    x = None
+    - '+    def foo():'
+    - +        pass
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
   review_count: 1
   reviews:
   - id: 1
     public: true
     ship_it: false
     body_top:
@@ -238,16 +298,34 @@ Create tests for line -= 2
   description: Bug 2 - Line adjustment minus 2
   target_people: []
   extra_data:
     p2rb: true
     p2rb.commit_id: 8da44ae24d4625e0339ed0287a6c61f7288ad5d5
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://2/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 4
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/e302.py b/e302.py
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/e302.py
+    - '@@ -0,0 +1,5 @@'
+    - '+def foo():'
+    - +    pass
+    - +
+    - '+def bar():'
+    - +    pass
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
   review_count: 1
   reviews:
   - id: 2
     public: true
     ship_it: false
     body_top:
--- a/pylib/mozreviewbots/tests/test-snarkbot.t
+++ b/pylib/mozreviewbots/tests/test-snarkbot.t
@@ -92,16 +92,36 @@ Create and publish a review for SnarkBot
   description: Bug 1 - Foo 1
   target_people: []
   extra_data:
     p2rb: true
     p2rb.commit_id: 93b21e22593fc0a96331d5357aa5835b7db407e3
     p2rb.first_public_ancestor: 7c5bdf0cec4a90edb36300f8f3679857f46db829
     p2rb.identifier: bz://1/mynick
     p2rb.is_squashed: false
+  diffs:
+  - id: 2
+    revision: 1
+    base_commit_id: 7c5bdf0cec4a90edb36300f8f3679857f46db829
+    name: diff
+    extra: {}
+    patch:
+    - diff --git a/foo b/foo
+    - '--- a/foo'
+    - +++ b/foo
+    - '@@ -1,1 +1,1 @@'
+    - -foo0
+    - +foo1
+    - diff --git a/foo1 b/foo1
+    - new file mode 100644
+    - '--- /dev/null'
+    - +++ b/foo1
+    - '@@ -0,0 +1,1 @@'
+    - +foo1
+    - ''
   approved: false
   approval_failure: A suitable reviewer has not given a "Ship It!"
   review_count: 1
   reviews:
   - id: 1
     public: true
     ship_it: false
     body_top: 'This is what I think of your changes:'
--- a/testing/vcttesting/reviewboard/mach_commands.py
+++ b/testing/vcttesting/reviewboard/mach_commands.py
@@ -23,29 +23,44 @@ yaml.add_representer(OrderedDict, ordere
 
 def _serialize_text(s):
     lines = s.splitlines()
     if len(lines) > 1:
         return lines
     return s
 
 
+def dict_from_diff(diff):
+    d = OrderedDict()
+    d['id'] = diff.id
+    d['revision'] = diff.revision
+    d['base_commit_id'] = diff.base_commit_id
+    d['name'] = diff.name
+    d['extra'] = dict(diff.extra_data.iteritems())
+    d['patch'] = diff.get_patch().data.splitlines()
+    return d
+
+
 def serialize_review_requests(rr):
     from rbtools.api.errors import APIError
     d = OrderedDict()
     d['id'] = rr.id
     d['status'] = rr.status
     d['public'] = rr.public
     d['bugs'] = list(rr.bugs_closed)
     d['commit'] = rr.commit_id
     d['submitter'] = rr.get_submitter().username
     d['summary'] = _serialize_text(rr.summary)
     d['description'] = _serialize_text(rr.description)
     d['target_people'] = [p.get().username for p in rr.target_people]
     d['extra_data'] = dict(rr.extra_data.iteritems())
+    d['diffs'] = []
+    for diff in rr.get_diffs():
+        d['diffs'].append(dict_from_diff(diff))
+
     d['approved'] = rr.approved
     d['approval_failure'] = rr.approval_failure
 
     review_list = rr.get_reviews(review_request_id=rr.id)
     reviews = []
     for review in review_list:
         d['review_count'] = review_list.total_results
 
@@ -107,22 +122,17 @@ def serialize_review_requests(rr):
         ddraft['commit'] = draft.commit_id
         ddraft['summary'] = _serialize_text(draft.summary)
         ddraft['description'] = _serialize_text(draft.description)
         ddraft['target_people'] = [p.get().username for p in draft.target_people]
         ddraft['extra'] = dict(draft.extra_data.iteritems())
 
         ddraft['diffs'] = []
         for diff in draft.get_draft_diffs():
-            diffd = OrderedDict()
-            diffd['id'] = diff.id
-            diffd['revision'] = diff.revision
-            diffd['base_commit_id'] = diff.base_commit_id
-            diffd['patch'] = diff.get_patch().data.splitlines()
-            ddraft['diffs'].append(diffd)
+            ddraft['diffs'].append(dict_from_diff(diff))
 
     except APIError:
         pass
 
     return yaml.safe_dump(d, default_flow_style=False).rstrip()
 
 
 def short_review_request_dict(rr):