2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2020-01-20 13:42:49 +03:00
|
|
|
$ enable tweakdefaults remotenames
|
2016-07-12 22:39:34 +03:00
|
|
|
|
2016-02-19 08:32:11 +03:00
|
|
|
Setup
|
|
|
|
|
2015-07-18 01:47:30 +03:00
|
|
|
$ cat > $TESTTMP/pretxnchangegroup.sh << EOF
|
2017-09-07 07:46:16 +03:00
|
|
|
> #!/bin/sh
|
2015-07-18 01:47:30 +03:00
|
|
|
> env | grep -E "^HG_USERVAR"
|
|
|
|
> exit 0
|
|
|
|
> EOF
|
|
|
|
$ chmod +x $TESTTMP/pretxnchangegroup.sh
|
2020-01-20 13:42:49 +03:00
|
|
|
|
|
|
|
$ readconfig <<EOF
|
2015-07-18 01:47:30 +03:00
|
|
|
> [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
|
|
|
|
|
2016-01-08 05:30:24 +03:00
|
|
|
$ hg push --to master --debug --pushvars MYPUSHVAR=true 2>&1 | egrep -i '(USERVAR|pushvar)'
|
2015-07-18 01:47:30 +03:00
|
|
|
pushing rev c73f3db8c9d2 to destination $TESTTMP/server bookmark master
|
2019-01-29 08:44:27 +03:00
|
|
|
bundle2-output-part: "pushvars" (params: 1 advisory) empty payload
|
|
|
|
bundle2-input-part: "pushvars" (params: 1 advisory) supported
|
2015-07-18 01:47:30 +03:00
|
|
|
running hook pretxnchangegroup: $TESTTMP/pretxnchangegroup.sh
|
|
|
|
HG_USERVAR_MYPUSHVAR=true
|