<div dir="ltr"><span style="font-size:12.8px">> $ hg debugextensions -q</span><br style="font-size:12.8px"><span style="font-size:12.8px">> purge</span><br style="font-size:12.8px"><span style="font-size:12.8px">> dbsh</span><br style="font-size:12.8px"><span style="font-size:12.8px">> extdiff</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">> $ hg debugextensions</span><br style="font-size:12.8px"><span style="font-size:12.8px">> purge</span><br style="font-size:12.8px"><span style="font-size:12.8px">> dbsh (untested!)</span><br style="font-size:12.8px"><span style="font-size:12.8px">> hggit (3.4!)</span><div><br></div><div>Could you describe more precisely the difference between version with quiet parameter and without parameters? In new patch i sent debugextensions without parameters print only names of extension modules, with verbose prints other information as well(source,tested,bug).</div><div><br></div><div><span style="font-size:12.8px">> Sorting probably makes sense here. It might also make sense to use the</span><br style="font-size:12.8px"><span style="font-size:12.8px">> generic templating interface:</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">I used generic template interface in new sent patch without sorting. Would sth like</span></div><div><span style="font-size:12.8px">exts_infos.sort(sort=cmp_ext_name) be good enough?</span></div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-13 1:04 GMT+02:00 Matt Mackall <span dir="ltr"><<a href="mailto:mpm@selenic.com" target="_blank">mpm@selenic.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Thu, 2015-09-10 at 20:25 +0200, liscju wrote:<br>
> # HG changeset patch<br>
> # User liscju <<a href="mailto:piotr.listkiewicz@gmail.com">piotr.listkiewicz@gmail.com</a>><br>
> # Date 1441896787 -7200<br>
> #      Thu Sep 10 16:53:07 2015 +0200<br>
> # Node ID a1d762cfc0428911f52b109d1c335a37ea24ff59<br>
> # Parent  ea489d94e1dc1fc3dc1dcbef1c86c18c49605ed1<br>
> mercurial: add debugextensions command (issue4676)<br>
><br>
> Add debugextensions command to help users debug their extension<br>
> problems. If there are no extensions command prints nothing,<br>
> otherwise it prints the table with: extension name, import source,<br>
> testedwith and buglink informations. If information about testedwith<br>
> or buglink in given module is missing it prints "-" in appropriate<br>
> column.<br>
<br>
</span>Interesting choice to use minirst tables here. Unfortunately,  I don't<br>
think it's going to work out well for a lot of people because some of<br>
the columns can be quite wide:<br>
<br>
$ hg debugextensions<br>
============== =========================================== ============================= ===========================================<br>
Extension name Import source                               Testedwith                    Buglink<br>
============== =========================================== ============================= ===========================================<br>
purge          /home/mpm/hg/hgext/purge.pyc                internal                      -<br>
dbsh           /home/mpm/hg/contrib/debugshell.pyc         -                             -<br>
extdiff        /home/mpm/hg/hgext/extdiff.pyc              internal                      -<br>
gpg            /home/mpm/hg/hgext/gpg.pyc                  internal                      -<br>
hggit          /home/mpm/src/hg-git/hggit/__init__.pyc     2.8.2 3.0.1 3.1 3.2.2 3.3 3.4 <a href="https://bitbucket.org/durin42/hg-git/issues" rel="noreferrer" target="_blank">https://bitbucket.org/durin42/hg-git/issues</a><br>
<br>
<br>
That's way over 80 columns. I'm sure there are a lot of people with<br>
100-character paths to their extensions as well. It's also not a very<br>
good match to our usual output style.<br>
<br>
Here's what I'd suggest:<br>
<br>
$ hg debugextensions -q<br>
purge<br>
dbsh<br>
extdiff<br>
...<br>
<br>
$ hg debugextensions<br>
purge<br>
dbsh (untested!)<br>
hggit (3.4!)<br>
...<br>
<br>
$ hg debugextensions -v<br>
purge<br>
 location: ...<br>
 tested with: internal<br>
 bug reporting: <a href="http://bz.selenic.com" rel="noreferrer" target="_blank">http://bz.selenic.com</a><br>
hggit<br>
...<br>
<br>
Sorting probably makes sense here. It might also make sense to use the<br>
generic templating interface:<br>
<br>
<a href="https://mercurial.selenic.com/wiki/GenericTemplatingPlan" rel="noreferrer" target="_blank">https://mercurial.selenic.com/wiki/GenericTemplatingPlan</a><br>
<div><div class="h5"><br>
<br>
> diff -r ea489d94e1dc -r a1d762cfc042 mercurial/commands.py<br>
> --- a/mercurial/commands.py   Sat Aug 22 17:08:37 2015 -0700<br>
> +++ b/mercurial/commands.py   Thu Sep 10 16:53:07 2015 +0200<br>
> @@ -2184,6 +2184,28 @@<br>
>      for f in ctx.getfileset(expr):<br>
>          ui.write("%s\n" % f)<br>
><br>
> +@command('debugextensions', [], norepo=True)<br>
> +def debugextensions(ui):<br>
> +    exts = extensions.extensions(ui)<br>
> +    header = ["Extension name", "Import source", "Testedwith", "Buglink"]<br>
> +    rows = [header]<br>
> +    for extname, extmod in exts:<br>
> +        extsource = extmod.__file__<br>
> +        try:<br>
> +            exttestedwith = extmod.testedwith<br>
> +        except AttributeError:<br>
> +            exttestedwith = "-"<br>
> +        try:<br>
> +            extbuglink = extmod.buglink<br>
> +        except AttributeError:<br>
> +            extbuglink = "-"<br>
> +        rows.append([extname, extsource, exttestedwith, extbuglink])<br>
> +<br>
> +    if len(rows) > 1:<br>
> +        rst = minirst.maketable(rows, header=True)<br>
> +        table = ''.join(rst)<br>
> +        ui.write(table)<br>
> +<br>
>  @command('debugfsinfo', [], _('[PATH]'), norepo=True)<br>
>  def debugfsinfo(ui, path="."):<br>
>      """show information detected about current filesystem"""<br>
> diff -r ea489d94e1dc -r a1d762cfc042 tests/test-debugextensions.t<br>
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000<br>
> +++ b/tests/test-debugextensions.t    Thu Sep 10 16:53:07 2015 +0200<br>
> @@ -0,0 +1,21 @@<br>
> +  $ hg debugextensions<br>
> +<br>
> +  $ cat >> $HGRCPATH <<EOF<br>
> +  > [extensions]<br>
> +  > color=<br>
> +  > histedit=<br>
> +  > patchbomb=<br>
> +  > rebase=<br>
> +  > mq=<br>
> +  > EOF<br>
> +<br>
> +  $ hg debugextensions<br>
> +  ==============*=====================*==========*======= (glob)<br>
> +  Extension name*Import source        *Testedwith*Buglink (glob)<br>
> +  ==============*=====================*==========*======= (glob)<br>
> +  color          */hgext/color.pyc    *internal  *-       (glob)<br>
> +  histedit       */hgext/histedit.pyc *internal  *-       (glob)<br>
> +  patchbomb      */hgext/patchbomb.pyc*internal  *-       (glob)<br>
> +  rebase         */hgext/rebase.pyc   *internal  *-       (glob)<br>
> +  mq             */hgext/mq.pyc       *internal  *-       (glob)<br>
> +  ==============*=====================*==========*======= (glob)<br>
</div></div>> _______________________________________________<br>
> Mercurial-devel mailing list<br>
> <a href="mailto:Mercurial-devel@selenic.com">Mercurial-devel@selenic.com</a><br>
> <a href="https://selenic.com/mailman/listinfo/mercurial-devel" rel="noreferrer" target="_blank">https://selenic.com/mailman/listinfo/mercurial-devel</a><br>
<span class=""><font color="#888888"><br>
--<br>
Mathematics is the supreme nostalgia of our time.<br>
<br>
</font></span></blockquote></div><br></div></div></div>