[PATCH 1 of 3] debugformat: flush formatter output per item
Gregory Szorc
gregory.szorc at gmail.com
Sun Dec 10 12:32:41 EST 2017
On Sun, Dec 10, 2017 at 2:58 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1512902379 -32400
> # Sun Dec 10 19:39:39 2017 +0900
> # Node ID 85a8d0279d24d039a4f113179dcafac44a3eb93c
> # Parent ea645c6c6d4609a8beedee97610ce27cb4d18a6c
> debugformat: flush formatter output per item
>
Queued. Thanks.
>
> diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
> --- a/mercurial/debugcommands.py
> +++ b/mercurial/debugcommands.py
> @@ -888,8 +888,8 @@ def debugformat(ui, repo, **opts):
> if ui.verbose:
> fm.plain(' config default')
> fm.plain('\n')
> - fm.startitem()
> for fv in upgrade.allformatvariant:
> + fm.startitem()
> repovalue = fv.fromrepo(repo)
> configvalue = fv.fromconfig(repo)
>
> @@ -916,6 +916,7 @@ def debugformat(ui, repo, **opts):
> fm.condwrite(ui.verbose, 'default', ' %7s',
> formatvalue(fv.default),
> label='formatvariant.default')
> fm.plain('\n')
> + fm.end()
>
> @command('debugfsinfo', [], _('[PATH]'), norepo=True)
> def debugfsinfo(ui, path="."):
> diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
> --- a/tests/test-upgrade-repo.t
> +++ b/tests/test-upgrade-repo.t
> @@ -82,6 +82,39 @@ An upgrade of a repository created with
> [formatvariant.name.uptodate|generaldelta:
> ][formatvariant.repo.uptodate| yes][formatvariant.config.default|
> yes][formatvariant.default| yes]
> [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate|
> yes][formatvariant.config.default| yes][formatvariant.default| yes]
> [formatvariant.name.uptodate|compression:
> ][formatvariant.repo.uptodate| zlib][formatvariant.config.default|
> zlib][formatvariant.default| zlib]
> + $ hg debugformat -Tjson
> + [
> + {
> + "config": "yes",
> + "default": "yes",
> + "name": "fncache",
> + "repo": "yes"
> + },
> + {
> + "config": "yes",
> + "default": "yes",
> + "name": "dotencode",
> + "repo": "yes"
> + },
> + {
> + "config": "yes",
> + "default": "yes",
> + "name": "generaldelta",
> + "repo": "yes"
> + },
> + {
> + "config": "yes",
> + "default": "yes",
> + "name": "plain-cl-delta",
> + "repo": "yes"
> + },
> + {
> + "config": "zlib",
> + "default": "zlib",
> + "name": "compression",
> + "repo": "zlib"
> + }
> + ]
> $ hg debugupgraderepo
> (no feature deficiencies found in existing repository)
> performing an upgrade with "--run" will make the following changes:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20171210/d2e022dc/attachment.html>
More information about the Mercurial-devel
mailing list