annotate tests/test-push-http.t @ 41710:4028897dfa05

url: always use str for proxy configuration Previously, proxies didn't work on Python 3 for various reasons. First, the keys to the "proxies" dict are fed into a `setattr(self, "%s_open", ...)` call and passing bytestrings results in setting an oddly named attribute due to the b'' in %s formatting. This resulted in "http_open" and "https_open" not being properly overridden and proxies not being used. Second, the standard library was expecting proxy URLs to be str. And various operations (including our custom code in url.py) would fail to account for the str/bytes mismatch. This commit normalizes everything to str and adjusts our proxy code in url.py to account for the presence of str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5952
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 15 Feb 2019 13:16:07 -0800
parents 7839249e7834
children 94faa2e84094
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38021
538e850ae737 tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com>
parents: 37845
diff changeset
1 #require no-chg
538e850ae737 tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com>
parents: 37845
diff changeset
2
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
3 #testcases bundle1 bundle2
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
4
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
5 #if bundle1
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
6 $ cat << EOF >> $HGRCPATH
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
7 > [devel]
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
8 > # This test is dedicated to interaction through old bundle
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
9 > legacy.exchange = bundle1
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
10 > EOF
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
11 #endif
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
12
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
13 $ hg init test
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
14 $ cd test
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
15 $ echo a > a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
16 $ hg ci -Ama
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
17 adding a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
18 $ cd ..
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
19 $ hg clone test test2
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
20 updating to branch default
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
22 $ cd test2
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
23 $ echo a >> a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
24 $ hg ci -mb
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
25 $ req() {
37414
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
26 > hg $1 serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
12743
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
27 > cat hg.pid >> $DAEMON_PIDS
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
28 > hg --cwd ../test2 push http://localhost:$HGPORT/
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
29 > exitstatus=$?
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
30 > killdaemons.py
12743
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
31 > echo % serve errors
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
32 > cat errors.log
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
33 > return $exitstatus
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
34 > }
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
35 $ cd ../test
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
36
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
37 expect ssl error
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
38
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
39 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
40 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
41 searching for changes
17456
59a168019255 hgweb: respond 403 forbidden for ssl required error
Yuya Nishihara <yuya@tcha.org>
parents: 17455
diff changeset
42 abort: HTTP Error 403: ssl required
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
43 % serve errors
17456
59a168019255 hgweb: respond 403 forbidden for ssl required error
Yuya Nishihara <yuya@tcha.org>
parents: 17455
diff changeset
44 [255]
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
45
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
46 expect authorization error
6167
f53b9a383476 tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 5386
diff changeset
47
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
48 $ echo '[web]' > .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
49 $ echo 'push_ssl = false' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
50 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
51 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
52 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
53 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
54 % serve errors
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
55 [255]
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
56
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
57 expect authorization error: must have authorized user
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
58
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
59 $ echo 'allow_push = unperson' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
60 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
61 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
62 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
63 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
64 % serve errors
17455
2212af23c9de test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents: 17018
diff changeset
65 [255]
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
66
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
67 expect success
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
68
34938
aa05b95949fe tests: adjust hooks for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34876
diff changeset
69 $ cat > $TESTTMP/hook.sh <<'EOF'
aa05b95949fe tests: adjust hooks for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34876
diff changeset
70 > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE"
aa05b95949fe tests: adjust hooks for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34876
diff changeset
71 > EOF
aa05b95949fe tests: adjust hooks for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34876
diff changeset
72
37414
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
73 #if bundle1
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
74 $ cat >> .hg/hgrc <<EOF
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
75 > allow_push = *
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
76 > [hooks]
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
77 > changegroup = sh -c "printenv.py --line changegroup 0"
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
78 > pushkey = sh -c "printenv.py --line pushkey 0"
37414
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
79 > txnclose-phase.test = sh $TESTTMP/hook.sh
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
80 > EOF
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
81 $ req "--debug --config extensions.blackbox="
37592
fb91757471b5 tests: glob away fqdn wherever we print it
Augie Fackler <augie@google.com>
parents: 37478
diff changeset
82 listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?)
37414
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
83 pushing to http://localhost:$HGPORT/
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
84 searching for changes
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
85 remote: redirecting incoming bundle to */hg-unbundle-* (glob)
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
86 remote: adding changesets
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
87 remote: add changeset ba677d0156c1
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
88 remote: adding manifests
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
89 remote: adding file changes
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
90 remote: adding a revisions
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
91 remote: added 1 changesets with 1 changes to 1 files
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
92 remote: updating the branch cache
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
93 remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
94 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
95 remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
96 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
97 remote: running hook changegroup: sh -c "printenv.py --line changegroup 0"
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
98 remote: changegroup hook: HG_HOOKNAME=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
99 remote: HG_HOOKTYPE=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
100 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
101 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
102 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
103 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
104 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
105 remote:
37414
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
106 % serve errors
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
107 $ hg rollback
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
108 repository tip rolled back to revision 0 (undo serve)
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
109 $ req "--debug --config server.streamunbundle=True --config extensions.blackbox="
37592
fb91757471b5 tests: glob away fqdn wherever we print it
Augie Fackler <augie@google.com>
parents: 37478
diff changeset
110 listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?)
37414
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
111 pushing to http://localhost:$HGPORT/
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
112 searching for changes
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
113 remote: adding changesets
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
114 remote: add changeset ba677d0156c1
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
115 remote: adding manifests
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
116 remote: adding file changes
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
117 remote: adding a revisions
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
118 remote: added 1 changesets with 1 changes to 1 files
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
119 remote: updating the branch cache
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
120 remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
121 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
122 remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
123 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
124 remote: running hook changegroup: sh -c "printenv.py --line changegroup 0"
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
125 remote: changegroup hook: HG_HOOKNAME=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
126 remote: HG_HOOKTYPE=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
127 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
128 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
129 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
130 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
131 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
132 remote:
37414
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
133 % serve errors
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
134 $ hg rollback
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
135 repository tip rolled back to revision 0 (undo serve)
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
136 #endif
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
137
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
138 #if bundle2
30234
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 27739
diff changeset
139 $ cat >> .hg/hgrc <<EOF
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 27739
diff changeset
140 > allow_push = *
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 27739
diff changeset
141 > [hooks]
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
142 > changegroup = sh -c "printenv.py --line changegroup 0"
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
143 > pushkey = sh -c "printenv.py --line pushkey 0"
34938
aa05b95949fe tests: adjust hooks for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34876
diff changeset
144 > txnclose-phase.test = sh $TESTTMP/hook.sh
30234
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 27739
diff changeset
145 > EOF
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
146 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
147 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
148 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
149 remote: adding changesets
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
150 remote: adding manifests
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
151 remote: adding file changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
152 remote: added 1 changesets with 1 changes to 1 files
34876
eb1b964b354b phases: pass phase names to hooks instead of internal values
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 34836
diff changeset
153 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
eb1b964b354b phases: pass phase names to hooks instead of internal values
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 34836
diff changeset
154 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
155 remote: changegroup hook: HG_BUNDLE2=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
156 remote: HG_HOOKNAME=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
157 remote: HG_HOOKTYPE=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
158 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
159 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
160 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
161 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
162 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
163 remote:
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
164 % serve errors
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
165 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13405
diff changeset
166 repository tip rolled back to revision 0 (undo serve)
37414
2d965bfeb8f6 wireproto: allow direct stream processing for unbundle
Joerg Sonnenberger <joerg@bec.de>
parents: 36751
diff changeset
167 #endif
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
168
14093
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
169 expect success, server lacks the httpheader capability
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
170
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
171 $ CAP=httpheader
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
172 $ . "$TESTDIR/notcapable"
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
173 $ req
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
174 pushing to http://localhost:$HGPORT/
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
175 searching for changes
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
176 remote: adding changesets
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
177 remote: adding manifests
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
178 remote: adding file changes
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
179 remote: added 1 changesets with 1 changes to 1 files
34876
eb1b964b354b phases: pass phase names to hooks instead of internal values
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 34836
diff changeset
180 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
eb1b964b354b phases: pass phase names to hooks instead of internal values
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 34836
diff changeset
181 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
182 remote: changegroup hook: HG_HOOKNAME=changegroup (no-bundle2 !)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
183 remote: changegroup hook: HG_BUNDLE2=1 (bundle2 !)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
184 remote: HG_HOOKNAME=changegroup (bundle2 !)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
185 remote: HG_HOOKTYPE=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
186 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
187 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
188 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
189 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
190 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
191 remote:
14093
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
192 % serve errors
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
193 $ hg rollback
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
194 repository tip rolled back to revision 0 (undo serve)
ce99d887585f httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents: 14011
diff changeset
195
13946
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
196 expect success, server lacks the unbundlehash capability
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
197
14011
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13946
diff changeset
198 $ CAP=unbundlehash
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13946
diff changeset
199 $ . "$TESTDIR/notcapable"
13946
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
200 $ req
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
201 pushing to http://localhost:$HGPORT/
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
202 searching for changes
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
203 remote: adding changesets
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
204 remote: adding manifests
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
205 remote: adding file changes
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
206 remote: added 1 changesets with 1 changes to 1 files
34876
eb1b964b354b phases: pass phase names to hooks instead of internal values
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 34836
diff changeset
207 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
eb1b964b354b phases: pass phase names to hooks instead of internal values
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 34836
diff changeset
208 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
209 remote: changegroup hook: HG_HOOKNAME=changegroup (no-bundle2 !)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
210 remote: changegroup hook: HG_BUNDLE2=1 (bundle2 !)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
211 remote: HG_HOOKNAME=changegroup (bundle2 !)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
212 remote: HG_HOOKTYPE=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
213 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
214 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
215 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
216 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
217 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
218 remote:
13946
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
219 % serve errors
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
220 $ hg rollback
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
221 repository tip rolled back to revision 0 (undo serve)
3c2f9f611ef6 tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents: 13449
diff changeset
222
36241
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
223 expect success, pre-d1b16a746db6 server supports the unbundle capability, but
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
224 has no parameter
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
225
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
226 $ cat <<EOF > notcapable-unbundleparam.py
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
227 > from mercurial import extensions, httppeer
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
228 > def capable(orig, self, name):
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
229 > if name == 'unbundle':
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
230 > return True
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
231 > return orig(self, name)
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
232 > def uisetup(ui):
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
233 > extensions.wrapfunction(httppeer.httppeer, 'capable', capable)
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
234 > EOF
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
235 $ cp $HGRCPATH $HGRCPATH.orig
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
236 $ cat <<EOF >> $HGRCPATH
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
237 > [extensions]
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
238 > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
239 > EOF
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
240 $ req
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
241 pushing to http://localhost:$HGPORT/
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
242 searching for changes
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
243 remote: adding changesets
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
244 remote: adding manifests
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
245 remote: adding file changes
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
246 remote: added 1 changesets with 1 changes to 1 files
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
247 remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
248 remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
249 remote: changegroup hook: * (glob)
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
250 remote: HG_HOOKNAME=changegroup (bundle2 !)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
251 remote: HG_HOOKTYPE=changegroup
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
252 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
253 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
254 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
255 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
256 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
257 remote:
36241
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
258 % serve errors
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
259 $ hg rollback
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
260 repository tip rolled back to revision 0 (undo serve)
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
261 $ mv $HGRCPATH.orig $HGRCPATH
fefd57bd9573 tests: port value-less unbundle capability test to test-push-http.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34938
diff changeset
262
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
263 Test pushing to a publishing repository with a failing prepushkey hook
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
264
17842
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
265 $ cat > .hg/hgrc <<EOF
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
266 > [web]
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
267 > push_ssl = false
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
268 > allow_push = *
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
269 > [hooks]
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
270 > prepushkey = sh -c "printenv.py --line prepushkey 1"
34836
537de0b14030 phase: use a binary phase part to push through bundle2 (BC)
Boris Feld <boris.feld@octobus.net>
parents: 34710
diff changeset
271 > [devel]
537de0b14030 phase: use a binary phase part to push through bundle2 (BC)
Boris Feld <boris.feld@octobus.net>
parents: 34710
diff changeset
272 > legacy.exchange=phases
17842
a029dac38942 test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17793
diff changeset
273 > EOF
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
274
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
275 #if bundle1
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
276 Bundle1 works because a) phases are updated as part of changegroup application
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
277 and b) client checks phases after the "unbundle" command. Since it sees no
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
278 phase changes are necessary, it doesn't send the "pushkey" command and the
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
279 prepushkey hook never has to fire.
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
280
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
281 $ req
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
282 pushing to http://localhost:$HGPORT/
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
283 searching for changes
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
284 remote: adding changesets
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
285 remote: adding manifests
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
286 remote: adding file changes
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
287 remote: added 1 changesets with 1 changes to 1 files
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
288 % serve errors
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
289
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
290 #endif
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
291
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
292 #if bundle2
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
293 Bundle2 sends a "pushkey" bundle2 part. This runs as part of the transaction
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
294 and fails the entire push.
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
295 $ req
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
296 pushing to http://localhost:$HGPORT/
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
297 searching for changes
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
298 remote: adding changesets
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
299 remote: adding manifests
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
300 remote: adding file changes
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
301 remote: added 1 changesets with 1 changes to 1 files
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
302 remote: prepushkey hook: HG_BUNDLE2=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
303 remote: HG_HOOKNAME=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
304 remote: HG_HOOKTYPE=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
305 remote: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
306 remote: HG_NAMESPACE=phases
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
307 remote: HG_NEW=0
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
308 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
309 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
310 remote: HG_OLD=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
311 remote: HG_PENDING=$TESTTMP/test
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
312 remote: HG_PHASES_MOVED=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
313 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
314 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
315 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
316 remote:
25390
14c6b4c6e3f9 test: use bundle2 in test-push-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24740
diff changeset
317 remote: pushkey-abort: prepushkey hook exited with status 1
25502
bd41c19383db phases: abort the whole push if phases fail to update (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25478
diff changeset
318 remote: transaction abort!
bd41c19383db phases: abort the whole push if phases fail to update (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25478
diff changeset
319 remote: rollback completed
bd41c19383db phases: abort the whole push if phases fail to update (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25478
diff changeset
320 abort: updating ba677d0156c1 to public failed
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
321 % serve errors
25502
bd41c19383db phases: abort the whole push if phases fail to update (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25478
diff changeset
322 [255]
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
323
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
324 #endif
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
325
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
326 Now remove the failing prepushkey hook.
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
327
30234
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 27739
diff changeset
328 $ cat >> .hg/hgrc <<EOF
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
329 > [hooks]
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
330 > prepushkey = sh -c "printenv.py --line prepushkey 0"
30234
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 27739
diff changeset
331 > EOF
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
332
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
333 We don't need to test bundle1 because it succeeded above.
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
334
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
335 #if bundle2
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
336 $ req
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
337 pushing to http://localhost:$HGPORT/
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
338 searching for changes
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
339 remote: adding changesets
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
340 remote: adding manifests
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
341 remote: adding file changes
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
342 remote: added 1 changesets with 1 changes to 1 files
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
343 remote: prepushkey hook: HG_BUNDLE2=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
344 remote: HG_HOOKNAME=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
345 remote: HG_HOOKTYPE=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
346 remote: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
347 remote: HG_NAMESPACE=phases
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
348 remote: HG_NEW=0
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
349 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
350 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
351 remote: HG_OLD=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
352 remote: HG_PENDING=$TESTTMP/test
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
353 remote: HG_PHASES_MOVED=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
354 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
355 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
356 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
357 remote:
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
358 % serve errors
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
359 #endif
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
360
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
361 $ hg --config extensions.strip= strip -r 1:
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
362 saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
363
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
364 Now do a variant of the above, except on a non-publishing repository
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
365
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
366 $ cat >> .hg/hgrc <<EOF
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
367 > [phases]
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
368 > publish = false
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
369 > [hooks]
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
370 > prepushkey = sh -c "printenv.py --line prepushkey 1"
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
371 > EOF
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
372
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
373 #if bundle1
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
374 $ req
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
375 pushing to http://localhost:$HGPORT/
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
376 searching for changes
25502
bd41c19383db phases: abort the whole push if phases fail to update (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25478
diff changeset
377 remote: adding changesets
bd41c19383db phases: abort the whole push if phases fail to update (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25478
diff changeset
378 remote: adding manifests
bd41c19383db phases: abort the whole push if phases fail to update (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25478
diff changeset
379 remote: adding file changes
bd41c19383db phases: abort the whole push if phases fail to update (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25478
diff changeset
380 remote: added 1 changesets with 1 changes to 1 files
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
381 remote: prepushkey hook: HG_HOOKNAME=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
382 remote: HG_HOOKTYPE=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
383 remote: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
384 remote: HG_NAMESPACE=phases
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
385 remote: HG_NEW=0
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
386 remote: HG_OLD=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
387 remote:
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
388 remote: pushkey-abort: prepushkey hook exited with status 1
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
389 updating ba677d0156c1 to public failed!
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
390 % serve errors
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
391 #endif
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
392
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
393 #if bundle2
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
394 $ req
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
395 pushing to http://localhost:$HGPORT/
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
396 searching for changes
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
397 remote: adding changesets
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
398 remote: adding manifests
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
399 remote: adding file changes
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
400 remote: added 1 changesets with 1 changes to 1 files
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
401 remote: prepushkey hook: HG_BUNDLE2=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
402 remote: HG_HOOKNAME=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
403 remote: HG_HOOKTYPE=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
404 remote: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
405 remote: HG_NAMESPACE=phases
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
406 remote: HG_NEW=0
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
407 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
408 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
409 remote: HG_OLD=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
410 remote: HG_PENDING=$TESTTMP/test
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
411 remote: HG_PHASES_MOVED=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
412 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
413 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
414 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
415 remote:
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
416 remote: pushkey-abort: prepushkey hook exited with status 1
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
417 remote: transaction abort!
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
418 remote: rollback completed
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
419 abort: updating ba677d0156c1 to public failed
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
420 % serve errors
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
421 [255]
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
422 #endif
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
423
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
424 Make phases updates work
17793
8474be4412ca wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 17565
diff changeset
425
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
426 $ cat >> .hg/hgrc <<EOF
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
427 > [hooks]
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
428 > prepushkey = sh -c "printenv.py --line prepushkey 0"
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
429 > EOF
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
430
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
431 #if bundle1
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
432 $ req
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
433 pushing to http://localhost:$HGPORT/
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
434 searching for changes
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
435 no changes found
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
436 remote: prepushkey hook: HG_HOOKNAME=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
437 remote: HG_HOOKTYPE=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
438 remote: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
439 remote: HG_NAMESPACE=phases
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
440 remote: HG_NEW=0
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
441 remote: HG_OLD=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
442 remote:
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
443 % serve errors
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
444 [1]
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
445 #endif
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
446
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
447 #if bundle2
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
448 $ req
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
449 pushing to http://localhost:$HGPORT/
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
450 searching for changes
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
451 remote: adding changesets
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
452 remote: adding manifests
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
453 remote: adding file changes
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
454 remote: added 1 changesets with 1 changes to 1 files
41642
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
455 remote: prepushkey hook: HG_BUNDLE2=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
456 remote: HG_HOOKNAME=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
457 remote: HG_HOOKTYPE=prepushkey
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
458 remote: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
459 remote: HG_NAMESPACE=phases
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
460 remote: HG_NEW=0
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
461 remote: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
462 remote: HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
463 remote: HG_OLD=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
464 remote: HG_PENDING=$TESTTMP/test
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
465 remote: HG_PHASES_MOVED=1
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
466 remote: HG_SOURCE=serve
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
467 remote: HG_TXNID=TXN:$ID$
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
468 remote: HG_URL=remote:http:$LOCALIP: (glob)
7839249e7834 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net>
parents: 38722
diff changeset
469 remote:
36243
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
470 % serve errors
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
471 #endif
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
472
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
473 $ hg --config extensions.strip= strip -r 1:
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
474 saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg
c19e66dacaa1 tests: expand test coverage for updating phases
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36242
diff changeset
475
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
476 #if bundle2
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
477
33700
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
478 $ cat > .hg/hgrc <<EOF
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
479 > [web]
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
480 > push_ssl = false
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
481 > allow_push = *
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
482 > [experimental]
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
483 > httppostargs=true
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
484 > EOF
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
485 $ req
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
486 pushing to http://localhost:$HGPORT/
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
487 searching for changes
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
488 remote: adding changesets
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
489 remote: adding manifests
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
490 remote: adding file changes
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
491 remote: added 1 changesets with 1 changes to 1 files
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
492 % serve errors
970967e0a917 http: add a test of actually pushing with httppostargs
Augie Fackler <augie@google.com>
parents: 31815
diff changeset
493
36242
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
494 #endif
477280637646 tests: consolidate test-push-http.t and test-push-http-bundle1.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36241
diff changeset
495
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15933
diff changeset
496 $ cd ..
37818
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
497
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
498 Pushing via hgwebdir works
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
499
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
500 $ hg init hgwebdir
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
501 $ cd hgwebdir
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
502 $ echo 0 > a
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
503 $ hg -q commit -A -m initial
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
504 $ cd ..
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
505
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
506 $ cat > web.conf << EOF
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
507 > [paths]
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
508 > / = *
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
509 > [web]
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
510 > push_ssl = false
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
511 > allow_push = *
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
512 > EOF
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
513
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
514 $ hg serve --web-conf web.conf -p $HGPORT -d --pid-file hg.pid
37824
2968ad548583 test-push-http: do not clear pid file
Yuya Nishihara <yuya@tcha.org>
parents: 37818
diff changeset
515 $ cat hg.pid >> $DAEMON_PIDS
37818
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
516
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
517 $ hg clone http://localhost:$HGPORT/hgwebdir hgwebdir-local
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
518 requesting all changes
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
519 adding changesets
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
520 adding manifests
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
521 adding file changes
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
522 added 1 changesets with 1 changes to 1 files
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
523 new changesets 98a3f8f02ba7
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
524 updating to branch default
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
525 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
526 $ cd hgwebdir-local
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
527 $ echo commit > a
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
528 $ hg commit -m 'local commit'
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
529
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
530 $ hg push
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
531 pushing to http://localhost:$HGPORT/hgwebdir
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
532 searching for changes
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
533 remote: adding changesets
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
534 remote: adding manifests
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
535 remote: adding file changes
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
536 remote: added 1 changesets with 1 changes to 1 files
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
537
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
538 $ killdaemons.py
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
539
877185de62cf hgweb: reuse body file object when hgwebdir calls hgweb (issue5851)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37592
diff changeset
540 $ cd ..