Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 19872:681f7b9213a4
check-code: check for spaces around = for named parameters
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 03 Oct 2013 14:50:47 +0200 |
parents | 41abe2e3e3b7 |
children | dc4edca39e41 |
comparison
equal
deleted
inserted
replaced
19871:6e74632170d3 | 19872:681f7b9213a4 |
---|---|
1806 | 1806 |
1807 @command('debugdata', | 1807 @command('debugdata', |
1808 [('c', 'changelog', False, _('open changelog')), | 1808 [('c', 'changelog', False, _('open changelog')), |
1809 ('m', 'manifest', False, _('open manifest'))], | 1809 ('m', 'manifest', False, _('open manifest'))], |
1810 _('-c|-m|FILE REV')) | 1810 _('-c|-m|FILE REV')) |
1811 def debugdata(ui, repo, file_, rev = None, **opts): | 1811 def debugdata(ui, repo, file_, rev=None, **opts): |
1812 """dump the contents of a data file revision""" | 1812 """dump the contents of a data file revision""" |
1813 if opts.get('changelog') or opts.get('manifest'): | 1813 if opts.get('changelog') or opts.get('manifest'): |
1814 file_, rev = None, file_ | 1814 file_, rev = None, file_ |
1815 elif rev is None: | 1815 elif rev is None: |
1816 raise error.CommandError('debugdata', _('invalid arguments')) | 1816 raise error.CommandError('debugdata', _('invalid arguments')) |
1917 | 1917 |
1918 for f in fileset.getfileset(ctx, expr): | 1918 for f in fileset.getfileset(ctx, expr): |
1919 ui.write("%s\n" % f) | 1919 ui.write("%s\n" % f) |
1920 | 1920 |
1921 @command('debugfsinfo', [], _('[PATH]')) | 1921 @command('debugfsinfo', [], _('[PATH]')) |
1922 def debugfsinfo(ui, path = "."): | 1922 def debugfsinfo(ui, path="."): |
1923 """show information detected about current filesystem""" | 1923 """show information detected about current filesystem""" |
1924 util.writefile('.debugfsinfo', '') | 1924 util.writefile('.debugfsinfo', '') |
1925 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) | 1925 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) |
1926 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no')) | 1926 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no')) |
1927 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no')) | 1927 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no')) |
1972 @command('debugindex', | 1972 @command('debugindex', |
1973 [('c', 'changelog', False, _('open changelog')), | 1973 [('c', 'changelog', False, _('open changelog')), |
1974 ('m', 'manifest', False, _('open manifest')), | 1974 ('m', 'manifest', False, _('open manifest')), |
1975 ('f', 'format', 0, _('revlog format'), _('FORMAT'))], | 1975 ('f', 'format', 0, _('revlog format'), _('FORMAT'))], |
1976 _('[-f FORMAT] -c|-m|FILE')) | 1976 _('[-f FORMAT] -c|-m|FILE')) |
1977 def debugindex(ui, repo, file_ = None, **opts): | 1977 def debugindex(ui, repo, file_=None, **opts): |
1978 """dump the contents of an index file""" | 1978 """dump the contents of an index file""" |
1979 r = cmdutil.openrevlog(repo, 'debugindex', file_, opts) | 1979 r = cmdutil.openrevlog(repo, 'debugindex', file_, opts) |
1980 format = opts.get('format', 0) | 1980 format = opts.get('format', 0) |
1981 if format not in (0, 1): | 1981 if format not in (0, 1): |
1982 raise util.Abort(_("unknown format %d") % format) | 1982 raise util.Abort(_("unknown format %d") % format) |
2353 @command('debugrevlog', | 2353 @command('debugrevlog', |
2354 [('c', 'changelog', False, _('open changelog')), | 2354 [('c', 'changelog', False, _('open changelog')), |
2355 ('m', 'manifest', False, _('open manifest')), | 2355 ('m', 'manifest', False, _('open manifest')), |
2356 ('d', 'dump', False, _('dump index data'))], | 2356 ('d', 'dump', False, _('dump index data'))], |
2357 _('-c|-m|FILE')) | 2357 _('-c|-m|FILE')) |
2358 def debugrevlog(ui, repo, file_ = None, **opts): | 2358 def debugrevlog(ui, repo, file_=None, **opts): |
2359 """show data and statistics about a revlog""" | 2359 """show data and statistics about a revlog""" |
2360 r = cmdutil.openrevlog(repo, 'debugrevlog', file_, opts) | 2360 r = cmdutil.openrevlog(repo, 'debugrevlog', file_, opts) |
2361 | 2361 |
2362 if opts.get("dump"): | 2362 if opts.get("dump"): |
2363 numrevs = len(r) | 2363 numrevs = len(r) |