mercurial/commands.py
changeset 30524 1ee358c3ed26
parent 30519 20a42325fdef
child 30525 86ebd2f61c31
equal deleted inserted replaced
30523:726d30a6d89b 30524:1ee358c3ed26
    39     discovery,
    39     discovery,
    40     encoding,
    40     encoding,
    41     error,
    41     error,
    42     exchange,
    42     exchange,
    43     extensions,
    43     extensions,
    44     fileset,
       
    45     formatter,
    44     formatter,
    46     graphmod,
    45     graphmod,
    47     hbisect,
    46     hbisect,
    48     help,
    47     help,
    49     hg,
    48     hg,
  1857     Returns 0 on success, 1 if errors are encountered.
  1856     Returns 0 on success, 1 if errors are encountered.
  1858     """
  1857     """
  1859     with repo.wlock(False):
  1858     with repo.wlock(False):
  1860         return cmdutil.copy(ui, repo, pats, opts)
  1859         return cmdutil.copy(ui, repo, pats, opts)
  1861 
  1860 
  1862 @command('debugfileset',
       
  1863     [('r', 'rev', '', _('apply the filespec on this revision'), _('REV'))],
       
  1864     _('[-r REV] FILESPEC'))
       
  1865 def debugfileset(ui, repo, expr, **opts):
       
  1866     '''parse and apply a fileset specification'''
       
  1867     ctx = scmutil.revsingle(repo, opts.get('rev'), None)
       
  1868     if ui.verbose:
       
  1869         tree = fileset.parse(expr)
       
  1870         ui.note(fileset.prettyformat(tree), "\n")
       
  1871 
       
  1872     for f in ctx.getfileset(expr):
       
  1873         ui.write("%s\n" % f)
       
  1874 
       
  1875 @command('debugfsinfo', [], _('[PATH]'), norepo=True)
  1861 @command('debugfsinfo', [], _('[PATH]'), norepo=True)
  1876 def debugfsinfo(ui, path="."):
  1862 def debugfsinfo(ui, path="."):
  1877     """show information detected about current filesystem"""
  1863     """show information detected about current filesystem"""
  1878     util.writefile('.debugfsinfo', '')
  1864     util.writefile('.debugfsinfo', '')
  1879     ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))
  1865     ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))