Show More
@@ -1,155 +1,155 | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 | $ echo foo > foo |
|
3 | $ echo foo > foo | |
4 | $ hg ci -qAm 'add foo' |
|
4 | $ hg ci -qAm 'add foo' | |
5 | $ echo >> foo |
|
5 | $ echo >> foo | |
6 | $ hg ci -m 'change foo' |
|
6 | $ hg ci -m 'change foo' | |
7 | $ hg up -qC 0 |
|
7 | $ hg up -qC 0 | |
8 | $ echo bar > bar |
|
8 | $ echo bar > bar | |
9 | $ hg ci -qAm 'add bar' |
|
9 | $ hg ci -qAm 'add bar' | |
10 |
|
10 | |||
11 | $ hg log |
|
11 | $ hg log | |
12 | changeset: 2:effea6de0384 |
|
12 | changeset: 2:effea6de0384 | |
13 | tag: tip |
|
13 | tag: tip | |
14 | parent: 0:bbd179dfa0a7 |
|
14 | parent: 0:bbd179dfa0a7 | |
15 | user: test |
|
15 | user: test | |
16 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
16 | date: Thu Jan 01 00:00:00 1970 +0000 | |
17 | summary: add bar |
|
17 | summary: add bar | |
18 |
|
18 | |||
19 | changeset: 1:ed1b79f46b9a |
|
19 | changeset: 1:ed1b79f46b9a | |
20 | user: test |
|
20 | user: test | |
21 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
21 | date: Thu Jan 01 00:00:00 1970 +0000 | |
22 | summary: change foo |
|
22 | summary: change foo | |
23 |
|
23 | |||
24 | changeset: 0:bbd179dfa0a7 |
|
24 | changeset: 0:bbd179dfa0a7 | |
25 | user: test |
|
25 | user: test | |
26 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
26 | date: Thu Jan 01 00:00:00 1970 +0000 | |
27 | summary: add foo |
|
27 | summary: add foo | |
28 |
|
28 | |||
29 | $ cd .. |
|
29 | $ cd .. | |
30 |
|
30 | |||
31 | Test pullbundle functionality |
|
31 | Test pullbundle functionality | |
32 |
|
32 | |||
33 | $ cd repo |
|
33 | $ cd repo | |
34 | $ cat <<EOF > .hg/hgrc |
|
34 | $ cat <<EOF > .hg/hgrc | |
35 | > [server] |
|
35 | > [server] | |
36 | > pullbundle = True |
|
36 | > pullbundle = True | |
37 | > [extensions] |
|
37 | > [extensions] | |
38 | > blackbox = |
|
38 | > blackbox = | |
39 | > EOF |
|
39 | > EOF | |
40 | $ hg bundle --base null -r 0 .hg/0.hg |
|
40 | $ hg bundle --base null -r 0 .hg/0.hg | |
41 | 1 changesets found |
|
41 | 1 changesets found | |
42 | $ hg bundle --base 0 -r 1 .hg/1.hg |
|
42 | $ hg bundle --base 0 -r 1 .hg/1.hg | |
43 | 1 changesets found |
|
43 | 1 changesets found | |
44 | $ hg bundle --base 1 -r 2 .hg/2.hg |
|
44 | $ hg bundle --base 1 -r 2 .hg/2.hg | |
45 | 1 changesets found |
|
45 | 1 changesets found | |
46 | $ cat <<EOF > .hg/pullbundles.manifest |
|
46 | $ cat <<EOF > .hg/pullbundles.manifest | |
47 | > 2.hg heads=effea6de0384e684f44435651cb7bd70b8735bd4 bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
47 | > 2.hg heads=effea6de0384e684f44435651cb7bd70b8735bd4 bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
48 | > 1.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
48 | > 1.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
49 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
49 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
50 | > EOF |
|
50 | > EOF | |
51 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
51 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid | |
52 |
listening at http:// |
|
52 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) | |
53 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
53 | $ cat ../repo.pid >> $DAEMON_PIDS | |
54 | $ cd .. |
|
54 | $ cd .. | |
55 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle |
|
55 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle | |
56 | adding changesets |
|
56 | adding changesets | |
57 | adding manifests |
|
57 | adding manifests | |
58 | adding file changes |
|
58 | adding file changes | |
59 | added 1 changesets with 1 changes to 1 files |
|
59 | added 1 changesets with 1 changes to 1 files | |
60 | new changesets bbd179dfa0a7 |
|
60 | new changesets bbd179dfa0a7 | |
61 | updating to branch default |
|
61 | updating to branch default | |
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 | $ cd repo.pullbundle |
|
63 | $ cd repo.pullbundle | |
64 | $ hg pull -r 1 |
|
64 | $ hg pull -r 1 | |
65 | pulling from http://localhost:$HGPORT2/ |
|
65 | pulling from http://localhost:$HGPORT2/ | |
66 | searching for changes |
|
66 | searching for changes | |
67 | adding changesets |
|
67 | adding changesets | |
68 | adding manifests |
|
68 | adding manifests | |
69 | adding file changes |
|
69 | adding file changes | |
70 | added 1 changesets with 1 changes to 1 files |
|
70 | added 1 changesets with 1 changes to 1 files | |
71 | new changesets ed1b79f46b9a |
|
71 | new changesets ed1b79f46b9a | |
72 | (run 'hg update' to get a working copy) |
|
72 | (run 'hg update' to get a working copy) | |
73 | $ hg pull -r 2 |
|
73 | $ hg pull -r 2 | |
74 | pulling from http://localhost:$HGPORT2/ |
|
74 | pulling from http://localhost:$HGPORT2/ | |
75 | searching for changes |
|
75 | searching for changes | |
76 | adding changesets |
|
76 | adding changesets | |
77 | adding manifests |
|
77 | adding manifests | |
78 | adding file changes |
|
78 | adding file changes | |
79 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
79 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
80 | new changesets effea6de0384 |
|
80 | new changesets effea6de0384 | |
81 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
81 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
82 | $ cd .. |
|
82 | $ cd .. | |
83 | $ killdaemons.py |
|
83 | $ killdaemons.py | |
84 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
84 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log | |
85 | * sending pullbundle "0.hg" (glob) |
|
85 | * sending pullbundle "0.hg" (glob) | |
86 | * sending pullbundle "1.hg" (glob) |
|
86 | * sending pullbundle "1.hg" (glob) | |
87 | * sending pullbundle "2.hg" (glob) |
|
87 | * sending pullbundle "2.hg" (glob) | |
88 | $ rm repo/.hg/blackbox.log |
|
88 | $ rm repo/.hg/blackbox.log | |
89 |
|
89 | |||
90 | Test pullbundle functionality for incremental pulls |
|
90 | Test pullbundle functionality for incremental pulls | |
91 |
|
91 | |||
92 | $ cd repo |
|
92 | $ cd repo | |
93 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
93 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid | |
94 |
listening at http:// |
|
94 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) | |
95 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
95 | $ cat ../repo.pid >> $DAEMON_PIDS | |
96 | $ cd .. |
|
96 | $ cd .. | |
97 | $ hg clone http://localhost:$HGPORT2/ repo.pullbundle2 |
|
97 | $ hg clone http://localhost:$HGPORT2/ repo.pullbundle2 | |
98 | requesting all changes |
|
98 | requesting all changes | |
99 | adding changesets |
|
99 | adding changesets | |
100 | adding manifests |
|
100 | adding manifests | |
101 | adding file changes |
|
101 | adding file changes | |
102 | added 1 changesets with 1 changes to 1 files |
|
102 | added 1 changesets with 1 changes to 1 files | |
103 | adding changesets |
|
103 | adding changesets | |
104 | adding manifests |
|
104 | adding manifests | |
105 | adding file changes |
|
105 | adding file changes | |
106 | added 1 changesets with 1 changes to 1 files |
|
106 | added 1 changesets with 1 changes to 1 files | |
107 | adding changesets |
|
107 | adding changesets | |
108 | adding manifests |
|
108 | adding manifests | |
109 | adding file changes |
|
109 | adding file changes | |
110 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
110 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
111 | new changesets bbd179dfa0a7:ed1b79f46b9a |
|
111 | new changesets bbd179dfa0a7:ed1b79f46b9a | |
112 | updating to branch default |
|
112 | updating to branch default | |
113 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
113 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
114 | $ killdaemons.py |
|
114 | $ killdaemons.py | |
115 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
115 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log | |
116 | * sending pullbundle "0.hg" (glob) |
|
116 | * sending pullbundle "0.hg" (glob) | |
117 | * sending pullbundle "2.hg" (glob) |
|
117 | * sending pullbundle "2.hg" (glob) | |
118 | * sending pullbundle "1.hg" (glob) |
|
118 | * sending pullbundle "1.hg" (glob) | |
119 | $ rm repo/.hg/blackbox.log |
|
119 | $ rm repo/.hg/blackbox.log | |
120 |
|
120 | |||
121 | Test recovery from misconfigured server sending no new data |
|
121 | Test recovery from misconfigured server sending no new data | |
122 |
|
122 | |||
123 | $ cd repo |
|
123 | $ cd repo | |
124 | $ cat <<EOF > .hg/pullbundles.manifest |
|
124 | $ cat <<EOF > .hg/pullbundles.manifest | |
125 | > 0.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
125 | > 0.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
126 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
126 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa | |
127 | > EOF |
|
127 | > EOF | |
128 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
128 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid | |
129 |
listening at http:// |
|
129 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) | |
130 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
130 | $ cat ../repo.pid >> $DAEMON_PIDS | |
131 | $ cd .. |
|
131 | $ cd .. | |
132 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle3 |
|
132 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle3 | |
133 | adding changesets |
|
133 | adding changesets | |
134 | adding manifests |
|
134 | adding manifests | |
135 | adding file changes |
|
135 | adding file changes | |
136 | added 1 changesets with 1 changes to 1 files |
|
136 | added 1 changesets with 1 changes to 1 files | |
137 | new changesets bbd179dfa0a7 |
|
137 | new changesets bbd179dfa0a7 | |
138 | updating to branch default |
|
138 | updating to branch default | |
139 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
139 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
140 | $ cd repo.pullbundle3 |
|
140 | $ cd repo.pullbundle3 | |
141 | $ hg pull -r 1 |
|
141 | $ hg pull -r 1 | |
142 | pulling from http://localhost:$HGPORT2/ |
|
142 | pulling from http://localhost:$HGPORT2/ | |
143 | searching for changes |
|
143 | searching for changes | |
144 | adding changesets |
|
144 | adding changesets | |
145 | adding manifests |
|
145 | adding manifests | |
146 | adding file changes |
|
146 | adding file changes | |
147 | added 0 changesets with 0 changes to 1 files |
|
147 | added 0 changesets with 0 changes to 1 files | |
148 | abort: 00changelog.i@ed1b79f46b9a: no node! |
|
148 | abort: 00changelog.i@ed1b79f46b9a: no node! | |
149 | [255] |
|
149 | [255] | |
150 | $ cd .. |
|
150 | $ cd .. | |
151 | $ killdaemons.py |
|
151 | $ killdaemons.py | |
152 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
152 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log | |
153 | * sending pullbundle "0.hg" (glob) |
|
153 | * sending pullbundle "0.hg" (glob) | |
154 | * sending pullbundle "0.hg" (glob) |
|
154 | * sending pullbundle "0.hg" (glob) | |
155 | $ rm repo/.hg/blackbox.log |
|
155 | $ rm repo/.hg/blackbox.log |
@@ -1,382 +1,382 | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | #testcases bundle1 bundle2 |
|
3 | #testcases bundle1 bundle2 | |
4 |
|
4 | |||
5 | #if bundle1 |
|
5 | #if bundle1 | |
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [devel] |
|
7 | > [devel] | |
8 | > # This test is dedicated to interaction through old bundle |
|
8 | > # This test is dedicated to interaction through old bundle | |
9 | > legacy.exchange = bundle1 |
|
9 | > legacy.exchange = bundle1 | |
10 | > EOF |
|
10 | > EOF | |
11 | #endif |
|
11 | #endif | |
12 |
|
12 | |||
13 | $ hg init test |
|
13 | $ hg init test | |
14 | $ cd test |
|
14 | $ cd test | |
15 | $ echo a > a |
|
15 | $ echo a > a | |
16 | $ hg ci -Ama |
|
16 | $ hg ci -Ama | |
17 | adding a |
|
17 | adding a | |
18 | $ cd .. |
|
18 | $ cd .. | |
19 | $ hg clone test test2 |
|
19 | $ hg clone test test2 | |
20 | updating to branch default |
|
20 | updating to branch default | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | $ cd test2 |
|
22 | $ cd test2 | |
23 | $ echo a >> a |
|
23 | $ echo a >> a | |
24 | $ hg ci -mb |
|
24 | $ hg ci -mb | |
25 | $ req() { |
|
25 | $ req() { | |
26 | > hg $1 serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
26 | > hg $1 serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
27 | > cat hg.pid >> $DAEMON_PIDS |
|
27 | > cat hg.pid >> $DAEMON_PIDS | |
28 | > hg --cwd ../test2 push http://localhost:$HGPORT/ |
|
28 | > hg --cwd ../test2 push http://localhost:$HGPORT/ | |
29 | > exitstatus=$? |
|
29 | > exitstatus=$? | |
30 | > killdaemons.py |
|
30 | > killdaemons.py | |
31 | > echo % serve errors |
|
31 | > echo % serve errors | |
32 | > cat errors.log |
|
32 | > cat errors.log | |
33 | > return $exitstatus |
|
33 | > return $exitstatus | |
34 | > } |
|
34 | > } | |
35 | $ cd ../test |
|
35 | $ cd ../test | |
36 |
|
36 | |||
37 | expect ssl error |
|
37 | expect ssl error | |
38 |
|
38 | |||
39 | $ req |
|
39 | $ req | |
40 | pushing to http://localhost:$HGPORT/ |
|
40 | pushing to http://localhost:$HGPORT/ | |
41 | searching for changes |
|
41 | searching for changes | |
42 | abort: HTTP Error 403: ssl required |
|
42 | abort: HTTP Error 403: ssl required | |
43 | % serve errors |
|
43 | % serve errors | |
44 | [255] |
|
44 | [255] | |
45 |
|
45 | |||
46 | expect authorization error |
|
46 | expect authorization error | |
47 |
|
47 | |||
48 | $ echo '[web]' > .hg/hgrc |
|
48 | $ echo '[web]' > .hg/hgrc | |
49 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
49 | $ echo 'push_ssl = false' >> .hg/hgrc | |
50 | $ req |
|
50 | $ req | |
51 | pushing to http://localhost:$HGPORT/ |
|
51 | pushing to http://localhost:$HGPORT/ | |
52 | searching for changes |
|
52 | searching for changes | |
53 | abort: authorization failed |
|
53 | abort: authorization failed | |
54 | % serve errors |
|
54 | % serve errors | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | expect authorization error: must have authorized user |
|
57 | expect authorization error: must have authorized user | |
58 |
|
58 | |||
59 | $ echo 'allow_push = unperson' >> .hg/hgrc |
|
59 | $ echo 'allow_push = unperson' >> .hg/hgrc | |
60 | $ req |
|
60 | $ req | |
61 | pushing to http://localhost:$HGPORT/ |
|
61 | pushing to http://localhost:$HGPORT/ | |
62 | searching for changes |
|
62 | searching for changes | |
63 | abort: authorization failed |
|
63 | abort: authorization failed | |
64 | % serve errors |
|
64 | % serve errors | |
65 | [255] |
|
65 | [255] | |
66 |
|
66 | |||
67 | expect success |
|
67 | expect success | |
68 |
|
68 | |||
69 | $ cat > $TESTTMP/hook.sh <<'EOF' |
|
69 | $ cat > $TESTTMP/hook.sh <<'EOF' | |
70 | > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" |
|
70 | > echo "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" | |
71 | > EOF |
|
71 | > EOF | |
72 |
|
72 | |||
73 | #if bundle1 |
|
73 | #if bundle1 | |
74 | $ cat >> .hg/hgrc <<EOF |
|
74 | $ cat >> .hg/hgrc <<EOF | |
75 | > allow_push = * |
|
75 | > allow_push = * | |
76 | > [hooks] |
|
76 | > [hooks] | |
77 | > changegroup = sh -c "printenv.py changegroup 0" |
|
77 | > changegroup = sh -c "printenv.py changegroup 0" | |
78 | > pushkey = sh -c "printenv.py pushkey 0" |
|
78 | > pushkey = sh -c "printenv.py pushkey 0" | |
79 | > txnclose-phase.test = sh $TESTTMP/hook.sh |
|
79 | > txnclose-phase.test = sh $TESTTMP/hook.sh | |
80 | > EOF |
|
80 | > EOF | |
81 | $ req "--debug --config extensions.blackbox=" |
|
81 | $ req "--debug --config extensions.blackbox=" | |
82 |
listening at http:// |
|
82 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) | |
83 | pushing to http://localhost:$HGPORT/ |
|
83 | pushing to http://localhost:$HGPORT/ | |
84 | searching for changes |
|
84 | searching for changes | |
85 | remote: redirecting incoming bundle to */hg-unbundle-* (glob) |
|
85 | remote: redirecting incoming bundle to */hg-unbundle-* (glob) | |
86 | remote: adding changesets |
|
86 | remote: adding changesets | |
87 | remote: add changeset ba677d0156c1 |
|
87 | remote: add changeset ba677d0156c1 | |
88 | remote: adding manifests |
|
88 | remote: adding manifests | |
89 | remote: adding file changes |
|
89 | remote: adding file changes | |
90 | remote: adding a revisions |
|
90 | remote: adding a revisions | |
91 | remote: added 1 changesets with 1 changes to 1 files |
|
91 | remote: added 1 changesets with 1 changes to 1 files | |
92 | remote: updating the branch cache |
|
92 | remote: updating the branch cache | |
93 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
93 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
94 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
94 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
95 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
95 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
96 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
96 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
97 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" |
|
97 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" | |
98 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
98 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
99 | % serve errors |
|
99 | % serve errors | |
100 | $ hg rollback |
|
100 | $ hg rollback | |
101 | repository tip rolled back to revision 0 (undo serve) |
|
101 | repository tip rolled back to revision 0 (undo serve) | |
102 | $ req "--debug --config server.streamunbundle=True --config extensions.blackbox=" |
|
102 | $ req "--debug --config server.streamunbundle=True --config extensions.blackbox=" | |
103 |
listening at http:// |
|
103 | listening at http://*:$HGPORT/ (bound to $LOCALIP:$HGPORT) (glob) (?) | |
104 | pushing to http://localhost:$HGPORT/ |
|
104 | pushing to http://localhost:$HGPORT/ | |
105 | searching for changes |
|
105 | searching for changes | |
106 | remote: adding changesets |
|
106 | remote: adding changesets | |
107 | remote: add changeset ba677d0156c1 |
|
107 | remote: add changeset ba677d0156c1 | |
108 | remote: adding manifests |
|
108 | remote: adding manifests | |
109 | remote: adding file changes |
|
109 | remote: adding file changes | |
110 | remote: adding a revisions |
|
110 | remote: adding a revisions | |
111 | remote: added 1 changesets with 1 changes to 1 files |
|
111 | remote: added 1 changesets with 1 changes to 1 files | |
112 | remote: updating the branch cache |
|
112 | remote: updating the branch cache | |
113 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
113 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
114 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
114 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
115 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh |
|
115 | remote: running hook txnclose-phase.test: sh $TESTTMP/hook.sh | |
116 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
116 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
117 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" |
|
117 | remote: running hook changegroup: sh -c "printenv.py changegroup 0" | |
118 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
118 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
119 | % serve errors |
|
119 | % serve errors | |
120 | $ hg rollback |
|
120 | $ hg rollback | |
121 | repository tip rolled back to revision 0 (undo serve) |
|
121 | repository tip rolled back to revision 0 (undo serve) | |
122 | #endif |
|
122 | #endif | |
123 |
|
123 | |||
124 | #if bundle2 |
|
124 | #if bundle2 | |
125 | $ cat >> .hg/hgrc <<EOF |
|
125 | $ cat >> .hg/hgrc <<EOF | |
126 | > allow_push = * |
|
126 | > allow_push = * | |
127 | > [hooks] |
|
127 | > [hooks] | |
128 | > changegroup = sh -c "printenv.py changegroup 0" |
|
128 | > changegroup = sh -c "printenv.py changegroup 0" | |
129 | > pushkey = sh -c "printenv.py pushkey 0" |
|
129 | > pushkey = sh -c "printenv.py pushkey 0" | |
130 | > txnclose-phase.test = sh $TESTTMP/hook.sh |
|
130 | > txnclose-phase.test = sh $TESTTMP/hook.sh | |
131 | > EOF |
|
131 | > EOF | |
132 | $ req |
|
132 | $ req | |
133 | pushing to http://localhost:$HGPORT/ |
|
133 | pushing to http://localhost:$HGPORT/ | |
134 | searching for changes |
|
134 | searching for changes | |
135 | remote: adding changesets |
|
135 | remote: adding changesets | |
136 | remote: adding manifests |
|
136 | remote: adding manifests | |
137 | remote: adding file changes |
|
137 | remote: adding file changes | |
138 | remote: added 1 changesets with 1 changes to 1 files |
|
138 | remote: added 1 changesets with 1 changes to 1 files | |
139 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
139 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
140 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
140 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
141 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
141 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
142 | % serve errors |
|
142 | % serve errors | |
143 | $ hg rollback |
|
143 | $ hg rollback | |
144 | repository tip rolled back to revision 0 (undo serve) |
|
144 | repository tip rolled back to revision 0 (undo serve) | |
145 | #endif |
|
145 | #endif | |
146 |
|
146 | |||
147 | expect success, server lacks the httpheader capability |
|
147 | expect success, server lacks the httpheader capability | |
148 |
|
148 | |||
149 | $ CAP=httpheader |
|
149 | $ CAP=httpheader | |
150 | $ . "$TESTDIR/notcapable" |
|
150 | $ . "$TESTDIR/notcapable" | |
151 | $ req |
|
151 | $ req | |
152 | pushing to http://localhost:$HGPORT/ |
|
152 | pushing to http://localhost:$HGPORT/ | |
153 | searching for changes |
|
153 | searching for changes | |
154 | remote: adding changesets |
|
154 | remote: adding changesets | |
155 | remote: adding manifests |
|
155 | remote: adding manifests | |
156 | remote: adding file changes |
|
156 | remote: adding file changes | |
157 | remote: added 1 changesets with 1 changes to 1 files |
|
157 | remote: added 1 changesets with 1 changes to 1 files | |
158 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
158 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
159 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
159 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
160 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) |
|
160 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) | |
161 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) |
|
161 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) | |
162 | % serve errors |
|
162 | % serve errors | |
163 | $ hg rollback |
|
163 | $ hg rollback | |
164 | repository tip rolled back to revision 0 (undo serve) |
|
164 | repository tip rolled back to revision 0 (undo serve) | |
165 |
|
165 | |||
166 | expect success, server lacks the unbundlehash capability |
|
166 | expect success, server lacks the unbundlehash capability | |
167 |
|
167 | |||
168 | $ CAP=unbundlehash |
|
168 | $ CAP=unbundlehash | |
169 | $ . "$TESTDIR/notcapable" |
|
169 | $ . "$TESTDIR/notcapable" | |
170 | $ req |
|
170 | $ req | |
171 | pushing to http://localhost:$HGPORT/ |
|
171 | pushing to http://localhost:$HGPORT/ | |
172 | searching for changes |
|
172 | searching for changes | |
173 | remote: adding changesets |
|
173 | remote: adding changesets | |
174 | remote: adding manifests |
|
174 | remote: adding manifests | |
175 | remote: adding file changes |
|
175 | remote: adding file changes | |
176 | remote: added 1 changesets with 1 changes to 1 files |
|
176 | remote: added 1 changesets with 1 changes to 1 files | |
177 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
177 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
178 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
178 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
179 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) |
|
179 | remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle1 !) | |
180 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) |
|
180 | remote: changegroup hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) (bundle2 !) | |
181 | % serve errors |
|
181 | % serve errors | |
182 | $ hg rollback |
|
182 | $ hg rollback | |
183 | repository tip rolled back to revision 0 (undo serve) |
|
183 | repository tip rolled back to revision 0 (undo serve) | |
184 |
|
184 | |||
185 | expect success, pre-d1b16a746db6 server supports the unbundle capability, but |
|
185 | expect success, pre-d1b16a746db6 server supports the unbundle capability, but | |
186 | has no parameter |
|
186 | has no parameter | |
187 |
|
187 | |||
188 | $ cat <<EOF > notcapable-unbundleparam.py |
|
188 | $ cat <<EOF > notcapable-unbundleparam.py | |
189 | > from mercurial import extensions, httppeer |
|
189 | > from mercurial import extensions, httppeer | |
190 | > def capable(orig, self, name): |
|
190 | > def capable(orig, self, name): | |
191 | > if name == 'unbundle': |
|
191 | > if name == 'unbundle': | |
192 | > return True |
|
192 | > return True | |
193 | > return orig(self, name) |
|
193 | > return orig(self, name) | |
194 | > def uisetup(ui): |
|
194 | > def uisetup(ui): | |
195 | > extensions.wrapfunction(httppeer.httppeer, 'capable', capable) |
|
195 | > extensions.wrapfunction(httppeer.httppeer, 'capable', capable) | |
196 | > EOF |
|
196 | > EOF | |
197 | $ cp $HGRCPATH $HGRCPATH.orig |
|
197 | $ cp $HGRCPATH $HGRCPATH.orig | |
198 | $ cat <<EOF >> $HGRCPATH |
|
198 | $ cat <<EOF >> $HGRCPATH | |
199 | > [extensions] |
|
199 | > [extensions] | |
200 | > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py |
|
200 | > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py | |
201 | > EOF |
|
201 | > EOF | |
202 | $ req |
|
202 | $ req | |
203 | pushing to http://localhost:$HGPORT/ |
|
203 | pushing to http://localhost:$HGPORT/ | |
204 | searching for changes |
|
204 | searching for changes | |
205 | remote: adding changesets |
|
205 | remote: adding changesets | |
206 | remote: adding manifests |
|
206 | remote: adding manifests | |
207 | remote: adding file changes |
|
207 | remote: adding file changes | |
208 | remote: added 1 changesets with 1 changes to 1 files |
|
208 | remote: added 1 changesets with 1 changes to 1 files | |
209 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public |
|
209 | remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: draft -> public | |
210 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public |
|
210 | remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872: -> public | |
211 | remote: changegroup hook: * (glob) |
|
211 | remote: changegroup hook: * (glob) | |
212 | % serve errors |
|
212 | % serve errors | |
213 | $ hg rollback |
|
213 | $ hg rollback | |
214 | repository tip rolled back to revision 0 (undo serve) |
|
214 | repository tip rolled back to revision 0 (undo serve) | |
215 | $ mv $HGRCPATH.orig $HGRCPATH |
|
215 | $ mv $HGRCPATH.orig $HGRCPATH | |
216 |
|
216 | |||
217 | Test pushing to a publishing repository with a failing prepushkey hook |
|
217 | Test pushing to a publishing repository with a failing prepushkey hook | |
218 |
|
218 | |||
219 | $ cat > .hg/hgrc <<EOF |
|
219 | $ cat > .hg/hgrc <<EOF | |
220 | > [web] |
|
220 | > [web] | |
221 | > push_ssl = false |
|
221 | > push_ssl = false | |
222 | > allow_push = * |
|
222 | > allow_push = * | |
223 | > [hooks] |
|
223 | > [hooks] | |
224 | > prepushkey = sh -c "printenv.py prepushkey 1" |
|
224 | > prepushkey = sh -c "printenv.py prepushkey 1" | |
225 | > [devel] |
|
225 | > [devel] | |
226 | > legacy.exchange=phases |
|
226 | > legacy.exchange=phases | |
227 | > EOF |
|
227 | > EOF | |
228 |
|
228 | |||
229 | #if bundle1 |
|
229 | #if bundle1 | |
230 | Bundle1 works because a) phases are updated as part of changegroup application |
|
230 | Bundle1 works because a) phases are updated as part of changegroup application | |
231 | and b) client checks phases after the "unbundle" command. Since it sees no |
|
231 | and b) client checks phases after the "unbundle" command. Since it sees no | |
232 | phase changes are necessary, it doesn't send the "pushkey" command and the |
|
232 | phase changes are necessary, it doesn't send the "pushkey" command and the | |
233 | prepushkey hook never has to fire. |
|
233 | prepushkey hook never has to fire. | |
234 |
|
234 | |||
235 | $ req |
|
235 | $ req | |
236 | pushing to http://localhost:$HGPORT/ |
|
236 | pushing to http://localhost:$HGPORT/ | |
237 | searching for changes |
|
237 | searching for changes | |
238 | remote: adding changesets |
|
238 | remote: adding changesets | |
239 | remote: adding manifests |
|
239 | remote: adding manifests | |
240 | remote: adding file changes |
|
240 | remote: adding file changes | |
241 | remote: added 1 changesets with 1 changes to 1 files |
|
241 | remote: added 1 changesets with 1 changes to 1 files | |
242 | % serve errors |
|
242 | % serve errors | |
243 |
|
243 | |||
244 | #endif |
|
244 | #endif | |
245 |
|
245 | |||
246 | #if bundle2 |
|
246 | #if bundle2 | |
247 | Bundle2 sends a "pushkey" bundle2 part. This runs as part of the transaction |
|
247 | Bundle2 sends a "pushkey" bundle2 part. This runs as part of the transaction | |
248 | and fails the entire push. |
|
248 | and fails the entire push. | |
249 | $ req |
|
249 | $ req | |
250 | pushing to http://localhost:$HGPORT/ |
|
250 | pushing to http://localhost:$HGPORT/ | |
251 | searching for changes |
|
251 | searching for changes | |
252 | remote: adding changesets |
|
252 | remote: adding changesets | |
253 | remote: adding manifests |
|
253 | remote: adding manifests | |
254 | remote: adding file changes |
|
254 | remote: adding file changes | |
255 | remote: added 1 changesets with 1 changes to 1 files |
|
255 | remote: added 1 changesets with 1 changes to 1 files | |
256 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
256 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
257 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
257 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
258 | remote: transaction abort! |
|
258 | remote: transaction abort! | |
259 | remote: rollback completed |
|
259 | remote: rollback completed | |
260 | abort: updating ba677d0156c1 to public failed |
|
260 | abort: updating ba677d0156c1 to public failed | |
261 | % serve errors |
|
261 | % serve errors | |
262 | [255] |
|
262 | [255] | |
263 |
|
263 | |||
264 | #endif |
|
264 | #endif | |
265 |
|
265 | |||
266 | Now remove the failing prepushkey hook. |
|
266 | Now remove the failing prepushkey hook. | |
267 |
|
267 | |||
268 | $ cat >> .hg/hgrc <<EOF |
|
268 | $ cat >> .hg/hgrc <<EOF | |
269 | > [hooks] |
|
269 | > [hooks] | |
270 | > prepushkey = sh -c "printenv.py prepushkey 0" |
|
270 | > prepushkey = sh -c "printenv.py prepushkey 0" | |
271 | > EOF |
|
271 | > EOF | |
272 |
|
272 | |||
273 | We don't need to test bundle1 because it succeeded above. |
|
273 | We don't need to test bundle1 because it succeeded above. | |
274 |
|
274 | |||
275 | #if bundle2 |
|
275 | #if bundle2 | |
276 | $ req |
|
276 | $ req | |
277 | pushing to http://localhost:$HGPORT/ |
|
277 | pushing to http://localhost:$HGPORT/ | |
278 | searching for changes |
|
278 | searching for changes | |
279 | remote: adding changesets |
|
279 | remote: adding changesets | |
280 | remote: adding manifests |
|
280 | remote: adding manifests | |
281 | remote: adding file changes |
|
281 | remote: adding file changes | |
282 | remote: added 1 changesets with 1 changes to 1 files |
|
282 | remote: added 1 changesets with 1 changes to 1 files | |
283 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
283 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
284 | % serve errors |
|
284 | % serve errors | |
285 | #endif |
|
285 | #endif | |
286 |
|
286 | |||
287 | $ hg --config extensions.strip= strip -r 1: |
|
287 | $ hg --config extensions.strip= strip -r 1: | |
288 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg |
|
288 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg | |
289 |
|
289 | |||
290 | Now do a variant of the above, except on a non-publishing repository |
|
290 | Now do a variant of the above, except on a non-publishing repository | |
291 |
|
291 | |||
292 | $ cat >> .hg/hgrc <<EOF |
|
292 | $ cat >> .hg/hgrc <<EOF | |
293 | > [phases] |
|
293 | > [phases] | |
294 | > publish = false |
|
294 | > publish = false | |
295 | > [hooks] |
|
295 | > [hooks] | |
296 | > prepushkey = sh -c "printenv.py prepushkey 1" |
|
296 | > prepushkey = sh -c "printenv.py prepushkey 1" | |
297 | > EOF |
|
297 | > EOF | |
298 |
|
298 | |||
299 | #if bundle1 |
|
299 | #if bundle1 | |
300 | $ req |
|
300 | $ req | |
301 | pushing to http://localhost:$HGPORT/ |
|
301 | pushing to http://localhost:$HGPORT/ | |
302 | searching for changes |
|
302 | searching for changes | |
303 | remote: adding changesets |
|
303 | remote: adding changesets | |
304 | remote: adding manifests |
|
304 | remote: adding manifests | |
305 | remote: adding file changes |
|
305 | remote: adding file changes | |
306 | remote: added 1 changesets with 1 changes to 1 files |
|
306 | remote: added 1 changesets with 1 changes to 1 files | |
307 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 |
|
307 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 | |
308 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
308 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
309 | updating ba677d0156c1 to public failed! |
|
309 | updating ba677d0156c1 to public failed! | |
310 | % serve errors |
|
310 | % serve errors | |
311 | #endif |
|
311 | #endif | |
312 |
|
312 | |||
313 | #if bundle2 |
|
313 | #if bundle2 | |
314 | $ req |
|
314 | $ req | |
315 | pushing to http://localhost:$HGPORT/ |
|
315 | pushing to http://localhost:$HGPORT/ | |
316 | searching for changes |
|
316 | searching for changes | |
317 | remote: adding changesets |
|
317 | remote: adding changesets | |
318 | remote: adding manifests |
|
318 | remote: adding manifests | |
319 | remote: adding file changes |
|
319 | remote: adding file changes | |
320 | remote: added 1 changesets with 1 changes to 1 files |
|
320 | remote: added 1 changesets with 1 changes to 1 files | |
321 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
321 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
322 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
322 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
323 | remote: transaction abort! |
|
323 | remote: transaction abort! | |
324 | remote: rollback completed |
|
324 | remote: rollback completed | |
325 | abort: updating ba677d0156c1 to public failed |
|
325 | abort: updating ba677d0156c1 to public failed | |
326 | % serve errors |
|
326 | % serve errors | |
327 | [255] |
|
327 | [255] | |
328 | #endif |
|
328 | #endif | |
329 |
|
329 | |||
330 | Make phases updates work |
|
330 | Make phases updates work | |
331 |
|
331 | |||
332 | $ cat >> .hg/hgrc <<EOF |
|
332 | $ cat >> .hg/hgrc <<EOF | |
333 | > [hooks] |
|
333 | > [hooks] | |
334 | > prepushkey = sh -c "printenv.py prepushkey 0" |
|
334 | > prepushkey = sh -c "printenv.py prepushkey 0" | |
335 | > EOF |
|
335 | > EOF | |
336 |
|
336 | |||
337 | #if bundle1 |
|
337 | #if bundle1 | |
338 | $ req |
|
338 | $ req | |
339 | pushing to http://localhost:$HGPORT/ |
|
339 | pushing to http://localhost:$HGPORT/ | |
340 | searching for changes |
|
340 | searching for changes | |
341 | no changes found |
|
341 | no changes found | |
342 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 |
|
342 | remote: prepushkey hook: HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 | |
343 | % serve errors |
|
343 | % serve errors | |
344 | [1] |
|
344 | [1] | |
345 | #endif |
|
345 | #endif | |
346 |
|
346 | |||
347 | #if bundle2 |
|
347 | #if bundle2 | |
348 | $ req |
|
348 | $ req | |
349 | pushing to http://localhost:$HGPORT/ |
|
349 | pushing to http://localhost:$HGPORT/ | |
350 | searching for changes |
|
350 | searching for changes | |
351 | remote: adding changesets |
|
351 | remote: adding changesets | |
352 | remote: adding manifests |
|
352 | remote: adding manifests | |
353 | remote: adding file changes |
|
353 | remote: adding file changes | |
354 | remote: added 1 changesets with 1 changes to 1 files |
|
354 | remote: added 1 changesets with 1 changes to 1 files | |
355 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
|
355 | remote: prepushkey hook: HG_BUNDLE2=1 HG_HOOKNAME=prepushkey HG_HOOKTYPE=prepushkey HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) | |
356 | % serve errors |
|
356 | % serve errors | |
357 | #endif |
|
357 | #endif | |
358 |
|
358 | |||
359 | $ hg --config extensions.strip= strip -r 1: |
|
359 | $ hg --config extensions.strip= strip -r 1: | |
360 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg |
|
360 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/ba677d0156c1-eea704d7-backup.hg | |
361 |
|
361 | |||
362 | #if bundle2 |
|
362 | #if bundle2 | |
363 |
|
363 | |||
364 | $ cat > .hg/hgrc <<EOF |
|
364 | $ cat > .hg/hgrc <<EOF | |
365 | > [web] |
|
365 | > [web] | |
366 | > push_ssl = false |
|
366 | > push_ssl = false | |
367 | > allow_push = * |
|
367 | > allow_push = * | |
368 | > [experimental] |
|
368 | > [experimental] | |
369 | > httppostargs=true |
|
369 | > httppostargs=true | |
370 | > EOF |
|
370 | > EOF | |
371 | $ req |
|
371 | $ req | |
372 | pushing to http://localhost:$HGPORT/ |
|
372 | pushing to http://localhost:$HGPORT/ | |
373 | searching for changes |
|
373 | searching for changes | |
374 | remote: adding changesets |
|
374 | remote: adding changesets | |
375 | remote: adding manifests |
|
375 | remote: adding manifests | |
376 | remote: adding file changes |
|
376 | remote: adding file changes | |
377 | remote: added 1 changesets with 1 changes to 1 files |
|
377 | remote: added 1 changesets with 1 changes to 1 files | |
378 | % serve errors |
|
378 | % serve errors | |
379 |
|
379 | |||
380 | #endif |
|
380 | #endif | |
381 |
|
381 | |||
382 | $ cd .. |
|
382 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now