comparison mercurial/debugcommands.py @ 45107:4a28f5e8408e

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
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 14 Apr 2020 17:06:11 +0530
parents d50d922ca02b
children 87047efbc6a6
comparison
equal deleted inserted replaced
45106:a03c177a4679 45107:4a28f5e8408e
2649 ui.write(_(b"%s renamed from %s:%s\n") % (rel, o[0], hex(o[1]))) 2649 ui.write(_(b"%s renamed from %s:%s\n") % (rel, o[0], hex(o[1])))
2650 else: 2650 else:
2651 ui.write(_(b"%s not renamed\n") % rel) 2651 ui.write(_(b"%s not renamed\n") % rel)
2652 2652
2653 2653
2654 @command(b'debugrequires|debugrequirements', [], b'')
2655 def debugrequirements(ui, repo):
2656 """ print the current repo requirements """
2657 for r in sorted(repo.requirements):
2658 ui.write(b"%s\n" % r)
2659
2660
2654 @command( 2661 @command(
2655 b'debugrevlog', 2662 b'debugrevlog',
2656 cmdutil.debugrevlogopts + [(b'd', b'dump', False, _(b'dump index data'))], 2663 cmdutil.debugrevlogopts + [(b'd', b'dump', False, _(b'dump index data'))],
2657 _(b'-c|-m|FILE'), 2664 _(b'-c|-m|FILE'),
2658 optionalrepo=True, 2665 optionalrepo=True,