sapling/tests/test-fb-hgext-pushvars-remotenames.t
Kostia Balytskyi e75b9fc1b1 fb-hgext: move most of hgext3rd and related tests to core
Summary:
This commit moves most of the stuff in hgext3rd and related tests to
hg-crew/hgext and hg-crew/test respectively.

The things that are not moved are the ones which require some more complex
imports.


Depends on D6675309

Test Plan: - tests are failing at this commit, fixes are in the following commits

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675329
2018-01-09 03:03:59 -08:00

43 lines
1.0 KiB
Perl

$ . $TESTDIR/require-ext.sh remotenames
Setup
$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
$ export PYTHONPATH
$ cat > $TESTTMP/pretxnchangegroup.sh << EOF
> #!/bin/sh
> env | grep -E "^HG_USERVAR"
> exit 0
> EOF
$ chmod +x $TESTTMP/pretxnchangegroup.sh
$ cat >> $HGRCPATH << EOF
> [extensions]
> tweakdefaults=
> remotenames=
> [hooks]
> pretxnchangegroup = $TESTTMP/pretxnchangegroup.sh
> EOF
$ hg init server
$ cd server
$ echo x > x
$ hg commit -qAm x
$ hg book master
$ cd ..
$ hg clone -q server client
$ cd client
$ echo x >> x
$ hg commit -m x
Remotenames should not interfere with pushvars
$ hg push --to master --debug --pushvars MYPUSHVAR=true 2>&1 | egrep -i '(USERVAR|pushvar)'
pushing rev c73f3db8c9d2 to destination $TESTTMP/server bookmark master
bundle2-output-part: "pushvars" (params: 0 advisory) empty payload
bundle2-input-part: "pushvars" (params: 0 advisory) supported
running hook pretxnchangegroup: $TESTTMP/pretxnchangegroup.sh
HG_USERVAR_MYPUSHVAR=true