mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
27729358a1
Summary: The old order fix was not quite right, since it modified a local copy of _order instead of the extension modules copy. Test Plan: Added a test that verifies the hooks can see a pushvar even through remotenames Reviewers: #sourcecontrol Differential Revision: https://phabricator.fb.com/D2275767
39 lines
1.1 KiB
Perl
39 lines
1.1 KiB
Perl
$ $PYTHON -c 'import remotenames' || exit 80
|
|
$ extpath=$(dirname $TESTDIR)
|
|
$ cat > $TESTTMP/pretxnchangegroup.sh << EOF
|
|
> #!/bin/bash
|
|
> env | grep -E "^HG_USERVAR"
|
|
> exit 0
|
|
> EOF
|
|
$ chmod +x $TESTTMP/pretxnchangegroup.sh
|
|
$ cp $extpath/pushvars.py $TESTTMP # use $TESTTMP substitution in message
|
|
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> pushvars=$TESTTMP/pushvars.py
|
|
> 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 | grep -Ei '(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
|