# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1586864171 -19800 # Node ID 4a28f5e8408e57be9d55496c628254b5a12393a6 # Parent a03c177a46792b1f87a2eea4e35a943256c3c488 debugcommands: introduce new debugrequirements command This for now just prints out the list of current requirements. In future this will be helpful in reading requirements from couple of sources, and checking which requirement comes from where. Differential Revision: https://phab.mercurial-scm.org/D8632 diff -r a03c177a4679 -r 4a28f5e8408e mercurial/debugcommands.py --- a/mercurial/debugcommands.py Tue Apr 14 16:43:54 2020 +0530 +++ b/mercurial/debugcommands.py Tue Apr 14 17:06:11 2020 +0530 @@ -2651,6 +2651,13 @@ ui.write(_(b"%s not renamed\n") % rel) +@command(b'debugrequires|debugrequirements', [], b'') +def debugrequirements(ui, repo): + """ print the current repo requirements """ + for r in sorted(repo.requirements): + ui.write(b"%s\n" % r) + + @command( b'debugrevlog', cmdutil.debugrevlogopts + [(b'd', b'dump', False, _(b'dump index data'))], diff -r a03c177a4679 -r 4a28f5e8408e tests/test-completion.t --- a/tests/test-completion.t Tue Apr 14 16:43:54 2020 +0530 +++ b/tests/test-completion.t Tue Apr 14 17:06:11 2020 +0530 @@ -121,6 +121,7 @@ debugrebuilddirstate debugrebuildfncache debugrename + debugrequires debugrevlog debugrevlogindex debugrevspec @@ -306,6 +307,7 @@ debugrebuilddirstate: rev, minimal debugrebuildfncache: debugrename: rev + debugrequires: debugrevlog: changelog, manifest, dir, dump debugrevlogindex: changelog, manifest, dir, format debugrevspec: optimize, show-revs, show-set, show-stage, no-optimized, verify-optimized diff -r a03c177a4679 -r 4a28f5e8408e tests/test-help.t --- a/tests/test-help.t Tue Apr 14 16:43:54 2020 +0530 +++ b/tests/test-help.t Tue Apr 14 17:06:11 2020 +0530 @@ -1051,6 +1051,8 @@ debugrebuildfncache rebuild the fncache file debugrename dump rename information + debugrequires + print the current repo requirements debugrevlog show data and statistics about a revlog debugrevlogindex dump the contents of a revlog index diff -r a03c177a4679 -r 4a28f5e8408e tests/test-requires.t --- a/tests/test-requires.t Tue Apr 14 16:43:54 2020 +0530 +++ b/tests/test-requires.t Tue Apr 14 17:06:11 2020 +0530 @@ -48,6 +48,14 @@ > # enable extension locally > supportlocally = $TESTTMP/supported-locally/supportlocally.py > EOF + $ hg -R supported debugrequirements + dotencode + featuresetup-test + fncache + generaldelta + revlogv1 + sparserevlog + store $ hg -R supported status $ hg init push-dst