Patchwork [5,of,8,"] manifestcache: test that adding the same entry twice do not duplicates it

login
register
mail settings
Submitter Pierre-Yves David
Date March 15, 2019, 11:43 a.m.
Message ID <9ff234990740cd884689.1552650207@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/39261/
State Accepted
Headers show

Comments

Pierre-Yves David - March 15, 2019, 11:43 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1552560808 0
#      Thu Mar 14 10:53:28 2019 +0000
# Node ID 9ff234990740cd884689f1252dc6e7ec487b4c10
# Parent  fb4ea9c2a37dc63b0093cbd9a512b5921128f812
# EXP-Topic manifestcache
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 9ff234990740
manifestcache: test that adding the same entry twice do not duplicates it

Simple sanity check.

Patch

diff --git a/tests/test-manifest.t b/tests/test-manifest.t
--- a/tests/test-manifest.t
+++ b/tests/test-manifest.t
@@ -116,3 +116,11 @@  Adding a new persistent entry in the cac
   cache contains 1 manifest entries, in order of most to least recent:
   id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
   total cache data size 157 bytes, on-disk 157 bytes
+
+Check we don't duplicated entry (added from the debug command)
+
+  $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
+  $ hg debugmanifestfulltextcache
+  cache contains 1 manifest entries, in order of most to least recent:
+  id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
+  total cache data size 157 bytes, on-disk 157 bytes