Patchwork D8180: nodemap: check that a simple lookup works fine

login
register
mail settings
Submitter phabricator
Date Feb. 28, 2020, 6:54 p.m.
Message ID <differential-rev-PHID-DREV-bm7qancc4gvijftnv6y4-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45388/
State Superseded
Headers show

Comments

phabricator - Feb. 28, 2020, 6:54 p.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I realised the code was not exercised much.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8180

AFFECTED FILES
  tests/test-persistent-nodemap.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: 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
@@ -19,6 +19,13 @@ 
   data-unused: 0
   $ f --size .hg/store/00changelog.n
   .hg/store/00changelog.n: size=42
+
+Simple lookup works
+
+  $ ANYNODE=`hg log --template '{node|short}\n' --rev tip`
+  $ hg log -r "$ANYNODE" --template '{rev}\n'
+  5000
+
   $ f --sha256 .hg/store/00changelog-*.nd
   .hg/store/00changelog-????????????????.nd: sha256=b961925120e1c9bc345c199b2cc442abc477029fdece37ef9d99cbe59c0558b7 (glob)
   $ hg debugnodemap --dump-new | f --sha256 --size