sapling/tests/test-debugextensions.t
Jun Wu 67b4301002 extensions: always turn on treedirstate
Summary:
This would make tests run on treedirstate.

To avoid issues with Eden pulling from a non-eden treedirstate repo,
treedirstate is changed to be "always on" and disables itself on an eden repo.

The extension list is changed to a set for efficient `__contains__` test.

Reviewed By: phillco

Differential Revision: D7769804

fbshipit-source-id: d328fe51ef67c4730cfc53f43bdfc48c2765c541
2018-05-01 08:18:36 -07:00

114 lines
2.4 KiB
Perl

$ hg debugextensions --excludedefault
treedirstate (untested!)
$ debugpath=`pwd`/extwithoutinfos.py
$ cat > extwithoutinfos.py <<EOF
> EOF
$ cat > extwithinfos.py <<EOF
> testedwith = '3.0 3.1 3.2.1'
> buglink = 'https://example.org/bts'
> EOF
$ cat >> $HGRCPATH <<EOF
> [extensions]
> histedit=
> patchbomb=
> rebase=
> mq=
> ext1 = $debugpath
> ext2 = `pwd`/extwithinfos.py
> EOF
$ hg debugextensions --excludedefault
ext1 (untested!)
ext2 (3.2.1!)
histedit
mq
patchbomb
rebase
treedirstate (untested!)
$ hg debugextensions -v --excludedefault
ext1
location: */extwithoutinfos.py* (glob)
bundled: no
ext2
location: */extwithinfos.py* (glob)
bundled: no
tested with: 3.0 3.1 3.2.1
bug reporting: https://example.org/bts
histedit
location: */hgext/histedit.py* (glob)
bundled: yes
mq
location: */hgext/mq.py* (glob)
bundled: yes
patchbomb
location: */hgext/patchbomb.py* (glob)
bundled: yes
rebase
location: */hgext/rebase.py* (glob)
bundled: yes
treedirstate
location: */treedirstate.py* (glob)
bundled: no
$ hg debugextensions --excludedefault -Tjson | sed 's|\\\\|/|g'
[
{
"buglink": "",
"bundled": false,
"name": "ext1",
"source": "*/extwithoutinfos.py*", (glob)
"testedwith": []
},
{
"buglink": "https://example.org/bts",
"bundled": false,
"name": "ext2",
"source": "*/extwithinfos.py*", (glob)
"testedwith": ["3.0", "3.1", "3.2.1"]
},
{
"buglink": "",
"bundled": true,
"name": "histedit",
"source": "*/hgext/histedit.py*", (glob)
"testedwith": []
},
{
"buglink": "",
"bundled": true,
"name": "mq",
"source": "*/hgext/mq.py*", (glob)
"testedwith": []
},
{
"buglink": "",
"bundled": true,
"name": "patchbomb",
"source": "*/hgext/patchbomb.py*", (glob)
"testedwith": []
},
{
"buglink": "",
"bundled": true,
"name": "rebase",
"source": "*/hgext/rebase.py*", (glob)
"testedwith": []
},
{
"buglink": "",
"bundled": false,
"name": "treedirstate",
"source": "*/hgext/treedirstate.py*", (glob)
"testedwith": []
}
]
$ hg debugextensions -T '{ifcontains("3.1", testedwith, "{name}\n")}'
ext2
$ hg debugextensions \
> -T '{ifcontains("3.2", testedwith, "no substring match: {name}\n")}'