Mercurial > hg
comparison mercurial/commands.py @ 25119:49c583ca48c4
treemanifest: add --dir option to debug{revlog,data,index}
It should be possible to debug the submanifest revlogs without having
to know where they are stored (in .hg/store/meta/), so let's add a
--dir option for this purpose.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 12 Apr 2015 23:51:06 -0700 |
parents | 1ef96a3b8b89 |
children | a7701001c829 |
comparison
equal
deleted
inserted
replaced
25118:e632a2429982 | 25119:49c583ca48c4 |
---|---|
2054 ui.write(line) | 2054 ui.write(line) |
2055 ui.write("\n") | 2055 ui.write("\n") |
2056 | 2056 |
2057 @command('debugdata', | 2057 @command('debugdata', |
2058 [('c', 'changelog', False, _('open changelog')), | 2058 [('c', 'changelog', False, _('open changelog')), |
2059 ('m', 'manifest', False, _('open manifest'))], | 2059 ('m', 'manifest', False, _('open manifest')), |
2060 ('', 'dir', False, _('open directory manifest'))], | |
2060 _('-c|-m|FILE REV')) | 2061 _('-c|-m|FILE REV')) |
2061 def debugdata(ui, repo, file_, rev=None, **opts): | 2062 def debugdata(ui, repo, file_, rev=None, **opts): |
2062 """dump the contents of a data file revision""" | 2063 """dump the contents of a data file revision""" |
2063 if opts.get('changelog') or opts.get('manifest'): | 2064 if opts.get('changelog') or opts.get('manifest'): |
2064 file_, rev = None, file_ | 2065 file_, rev = None, file_ |
2225 raise util.Abort(_("no ignore patterns found")) | 2226 raise util.Abort(_("no ignore patterns found")) |
2226 | 2227 |
2227 @command('debugindex', | 2228 @command('debugindex', |
2228 [('c', 'changelog', False, _('open changelog')), | 2229 [('c', 'changelog', False, _('open changelog')), |
2229 ('m', 'manifest', False, _('open manifest')), | 2230 ('m', 'manifest', False, _('open manifest')), |
2231 ('', 'dir', False, _('open directory manifest')), | |
2230 ('f', 'format', 0, _('revlog format'), _('FORMAT'))], | 2232 ('f', 'format', 0, _('revlog format'), _('FORMAT'))], |
2231 _('[-f FORMAT] -c|-m|FILE'), | 2233 _('[-f FORMAT] -c|-m|FILE'), |
2232 optionalrepo=True) | 2234 optionalrepo=True) |
2233 def debugindex(ui, repo, file_=None, **opts): | 2235 def debugindex(ui, repo, file_=None, **opts): |
2234 """dump the contents of an index file""" | 2236 """dump the contents of an index file""" |
2727 ui.write(_("%s not renamed\n") % rel) | 2729 ui.write(_("%s not renamed\n") % rel) |
2728 | 2730 |
2729 @command('debugrevlog', | 2731 @command('debugrevlog', |
2730 [('c', 'changelog', False, _('open changelog')), | 2732 [('c', 'changelog', False, _('open changelog')), |
2731 ('m', 'manifest', False, _('open manifest')), | 2733 ('m', 'manifest', False, _('open manifest')), |
2734 ('', 'dir', False, _('open directory manifest')), | |
2732 ('d', 'dump', False, _('dump index data'))], | 2735 ('d', 'dump', False, _('dump index data'))], |
2733 _('-c|-m|FILE'), | 2736 _('-c|-m|FILE'), |
2734 optionalrepo=True) | 2737 optionalrepo=True) |
2735 def debugrevlog(ui, repo, file_=None, **opts): | 2738 def debugrevlog(ui, repo, file_=None, **opts): |
2736 """show data and statistics about a revlog""" | 2739 """show data and statistics about a revlog""" |