mercurial/debugcommands.py
changeset 30525 86ebd2f61c31
parent 30524 1ee358c3ed26
child 30526 9c10905f4b48
equal deleted inserted replaced
30524:1ee358c3ed26 30525:86ebd2f61c31
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 from __future__ import absolute_import
     8 from __future__ import absolute_import
     9 
     9 
    10 import operator
    10 import operator
       
    11 import os
    11 import random
    12 import random
    12 
    13 
    13 from .i18n import _
    14 from .i18n import _
    14 from .node import (
    15 from .node import (
    15     hex,
    16     hex,
   583         tree = fileset.parse(expr)
   584         tree = fileset.parse(expr)
   584         ui.note(fileset.prettyformat(tree), "\n")
   585         ui.note(fileset.prettyformat(tree), "\n")
   585 
   586 
   586     for f in ctx.getfileset(expr):
   587     for f in ctx.getfileset(expr):
   587         ui.write("%s\n" % f)
   588         ui.write("%s\n" % f)
       
   589 
       
   590 @command('debugfsinfo', [], _('[PATH]'), norepo=True)
       
   591 def debugfsinfo(ui, path="."):
       
   592     """show information detected about current filesystem"""
       
   593     util.writefile('.debugfsinfo', '')
       
   594     ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))
       
   595     ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no'))
       
   596     ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
       
   597     ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo')
       
   598                                 and 'yes' or 'no'))
       
   599     os.unlink('.debugfsinfo')