From patchwork Thu Jan 28 12:41:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9900: persistent-nodemap: add test case reproducing a Rust panic From: phabricator X-Patchwork-Id: 48211 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 28 Jan 2021 12:41:47 +0000 SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The next commit fixes the bug. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9900 AFFECTED FILES tests/test-persistent-nodemap.t CHANGE DETAILS To: SimonSapin, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/tests/test-persistent-nodemap.t b/tests/test-persistent-nodemap.t --- a/tests/test-persistent-nodemap.t +++ b/tests/test-persistent-nodemap.t @@ -31,6 +31,15 @@ #endif +#if rust + +Reported bug: some Rust code panics when handling the null revision + + $ hg log -r 00000000 2>&1 | grep panicked + thread '' panicked at 'called `Option::unwrap()` on a `None` value', hg-cpython/src/revlog.rs:* (glob) + +#endif + $ hg debugformat format-variant repo