Patchwork D9900: persistent-nodemap: add test case reproducing a Rust panic

login
register
mail settings
Submitter phabricator
Date Jan. 28, 2021, 12:41 p.m.
Message ID <differential-rev-PHID-DREV-74ynrriml5ir2bjh6rwv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48211/
State Superseded
Headers show

Comments

phabricator - Jan. 28, 2021, 12:41 p.m.
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

Patch

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 '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', hg-cpython/src/revlog.rs:* (glob)
+
+#endif
+
 
   $ hg debugformat
   format-variant     repo