1858 Returns 0 on success, 1 if errors are encountered. |
1857 Returns 0 on success, 1 if errors are encountered. |
1859 """ |
1858 """ |
1860 with repo.wlock(False): |
1859 with repo.wlock(False): |
1861 return cmdutil.copy(ui, repo, pats, opts) |
1860 return cmdutil.copy(ui, repo, pats, opts) |
1862 |
1861 |
1863 @command('debugextensions', formatteropts, [], norepo=True) |
|
1864 def debugextensions(ui, **opts): |
|
1865 '''show information about active extensions''' |
|
1866 exts = extensions.extensions(ui) |
|
1867 hgver = util.version() |
|
1868 fm = ui.formatter('debugextensions', opts) |
|
1869 for extname, extmod in sorted(exts, key=operator.itemgetter(0)): |
|
1870 isinternal = extensions.ismoduleinternal(extmod) |
|
1871 extsource = extmod.__file__ |
|
1872 if isinternal: |
|
1873 exttestedwith = [] # never expose magic string to users |
|
1874 else: |
|
1875 exttestedwith = getattr(extmod, 'testedwith', '').split() |
|
1876 extbuglink = getattr(extmod, 'buglink', None) |
|
1877 |
|
1878 fm.startitem() |
|
1879 |
|
1880 if ui.quiet or ui.verbose: |
|
1881 fm.write('name', '%s\n', extname) |
|
1882 else: |
|
1883 fm.write('name', '%s', extname) |
|
1884 if isinternal or hgver in exttestedwith: |
|
1885 fm.plain('\n') |
|
1886 elif not exttestedwith: |
|
1887 fm.plain(_(' (untested!)\n')) |
|
1888 else: |
|
1889 lasttestedversion = exttestedwith[-1] |
|
1890 fm.plain(' (%s!)\n' % lasttestedversion) |
|
1891 |
|
1892 fm.condwrite(ui.verbose and extsource, 'source', |
|
1893 _(' location: %s\n'), extsource or "") |
|
1894 |
|
1895 if ui.verbose: |
|
1896 fm.plain(_(' bundled: %s\n') % ['no', 'yes'][isinternal]) |
|
1897 fm.data(bundled=isinternal) |
|
1898 |
|
1899 fm.condwrite(ui.verbose and exttestedwith, 'testedwith', |
|
1900 _(' tested with: %s\n'), |
|
1901 fm.formatlist(exttestedwith, name='ver')) |
|
1902 |
|
1903 fm.condwrite(ui.verbose and extbuglink, 'buglink', |
|
1904 _(' bug reporting: %s\n'), extbuglink or "") |
|
1905 |
|
1906 fm.end() |
|
1907 |
|
1908 @command('debugfileset', |
1862 @command('debugfileset', |
1909 [('r', 'rev', '', _('apply the filespec on this revision'), _('REV'))], |
1863 [('r', 'rev', '', _('apply the filespec on this revision'), _('REV'))], |
1910 _('[-r REV] FILESPEC')) |
1864 _('[-r REV] FILESPEC')) |
1911 def debugfileset(ui, repo, expr, **opts): |
1865 def debugfileset(ui, repo, expr, **opts): |
1912 '''parse and apply a fileset specification''' |
1866 '''parse and apply a fileset specification''' |