hgmo: add test reproducing node lookup failure (bug 1257152); r?dminor draft
authorGregory Szorc <gps@mozilla.com>
Wed, 16 Mar 2016 12:43:53 -0700
changeset 7499 daa65047d9af09ffe9846b20b9e7760a43d866d7
parent 7498 b8a3e7dd4f1f87f0409a3413ef5af5219f9259c0
child 7500 f978bc9ab883fbbc72ee656e98570b515e7be345
push id696
push usergszorc@mozilla.com
push dateWed, 16 Mar 2016 19:47:39 +0000
reviewersdminor
bugs1257152
hgmo: add test reproducing node lookup failure (bug 1257152); r?dminor My hunch is correct: a backout message referencing an invalid node results in an error. MozReview-Commit-ID: AiNKPnZYS04
hgext/hgmo/tests/test-backouts.t
--- a/hgext/hgmo/tests/test-backouts.t
+++ b/hgext/hgmo/tests/test-backouts.t
@@ -31,8 +31,20 @@ Backed out commits should show warnings
   <a href="/">Mercurial</a>  / changeset / 6c9721b3b4df &#x1f4a9;
   <tr><td colspan="2"><strong>&#x1f4a9;&#x1f4a9; backed out by <a style="font-family: monospace" href="/rev/f8c8d5d22c7d">f8c8d5d22c7d</a> &#x1f4a9; &#x1f4a9;</strong></td></tr>
 
 Backout commit links to backed out commit
 
   $ http http://localhost:$HGPORT/rev/f8c8d5d22c7d --body-file body > /dev/null
   $ grep '<td>backs out' body
   <tr><td>backs out</td><td><a style="font-family: monospace" href="/rev/6c9721b3b4df">6c9721b3b4df</a></td></tr>
+
+Reference a backed out node that doesn't exist
+
+  $ hg -q up -r 0
+  $ echo badnode > foo
+  $ hg commit -m 'Backed out changeset deadbeefbead (bug 123)'
+  created new head
+  $ hg -q push -f
+
+  $ http http://localhost:$HGPORT/rev/bdfc7e1edbe7 --body-file body > /dev/null
+  $ grep 'unknown revision' body
+  unknown revision 'deadbeefbead'