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
--- 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 💩
<tr><td colspan="2"><strong>💩💩 backed out by <a style="font-family: monospace" href="/rev/f8c8d5d22c7d">f8c8d5d22c7d</a> 💩 💩</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'