Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 30462:356406ac454f
debuginstall: print compression engine support
Since compression engines may be provided by extensions and since
not all registered compression engines may be available to use,
it seems useful to provide a mechanism to see the state of known
compression engines.
This commit teaches `hg debuginstall` to print info on known and
available compression engines.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 19 Nov 2016 10:54:21 -0800 |
parents | 932b18c95e11 |
children | 13251523b20c |
comparison
equal
deleted
inserted
replaced
30461:d195fa651b51 | 30462:356406ac454f |
---|---|
2577 except Exception as inst: | 2577 except Exception as inst: |
2578 err = inst | 2578 err = inst |
2579 problems += 1 | 2579 problems += 1 |
2580 fm.condwrite(err, 'extensionserror', " %s\n", err) | 2580 fm.condwrite(err, 'extensionserror', " %s\n", err) |
2581 | 2581 |
2582 compengines = util.compengines._engines.values() | |
2583 fm.write('compengines', _('checking registered compression engines (%s)\n'), | |
2584 fm.formatlist(sorted(e.name() for e in compengines), | |
2585 name='compengine', fmt='%s', sep=', ')) | |
2586 fm.write('compenginesavail', _('checking available compression engines ' | |
2587 '(%s)\n'), | |
2588 fm.formatlist(sorted(e.name() for e in compengines | |
2589 if e.available()), | |
2590 name='compengine', fmt='%s', sep=', ')) | |
2591 | |
2582 # templates | 2592 # templates |
2583 p = templater.templatepaths() | 2593 p = templater.templatepaths() |
2584 fm.write('templatedirs', 'checking templates (%s)...\n', ' '.join(p)) | 2594 fm.write('templatedirs', 'checking templates (%s)...\n', ' '.join(p)) |
2585 fm.condwrite(not p, '', _(" no template directories found\n")) | 2595 fm.condwrite(not p, '', _(" no template directories found\n")) |
2586 if p: | 2596 if p: |