Patchwork [1,of,8,"] manifestcache: test and fix some output of the debug command

login
register
mail settings
Submitter Pierre-Yves David
Date March 15, 2019, 11:43 a.m.
Message ID <9cad39da136fbe2e4c20.1552650203@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/39259/
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 1552554678 0
#      Thu Mar 14 09:11:18 2019 +0000
# Node ID 9cad39da136fbe2e4c2023e6407847bd67b96041
# Parent  2b21c7fbb3a109dab329df8f6e79987cebbcb4de
# EXP-Topic manifestcache
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 9cad39da136f
manifestcache: test and fix some output of the debug command

The message was lacking an end of line. In addition we do not capitalize output
in Mercurial.
Pulkit Goyal - March 15, 2019, 1:23 p.m.
On Fri, Mar 15, 2019 at 2:49 PM Pierre-Yves David <
pierre-yves.david@ens-lyon.org> wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1552554678 0
> #      Thu Mar 14 09:11:18 2019 +0000
> # Node ID 9cad39da136fbe2e4c2023e6407847bd67b96041
> # Parent  2b21c7fbb3a109dab329df8f6e79987cebbcb4de
> # EXP-Topic manifestcache
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 9cad39da136f
> manifestcache: test and fix some output of the debug command
>
> The message was lacking an end of line. In addition we do not capitalize
> output
> in Mercurial.
>

Queued the series. Many thanks!

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1486,7 +1486,7 @@  def debugmanifestfulltextcache(ui, repo,
             manifest.read()  # stores revisision in cache too
 
         if not len(cache):
-            ui.write(_('Cache empty'))
+            ui.write(_('cache empty\n'))
         else:
             ui.write(
                 _('Cache contains %d manifest entries, in order of most to '
diff --git a/tests/test-manifest.t b/tests/test-manifest.t
--- a/tests/test-manifest.t
+++ b/tests/test-manifest.t
@@ -93,3 +93,17 @@  The next two calls are expected to abort
   $ hg manifest -r tip tip
   abort: please specify just one revision
   [255]
+
+Testing the manifest full text cache utility
+--------------------------------------------
+
+Reminder of the manifest log content
+
+  $ hg log --debug | grep 'manifest:'
+  manifest:    1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
+  manifest:    0:fce2a30dedad1eef4da95ca1dc0004157aa527cf
+
+Showing the content of the caches after the above operations
+
+  $ hg debugmanifestfulltextcache
+  cache empty