Show More
@@ -9,7 +9,6 b' from __future__ import absolute_import' | |||||
9 |
|
9 | |||
10 | import difflib |
|
10 | import difflib | |
11 | import errno |
|
11 | import errno | |
12 | import operator |
|
|||
13 | import os |
|
12 | import os | |
14 | import re |
|
13 | import re | |
15 | import shlex |
|
14 | import shlex | |
@@ -1860,51 +1859,6 b' def copy(ui, repo, *pats, **opts):' | |||||
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')) |
@@ -7,6 +7,7 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
|
10 | import operator | |||
10 | import os |
|
11 | import os | |
11 | import random |
|
12 | import random | |
12 |
|
13 | |||
@@ -25,6 +26,7 b' from . import (' | |||||
25 | dagutil, |
|
26 | dagutil, | |
26 | error, |
|
27 | error, | |
27 | exchange, |
|
28 | exchange, | |
|
29 | extensions, | |||
28 | hg, |
|
30 | hg, | |
29 | localrepo, |
|
31 | localrepo, | |
30 | lock as lockmod, |
|
32 | lock as lockmod, | |
@@ -523,3 +525,48 b' def debugdiscovery(ui, repo, remoteurl="' | |||||
523 | opts.get('remote_head')) |
|
525 | opts.get('remote_head')) | |
524 | localrevs = opts.get('local_head') |
|
526 | localrevs = opts.get('local_head') | |
525 | doit(localrevs, remoterevs) |
|
527 | doit(localrevs, remoterevs) | |
|
528 | ||||
|
529 | @command('debugextensions', commands.formatteropts, [], norepo=True) | |||
|
530 | def debugextensions(ui, **opts): | |||
|
531 | '''show information about active extensions''' | |||
|
532 | exts = extensions.extensions(ui) | |||
|
533 | hgver = util.version() | |||
|
534 | fm = ui.formatter('debugextensions', opts) | |||
|
535 | for extname, extmod in sorted(exts, key=operator.itemgetter(0)): | |||
|
536 | isinternal = extensions.ismoduleinternal(extmod) | |||
|
537 | extsource = extmod.__file__ | |||
|
538 | if isinternal: | |||
|
539 | exttestedwith = [] # never expose magic string to users | |||
|
540 | else: | |||
|
541 | exttestedwith = getattr(extmod, 'testedwith', '').split() | |||
|
542 | extbuglink = getattr(extmod, 'buglink', None) | |||
|
543 | ||||
|
544 | fm.startitem() | |||
|
545 | ||||
|
546 | if ui.quiet or ui.verbose: | |||
|
547 | fm.write('name', '%s\n', extname) | |||
|
548 | else: | |||
|
549 | fm.write('name', '%s', extname) | |||
|
550 | if isinternal or hgver in exttestedwith: | |||
|
551 | fm.plain('\n') | |||
|
552 | elif not exttestedwith: | |||
|
553 | fm.plain(_(' (untested!)\n')) | |||
|
554 | else: | |||
|
555 | lasttestedversion = exttestedwith[-1] | |||
|
556 | fm.plain(' (%s!)\n' % lasttestedversion) | |||
|
557 | ||||
|
558 | fm.condwrite(ui.verbose and extsource, 'source', | |||
|
559 | _(' location: %s\n'), extsource or "") | |||
|
560 | ||||
|
561 | if ui.verbose: | |||
|
562 | fm.plain(_(' bundled: %s\n') % ['no', 'yes'][isinternal]) | |||
|
563 | fm.data(bundled=isinternal) | |||
|
564 | ||||
|
565 | fm.condwrite(ui.verbose and exttestedwith, 'testedwith', | |||
|
566 | _(' tested with: %s\n'), | |||
|
567 | fm.formatlist(exttestedwith, name='ver')) | |||
|
568 | ||||
|
569 | fm.condwrite(ui.verbose and extbuglink, 'buglink', | |||
|
570 | _(' bug reporting: %s\n'), extbuglink or "") | |||
|
571 | ||||
|
572 | fm.end() |
General Comments 0
You need to be logged in to leave comments.
Login now