debugdeltachain: add a parameter to display all info
This will be useful with the next changeset that change the defaul output to display the minimum amount of information.
--- a/mercurial/debugcommands.py Tue Sep 19 02:20:49 2023 +0200
+++ b/mercurial/debugcommands.py Tue Sep 19 03:00:44 2023 +0200
@@ -755,20 +755,26 @@
),
(
b'',
+ b'all-info',
+ True,
+ _('compute all information unless specified otherwise'),
+ ),
+ (
+ b'',
b'size-info',
- True,
+ None,
_('compute information related to deltas size'),
),
(
b'',
b'dist-info',
- True,
+ None,
_('compute information related to base distance'),
),
(
b'',
b'sparse-info',
- True,
+ None,
_('compute information related to sparse read'),
),
]
@@ -868,9 +874,16 @@
if revs_opt:
revs = [int(r) for r in revs_opt]
- size_info = opts.pop('size_info', True)
- dist_info = opts.pop('dist_info', True)
- sparse_info = opts.pop('sparse_info', True)
+ all_info = opts.pop('all_info', True)
+ size_info = opts.pop('size_info', None)
+ if size_info is None:
+ size_info = all_info
+ dist_info = opts.pop('dist_info', None)
+ if dist_info is None:
+ dist_info = all_info
+ sparse_info = opts.pop('sparse_info', None)
+ if sparse_info is None:
+ sparse_info = all_info
revlog = cmdutil.openrevlog(
repo, b'debugdeltachain', file_, pycompat.byteskwargs(opts)
--- a/tests/test-completion.t Tue Sep 19 02:20:49 2023 +0200
+++ b/tests/test-completion.t Tue Sep 19 03:00:44 2023 +0200
@@ -296,7 +296,7 @@
debugdag: tags, branches, dots, spaces
debugdata: changelog, manifest, dir
debugdate: extended
- debugdeltachain: rev, size-info, dist-info, sparse-info, changelog, manifest, dir, template
+ debugdeltachain: rev, all-info, size-info, dist-info, sparse-info, changelog, manifest, dir, template
debugdirstateignorepatternshash:
debugdirstate: nodates, dates, datesort, docket, all
debugdiscovery: old, nonheads, rev, seed, local-as-revs, remote-as-revs, ssh, remotecmd, insecure, template