Read about our upcoming Code of Conduct on this issue

Commit b05deb90 authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

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
parent a03c177a4679
......@@ -2651,6 +2651,13 @@ def debugrename(ui, repo, *pats, **opts):
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'))],
......
......@@ -121,6 +121,7 @@ Show debug commands if there are no other candidates
debugrebuilddirstate
debugrebuildfncache
debugrename
debugrequires
debugrevlog
debugrevlogindex
debugrevspec
......@@ -306,6 +307,7 @@ Show all commands + options
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
......
......@@ -1051,6 +1051,8 @@ Test list of internal help commands
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
......
......@@ -48,6 +48,14 @@ another repository of push/pull/clone on localhost:
> # 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment