# HG changeset patch # User Gregory Szorc # Date 1471492696 25200 # Node ID 86ebd2f61c31aed7dab31e1de60f0d75767a2f77 # Parent 1ee358c3ed266f604b9fd1f1939dc4f3bc7c95cd debugcommands: move 'debugfsinfo' in the new module diff -r 1ee358c3ed26 -r 86ebd2f61c31 mercurial/commands.py --- a/mercurial/commands.py Wed Aug 17 20:57:57 2016 -0700 +++ b/mercurial/commands.py Wed Aug 17 20:58:16 2016 -0700 @@ -1858,17 +1858,6 @@ with repo.wlock(False): return cmdutil.copy(ui, repo, pats, opts) -@command('debugfsinfo', [], _('[PATH]'), norepo=True) -def debugfsinfo(ui, path="."): - """show information detected about current filesystem""" - util.writefile('.debugfsinfo', '') - ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) - ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no')) - ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no')) - ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo') - and 'yes' or 'no')) - os.unlink('.debugfsinfo') - @command('debuggetbundle', [('H', 'head', [], _('id of head node'), _('ID')), ('C', 'common', [], _('id of common node'), _('ID')), diff -r 1ee358c3ed26 -r 86ebd2f61c31 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Wed Aug 17 20:57:57 2016 -0700 +++ b/mercurial/debugcommands.py Wed Aug 17 20:58:16 2016 -0700 @@ -8,6 +8,7 @@ from __future__ import absolute_import import operator +import os import random from .i18n import _ @@ -585,3 +586,14 @@ for f in ctx.getfileset(expr): ui.write("%s\n" % f) + +@command('debugfsinfo', [], _('[PATH]'), norepo=True) +def debugfsinfo(ui, path="."): + """show information detected about current filesystem""" + util.writefile('.debugfsinfo', '') + ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) + ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no')) + ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no')) + ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo') + and 'yes' or 'no')) + os.unlink('.debugfsinfo')