[PATCH 4 of 8 "] manifestcache: do not display data when using --add

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Mar 15 07:43:26 EDT 2019


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1552554701 0
#      Thu Mar 14 09:11:41 2019 +0000
# Node ID fb4ea9c2a37dc63b0093cbd9a512b5921128f812
# Parent  6c6d0a2d336f2da651863b981bfc071adaa19c46
# EXP-Topic manifestcache
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r fb4ea9c2a37d
manifestcache: do not display data when using --add

If the command invocation is about adding a new entry, we should remain terse
(the same as we do for many commands).

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1488,6 +1488,7 @@ def debugmanifestfulltextcache(ui, repo,
             except error.LookupError as e:
                 raise error.Abort(e, hint="Check your manifest node id")
             manifest.read()  # stores revisision in cache too
+            return
 
     cache = getcache()
     if not len(cache):
diff --git a/tests/test-manifest.t b/tests/test-manifest.t
--- a/tests/test-manifest.t
+++ b/tests/test-manifest.t
@@ -111,9 +111,6 @@ Showing the content of the caches after 
 Adding a new persistent entry in the cache
 
   $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
-  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
 
   $ hg debugmanifestfulltextcache
   cache contains 1 manifest entries, in order of most to least recent:


More information about the Mercurial-devel mailing list