equal
deleted
inserted
replaced
|
1 Setup |
|
2 |
|
3 $ PYTHONPATH=$TESTDIR/..:$PYTHONPATH |
|
4 $ export PYTHONPATH |
|
5 |
|
6 $ cat > $TESTTMP/pretxnchangegroup.sh << EOF |
|
7 > #!/bin/sh |
|
8 > env | egrep "^HG_USERVAR_(DEBUG|BYPASS_REVIEW)" | sort |
|
9 > exit 0 |
|
10 > EOF |
|
11 $ chmod +x $TESTTMP/pretxnchangegroup.sh |
|
12 $ cat >> $HGRCPATH << EOF |
|
13 > [hooks] |
|
14 > pretxnchangegroup = $TESTTMP/pretxnchangegroup.sh |
|
15 > [experimental] |
|
16 > bundle2-exp = true |
|
17 > EOF |
|
18 |
|
19 $ hg init repo |
|
20 $ hg clone -q repo child |
|
21 $ cd child |
|
22 |
|
23 Test pushing vars to repo with pushvars.server not set |
|
24 |
|
25 $ echo b > a |
|
26 $ hg commit -Aqm a |
|
27 $ hg push --pushvars "DEBUG=1" --pushvars "BYPASS_REVIEW=true" |
|
28 pushing to $TESTTMP/repo (glob) |
|
29 searching for changes |
|
30 adding changesets |
|
31 adding manifests |
|
32 adding file changes |
|
33 added 1 changesets with 1 changes to 1 files |
|
34 |
|
35 Setting pushvars.sever = true and then pushing. |
|
36 |
|
37 $ echo [push] >> $HGRCPATH |
|
38 $ echo "pushvars.server = true" >> $HGRCPATH |
|
39 $ echo b >> a |
|
40 $ hg commit -Aqm a |
|
41 $ hg push --pushvars "DEBUG=1" --pushvars "BYPASS_REVIEW=true" |
|
42 pushing to $TESTTMP/repo (glob) |
|
43 searching for changes |
|
44 adding changesets |
|
45 adding manifests |
|
46 adding file changes |
|
47 added 1 changesets with 1 changes to 1 files |
|
48 HG_USERVAR_BYPASS_REVIEW=true |
|
49 HG_USERVAR_DEBUG=1 |
|
50 |
|
51 Test pushing var with empty right-hand side |
|
52 |
|
53 $ echo b >> a |
|
54 $ hg commit -Aqm a |
|
55 $ hg push --pushvars "DEBUG=" |
|
56 pushing to $TESTTMP/repo (glob) |
|
57 searching for changes |
|
58 adding changesets |
|
59 adding manifests |
|
60 adding file changes |
|
61 added 1 changesets with 1 changes to 1 files |
|
62 HG_USERVAR_DEBUG= |
|
63 |
|
64 Test pushing bad vars |
|
65 |
|
66 $ echo b >> a |
|
67 $ hg commit -Aqm b |
|
68 $ hg push --pushvars "DEBUG" |
|
69 pushing to $TESTTMP/repo (glob) |
|
70 abort: unable to parse variable 'DEBUG', should follow 'KEY=VALUE' or 'KEY=' format |
|
71 [255] |