Mercurial > hg
view tests/test-debugextensions.t @ 35938:80a2b8ae42a1
sshpeer: move handshake outside of sshpeer
With the handshake now performed before a peer class is instantiated,
we can now instantiate a different peer class depending on the results
of the handshake.
Our test extension had to change to cope with the new API. Because
we now issue the command via raw I/O calls and don't call
_callstream(), we no longer have to register the fake command.
(_callstream() uses the command registration to see what args to
send).
Differential Revision: https://phab.mercurial-scm.org/D2034
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 05 Feb 2018 09:14:32 -0800 |
parents | a543d17dce03 |
children | 19ec5da944d5 |
line wrap: on
line source
$ hg debugextensions $ 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 ext1 (untested!) ext2 (3.2.1!) histedit mq patchbomb rebase $ hg debugextensions -v 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 $ hg debugextensions -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": [] } ] $ hg debugextensions -T '{ifcontains("3.1", testedwith, "{name}\n")}' ext2 $ hg debugextensions \ > -T '{ifcontains("3.2", testedwith, "no substring match: {name}\n")}'