manifestcache: do not display data when using --add
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 14 Mar 2019 09:11:41 +0000
changeset 41943 1e75311d78f7
parent 41942 fbee66c90cef
child 41944 99eb9f269a5a
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).
mercurial/debugcommands.py
tests/test-manifest.t
--- a/mercurial/debugcommands.py	Thu Mar 14 10:43:01 2019 +0000
+++ b/mercurial/debugcommands.py	Thu Mar 14 09:11:41 2019 +0000
@@ -1488,6 +1488,7 @@
             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):
--- a/tests/test-manifest.t	Thu Mar 14 10:43:01 2019 +0000
+++ b/tests/test-manifest.t	Thu Mar 14 09:11:41 2019 +0000
@@ -111,9 +111,6 @@
 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: