Mercurial > hg
view tests/test-debugextensions.t @ 29858:33461139c31c
grep: add formatter support
Several fields are renamed to be consistent with the annotate command, which
doesn't mean the last call for the name unification [1]. Actually, I'd rather
rename line_number to linenumber, linenum, lineno or line, but I want to
port the grep command to formatter first.
[1]: https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Dictionary
I don't have any better name for the list of matched/unmatched texts, so
they are just called as "texts".
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 18 Aug 2016 15:13:56 +0900 |
parents | 3ef9aa7ad1fc |
children | ca6940515485 |
line wrap: on
line source
$ hg debugextensions $ debugpath=`pwd`/extwithoutinfos.py $ cat > extwithoutinfos.py <<EOF > EOF $ cat >> $HGRCPATH <<EOF > [extensions] > color= > histedit= > patchbomb= > rebase= > mq= > ext1 = $debugpath > EOF $ hg debugextensions color ext1 (untested!) histedit mq patchbomb rebase $ hg debugextensions -v color location: */hgext/color.py* (glob) tested with: internal ext1 location: */extwithoutinfos.py* (glob) histedit location: */hgext/histedit.py* (glob) tested with: internal mq location: */hgext/mq.py* (glob) tested with: internal patchbomb location: */hgext/patchbomb.py* (glob) tested with: internal rebase location: */hgext/rebase.py* (glob) tested with: internal $ hg debugextensions -Tjson | sed 's|\\\\|/|g' [ { "buglink": "", "name": "color", "source": "*/hgext/color.py*", (glob) "testedwith": ["internal"] }, { "buglink": "", "name": "ext1", "source": "*/extwithoutinfos.py*", (glob) "testedwith": [] }, { "buglink": "", "name": "histedit", "source": "*/hgext/histedit.py*", (glob) "testedwith": ["internal"] }, { "buglink": "", "name": "mq", "source": "*/hgext/mq.py*", (glob) "testedwith": ["internal"] }, { "buglink": "", "name": "patchbomb", "source": "*/hgext/patchbomb.py*", (glob) "testedwith": ["internal"] }, { "buglink": "", "name": "rebase", "source": "*/hgext/rebase.py*", (glob) "testedwith": ["internal"] } ] $ hg debugextensions -T '{ifcontains("internal", testedwith, "", "{name}\n")}' ext1