##// END OF EJS Templates
tests: enable even more Windows server tests
Patrick Mezard -
r17565:f62ed3d9 default
parent child Browse files
Show More
@@ -1,38 +1,39 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" killdaemons || exit 80
2 2
3 3 = Test the known() protocol function =
4 4
5 5 Create a test repository:
6 6
7 7 $ hg init repo
8 8 $ cd repo
9 9 $ touch a ; hg add a ; hg ci -ma
10 10 $ touch b ; hg add b ; hg ci -mb
11 11 $ touch c ; hg add c ; hg ci -mc
12 12 $ hg log --template '{node}\n'
13 13 991a3460af53952d10ec8a295d3d2cc2e5fa9690
14 14 0e067c57feba1a5694ca4844f05588bb1bf82342
15 15 3903775176ed42b1458a6281db4a0ccf4d9f287a
16 16 $ cd ..
17 17
18 18 Test locally:
19 19
20 20 $ hg debugknown repo 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a
21 21 111
22 22 $ hg debugknown repo 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a
23 23 010
24 24 $ hg debugknown repo
25 25
26 26
27 27 Test via HTTP:
28 28
29 29 $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log
30 30 $ cat hg.pid >> $DAEMON_PIDS
31 31 $ hg debugknown http://localhost:$HGPORT/ 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a
32 32 111
33 33 $ hg debugknown http://localhost:$HGPORT/ 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a
34 34 010
35 35 $ hg debugknown http://localhost:$HGPORT/
36 36
37 37 $ cat error.log
38 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
38 39
@@ -1,153 +1,156 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" killdaemons || exit 80
2 2
3 3 hide outer repo
4 4 $ hg init
5 5
6 6 $ echo "[extensions]" >> $HGRCPATH
7 7 $ echo "mq=" >> $HGRCPATH
8 8 $ mkdir webdir
9 9 $ cd webdir
10 10 $ hg init a
11 11 $ hg --cwd a qinit -c
12 12 $ echo a > a/a
13 13 $ hg --cwd a ci -A -m a
14 14 adding a
15 15 $ echo b > a/b
16 16 $ hg --cwd a addremove
17 17 adding b
18 18 $ hg --cwd a qnew -f b.patch
19 19 $ hg --cwd a qcommit -m b.patch
20 20 $ hg --cwd a log --template "{desc}\n"
21 21 [mq]: b.patch
22 22 a
23 23 $ hg --cwd a/.hg/patches log --template "{desc}\n"
24 24 b.patch
25 25 $ root=`pwd`
26 26 $ cd ..
27 27
28 28 test with recursive collection
29 29
30 30 $ cat > collections.conf <<EOF
31 31 > [paths]
32 32 > /=$root/**
33 33 > EOF
34 34 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \
35 35 > -A access-paths.log -E error-paths-1.log
36 36 $ cat hg.pid >> $DAEMON_PIDS
37 37 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw'
38 38 200 Script output follows
39 39
40 40
41 41 /a/
42 42 /a/.hg/patches/
43 43
44 44 $ hg qclone http://localhost:$HGPORT/a b
45 45 requesting all changes
46 46 adding changesets
47 47 adding manifests
48 48 adding file changes
49 49 added 2 changesets with 2 changes to 2 files
50 50 requesting all changes
51 51 adding changesets
52 52 adding manifests
53 53 adding file changes
54 54 added 1 changesets with 3 changes to 3 files
55 55 updating to branch default
56 56 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 58 $ hg --cwd b log --template "{desc}\n"
59 59 a
60 60 $ hg --cwd b qpush -a
61 61 applying b.patch
62 62 now at: b.patch
63 63 $ hg --cwd b log --template "{desc}\n"
64 64 imported patch b.patch
65 65 a
66 66
67 67 test with normal collection
68 68
69 69 $ cat > collections1.conf <<EOF
70 70 > [paths]
71 71 > /=$root/*
72 72 > EOF
73 73 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \
74 74 > -A access-paths.log -E error-paths-1.log
75 75 $ cat hg.pid >> $DAEMON_PIDS
76 76 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
77 77 200 Script output follows
78 78
79 79
80 80 /a/
81 81 /a/.hg/patches/
82 82
83 83 $ hg qclone http://localhost:$HGPORT1/a c
84 84 requesting all changes
85 85 adding changesets
86 86 adding manifests
87 87 adding file changes
88 88 added 2 changesets with 2 changes to 2 files
89 89 requesting all changes
90 90 adding changesets
91 91 adding manifests
92 92 adding file changes
93 93 added 1 changesets with 3 changes to 3 files
94 94 updating to branch default
95 95 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
96 96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
97 97 $ hg --cwd c log --template "{desc}\n"
98 98 a
99 99 $ hg --cwd c qpush -a
100 100 applying b.patch
101 101 now at: b.patch
102 102 $ hg --cwd c log --template "{desc}\n"
103 103 imported patch b.patch
104 104 a
105 105
106 106 test with old-style collection
107 107
108 108 $ cat > collections2.conf <<EOF
109 109 > [collections]
110 110 > $root=$root
111 111 > EOF
112 112 $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \
113 113 > -A access-paths.log -E error-paths-1.log
114 114 $ cat hg.pid >> $DAEMON_PIDS
115 115 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '?style=raw'
116 116 200 Script output follows
117 117
118 118
119 119 /a/
120 120 /a/.hg/patches/
121 121
122 122 $ hg qclone http://localhost:$HGPORT2/a d
123 123 requesting all changes
124 124 adding changesets
125 125 adding manifests
126 126 adding file changes
127 127 added 2 changesets with 2 changes to 2 files
128 128 requesting all changes
129 129 adding changesets
130 130 adding manifests
131 131 adding file changes
132 132 added 1 changesets with 3 changes to 3 files
133 133 updating to branch default
134 134 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
135 135 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 136 $ hg --cwd d log --template "{desc}\n"
137 137 a
138 138 $ hg --cwd d qpush -a
139 139 applying b.patch
140 140 now at: b.patch
141 141 $ hg --cwd d log --template "{desc}\n"
142 142 imported patch b.patch
143 143 a
144 144
145 145 test --mq works and uses correct repository config
146 146
147 147 $ hg --cwd d outgoing --mq
148 148 comparing with http://localhost:$HGPORT2/a/.hg/patches
149 149 searching for changes
150 150 no changes found
151 151 [1]
152 152 $ hg --cwd d log --mq --template '{rev} {desc|firstline}\n'
153 153 0 b.patch
154
155 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
156
@@ -1,280 +1,282 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" killdaemons || exit 80
2 2
3 3 $ cat > writelines.py <<EOF
4 4 > import sys
5 5 > path = sys.argv[1]
6 6 > args = sys.argv[2:]
7 7 > assert (len(args) % 2) == 0
8 8 >
9 9 > f = file(path, 'wb')
10 10 > for i in xrange(len(args)/2):
11 11 > count, s = args[2*i:2*i+2]
12 12 > count = int(count)
13 13 > s = s.decode('string_escape')
14 14 > f.write(s*count)
15 15 > f.close()
16 16 >
17 17 > EOF
18 18 $ echo "[extensions]" >> $HGRCPATH
19 19 $ echo "mq=" >> $HGRCPATH
20 20 $ echo "[diff]" >> $HGRCPATH
21 21 $ echo "git=1" >> $HGRCPATH
22 22 $ hg init repo
23 23 $ cd repo
24 24
25 25 qimport without file or revision
26 26
27 27 $ hg qimport
28 28 abort: no files or revisions specified
29 29 [255]
30 30
31 31 qimport non-existing-file
32 32
33 33 $ hg qimport non-existing-file
34 34 abort: unable to read file non-existing-file
35 35 [255]
36 36
37 37 qimport null revision
38 38
39 39 $ hg qimport -r null
40 40 abort: revision -1 is not mutable
41 41 (see "hg help phases" for details)
42 42 [255]
43 43 $ hg qseries
44 44
45 45 import email
46 46
47 47 $ hg qimport --push -n email - <<EOF
48 48 > From: Username in email <test@example.net>
49 49 > Subject: [PATCH] Message in email
50 50 > Date: Fri, 02 Jan 1970 00:00:00 +0000
51 51 >
52 52 > Text before patch.
53 53 >
54 54 > # HG changeset patch
55 55 > # User Username in patch <test@example.net>
56 56 > # Date 0 0
57 57 > # Node ID 1a706973a7d84cb549823634a821d9bdf21c6220
58 58 > # Parent 0000000000000000000000000000000000000000
59 59 > First line of commit message.
60 60 >
61 61 > More text in commit message.
62 62 > --- confuse the diff detection
63 63 >
64 64 > diff --git a/x b/x
65 65 > new file mode 100644
66 66 > --- /dev/null
67 67 > +++ b/x
68 68 > @@ -0,0 +1,1 @@
69 69 > +new file
70 70 > Text after patch.
71 71 >
72 72 > EOF
73 73 adding email to series file
74 74 applying email
75 75 now at: email
76 76
77 77 hg tip -v
78 78
79 79 $ hg tip -v
80 80 changeset: 0:1a706973a7d8
81 81 tag: email
82 82 tag: qbase
83 83 tag: qtip
84 84 tag: tip
85 85 user: Username in patch <test@example.net>
86 86 date: Thu Jan 01 00:00:00 1970 +0000
87 87 files: x
88 88 description:
89 89 First line of commit message.
90 90
91 91 More text in commit message.
92 92
93 93
94 94 $ hg qpop
95 95 popping email
96 96 patch queue now empty
97 97 $ hg qdelete email
98 98
99 99 import URL
100 100
101 101 $ echo foo >> foo
102 102 $ hg add foo
103 103 $ hg diff > url.diff
104 104 $ hg revert --no-backup foo
105 105 $ rm foo
106 106
107 107 Under unix: file:///foobar/blah
108 108 Under windows: file:///c:/foobar/blah
109 109
110 110 $ patchurl=`pwd | tr '\\\\' /`/url.diff
111 111 $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl"
112 112 $ hg qimport file://"$patchurl"
113 113 adding url.diff to series file
114 114 $ rm url.diff
115 115 $ hg qun
116 116 url.diff
117 117
118 118 import patch that already exists
119 119
120 120 $ echo foo2 >> foo
121 121 $ hg add foo
122 122 $ hg diff > ../url.diff
123 123 $ hg revert --no-backup foo
124 124 $ rm foo
125 125 $ hg qimport ../url.diff
126 126 abort: patch "url.diff" already exists
127 127 [255]
128 128 $ hg qpush
129 129 applying url.diff
130 130 now at: url.diff
131 131 $ cat foo
132 132 foo
133 133 $ hg qpop
134 134 popping url.diff
135 135 patch queue now empty
136 136
137 137 qimport -f
138 138
139 139 $ hg qimport -f ../url.diff
140 140 adding url.diff to series file
141 141 $ hg qpush
142 142 applying url.diff
143 143 now at: url.diff
144 144 $ cat foo
145 145 foo2
146 146 $ hg qpop
147 147 popping url.diff
148 148 patch queue now empty
149 149
150 150 build diff with CRLF
151 151
152 152 $ python ../writelines.py b 5 'a\n' 5 'a\r\n'
153 153 $ hg ci -Am addb
154 154 adding b
155 155 $ python ../writelines.py b 2 'a\n' 10 'b\n' 2 'a\r\n'
156 156 $ hg diff > b.diff
157 157 $ hg up -C
158 158 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
159 159
160 160 qimport CRLF diff
161 161
162 162 $ hg qimport b.diff
163 163 adding b.diff to series file
164 164 $ hg qpush
165 165 applying b.diff
166 166 now at: b.diff
167 167
168 168 try to import --push
169 169
170 170 $ cat > appendfoo.diff <<EOF
171 171 > append foo
172 172 >
173 173 > diff -r 07f494440405 -r 261500830e46 baz
174 174 > --- /dev/null Thu Jan 01 00:00:00 1970 +0000
175 175 > +++ b/baz Thu Jan 01 00:00:00 1970 +0000
176 176 > @@ -0,0 +1,1 @@
177 177 > +foo
178 178 > EOF
179 179
180 180 $ cat > appendbar.diff <<EOF
181 181 > append bar
182 182 >
183 183 > diff -r 07f494440405 -r 261500830e46 baz
184 184 > --- a/baz Thu Jan 01 00:00:00 1970 +0000
185 185 > +++ b/baz Thu Jan 01 00:00:00 1970 +0000
186 186 > @@ -1,1 +1,2 @@
187 187 > foo
188 188 > +bar
189 189 > EOF
190 190
191 191 $ hg qimport --push appendfoo.diff appendbar.diff
192 192 adding appendfoo.diff to series file
193 193 adding appendbar.diff to series file
194 194 applying appendfoo.diff
195 195 applying appendbar.diff
196 196 now at: appendbar.diff
197 197 $ hg qfin -a
198 198 patch b.diff finalized without changeset message
199 199 $ hg qimport -r 'p1(.)::' -P
200 200 $ hg qpop -a
201 201 popping 3.diff
202 202 popping 2.diff
203 203 patch queue now empty
204 204 $ hg qdel 3.diff
205 205 $ hg qdel -k 2.diff
206 206
207 207 qimport -e
208 208
209 209 $ hg qimport -e 2.diff
210 210 adding 2.diff to series file
211 211 $ hg qdel -k 2.diff
212 212
213 213 qimport -e --name newname oldexisitingpatch
214 214
215 215 $ hg qimport -e --name this-name-is-better 2.diff
216 216 renaming 2.diff to this-name-is-better
217 217 adding this-name-is-better to series file
218 218 $ hg qser
219 219 this-name-is-better
220 220 url.diff
221 221
222 222 qimport -e --name without --force
223 223
224 224 $ cp .hg/patches/this-name-is-better .hg/patches/3.diff
225 225 $ hg qimport -e --name this-name-is-better 3.diff
226 226 abort: patch "this-name-is-better" already exists
227 227 [255]
228 228 $ hg qser
229 229 this-name-is-better
230 230 url.diff
231 231
232 232 qimport -e --name with --force
233 233
234 234 $ hg qimport --force -e --name this-name-is-better 3.diff
235 235 renaming 3.diff to this-name-is-better
236 236 adding this-name-is-better to series file
237 237 $ hg qser
238 238 this-name-is-better
239 239 url.diff
240 240
241 241 qimport with bad name, should abort before reading file
242 242
243 243 $ hg qimport non-existent-file --name .hg
244 244 abort: patch name cannot begin with ".hg"
245 245 [255]
246 246
247 247 qimport http:// patch with leading slashes in url
248 248
249 249 set up hgweb
250 250
251 251 $ cd ..
252 252 $ hg init served
253 253 $ cd served
254 254 $ echo a > a
255 255 $ hg ci -Am patch
256 256 adding a
257 257 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
258 258 $ cat hg.pid >> $DAEMON_PIDS
259 259
260 260 $ cd ../repo
261 261 $ hg qimport http://localhost:$HGPORT/raw-rev/0///
262 262 adding 0 to series file
263 263
264 264 check qimport phase:
265 265
266 266 $ hg -q qpush
267 267 now at: 0
268 268 $ hg phase qparent
269 269 1: draft
270 270 $ hg qimport -r qparent
271 271 $ hg phase qbase
272 272 1: draft
273 273 $ hg qfinish qbase
274 274 $ echo '[mq]' >> $HGRCPATH
275 275 $ echo 'secret=true' >> $HGRCPATH
276 276 $ hg qimport -r qparent
277 277 $ hg phase qbase
278 278 1: secret
279 279
280 280 $ cd ..
281
282 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
@@ -1,1065 +1,1066 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" killdaemons || exit 80
2 2
3 3 $ cat >> $HGRCPATH <<EOF
4 4 > [extensions]
5 5 > graphlog=
6 6 > EOF
7 7 $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
8 8
9 9 $ mkcommit() {
10 10 > echo "$1" > "$1"
11 11 > hg add "$1"
12 12 > message="$1"
13 13 > shift
14 14 > hg ci -m "$message" $*
15 15 > }
16 16
17 17 $ hg init alpha
18 18 $ cd alpha
19 19 $ mkcommit a-A
20 20 $ mkcommit a-B
21 21 $ mkcommit a-C
22 22 $ mkcommit a-D
23 23 $ hgph
24 24 @ 3 draft a-D - b555f63b6063
25 25 |
26 26 o 2 draft a-C - 54acac6f23ab
27 27 |
28 28 o 1 draft a-B - 548a3d25dbf0
29 29 |
30 30 o 0 draft a-A - 054250a37db4
31 31
32 32
33 33 $ hg init ../beta
34 34 $ hg push -r 1 ../beta
35 35 pushing to ../beta
36 36 searching for changes
37 37 adding changesets
38 38 adding manifests
39 39 adding file changes
40 40 added 2 changesets with 2 changes to 2 files
41 41 $ hgph
42 42 @ 3 draft a-D - b555f63b6063
43 43 |
44 44 o 2 draft a-C - 54acac6f23ab
45 45 |
46 46 o 1 public a-B - 548a3d25dbf0
47 47 |
48 48 o 0 public a-A - 054250a37db4
49 49
50 50
51 51 $ cd ../beta
52 52 $ hgph
53 53 o 1 public a-B - 548a3d25dbf0
54 54 |
55 55 o 0 public a-A - 054250a37db4
56 56
57 57 $ hg up -q
58 58 $ mkcommit b-A
59 59 $ hgph
60 60 @ 2 draft b-A - f54f1bb90ff3
61 61 |
62 62 o 1 public a-B - 548a3d25dbf0
63 63 |
64 64 o 0 public a-A - 054250a37db4
65 65
66 66 $ hg pull ../alpha
67 67 pulling from ../alpha
68 68 searching for changes
69 69 adding changesets
70 70 adding manifests
71 71 adding file changes
72 72 added 2 changesets with 2 changes to 2 files (+1 heads)
73 73 (run 'hg heads' to see heads, 'hg merge' to merge)
74 74 $ hgph
75 75 o 4 public a-D - b555f63b6063
76 76 |
77 77 o 3 public a-C - 54acac6f23ab
78 78 |
79 79 | @ 2 draft b-A - f54f1bb90ff3
80 80 |/
81 81 o 1 public a-B - 548a3d25dbf0
82 82 |
83 83 o 0 public a-A - 054250a37db4
84 84
85 85
86 86 pull did not updated ../alpha state.
87 87 push from alpha to beta should update phase even if nothing is transferred
88 88
89 89 $ cd ../alpha
90 90 $ hgph # not updated by remote pull
91 91 @ 3 draft a-D - b555f63b6063
92 92 |
93 93 o 2 draft a-C - 54acac6f23ab
94 94 |
95 95 o 1 public a-B - 548a3d25dbf0
96 96 |
97 97 o 0 public a-A - 054250a37db4
98 98
99 99 $ hg push ../beta
100 100 pushing to ../beta
101 101 searching for changes
102 102 no changes found
103 103 [1]
104 104 $ hgph
105 105 @ 3 public a-D - b555f63b6063
106 106 |
107 107 o 2 public a-C - 54acac6f23ab
108 108 |
109 109 o 1 public a-B - 548a3d25dbf0
110 110 |
111 111 o 0 public a-A - 054250a37db4
112 112
113 113
114 114 update must update phase of common changeset too
115 115
116 116 $ hg pull ../beta # getting b-A
117 117 pulling from ../beta
118 118 searching for changes
119 119 adding changesets
120 120 adding manifests
121 121 adding file changes
122 122 added 1 changesets with 1 changes to 1 files (+1 heads)
123 123 (run 'hg heads' to see heads, 'hg merge' to merge)
124 124
125 125 $ cd ../beta
126 126 $ hgph # not updated by remote pull
127 127 o 4 public a-D - b555f63b6063
128 128 |
129 129 o 3 public a-C - 54acac6f23ab
130 130 |
131 131 | @ 2 draft b-A - f54f1bb90ff3
132 132 |/
133 133 o 1 public a-B - 548a3d25dbf0
134 134 |
135 135 o 0 public a-A - 054250a37db4
136 136
137 137 $ hg pull ../alpha
138 138 pulling from ../alpha
139 139 searching for changes
140 140 no changes found
141 141 $ hgph
142 142 o 4 public a-D - b555f63b6063
143 143 |
144 144 o 3 public a-C - 54acac6f23ab
145 145 |
146 146 | @ 2 public b-A - f54f1bb90ff3
147 147 |/
148 148 o 1 public a-B - 548a3d25dbf0
149 149 |
150 150 o 0 public a-A - 054250a37db4
151 151
152 152
153 153 Publish configuration option
154 154 ----------------------------
155 155
156 156 Pull
157 157 ````
158 158
159 159 changegroup are added without phase movement
160 160
161 161 $ hg bundle -a ../base.bundle
162 162 5 changesets found
163 163 $ cd ..
164 164 $ hg init mu
165 165 $ cd mu
166 166 $ cat > .hg/hgrc << EOF
167 167 > [phases]
168 168 > publish=0
169 169 > EOF
170 170 $ hg unbundle ../base.bundle
171 171 adding changesets
172 172 adding manifests
173 173 adding file changes
174 174 added 5 changesets with 5 changes to 5 files (+1 heads)
175 175 (run 'hg heads' to see heads, 'hg merge' to merge)
176 176 $ hgph
177 177 o 4 draft a-D - b555f63b6063
178 178 |
179 179 o 3 draft a-C - 54acac6f23ab
180 180 |
181 181 | o 2 draft b-A - f54f1bb90ff3
182 182 |/
183 183 o 1 draft a-B - 548a3d25dbf0
184 184 |
185 185 o 0 draft a-A - 054250a37db4
186 186
187 187 $ cd ..
188 188
189 189 Pulling from publish=False to publish=False does not move boundary.
190 190
191 191 $ hg init nu
192 192 $ cd nu
193 193 $ cat > .hg/hgrc << EOF
194 194 > [phases]
195 195 > publish=0
196 196 > EOF
197 197 $ hg pull ../mu -r 54acac6f23ab
198 198 pulling from ../mu
199 199 adding changesets
200 200 adding manifests
201 201 adding file changes
202 202 added 3 changesets with 3 changes to 3 files
203 203 (run 'hg update' to get a working copy)
204 204 $ hgph
205 205 o 2 draft a-C - 54acac6f23ab
206 206 |
207 207 o 1 draft a-B - 548a3d25dbf0
208 208 |
209 209 o 0 draft a-A - 054250a37db4
210 210
211 211
212 212 Even for common
213 213
214 214 $ hg pull ../mu -r f54f1bb90ff3
215 215 pulling from ../mu
216 216 searching for changes
217 217 adding changesets
218 218 adding manifests
219 219 adding file changes
220 220 added 1 changesets with 1 changes to 1 files (+1 heads)
221 221 (run 'hg heads' to see heads, 'hg merge' to merge)
222 222 $ hgph
223 223 o 3 draft b-A - f54f1bb90ff3
224 224 |
225 225 | o 2 draft a-C - 54acac6f23ab
226 226 |/
227 227 o 1 draft a-B - 548a3d25dbf0
228 228 |
229 229 o 0 draft a-A - 054250a37db4
230 230
231 231
232 232
233 233 Pulling from Publish=True to Publish=False move boundary in common set.
234 234 we are in nu
235 235
236 236 $ hg pull ../alpha -r b555f63b6063
237 237 pulling from ../alpha
238 238 searching for changes
239 239 adding changesets
240 240 adding manifests
241 241 adding file changes
242 242 added 1 changesets with 1 changes to 1 files
243 243 (run 'hg update' to get a working copy)
244 244 $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
245 245 o 4 public a-D - b555f63b6063
246 246 |
247 247 | o 3 draft b-A - f54f1bb90ff3
248 248 | |
249 249 o | 2 public a-C - 54acac6f23ab
250 250 |/
251 251 o 1 public a-B - 548a3d25dbf0
252 252 |
253 253 o 0 public a-A - 054250a37db4
254 254
255 255
256 256 pulling from Publish=False to publish=False with some public
257 257
258 258 $ hg up -q f54f1bb90ff3
259 259 $ mkcommit n-A
260 260 $ mkcommit n-B
261 261 $ hgph
262 262 @ 6 draft n-B - 145e75495359
263 263 |
264 264 o 5 draft n-A - d6bcb4f74035
265 265 |
266 266 | o 4 public a-D - b555f63b6063
267 267 | |
268 268 o | 3 draft b-A - f54f1bb90ff3
269 269 | |
270 270 | o 2 public a-C - 54acac6f23ab
271 271 |/
272 272 o 1 public a-B - 548a3d25dbf0
273 273 |
274 274 o 0 public a-A - 054250a37db4
275 275
276 276 $ cd ../mu
277 277 $ hg pull ../nu
278 278 pulling from ../nu
279 279 searching for changes
280 280 adding changesets
281 281 adding manifests
282 282 adding file changes
283 283 added 2 changesets with 2 changes to 2 files
284 284 (run 'hg update' to get a working copy)
285 285 $ hgph
286 286 o 6 draft n-B - 145e75495359
287 287 |
288 288 o 5 draft n-A - d6bcb4f74035
289 289 |
290 290 | o 4 public a-D - b555f63b6063
291 291 | |
292 292 | o 3 public a-C - 54acac6f23ab
293 293 | |
294 294 o | 2 draft b-A - f54f1bb90ff3
295 295 |/
296 296 o 1 public a-B - 548a3d25dbf0
297 297 |
298 298 o 0 public a-A - 054250a37db4
299 299
300 300 $ cd ..
301 301
302 302 pulling into publish=True
303 303
304 304 $ cd alpha
305 305 $ hgph
306 306 o 4 public b-A - f54f1bb90ff3
307 307 |
308 308 | @ 3 public a-D - b555f63b6063
309 309 | |
310 310 | o 2 public a-C - 54acac6f23ab
311 311 |/
312 312 o 1 public a-B - 548a3d25dbf0
313 313 |
314 314 o 0 public a-A - 054250a37db4
315 315
316 316 $ hg pull ../mu
317 317 pulling from ../mu
318 318 searching for changes
319 319 adding changesets
320 320 adding manifests
321 321 adding file changes
322 322 added 2 changesets with 2 changes to 2 files
323 323 (run 'hg update' to get a working copy)
324 324 $ hgph
325 325 o 6 draft n-B - 145e75495359
326 326 |
327 327 o 5 draft n-A - d6bcb4f74035
328 328 |
329 329 o 4 public b-A - f54f1bb90ff3
330 330 |
331 331 | @ 3 public a-D - b555f63b6063
332 332 | |
333 333 | o 2 public a-C - 54acac6f23ab
334 334 |/
335 335 o 1 public a-B - 548a3d25dbf0
336 336 |
337 337 o 0 public a-A - 054250a37db4
338 338
339 339 $ cd ..
340 340
341 341 pulling back into original repo
342 342
343 343 $ cd nu
344 344 $ hg pull ../alpha
345 345 pulling from ../alpha
346 346 searching for changes
347 347 no changes found
348 348 $ hgph
349 349 @ 6 public n-B - 145e75495359
350 350 |
351 351 o 5 public n-A - d6bcb4f74035
352 352 |
353 353 | o 4 public a-D - b555f63b6063
354 354 | |
355 355 o | 3 public b-A - f54f1bb90ff3
356 356 | |
357 357 | o 2 public a-C - 54acac6f23ab
358 358 |/
359 359 o 1 public a-B - 548a3d25dbf0
360 360 |
361 361 o 0 public a-A - 054250a37db4
362 362
363 363
364 364 Push
365 365 ````
366 366
367 367 (inserted)
368 368
369 369 Test that phase are pushed even when they are nothing to pus
370 370 (this might be tested later bu are very convenient to not alter too much test)
371 371
372 372 Push back to alpha
373 373
374 374 $ hg push ../alpha # from nu
375 375 pushing to ../alpha
376 376 searching for changes
377 377 no changes found
378 378 [1]
379 379 $ cd ..
380 380 $ cd alpha
381 381 $ hgph
382 382 o 6 public n-B - 145e75495359
383 383 |
384 384 o 5 public n-A - d6bcb4f74035
385 385 |
386 386 o 4 public b-A - f54f1bb90ff3
387 387 |
388 388 | @ 3 public a-D - b555f63b6063
389 389 | |
390 390 | o 2 public a-C - 54acac6f23ab
391 391 |/
392 392 o 1 public a-B - 548a3d25dbf0
393 393 |
394 394 o 0 public a-A - 054250a37db4
395 395
396 396
397 397 (end insertion)
398 398
399 399
400 400 initial setup
401 401
402 402 $ hg glog # of alpha
403 403 o changeset: 6:145e75495359
404 404 | tag: tip
405 405 | user: test
406 406 | date: Thu Jan 01 00:00:00 1970 +0000
407 407 | summary: n-B
408 408 |
409 409 o changeset: 5:d6bcb4f74035
410 410 | user: test
411 411 | date: Thu Jan 01 00:00:00 1970 +0000
412 412 | summary: n-A
413 413 |
414 414 o changeset: 4:f54f1bb90ff3
415 415 | parent: 1:548a3d25dbf0
416 416 | user: test
417 417 | date: Thu Jan 01 00:00:00 1970 +0000
418 418 | summary: b-A
419 419 |
420 420 | @ changeset: 3:b555f63b6063
421 421 | | user: test
422 422 | | date: Thu Jan 01 00:00:00 1970 +0000
423 423 | | summary: a-D
424 424 | |
425 425 | o changeset: 2:54acac6f23ab
426 426 |/ user: test
427 427 | date: Thu Jan 01 00:00:00 1970 +0000
428 428 | summary: a-C
429 429 |
430 430 o changeset: 1:548a3d25dbf0
431 431 | user: test
432 432 | date: Thu Jan 01 00:00:00 1970 +0000
433 433 | summary: a-B
434 434 |
435 435 o changeset: 0:054250a37db4
436 436 user: test
437 437 date: Thu Jan 01 00:00:00 1970 +0000
438 438 summary: a-A
439 439
440 440 $ mkcommit a-E
441 441 $ mkcommit a-F
442 442 $ mkcommit a-G
443 443 $ hg up d6bcb4f74035 -q
444 444 $ mkcommit a-H
445 445 created new head
446 446 $ hgph
447 447 @ 10 draft a-H - 967b449fbc94
448 448 |
449 449 | o 9 draft a-G - 3e27b6f1eee1
450 450 | |
451 451 | o 8 draft a-F - b740e3e5c05d
452 452 | |
453 453 | o 7 draft a-E - e9f537e46dea
454 454 | |
455 455 +---o 6 public n-B - 145e75495359
456 456 | |
457 457 o | 5 public n-A - d6bcb4f74035
458 458 | |
459 459 o | 4 public b-A - f54f1bb90ff3
460 460 | |
461 461 | o 3 public a-D - b555f63b6063
462 462 | |
463 463 | o 2 public a-C - 54acac6f23ab
464 464 |/
465 465 o 1 public a-B - 548a3d25dbf0
466 466 |
467 467 o 0 public a-A - 054250a37db4
468 468
469 469
470 470 Pulling from bundle does not alter phases of changeset not present in the bundle
471 471
472 472 $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg
473 473 5 changesets found
474 474 $ hg pull ../partial-bundle.hg
475 475 pulling from ../partial-bundle.hg
476 476 searching for changes
477 477 no changes found
478 478 $ hgph
479 479 @ 10 draft a-H - 967b449fbc94
480 480 |
481 481 | o 9 draft a-G - 3e27b6f1eee1
482 482 | |
483 483 | o 8 draft a-F - b740e3e5c05d
484 484 | |
485 485 | o 7 draft a-E - e9f537e46dea
486 486 | |
487 487 +---o 6 public n-B - 145e75495359
488 488 | |
489 489 o | 5 public n-A - d6bcb4f74035
490 490 | |
491 491 o | 4 public b-A - f54f1bb90ff3
492 492 | |
493 493 | o 3 public a-D - b555f63b6063
494 494 | |
495 495 | o 2 public a-C - 54acac6f23ab
496 496 |/
497 497 o 1 public a-B - 548a3d25dbf0
498 498 |
499 499 o 0 public a-A - 054250a37db4
500 500
501 501
502 502 Pushing to Publish=False (unknown changeset)
503 503
504 504 $ hg push ../mu -r b740e3e5c05d # a-F
505 505 pushing to ../mu
506 506 searching for changes
507 507 adding changesets
508 508 adding manifests
509 509 adding file changes
510 510 added 2 changesets with 2 changes to 2 files
511 511 $ hgph
512 512 @ 10 draft a-H - 967b449fbc94
513 513 |
514 514 | o 9 draft a-G - 3e27b6f1eee1
515 515 | |
516 516 | o 8 draft a-F - b740e3e5c05d
517 517 | |
518 518 | o 7 draft a-E - e9f537e46dea
519 519 | |
520 520 +---o 6 public n-B - 145e75495359
521 521 | |
522 522 o | 5 public n-A - d6bcb4f74035
523 523 | |
524 524 o | 4 public b-A - f54f1bb90ff3
525 525 | |
526 526 | o 3 public a-D - b555f63b6063
527 527 | |
528 528 | o 2 public a-C - 54acac6f23ab
529 529 |/
530 530 o 1 public a-B - 548a3d25dbf0
531 531 |
532 532 o 0 public a-A - 054250a37db4
533 533
534 534
535 535 $ cd ../mu
536 536 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
537 537 > # not ancestor of -r
538 538 o 8 draft a-F - b740e3e5c05d
539 539 |
540 540 o 7 draft a-E - e9f537e46dea
541 541 |
542 542 | o 6 draft n-B - 145e75495359
543 543 | |
544 544 | o 5 draft n-A - d6bcb4f74035
545 545 | |
546 546 o | 4 public a-D - b555f63b6063
547 547 | |
548 548 o | 3 public a-C - 54acac6f23ab
549 549 | |
550 550 | o 2 draft b-A - f54f1bb90ff3
551 551 |/
552 552 o 1 public a-B - 548a3d25dbf0
553 553 |
554 554 o 0 public a-A - 054250a37db4
555 555
556 556
557 557 Pushing to Publish=True (unknown changeset)
558 558
559 559 $ hg push ../beta -r b740e3e5c05d
560 560 pushing to ../beta
561 561 searching for changes
562 562 adding changesets
563 563 adding manifests
564 564 adding file changes
565 565 added 2 changesets with 2 changes to 2 files
566 566 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
567 567 > # not ancestor of -r
568 568 o 8 public a-F - b740e3e5c05d
569 569 |
570 570 o 7 public a-E - e9f537e46dea
571 571 |
572 572 | o 6 draft n-B - 145e75495359
573 573 | |
574 574 | o 5 draft n-A - d6bcb4f74035
575 575 | |
576 576 o | 4 public a-D - b555f63b6063
577 577 | |
578 578 o | 3 public a-C - 54acac6f23ab
579 579 | |
580 580 | o 2 draft b-A - f54f1bb90ff3
581 581 |/
582 582 o 1 public a-B - 548a3d25dbf0
583 583 |
584 584 o 0 public a-A - 054250a37db4
585 585
586 586
587 587 Pushing to Publish=True (common changeset)
588 588
589 589 $ cd ../beta
590 590 $ hg push ../alpha
591 591 pushing to ../alpha
592 592 searching for changes
593 593 no changes found
594 594 [1]
595 595 $ hgph
596 596 o 6 public a-F - b740e3e5c05d
597 597 |
598 598 o 5 public a-E - e9f537e46dea
599 599 |
600 600 o 4 public a-D - b555f63b6063
601 601 |
602 602 o 3 public a-C - 54acac6f23ab
603 603 |
604 604 | @ 2 public b-A - f54f1bb90ff3
605 605 |/
606 606 o 1 public a-B - 548a3d25dbf0
607 607 |
608 608 o 0 public a-A - 054250a37db4
609 609
610 610 $ cd ../alpha
611 611 $ hgph
612 612 @ 10 draft a-H - 967b449fbc94
613 613 |
614 614 | o 9 draft a-G - 3e27b6f1eee1
615 615 | |
616 616 | o 8 public a-F - b740e3e5c05d
617 617 | |
618 618 | o 7 public a-E - e9f537e46dea
619 619 | |
620 620 +---o 6 public n-B - 145e75495359
621 621 | |
622 622 o | 5 public n-A - d6bcb4f74035
623 623 | |
624 624 o | 4 public b-A - f54f1bb90ff3
625 625 | |
626 626 | o 3 public a-D - b555f63b6063
627 627 | |
628 628 | o 2 public a-C - 54acac6f23ab
629 629 |/
630 630 o 1 public a-B - 548a3d25dbf0
631 631 |
632 632 o 0 public a-A - 054250a37db4
633 633
634 634
635 635 Pushing to Publish=False (common changeset that change phase + unknown one)
636 636
637 637 $ hg push ../mu -r 967b449fbc94 -f
638 638 pushing to ../mu
639 639 searching for changes
640 640 adding changesets
641 641 adding manifests
642 642 adding file changes
643 643 added 1 changesets with 1 changes to 1 files (+1 heads)
644 644 $ hgph
645 645 @ 10 draft a-H - 967b449fbc94
646 646 |
647 647 | o 9 draft a-G - 3e27b6f1eee1
648 648 | |
649 649 | o 8 public a-F - b740e3e5c05d
650 650 | |
651 651 | o 7 public a-E - e9f537e46dea
652 652 | |
653 653 +---o 6 public n-B - 145e75495359
654 654 | |
655 655 o | 5 public n-A - d6bcb4f74035
656 656 | |
657 657 o | 4 public b-A - f54f1bb90ff3
658 658 | |
659 659 | o 3 public a-D - b555f63b6063
660 660 | |
661 661 | o 2 public a-C - 54acac6f23ab
662 662 |/
663 663 o 1 public a-B - 548a3d25dbf0
664 664 |
665 665 o 0 public a-A - 054250a37db4
666 666
667 667 $ cd ../mu
668 668 $ hgph # d6bcb4f74035 should have changed phase
669 669 > # 145e75495359 is still draft. not ancestor of -r
670 670 o 9 draft a-H - 967b449fbc94
671 671 |
672 672 | o 8 public a-F - b740e3e5c05d
673 673 | |
674 674 | o 7 public a-E - e9f537e46dea
675 675 | |
676 676 +---o 6 draft n-B - 145e75495359
677 677 | |
678 678 o | 5 public n-A - d6bcb4f74035
679 679 | |
680 680 | o 4 public a-D - b555f63b6063
681 681 | |
682 682 | o 3 public a-C - 54acac6f23ab
683 683 | |
684 684 o | 2 public b-A - f54f1bb90ff3
685 685 |/
686 686 o 1 public a-B - 548a3d25dbf0
687 687 |
688 688 o 0 public a-A - 054250a37db4
689 689
690 690
691 691
692 692 Pushing to Publish=True (common changeset from publish=False)
693 693
694 694 (in mu)
695 695 $ hg push ../alpha
696 696 pushing to ../alpha
697 697 searching for changes
698 698 no changes found
699 699 [1]
700 700 $ hgph
701 701 o 9 public a-H - 967b449fbc94
702 702 |
703 703 | o 8 public a-F - b740e3e5c05d
704 704 | |
705 705 | o 7 public a-E - e9f537e46dea
706 706 | |
707 707 +---o 6 public n-B - 145e75495359
708 708 | |
709 709 o | 5 public n-A - d6bcb4f74035
710 710 | |
711 711 | o 4 public a-D - b555f63b6063
712 712 | |
713 713 | o 3 public a-C - 54acac6f23ab
714 714 | |
715 715 o | 2 public b-A - f54f1bb90ff3
716 716 |/
717 717 o 1 public a-B - 548a3d25dbf0
718 718 |
719 719 o 0 public a-A - 054250a37db4
720 720
721 721 $ hgph -R ../alpha # a-H should have been synced to 0
722 722 @ 10 public a-H - 967b449fbc94
723 723 |
724 724 | o 9 draft a-G - 3e27b6f1eee1
725 725 | |
726 726 | o 8 public a-F - b740e3e5c05d
727 727 | |
728 728 | o 7 public a-E - e9f537e46dea
729 729 | |
730 730 +---o 6 public n-B - 145e75495359
731 731 | |
732 732 o | 5 public n-A - d6bcb4f74035
733 733 | |
734 734 o | 4 public b-A - f54f1bb90ff3
735 735 | |
736 736 | o 3 public a-D - b555f63b6063
737 737 | |
738 738 | o 2 public a-C - 54acac6f23ab
739 739 |/
740 740 o 1 public a-B - 548a3d25dbf0
741 741 |
742 742 o 0 public a-A - 054250a37db4
743 743
744 744
745 745
746 746 Discovery locally secret changeset on a remote repository:
747 747
748 748 - should make it non-secret
749 749
750 750 $ cd ../alpha
751 751 $ mkcommit A-secret --config phases.new-commit=2
752 752 $ hgph
753 753 @ 11 secret A-secret - 435b5d83910c
754 754 |
755 755 o 10 public a-H - 967b449fbc94
756 756 |
757 757 | o 9 draft a-G - 3e27b6f1eee1
758 758 | |
759 759 | o 8 public a-F - b740e3e5c05d
760 760 | |
761 761 | o 7 public a-E - e9f537e46dea
762 762 | |
763 763 +---o 6 public n-B - 145e75495359
764 764 | |
765 765 o | 5 public n-A - d6bcb4f74035
766 766 | |
767 767 o | 4 public b-A - f54f1bb90ff3
768 768 | |
769 769 | o 3 public a-D - b555f63b6063
770 770 | |
771 771 | o 2 public a-C - 54acac6f23ab
772 772 |/
773 773 o 1 public a-B - 548a3d25dbf0
774 774 |
775 775 o 0 public a-A - 054250a37db4
776 776
777 777 $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg
778 778 1 changesets found
779 779 $ hg -R ../mu unbundle ../secret-bundle.hg
780 780 adding changesets
781 781 adding manifests
782 782 adding file changes
783 783 added 1 changesets with 1 changes to 1 files
784 784 (run 'hg update' to get a working copy)
785 785 $ hgph -R ../mu
786 786 o 10 draft A-secret - 435b5d83910c
787 787 |
788 788 o 9 public a-H - 967b449fbc94
789 789 |
790 790 | o 8 public a-F - b740e3e5c05d
791 791 | |
792 792 | o 7 public a-E - e9f537e46dea
793 793 | |
794 794 +---o 6 public n-B - 145e75495359
795 795 | |
796 796 o | 5 public n-A - d6bcb4f74035
797 797 | |
798 798 | o 4 public a-D - b555f63b6063
799 799 | |
800 800 | o 3 public a-C - 54acac6f23ab
801 801 | |
802 802 o | 2 public b-A - f54f1bb90ff3
803 803 |/
804 804 o 1 public a-B - 548a3d25dbf0
805 805 |
806 806 o 0 public a-A - 054250a37db4
807 807
808 808 $ hg pull ../mu
809 809 pulling from ../mu
810 810 searching for changes
811 811 no changes found
812 812 $ hgph
813 813 @ 11 draft A-secret - 435b5d83910c
814 814 |
815 815 o 10 public a-H - 967b449fbc94
816 816 |
817 817 | o 9 draft a-G - 3e27b6f1eee1
818 818 | |
819 819 | o 8 public a-F - b740e3e5c05d
820 820 | |
821 821 | o 7 public a-E - e9f537e46dea
822 822 | |
823 823 +---o 6 public n-B - 145e75495359
824 824 | |
825 825 o | 5 public n-A - d6bcb4f74035
826 826 | |
827 827 o | 4 public b-A - f54f1bb90ff3
828 828 | |
829 829 | o 3 public a-D - b555f63b6063
830 830 | |
831 831 | o 2 public a-C - 54acac6f23ab
832 832 |/
833 833 o 1 public a-B - 548a3d25dbf0
834 834 |
835 835 o 0 public a-A - 054250a37db4
836 836
837 837
838 838 pushing a locally public and draft changesets remotly secret should make them
839 839 appear on the remote side.
840 840
841 841
842 842 $ hg -R ../mu phase --secret --force 967b449fbc94
843 843 $ hg push -r 435b5d83910c ../mu
844 844 pushing to ../mu
845 845 searching for changes
846 846 abort: push creates new remote head 435b5d83910c!
847 847 (did you forget to merge? use push -f to force)
848 848 [255]
849 849 $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
850 850 pushing to ../mu
851 851 searching for changes
852 852 adding changesets
853 853 adding manifests
854 854 adding file changes
855 855 added 0 changesets with 0 changes to 2 files
856 856 $ hgph -R ../mu
857 857 o 10 draft A-secret - 435b5d83910c
858 858 |
859 859 o 9 public a-H - 967b449fbc94
860 860 |
861 861 | o 8 public a-F - b740e3e5c05d
862 862 | |
863 863 | o 7 public a-E - e9f537e46dea
864 864 | |
865 865 +---o 6 public n-B - 145e75495359
866 866 | |
867 867 o | 5 public n-A - d6bcb4f74035
868 868 | |
869 869 | o 4 public a-D - b555f63b6063
870 870 | |
871 871 | o 3 public a-C - 54acac6f23ab
872 872 | |
873 873 o | 2 public b-A - f54f1bb90ff3
874 874 |/
875 875 o 1 public a-B - 548a3d25dbf0
876 876 |
877 877 o 0 public a-A - 054250a37db4
878 878
879 879
880 880 pull new changeset with common draft locally
881 881
882 882 $ hg up -q 967b449fbc94 # create a new root for draft
883 883 $ mkcommit 'alpha-more'
884 884 created new head
885 885 $ hg push -fr . ../mu
886 886 pushing to ../mu
887 887 searching for changes
888 888 adding changesets
889 889 adding manifests
890 890 adding file changes
891 891 added 1 changesets with 1 changes to 1 files (+1 heads)
892 892 $ cd ../mu
893 893 $ hg phase --secret --force 1c5cfd894796
894 894 $ hg up -q 435b5d83910c
895 895 $ mkcommit 'mu-more'
896 896 $ cd ../alpha
897 897 $ hg pull ../mu
898 898 pulling from ../mu
899 899 searching for changes
900 900 adding changesets
901 901 adding manifests
902 902 adding file changes
903 903 added 1 changesets with 1 changes to 1 files
904 904 (run 'hg update' to get a working copy)
905 905 $ hgph
906 906 o 13 draft mu-more - 5237fb433fc8
907 907 |
908 908 | @ 12 draft alpha-more - 1c5cfd894796
909 909 | |
910 910 o | 11 draft A-secret - 435b5d83910c
911 911 |/
912 912 o 10 public a-H - 967b449fbc94
913 913 |
914 914 | o 9 draft a-G - 3e27b6f1eee1
915 915 | |
916 916 | o 8 public a-F - b740e3e5c05d
917 917 | |
918 918 | o 7 public a-E - e9f537e46dea
919 919 | |
920 920 +---o 6 public n-B - 145e75495359
921 921 | |
922 922 o | 5 public n-A - d6bcb4f74035
923 923 | |
924 924 o | 4 public b-A - f54f1bb90ff3
925 925 | |
926 926 | o 3 public a-D - b555f63b6063
927 927 | |
928 928 | o 2 public a-C - 54acac6f23ab
929 929 |/
930 930 o 1 public a-B - 548a3d25dbf0
931 931 |
932 932 o 0 public a-A - 054250a37db4
933 933
934 934
935 935 Test that test are properly ignored on remote event when existing locally
936 936
937 937 $ cd ..
938 938 $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma
939 939
940 940 # pathological case are
941 941 #
942 942 # * secret remotely
943 943 # * known locally
944 944 # * repo have uncommon changeset
945 945
946 946 $ hg -R beta phase --secret --force f54f1bb90ff3
947 947 $ hg -R gamma phase --draft --force f54f1bb90ff3
948 948
949 949 $ cd gamma
950 950 $ hg pull ../beta
951 951 pulling from ../beta
952 952 searching for changes
953 953 adding changesets
954 954 adding manifests
955 955 adding file changes
956 956 added 2 changesets with 2 changes to 2 files
957 957 (run 'hg update' to get a working copy)
958 958 $ hg phase f54f1bb90ff3
959 959 2: draft
960 960
961 961 same over the wire
962 962
963 963 $ cd ../beta
964 964 $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log
965 965 $ cat ../beta.pid >> $DAEMON_PIDS
966 966 $ cd ../gamma
967 967
968 968 $ hg pull http://localhost:$HGPORT/
969 969 pulling from http://localhost:$HGPORT/
970 970 searching for changes
971 971 no changes found
972 972 $ hg phase f54f1bb90ff3
973 973 2: draft
974 974
975 975 check that secret local on both side are not synced to public
976 976
977 977 $ hg push -r b555f63b6063 http://localhost:$HGPORT/
978 978 pushing to http://localhost:$HGPORT/
979 979 searching for changes
980 980 no changes found
981 981 [1]
982 982 $ hg phase f54f1bb90ff3
983 983 2: draft
984 984
985 985 put the changeset in the draft state again
986 986 (first test after this one expect to be able to copy)
987 987
988 988 $ cd ..
989 989
990 990
991 991 Test Clone behavior
992 992
993 993 A. Clone without secret changeset
994 994
995 995 1. cloning non-publishing repository
996 996 (Phase should be preserved)
997 997
998 998 # make sure there is no secret so we can use a copy clone
999 999
1000 1000 $ hg -R mu phase --draft 'secret()'
1001 1001
1002 1002 $ hg clone -U mu Tau
1003 1003 $ hgph -R Tau
1004 1004 o 12 draft mu-more - 5237fb433fc8
1005 1005 |
1006 1006 | o 11 draft alpha-more - 1c5cfd894796
1007 1007 | |
1008 1008 o | 10 draft A-secret - 435b5d83910c
1009 1009 |/
1010 1010 o 9 public a-H - 967b449fbc94
1011 1011 |
1012 1012 | o 8 public a-F - b740e3e5c05d
1013 1013 | |
1014 1014 | o 7 public a-E - e9f537e46dea
1015 1015 | |
1016 1016 +---o 6 public n-B - 145e75495359
1017 1017 | |
1018 1018 o | 5 public n-A - d6bcb4f74035
1019 1019 | |
1020 1020 | o 4 public a-D - b555f63b6063
1021 1021 | |
1022 1022 | o 3 public a-C - 54acac6f23ab
1023 1023 | |
1024 1024 o | 2 public b-A - f54f1bb90ff3
1025 1025 |/
1026 1026 o 1 public a-B - 548a3d25dbf0
1027 1027 |
1028 1028 o 0 public a-A - 054250a37db4
1029 1029
1030 1030
1031 1031 2. cloning publishing repository
1032 1032
1033 1033 (everything should be public)
1034 1034
1035 1035 $ hg clone -U alpha Upsilon
1036 1036 $ hgph -R Upsilon
1037 1037 o 13 public mu-more - 5237fb433fc8
1038 1038 |
1039 1039 | o 12 public alpha-more - 1c5cfd894796
1040 1040 | |
1041 1041 o | 11 public A-secret - 435b5d83910c
1042 1042 |/
1043 1043 o 10 public a-H - 967b449fbc94
1044 1044 |
1045 1045 | o 9 public a-G - 3e27b6f1eee1
1046 1046 | |
1047 1047 | o 8 public a-F - b740e3e5c05d
1048 1048 | |
1049 1049 | o 7 public a-E - e9f537e46dea
1050 1050 | |
1051 1051 +---o 6 public n-B - 145e75495359
1052 1052 | |
1053 1053 o | 5 public n-A - d6bcb4f74035
1054 1054 | |
1055 1055 o | 4 public b-A - f54f1bb90ff3
1056 1056 | |
1057 1057 | o 3 public a-D - b555f63b6063
1058 1058 | |
1059 1059 | o 2 public a-C - 54acac6f23ab
1060 1060 |/
1061 1061 o 1 public a-B - 548a3d25dbf0
1062 1062 |
1063 1063 o 0 public a-A - 054250a37db4
1064 1064
1065 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
1065 1066
@@ -1,65 +1,65 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" killdaemons || exit 80
2 2
3 3 $ hg init test
4 4 $ cd test
5 5 $ echo a > a
6 6 $ hg ci -Ama
7 7 adding a
8 8 $ cd ..
9 9 $ hg clone test test2
10 10 updating to branch default
11 11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 12 $ cd test2
13 13 $ echo a >> a
14 14 $ hg ci -mb
15 15
16 16 Cloning with a password in the URL should not save the password in .hg/hgrc:
17 17
18 18 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
19 19 $ cat hg.pid >> $DAEMON_PIDS
20 20 $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3
21 21 requesting all changes
22 22 adding changesets
23 23 adding manifests
24 24 adding file changes
25 25 added 2 changesets with 2 changes to 1 files
26 26 updating to branch default
27 27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28 28 $ cat test3/.hg/hgrc
29 29 [paths]
30 30 default = http://foo@localhost:$HGPORT/
31 31 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
32 32
33 33 expect error, cloning not allowed
34 34
35 35 $ echo '[web]' > .hg/hgrc
36 36 $ echo 'allowpull = false' >> .hg/hgrc
37 37 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
38 38 $ cat hg.pid >> $DAEMON_PIDS
39 39 $ hg clone http://localhost:$HGPORT/ test4
40 40 requesting all changes
41 41 abort: authorization failed
42 42 [255]
43 43 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
44 44
45 45 serve errors
46 46
47 47 $ cat errors.log
48 48 $ req() {
49 49 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
50 50 > cat hg.pid >> $DAEMON_PIDS
51 51 > hg --cwd ../test pull http://localhost:$HGPORT/
52 > kill `cat hg.pid`
52 > "$TESTDIR/killdaemons.py" hg.pid
53 53 > echo % serve errors
54 54 > cat errors.log
55 55 > }
56 56
57 57 expect error, pulling not allowed
58 58
59 59 $ req
60 60 pulling from http://localhost:$HGPORT/
61 61 searching for changes
62 62 abort: authorization failed
63 63 % serve errors
64 64
65 65 $ cd ..
@@ -1,128 +1,128 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" killdaemons || exit 80
2 2
3 3 $ hg init test
4 4 $ cd test
5 5 $ echo a > a
6 6 $ hg ci -Ama
7 7 adding a
8 8 $ cd ..
9 9 $ hg clone test test2
10 10 updating to branch default
11 11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 12 $ cd test2
13 13 $ echo a >> a
14 14 $ hg ci -mb
15 15 $ req() {
16 16 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
17 17 > cat hg.pid >> $DAEMON_PIDS
18 18 > hg --cwd ../test2 push http://localhost:$HGPORT/
19 19 > exitstatus=$?
20 20 > "$TESTDIR/killdaemons.py" $DAEMON_PIDS
21 21 > echo % serve errors
22 22 > cat errors.log
23 23 > return $exitstatus
24 24 > }
25 25 $ cd ../test
26 26
27 27 expect ssl error
28 28
29 29 $ req
30 30 pushing to http://localhost:$HGPORT/
31 31 searching for changes
32 32 abort: HTTP Error 403: ssl required
33 33 % serve errors
34 34 [255]
35 35
36 36 expect authorization error
37 37
38 38 $ echo '[web]' > .hg/hgrc
39 39 $ echo 'push_ssl = false' >> .hg/hgrc
40 40 $ req
41 41 pushing to http://localhost:$HGPORT/
42 42 searching for changes
43 43 abort: authorization failed
44 44 % serve errors
45 45 [255]
46 46
47 47 expect authorization error: must have authorized user
48 48
49 49 $ echo 'allow_push = unperson' >> .hg/hgrc
50 50 $ req
51 51 pushing to http://localhost:$HGPORT/
52 52 searching for changes
53 53 abort: authorization failed
54 54 % serve errors
55 55 [255]
56 56
57 57 expect success
58 58
59 59 $ echo 'allow_push = *' >> .hg/hgrc
60 60 $ echo '[hooks]' >> .hg/hgrc
61 61 $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup 0" >> .hg/hgrc
62 62 $ req
63 63 pushing to http://localhost:$HGPORT/
64 64 searching for changes
65 65 remote: adding changesets
66 66 remote: adding manifests
67 67 remote: adding file changes
68 68 remote: added 1 changesets with 1 changes to 1 files
69 69 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
70 70 % serve errors
71 71 $ hg rollback
72 72 repository tip rolled back to revision 0 (undo serve)
73 73
74 74 expect success, server lacks the httpheader capability
75 75
76 76 $ CAP=httpheader
77 77 $ . "$TESTDIR/notcapable"
78 78 $ req
79 79 pushing to http://localhost:$HGPORT/
80 80 searching for changes
81 81 remote: adding changesets
82 82 remote: adding manifests
83 83 remote: adding file changes
84 84 remote: added 1 changesets with 1 changes to 1 files
85 85 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
86 86 % serve errors
87 87 $ hg rollback
88 88 repository tip rolled back to revision 0 (undo serve)
89 89
90 90 expect success, server lacks the unbundlehash capability
91 91
92 92 $ CAP=unbundlehash
93 93 $ . "$TESTDIR/notcapable"
94 94 $ req
95 95 pushing to http://localhost:$HGPORT/
96 96 searching for changes
97 97 remote: adding changesets
98 98 remote: adding manifests
99 99 remote: adding file changes
100 100 remote: added 1 changesets with 1 changes to 1 files
101 101 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
102 102 % serve errors
103 103 $ hg rollback
104 104 repository tip rolled back to revision 0 (undo serve)
105 105
106 106 expect authorization error: all users denied
107 107
108 108 $ echo '[web]' > .hg/hgrc
109 109 $ echo 'push_ssl = false' >> .hg/hgrc
110 110 $ echo 'deny_push = *' >> .hg/hgrc
111 111 $ req
112 112 pushing to http://localhost:$HGPORT/
113 113 searching for changes
114 114 abort: authorization failed
115 115 % serve errors
116 116 [255]
117 117
118 118 expect authorization error: some users denied, users must be authenticated
119 119
120 120 $ echo 'deny_push = unperson' >> .hg/hgrc
121 121 $ req
122 122 pushing to http://localhost:$HGPORT/
123 123 searching for changes
124 124 abort: authorization failed
125 125 % serve errors
126 126 [255]
127 127
128 128 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now