reviewboard: add test demonstrating no empty line after summary (bug 1247012); r?dminor draft
authorGregory Szorc <gps@mozilla.com>
Tue, 09 Feb 2016 11:41:48 -0800
changeset 7180 a6475facc5420f38927c576894e76b65a4eb187f
parent 7179 cf762f6a00e62df9ed5fcb563d102d53b2ce3d17
child 7181 3da7c445ae8b72ccea94cc425d4b2153839e2ced
push id604
push usergszorc@mozilla.com
push dateTue, 09 Feb 2016 19:43:57 +0000
reviewersdminor
bugs1247012
reviewboard: add test demonstrating no empty line after summary (bug 1247012); r?dminor MozReview-Commit-ID: AzQviS0CyA0
hgext/reviewboard/tests/test-commitid.t
--- a/hgext/reviewboard/tests/test-commitid.t
+++ b/hgext/reviewboard/tests/test-commitid.t
@@ -28,18 +28,17 @@ Commit ID should be present after review
   $ hg commit -m 'commit 1'
 
   $ hg log -T '{rev}:{node|short} {desc}\n'
   1:306d1563179b commit 1
   
   MozReview-Commit-ID: 124Bxg
   0:96ee1d7354c4 initial
 
-Mercurial doesn't preserve extras on rebase by default. Verify our
-monkeypatch works.
+Verify commit IDs survive rebasing
 
   $ hg -q up -r 0
   $ touch bar
   $ hg -q commit -A -m 'head 2'
 
   $ hg rebase -s 1 -d 2
   rebasing 1:306d1563179b "commit 1"
   saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/*-backup.hg (glob)
@@ -112,8 +111,31 @@ Graft will preserve commit id.
   grafting 4:84bc2f59c8ec "histedit3"
 
   $ hg log -G -T '{rev}:{node|short} {desc}\n' -r '::.'
   @  6:7eb940c47356 histedit3
   |
   |  MozReview-Commit-ID: JmjAjw
   o  0:96ee1d7354c4 initial
   
+"topic: foo" commit messages result in empty line
+
+  $ hg -q up -r 0
+  $ echo empty > foo
+  $ hg -q commit -m 'foo: empty'
+
+"key: value *" on a line doesn't get interpretted as metadata
+
+  $ echo metadata > foo
+  $ hg commit -l - << EOF
+  > topic: foo
+  > 
+  > foo: bar baz
+  > EOF
+  $ hg log -G -T '{rev}:{node|short} {desc}\n' -r '::.'
+  @  8:ad9558f7cd71 topic: foo
+  |
+  |  foo: bar baz
+  |  MozReview-Commit-ID: TA3f84
+  o  7:12881bf6ca0a foo: empty
+  |  MozReview-Commit-ID: OTOPw0
+  o  0:96ee1d7354c4 initial
+