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')) |