Show More
@@ -1,2155 +1,2148 | |||
|
1 | 1 | > do_push() |
|
2 | 2 | > { |
|
3 | 3 | > user=$1 |
|
4 | 4 | > shift |
|
5 | 5 | > echo "Pushing as user $user" |
|
6 | 6 | > echo 'hgrc = """' |
|
7 | 7 | > sed -n '/\[[ha]/,$p' b/.hg/hgrc | grep -v fakegroups.py |
|
8 | 8 | > echo '"""' |
|
9 | 9 | > if test -f acl.config; then |
|
10 | 10 | > echo 'acl.config = """' |
|
11 | 11 | > cat acl.config |
|
12 | 12 | > echo '"""' |
|
13 | 13 | > fi |
|
14 | 14 | > # On AIX /etc/profile sets LOGNAME read-only. So |
|
15 | 15 | > # LOGNAME=$user hg --cws a --debug push ../b |
|
16 | 16 | > # fails with "This variable is read only." |
|
17 | 17 | > # Use env to work around this. |
|
18 | 18 | > env LOGNAME=$user hg --cwd a --debug push ../b |
|
19 | 19 | > hg --cwd b rollback |
|
20 | 20 | > hg --cwd b --quiet tip |
|
21 | 21 | > echo |
|
22 | 22 | > } |
|
23 | 23 | |
|
24 | 24 | > init_config() |
|
25 | 25 | > { |
|
26 | 26 | > cat > fakegroups.py <<EOF |
|
27 | 27 | > from hgext import acl |
|
28 | 28 | > def fakegetusers(ui, group): |
|
29 | 29 | > try: |
|
30 | 30 | > return acl._getusersorig(ui, group) |
|
31 | 31 | > except: |
|
32 | 32 | > return ["fred", "betty"] |
|
33 | 33 | > acl._getusersorig = acl._getusers |
|
34 | 34 | > acl._getusers = fakegetusers |
|
35 | 35 | > EOF |
|
36 | 36 | > rm -f acl.config |
|
37 | 37 | > cat > $config <<EOF |
|
38 | 38 | > [hooks] |
|
39 | 39 | > pretxnchangegroup.acl = python:hgext.acl.hook |
|
40 | 40 | > [acl] |
|
41 | 41 | > sources = push |
|
42 | 42 | > [extensions] |
|
43 | 43 | > f=`pwd`/fakegroups.py |
|
44 | 44 | > EOF |
|
45 | 45 | > } |
|
46 | 46 | |
|
47 | $ cat << EOF >> $HGRCPATH | |
|
48 | > [experimental] | |
|
49 | > # drop me once bundle2 is the default, | |
|
50 | > # added to get test change early. | |
|
51 | > bundle2-exp = True | |
|
52 | > EOF | |
|
53 | ||
|
54 | 47 | $ hg init a |
|
55 | 48 | $ cd a |
|
56 | 49 | $ mkdir foo foo/Bar quux |
|
57 | 50 | $ echo 'in foo' > foo/file.txt |
|
58 | 51 | $ echo 'in foo/Bar' > foo/Bar/file.txt |
|
59 | 52 | $ echo 'in quux' > quux/file.py |
|
60 | 53 | $ hg add -q |
|
61 | 54 | $ hg ci -m 'add files' -d '1000000 0' |
|
62 | 55 | $ echo >> foo/file.txt |
|
63 | 56 | $ hg ci -m 'change foo/file' -d '1000001 0' |
|
64 | 57 | $ echo >> foo/Bar/file.txt |
|
65 | 58 | $ hg ci -m 'change foo/Bar/file' -d '1000002 0' |
|
66 | 59 | $ echo >> quux/file.py |
|
67 | 60 | $ hg ci -m 'change quux/file' -d '1000003 0' |
|
68 | 61 | $ hg tip --quiet |
|
69 | 62 | 3:911600dab2ae |
|
70 | 63 | |
|
71 | 64 | $ cd .. |
|
72 | 65 | $ hg clone -r 0 a b |
|
73 | 66 | adding changesets |
|
74 | 67 | adding manifests |
|
75 | 68 | adding file changes |
|
76 | 69 | added 1 changesets with 3 changes to 3 files |
|
77 | 70 | updating to branch default |
|
78 | 71 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 72 | |
|
80 | 73 | $ config=b/.hg/hgrc |
|
81 | 74 | |
|
82 | 75 | Extension disabled for lack of a hook |
|
83 | 76 | |
|
84 | 77 | $ do_push fred |
|
85 | 78 | Pushing as user fred |
|
86 | 79 | hgrc = """ |
|
87 | 80 | """ |
|
88 | 81 | pushing to ../b |
|
89 | 82 | query 1; heads |
|
90 | 83 | searching for changes |
|
91 | 84 | all remote heads known locally |
|
92 | 85 | listing keys for "phases" |
|
93 | 86 | checking for updated bookmarks |
|
94 | 87 | listing keys for "bookmarks" |
|
95 | 88 | listing keys for "bookmarks" |
|
96 | 89 | 3 changesets found |
|
97 | 90 | list of changesets: |
|
98 | 91 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
99 | 92 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
100 | 93 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
101 | 94 | bundle2-output-bundle: "HG20", 4 parts total |
|
102 | 95 | bundle2-output-part: "replycaps" 155 bytes payload |
|
103 | 96 | bundle2-output-part: "check:heads" streamed payload |
|
104 | 97 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
105 | 98 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
106 | 99 | bundle2-input-bundle: with-transaction |
|
107 | 100 | bundle2-input-part: "replycaps" supported |
|
108 | 101 | bundle2-input-part: total payload size 155 |
|
109 | 102 | bundle2-input-part: "check:heads" supported |
|
110 | 103 | bundle2-input-part: total payload size 20 |
|
111 | 104 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
112 | 105 | adding changesets |
|
113 | 106 | add changeset ef1ea85a6374 |
|
114 | 107 | add changeset f9cafe1212c8 |
|
115 | 108 | add changeset 911600dab2ae |
|
116 | 109 | adding manifests |
|
117 | 110 | adding file changes |
|
118 | 111 | adding foo/Bar/file.txt revisions |
|
119 | 112 | adding foo/file.txt revisions |
|
120 | 113 | adding quux/file.py revisions |
|
121 | 114 | added 3 changesets with 3 changes to 3 files |
|
122 | 115 | bundle2-input-part: total payload size 1606 |
|
123 | 116 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
124 | 117 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
125 | 118 | bundle2-input-bundle: 3 parts total |
|
126 | 119 | updating the branch cache |
|
127 | 120 | bundle2-output-bundle: "HG20", 2 parts total |
|
128 | 121 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
129 | 122 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
130 | 123 | bundle2-input-bundle: with-transaction |
|
131 | 124 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
132 | 125 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
133 | 126 | bundle2-input-bundle: 1 parts total |
|
134 | 127 | listing keys for "phases" |
|
135 | 128 | repository tip rolled back to revision 0 (undo push) |
|
136 | 129 | 0:6675d58eff77 |
|
137 | 130 | |
|
138 | 131 | |
|
139 | 132 | $ echo '[hooks]' >> $config |
|
140 | 133 | $ echo 'pretxnchangegroup.acl = python:hgext.acl.hook' >> $config |
|
141 | 134 | |
|
142 | 135 | Extension disabled for lack of acl.sources |
|
143 | 136 | |
|
144 | 137 | $ do_push fred |
|
145 | 138 | Pushing as user fred |
|
146 | 139 | hgrc = """ |
|
147 | 140 | [hooks] |
|
148 | 141 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
149 | 142 | """ |
|
150 | 143 | pushing to ../b |
|
151 | 144 | query 1; heads |
|
152 | 145 | searching for changes |
|
153 | 146 | all remote heads known locally |
|
154 | 147 | listing keys for "phases" |
|
155 | 148 | checking for updated bookmarks |
|
156 | 149 | listing keys for "bookmarks" |
|
157 | 150 | invalid branchheads cache (served): tip differs |
|
158 | 151 | listing keys for "bookmarks" |
|
159 | 152 | 3 changesets found |
|
160 | 153 | list of changesets: |
|
161 | 154 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
162 | 155 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
163 | 156 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
164 | 157 | bundle2-output-bundle: "HG20", 4 parts total |
|
165 | 158 | bundle2-output-part: "replycaps" 155 bytes payload |
|
166 | 159 | bundle2-output-part: "check:heads" streamed payload |
|
167 | 160 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
168 | 161 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
169 | 162 | bundle2-input-bundle: with-transaction |
|
170 | 163 | bundle2-input-part: "replycaps" supported |
|
171 | 164 | bundle2-input-part: total payload size 155 |
|
172 | 165 | bundle2-input-part: "check:heads" supported |
|
173 | 166 | bundle2-input-part: total payload size 20 |
|
174 | 167 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
175 | 168 | adding changesets |
|
176 | 169 | add changeset ef1ea85a6374 |
|
177 | 170 | add changeset f9cafe1212c8 |
|
178 | 171 | add changeset 911600dab2ae |
|
179 | 172 | adding manifests |
|
180 | 173 | adding file changes |
|
181 | 174 | adding foo/Bar/file.txt revisions |
|
182 | 175 | adding foo/file.txt revisions |
|
183 | 176 | adding quux/file.py revisions |
|
184 | 177 | added 3 changesets with 3 changes to 3 files |
|
185 | 178 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
186 | 179 | acl: changes have source "push" - skipping |
|
187 | 180 | bundle2-input-part: total payload size 1606 |
|
188 | 181 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
189 | 182 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
190 | 183 | bundle2-input-bundle: 3 parts total |
|
191 | 184 | updating the branch cache |
|
192 | 185 | bundle2-output-bundle: "HG20", 2 parts total |
|
193 | 186 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
194 | 187 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
195 | 188 | bundle2-input-bundle: with-transaction |
|
196 | 189 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
197 | 190 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
198 | 191 | bundle2-input-bundle: 1 parts total |
|
199 | 192 | listing keys for "phases" |
|
200 | 193 | repository tip rolled back to revision 0 (undo push) |
|
201 | 194 | 0:6675d58eff77 |
|
202 | 195 | |
|
203 | 196 | |
|
204 | 197 | No [acl.allow]/[acl.deny] |
|
205 | 198 | |
|
206 | 199 | $ echo '[acl]' >> $config |
|
207 | 200 | $ echo 'sources = push' >> $config |
|
208 | 201 | $ do_push fred |
|
209 | 202 | Pushing as user fred |
|
210 | 203 | hgrc = """ |
|
211 | 204 | [hooks] |
|
212 | 205 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
213 | 206 | [acl] |
|
214 | 207 | sources = push |
|
215 | 208 | """ |
|
216 | 209 | pushing to ../b |
|
217 | 210 | query 1; heads |
|
218 | 211 | searching for changes |
|
219 | 212 | all remote heads known locally |
|
220 | 213 | listing keys for "phases" |
|
221 | 214 | checking for updated bookmarks |
|
222 | 215 | listing keys for "bookmarks" |
|
223 | 216 | invalid branchheads cache (served): tip differs |
|
224 | 217 | listing keys for "bookmarks" |
|
225 | 218 | 3 changesets found |
|
226 | 219 | list of changesets: |
|
227 | 220 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
228 | 221 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
229 | 222 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
230 | 223 | bundle2-output-bundle: "HG20", 4 parts total |
|
231 | 224 | bundle2-output-part: "replycaps" 155 bytes payload |
|
232 | 225 | bundle2-output-part: "check:heads" streamed payload |
|
233 | 226 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
234 | 227 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
235 | 228 | bundle2-input-bundle: with-transaction |
|
236 | 229 | bundle2-input-part: "replycaps" supported |
|
237 | 230 | bundle2-input-part: total payload size 155 |
|
238 | 231 | bundle2-input-part: "check:heads" supported |
|
239 | 232 | bundle2-input-part: total payload size 20 |
|
240 | 233 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
241 | 234 | adding changesets |
|
242 | 235 | add changeset ef1ea85a6374 |
|
243 | 236 | add changeset f9cafe1212c8 |
|
244 | 237 | add changeset 911600dab2ae |
|
245 | 238 | adding manifests |
|
246 | 239 | adding file changes |
|
247 | 240 | adding foo/Bar/file.txt revisions |
|
248 | 241 | adding foo/file.txt revisions |
|
249 | 242 | adding quux/file.py revisions |
|
250 | 243 | added 3 changesets with 3 changes to 3 files |
|
251 | 244 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
252 | 245 | acl: checking access for user "fred" |
|
253 | 246 | acl: acl.allow.branches not enabled |
|
254 | 247 | acl: acl.deny.branches not enabled |
|
255 | 248 | acl: acl.allow not enabled |
|
256 | 249 | acl: acl.deny not enabled |
|
257 | 250 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
258 | 251 | acl: path access granted: "ef1ea85a6374" |
|
259 | 252 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
260 | 253 | acl: path access granted: "f9cafe1212c8" |
|
261 | 254 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
262 | 255 | acl: path access granted: "911600dab2ae" |
|
263 | 256 | bundle2-input-part: total payload size 1606 |
|
264 | 257 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
265 | 258 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
266 | 259 | bundle2-input-bundle: 3 parts total |
|
267 | 260 | updating the branch cache |
|
268 | 261 | bundle2-output-bundle: "HG20", 2 parts total |
|
269 | 262 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
270 | 263 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
271 | 264 | bundle2-input-bundle: with-transaction |
|
272 | 265 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
273 | 266 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
274 | 267 | bundle2-input-bundle: 1 parts total |
|
275 | 268 | listing keys for "phases" |
|
276 | 269 | repository tip rolled back to revision 0 (undo push) |
|
277 | 270 | 0:6675d58eff77 |
|
278 | 271 | |
|
279 | 272 | |
|
280 | 273 | Empty [acl.allow] |
|
281 | 274 | |
|
282 | 275 | $ echo '[acl.allow]' >> $config |
|
283 | 276 | $ do_push fred |
|
284 | 277 | Pushing as user fred |
|
285 | 278 | hgrc = """ |
|
286 | 279 | [hooks] |
|
287 | 280 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
288 | 281 | [acl] |
|
289 | 282 | sources = push |
|
290 | 283 | [acl.allow] |
|
291 | 284 | """ |
|
292 | 285 | pushing to ../b |
|
293 | 286 | query 1; heads |
|
294 | 287 | searching for changes |
|
295 | 288 | all remote heads known locally |
|
296 | 289 | listing keys for "phases" |
|
297 | 290 | checking for updated bookmarks |
|
298 | 291 | listing keys for "bookmarks" |
|
299 | 292 | invalid branchheads cache (served): tip differs |
|
300 | 293 | listing keys for "bookmarks" |
|
301 | 294 | 3 changesets found |
|
302 | 295 | list of changesets: |
|
303 | 296 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
304 | 297 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
305 | 298 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
306 | 299 | bundle2-output-bundle: "HG20", 4 parts total |
|
307 | 300 | bundle2-output-part: "replycaps" 155 bytes payload |
|
308 | 301 | bundle2-output-part: "check:heads" streamed payload |
|
309 | 302 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
310 | 303 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
311 | 304 | bundle2-input-bundle: with-transaction |
|
312 | 305 | bundle2-input-part: "replycaps" supported |
|
313 | 306 | bundle2-input-part: total payload size 155 |
|
314 | 307 | bundle2-input-part: "check:heads" supported |
|
315 | 308 | bundle2-input-part: total payload size 20 |
|
316 | 309 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
317 | 310 | adding changesets |
|
318 | 311 | add changeset ef1ea85a6374 |
|
319 | 312 | add changeset f9cafe1212c8 |
|
320 | 313 | add changeset 911600dab2ae |
|
321 | 314 | adding manifests |
|
322 | 315 | adding file changes |
|
323 | 316 | adding foo/Bar/file.txt revisions |
|
324 | 317 | adding foo/file.txt revisions |
|
325 | 318 | adding quux/file.py revisions |
|
326 | 319 | added 3 changesets with 3 changes to 3 files |
|
327 | 320 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
328 | 321 | acl: checking access for user "fred" |
|
329 | 322 | acl: acl.allow.branches not enabled |
|
330 | 323 | acl: acl.deny.branches not enabled |
|
331 | 324 | acl: acl.allow enabled, 0 entries for user fred |
|
332 | 325 | acl: acl.deny not enabled |
|
333 | 326 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
334 | 327 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
335 | 328 | bundle2-input-part: total payload size 1606 |
|
336 | 329 | bundle2-input-bundle: 3 parts total |
|
337 | 330 | transaction abort! |
|
338 | 331 | rollback completed |
|
339 | 332 | abort: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
340 | 333 | no rollback information available |
|
341 | 334 | 0:6675d58eff77 |
|
342 | 335 | |
|
343 | 336 | |
|
344 | 337 | fred is allowed inside foo/ |
|
345 | 338 | |
|
346 | 339 | $ echo 'foo/** = fred' >> $config |
|
347 | 340 | $ do_push fred |
|
348 | 341 | Pushing as user fred |
|
349 | 342 | hgrc = """ |
|
350 | 343 | [hooks] |
|
351 | 344 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
352 | 345 | [acl] |
|
353 | 346 | sources = push |
|
354 | 347 | [acl.allow] |
|
355 | 348 | foo/** = fred |
|
356 | 349 | """ |
|
357 | 350 | pushing to ../b |
|
358 | 351 | query 1; heads |
|
359 | 352 | searching for changes |
|
360 | 353 | all remote heads known locally |
|
361 | 354 | listing keys for "phases" |
|
362 | 355 | checking for updated bookmarks |
|
363 | 356 | listing keys for "bookmarks" |
|
364 | 357 | invalid branchheads cache (served): tip differs |
|
365 | 358 | listing keys for "bookmarks" |
|
366 | 359 | 3 changesets found |
|
367 | 360 | list of changesets: |
|
368 | 361 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
369 | 362 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
370 | 363 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
371 | 364 | bundle2-output-bundle: "HG20", 4 parts total |
|
372 | 365 | bundle2-output-part: "replycaps" 155 bytes payload |
|
373 | 366 | bundle2-output-part: "check:heads" streamed payload |
|
374 | 367 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
375 | 368 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
376 | 369 | bundle2-input-bundle: with-transaction |
|
377 | 370 | bundle2-input-part: "replycaps" supported |
|
378 | 371 | bundle2-input-part: total payload size 155 |
|
379 | 372 | bundle2-input-part: "check:heads" supported |
|
380 | 373 | bundle2-input-part: total payload size 20 |
|
381 | 374 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
382 | 375 | adding changesets |
|
383 | 376 | add changeset ef1ea85a6374 |
|
384 | 377 | add changeset f9cafe1212c8 |
|
385 | 378 | add changeset 911600dab2ae |
|
386 | 379 | adding manifests |
|
387 | 380 | adding file changes |
|
388 | 381 | adding foo/Bar/file.txt revisions |
|
389 | 382 | adding foo/file.txt revisions |
|
390 | 383 | adding quux/file.py revisions |
|
391 | 384 | added 3 changesets with 3 changes to 3 files |
|
392 | 385 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
393 | 386 | acl: checking access for user "fred" |
|
394 | 387 | acl: acl.allow.branches not enabled |
|
395 | 388 | acl: acl.deny.branches not enabled |
|
396 | 389 | acl: acl.allow enabled, 1 entries for user fred |
|
397 | 390 | acl: acl.deny not enabled |
|
398 | 391 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
399 | 392 | acl: path access granted: "ef1ea85a6374" |
|
400 | 393 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
401 | 394 | acl: path access granted: "f9cafe1212c8" |
|
402 | 395 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
403 | 396 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
404 | 397 | bundle2-input-part: total payload size 1606 |
|
405 | 398 | bundle2-input-bundle: 3 parts total |
|
406 | 399 | transaction abort! |
|
407 | 400 | rollback completed |
|
408 | 401 | abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
409 | 402 | no rollback information available |
|
410 | 403 | 0:6675d58eff77 |
|
411 | 404 | |
|
412 | 405 | |
|
413 | 406 | Empty [acl.deny] |
|
414 | 407 | |
|
415 | 408 | $ echo '[acl.deny]' >> $config |
|
416 | 409 | $ do_push barney |
|
417 | 410 | Pushing as user barney |
|
418 | 411 | hgrc = """ |
|
419 | 412 | [hooks] |
|
420 | 413 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
421 | 414 | [acl] |
|
422 | 415 | sources = push |
|
423 | 416 | [acl.allow] |
|
424 | 417 | foo/** = fred |
|
425 | 418 | [acl.deny] |
|
426 | 419 | """ |
|
427 | 420 | pushing to ../b |
|
428 | 421 | query 1; heads |
|
429 | 422 | searching for changes |
|
430 | 423 | all remote heads known locally |
|
431 | 424 | listing keys for "phases" |
|
432 | 425 | checking for updated bookmarks |
|
433 | 426 | listing keys for "bookmarks" |
|
434 | 427 | invalid branchheads cache (served): tip differs |
|
435 | 428 | listing keys for "bookmarks" |
|
436 | 429 | 3 changesets found |
|
437 | 430 | list of changesets: |
|
438 | 431 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
439 | 432 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
440 | 433 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
441 | 434 | bundle2-output-bundle: "HG20", 4 parts total |
|
442 | 435 | bundle2-output-part: "replycaps" 155 bytes payload |
|
443 | 436 | bundle2-output-part: "check:heads" streamed payload |
|
444 | 437 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
445 | 438 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
446 | 439 | bundle2-input-bundle: with-transaction |
|
447 | 440 | bundle2-input-part: "replycaps" supported |
|
448 | 441 | bundle2-input-part: total payload size 155 |
|
449 | 442 | bundle2-input-part: "check:heads" supported |
|
450 | 443 | bundle2-input-part: total payload size 20 |
|
451 | 444 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
452 | 445 | adding changesets |
|
453 | 446 | add changeset ef1ea85a6374 |
|
454 | 447 | add changeset f9cafe1212c8 |
|
455 | 448 | add changeset 911600dab2ae |
|
456 | 449 | adding manifests |
|
457 | 450 | adding file changes |
|
458 | 451 | adding foo/Bar/file.txt revisions |
|
459 | 452 | adding foo/file.txt revisions |
|
460 | 453 | adding quux/file.py revisions |
|
461 | 454 | added 3 changesets with 3 changes to 3 files |
|
462 | 455 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
463 | 456 | acl: checking access for user "barney" |
|
464 | 457 | acl: acl.allow.branches not enabled |
|
465 | 458 | acl: acl.deny.branches not enabled |
|
466 | 459 | acl: acl.allow enabled, 0 entries for user barney |
|
467 | 460 | acl: acl.deny enabled, 0 entries for user barney |
|
468 | 461 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
469 | 462 | error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
470 | 463 | bundle2-input-part: total payload size 1606 |
|
471 | 464 | bundle2-input-bundle: 3 parts total |
|
472 | 465 | transaction abort! |
|
473 | 466 | rollback completed |
|
474 | 467 | abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
475 | 468 | no rollback information available |
|
476 | 469 | 0:6675d58eff77 |
|
477 | 470 | |
|
478 | 471 | |
|
479 | 472 | fred is allowed inside foo/, but not foo/bar/ (case matters) |
|
480 | 473 | |
|
481 | 474 | $ echo 'foo/bar/** = fred' >> $config |
|
482 | 475 | $ do_push fred |
|
483 | 476 | Pushing as user fred |
|
484 | 477 | hgrc = """ |
|
485 | 478 | [hooks] |
|
486 | 479 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
487 | 480 | [acl] |
|
488 | 481 | sources = push |
|
489 | 482 | [acl.allow] |
|
490 | 483 | foo/** = fred |
|
491 | 484 | [acl.deny] |
|
492 | 485 | foo/bar/** = fred |
|
493 | 486 | """ |
|
494 | 487 | pushing to ../b |
|
495 | 488 | query 1; heads |
|
496 | 489 | searching for changes |
|
497 | 490 | all remote heads known locally |
|
498 | 491 | listing keys for "phases" |
|
499 | 492 | checking for updated bookmarks |
|
500 | 493 | listing keys for "bookmarks" |
|
501 | 494 | invalid branchheads cache (served): tip differs |
|
502 | 495 | listing keys for "bookmarks" |
|
503 | 496 | 3 changesets found |
|
504 | 497 | list of changesets: |
|
505 | 498 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
506 | 499 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
507 | 500 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
508 | 501 | bundle2-output-bundle: "HG20", 4 parts total |
|
509 | 502 | bundle2-output-part: "replycaps" 155 bytes payload |
|
510 | 503 | bundle2-output-part: "check:heads" streamed payload |
|
511 | 504 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
512 | 505 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
513 | 506 | bundle2-input-bundle: with-transaction |
|
514 | 507 | bundle2-input-part: "replycaps" supported |
|
515 | 508 | bundle2-input-part: total payload size 155 |
|
516 | 509 | bundle2-input-part: "check:heads" supported |
|
517 | 510 | bundle2-input-part: total payload size 20 |
|
518 | 511 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
519 | 512 | adding changesets |
|
520 | 513 | add changeset ef1ea85a6374 |
|
521 | 514 | add changeset f9cafe1212c8 |
|
522 | 515 | add changeset 911600dab2ae |
|
523 | 516 | adding manifests |
|
524 | 517 | adding file changes |
|
525 | 518 | adding foo/Bar/file.txt revisions |
|
526 | 519 | adding foo/file.txt revisions |
|
527 | 520 | adding quux/file.py revisions |
|
528 | 521 | added 3 changesets with 3 changes to 3 files |
|
529 | 522 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
530 | 523 | acl: checking access for user "fred" |
|
531 | 524 | acl: acl.allow.branches not enabled |
|
532 | 525 | acl: acl.deny.branches not enabled |
|
533 | 526 | acl: acl.allow enabled, 1 entries for user fred |
|
534 | 527 | acl: acl.deny enabled, 1 entries for user fred |
|
535 | 528 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
536 | 529 | acl: path access granted: "ef1ea85a6374" |
|
537 | 530 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
538 | 531 | acl: path access granted: "f9cafe1212c8" |
|
539 | 532 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
540 | 533 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
541 | 534 | bundle2-input-part: total payload size 1606 |
|
542 | 535 | bundle2-input-bundle: 3 parts total |
|
543 | 536 | transaction abort! |
|
544 | 537 | rollback completed |
|
545 | 538 | abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
546 | 539 | no rollback information available |
|
547 | 540 | 0:6675d58eff77 |
|
548 | 541 | |
|
549 | 542 | |
|
550 | 543 | fred is allowed inside foo/, but not foo/Bar/ |
|
551 | 544 | |
|
552 | 545 | $ echo 'foo/Bar/** = fred' >> $config |
|
553 | 546 | $ do_push fred |
|
554 | 547 | Pushing as user fred |
|
555 | 548 | hgrc = """ |
|
556 | 549 | [hooks] |
|
557 | 550 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
558 | 551 | [acl] |
|
559 | 552 | sources = push |
|
560 | 553 | [acl.allow] |
|
561 | 554 | foo/** = fred |
|
562 | 555 | [acl.deny] |
|
563 | 556 | foo/bar/** = fred |
|
564 | 557 | foo/Bar/** = fred |
|
565 | 558 | """ |
|
566 | 559 | pushing to ../b |
|
567 | 560 | query 1; heads |
|
568 | 561 | searching for changes |
|
569 | 562 | all remote heads known locally |
|
570 | 563 | listing keys for "phases" |
|
571 | 564 | checking for updated bookmarks |
|
572 | 565 | listing keys for "bookmarks" |
|
573 | 566 | invalid branchheads cache (served): tip differs |
|
574 | 567 | listing keys for "bookmarks" |
|
575 | 568 | 3 changesets found |
|
576 | 569 | list of changesets: |
|
577 | 570 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
578 | 571 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
579 | 572 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
580 | 573 | bundle2-output-bundle: "HG20", 4 parts total |
|
581 | 574 | bundle2-output-part: "replycaps" 155 bytes payload |
|
582 | 575 | bundle2-output-part: "check:heads" streamed payload |
|
583 | 576 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
584 | 577 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
585 | 578 | bundle2-input-bundle: with-transaction |
|
586 | 579 | bundle2-input-part: "replycaps" supported |
|
587 | 580 | bundle2-input-part: total payload size 155 |
|
588 | 581 | bundle2-input-part: "check:heads" supported |
|
589 | 582 | bundle2-input-part: total payload size 20 |
|
590 | 583 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
591 | 584 | adding changesets |
|
592 | 585 | add changeset ef1ea85a6374 |
|
593 | 586 | add changeset f9cafe1212c8 |
|
594 | 587 | add changeset 911600dab2ae |
|
595 | 588 | adding manifests |
|
596 | 589 | adding file changes |
|
597 | 590 | adding foo/Bar/file.txt revisions |
|
598 | 591 | adding foo/file.txt revisions |
|
599 | 592 | adding quux/file.py revisions |
|
600 | 593 | added 3 changesets with 3 changes to 3 files |
|
601 | 594 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
602 | 595 | acl: checking access for user "fred" |
|
603 | 596 | acl: acl.allow.branches not enabled |
|
604 | 597 | acl: acl.deny.branches not enabled |
|
605 | 598 | acl: acl.allow enabled, 1 entries for user fred |
|
606 | 599 | acl: acl.deny enabled, 2 entries for user fred |
|
607 | 600 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
608 | 601 | acl: path access granted: "ef1ea85a6374" |
|
609 | 602 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
610 | 603 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
611 | 604 | bundle2-input-part: total payload size 1606 |
|
612 | 605 | bundle2-input-bundle: 3 parts total |
|
613 | 606 | transaction abort! |
|
614 | 607 | rollback completed |
|
615 | 608 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
616 | 609 | no rollback information available |
|
617 | 610 | 0:6675d58eff77 |
|
618 | 611 | |
|
619 | 612 | |
|
620 | 613 | $ echo 'barney is not mentioned => not allowed anywhere' |
|
621 | 614 | barney is not mentioned => not allowed anywhere |
|
622 | 615 | $ do_push barney |
|
623 | 616 | Pushing as user barney |
|
624 | 617 | hgrc = """ |
|
625 | 618 | [hooks] |
|
626 | 619 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
627 | 620 | [acl] |
|
628 | 621 | sources = push |
|
629 | 622 | [acl.allow] |
|
630 | 623 | foo/** = fred |
|
631 | 624 | [acl.deny] |
|
632 | 625 | foo/bar/** = fred |
|
633 | 626 | foo/Bar/** = fred |
|
634 | 627 | """ |
|
635 | 628 | pushing to ../b |
|
636 | 629 | query 1; heads |
|
637 | 630 | searching for changes |
|
638 | 631 | all remote heads known locally |
|
639 | 632 | listing keys for "phases" |
|
640 | 633 | checking for updated bookmarks |
|
641 | 634 | listing keys for "bookmarks" |
|
642 | 635 | invalid branchheads cache (served): tip differs |
|
643 | 636 | listing keys for "bookmarks" |
|
644 | 637 | 3 changesets found |
|
645 | 638 | list of changesets: |
|
646 | 639 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
647 | 640 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
648 | 641 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
649 | 642 | bundle2-output-bundle: "HG20", 4 parts total |
|
650 | 643 | bundle2-output-part: "replycaps" 155 bytes payload |
|
651 | 644 | bundle2-output-part: "check:heads" streamed payload |
|
652 | 645 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
653 | 646 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
654 | 647 | bundle2-input-bundle: with-transaction |
|
655 | 648 | bundle2-input-part: "replycaps" supported |
|
656 | 649 | bundle2-input-part: total payload size 155 |
|
657 | 650 | bundle2-input-part: "check:heads" supported |
|
658 | 651 | bundle2-input-part: total payload size 20 |
|
659 | 652 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
660 | 653 | adding changesets |
|
661 | 654 | add changeset ef1ea85a6374 |
|
662 | 655 | add changeset f9cafe1212c8 |
|
663 | 656 | add changeset 911600dab2ae |
|
664 | 657 | adding manifests |
|
665 | 658 | adding file changes |
|
666 | 659 | adding foo/Bar/file.txt revisions |
|
667 | 660 | adding foo/file.txt revisions |
|
668 | 661 | adding quux/file.py revisions |
|
669 | 662 | added 3 changesets with 3 changes to 3 files |
|
670 | 663 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
671 | 664 | acl: checking access for user "barney" |
|
672 | 665 | acl: acl.allow.branches not enabled |
|
673 | 666 | acl: acl.deny.branches not enabled |
|
674 | 667 | acl: acl.allow enabled, 0 entries for user barney |
|
675 | 668 | acl: acl.deny enabled, 0 entries for user barney |
|
676 | 669 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
677 | 670 | error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
678 | 671 | bundle2-input-part: total payload size 1606 |
|
679 | 672 | bundle2-input-bundle: 3 parts total |
|
680 | 673 | transaction abort! |
|
681 | 674 | rollback completed |
|
682 | 675 | abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
683 | 676 | no rollback information available |
|
684 | 677 | 0:6675d58eff77 |
|
685 | 678 | |
|
686 | 679 | |
|
687 | 680 | barney is allowed everywhere |
|
688 | 681 | |
|
689 | 682 | $ echo '[acl.allow]' >> $config |
|
690 | 683 | $ echo '** = barney' >> $config |
|
691 | 684 | $ do_push barney |
|
692 | 685 | Pushing as user barney |
|
693 | 686 | hgrc = """ |
|
694 | 687 | [hooks] |
|
695 | 688 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
696 | 689 | [acl] |
|
697 | 690 | sources = push |
|
698 | 691 | [acl.allow] |
|
699 | 692 | foo/** = fred |
|
700 | 693 | [acl.deny] |
|
701 | 694 | foo/bar/** = fred |
|
702 | 695 | foo/Bar/** = fred |
|
703 | 696 | [acl.allow] |
|
704 | 697 | ** = barney |
|
705 | 698 | """ |
|
706 | 699 | pushing to ../b |
|
707 | 700 | query 1; heads |
|
708 | 701 | searching for changes |
|
709 | 702 | all remote heads known locally |
|
710 | 703 | listing keys for "phases" |
|
711 | 704 | checking for updated bookmarks |
|
712 | 705 | listing keys for "bookmarks" |
|
713 | 706 | invalid branchheads cache (served): tip differs |
|
714 | 707 | listing keys for "bookmarks" |
|
715 | 708 | 3 changesets found |
|
716 | 709 | list of changesets: |
|
717 | 710 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
718 | 711 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
719 | 712 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
720 | 713 | bundle2-output-bundle: "HG20", 4 parts total |
|
721 | 714 | bundle2-output-part: "replycaps" 155 bytes payload |
|
722 | 715 | bundle2-output-part: "check:heads" streamed payload |
|
723 | 716 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
724 | 717 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
725 | 718 | bundle2-input-bundle: with-transaction |
|
726 | 719 | bundle2-input-part: "replycaps" supported |
|
727 | 720 | bundle2-input-part: total payload size 155 |
|
728 | 721 | bundle2-input-part: "check:heads" supported |
|
729 | 722 | bundle2-input-part: total payload size 20 |
|
730 | 723 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
731 | 724 | adding changesets |
|
732 | 725 | add changeset ef1ea85a6374 |
|
733 | 726 | add changeset f9cafe1212c8 |
|
734 | 727 | add changeset 911600dab2ae |
|
735 | 728 | adding manifests |
|
736 | 729 | adding file changes |
|
737 | 730 | adding foo/Bar/file.txt revisions |
|
738 | 731 | adding foo/file.txt revisions |
|
739 | 732 | adding quux/file.py revisions |
|
740 | 733 | added 3 changesets with 3 changes to 3 files |
|
741 | 734 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
742 | 735 | acl: checking access for user "barney" |
|
743 | 736 | acl: acl.allow.branches not enabled |
|
744 | 737 | acl: acl.deny.branches not enabled |
|
745 | 738 | acl: acl.allow enabled, 1 entries for user barney |
|
746 | 739 | acl: acl.deny enabled, 0 entries for user barney |
|
747 | 740 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
748 | 741 | acl: path access granted: "ef1ea85a6374" |
|
749 | 742 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
750 | 743 | acl: path access granted: "f9cafe1212c8" |
|
751 | 744 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
752 | 745 | acl: path access granted: "911600dab2ae" |
|
753 | 746 | bundle2-input-part: total payload size 1606 |
|
754 | 747 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
755 | 748 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
756 | 749 | bundle2-input-bundle: 3 parts total |
|
757 | 750 | updating the branch cache |
|
758 | 751 | bundle2-output-bundle: "HG20", 2 parts total |
|
759 | 752 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
760 | 753 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
761 | 754 | bundle2-input-bundle: with-transaction |
|
762 | 755 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
763 | 756 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
764 | 757 | bundle2-input-bundle: 1 parts total |
|
765 | 758 | listing keys for "phases" |
|
766 | 759 | repository tip rolled back to revision 0 (undo push) |
|
767 | 760 | 0:6675d58eff77 |
|
768 | 761 | |
|
769 | 762 | |
|
770 | 763 | wilma can change files with a .txt extension |
|
771 | 764 | |
|
772 | 765 | $ echo '**/*.txt = wilma' >> $config |
|
773 | 766 | $ do_push wilma |
|
774 | 767 | Pushing as user wilma |
|
775 | 768 | hgrc = """ |
|
776 | 769 | [hooks] |
|
777 | 770 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
778 | 771 | [acl] |
|
779 | 772 | sources = push |
|
780 | 773 | [acl.allow] |
|
781 | 774 | foo/** = fred |
|
782 | 775 | [acl.deny] |
|
783 | 776 | foo/bar/** = fred |
|
784 | 777 | foo/Bar/** = fred |
|
785 | 778 | [acl.allow] |
|
786 | 779 | ** = barney |
|
787 | 780 | **/*.txt = wilma |
|
788 | 781 | """ |
|
789 | 782 | pushing to ../b |
|
790 | 783 | query 1; heads |
|
791 | 784 | searching for changes |
|
792 | 785 | all remote heads known locally |
|
793 | 786 | listing keys for "phases" |
|
794 | 787 | checking for updated bookmarks |
|
795 | 788 | listing keys for "bookmarks" |
|
796 | 789 | invalid branchheads cache (served): tip differs |
|
797 | 790 | listing keys for "bookmarks" |
|
798 | 791 | 3 changesets found |
|
799 | 792 | list of changesets: |
|
800 | 793 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
801 | 794 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
802 | 795 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
803 | 796 | bundle2-output-bundle: "HG20", 4 parts total |
|
804 | 797 | bundle2-output-part: "replycaps" 155 bytes payload |
|
805 | 798 | bundle2-output-part: "check:heads" streamed payload |
|
806 | 799 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
807 | 800 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
808 | 801 | bundle2-input-bundle: with-transaction |
|
809 | 802 | bundle2-input-part: "replycaps" supported |
|
810 | 803 | bundle2-input-part: total payload size 155 |
|
811 | 804 | bundle2-input-part: "check:heads" supported |
|
812 | 805 | bundle2-input-part: total payload size 20 |
|
813 | 806 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
814 | 807 | adding changesets |
|
815 | 808 | add changeset ef1ea85a6374 |
|
816 | 809 | add changeset f9cafe1212c8 |
|
817 | 810 | add changeset 911600dab2ae |
|
818 | 811 | adding manifests |
|
819 | 812 | adding file changes |
|
820 | 813 | adding foo/Bar/file.txt revisions |
|
821 | 814 | adding foo/file.txt revisions |
|
822 | 815 | adding quux/file.py revisions |
|
823 | 816 | added 3 changesets with 3 changes to 3 files |
|
824 | 817 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
825 | 818 | acl: checking access for user "wilma" |
|
826 | 819 | acl: acl.allow.branches not enabled |
|
827 | 820 | acl: acl.deny.branches not enabled |
|
828 | 821 | acl: acl.allow enabled, 1 entries for user wilma |
|
829 | 822 | acl: acl.deny enabled, 0 entries for user wilma |
|
830 | 823 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
831 | 824 | acl: path access granted: "ef1ea85a6374" |
|
832 | 825 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
833 | 826 | acl: path access granted: "f9cafe1212c8" |
|
834 | 827 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
835 | 828 | error: pretxnchangegroup.acl hook failed: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
836 | 829 | bundle2-input-part: total payload size 1606 |
|
837 | 830 | bundle2-input-bundle: 3 parts total |
|
838 | 831 | transaction abort! |
|
839 | 832 | rollback completed |
|
840 | 833 | abort: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
841 | 834 | no rollback information available |
|
842 | 835 | 0:6675d58eff77 |
|
843 | 836 | |
|
844 | 837 | |
|
845 | 838 | file specified by acl.config does not exist |
|
846 | 839 | |
|
847 | 840 | $ echo '[acl]' >> $config |
|
848 | 841 | $ echo 'config = ../acl.config' >> $config |
|
849 | 842 | $ do_push barney |
|
850 | 843 | Pushing as user barney |
|
851 | 844 | hgrc = """ |
|
852 | 845 | [hooks] |
|
853 | 846 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
854 | 847 | [acl] |
|
855 | 848 | sources = push |
|
856 | 849 | [acl.allow] |
|
857 | 850 | foo/** = fred |
|
858 | 851 | [acl.deny] |
|
859 | 852 | foo/bar/** = fred |
|
860 | 853 | foo/Bar/** = fred |
|
861 | 854 | [acl.allow] |
|
862 | 855 | ** = barney |
|
863 | 856 | **/*.txt = wilma |
|
864 | 857 | [acl] |
|
865 | 858 | config = ../acl.config |
|
866 | 859 | """ |
|
867 | 860 | pushing to ../b |
|
868 | 861 | query 1; heads |
|
869 | 862 | searching for changes |
|
870 | 863 | all remote heads known locally |
|
871 | 864 | listing keys for "phases" |
|
872 | 865 | checking for updated bookmarks |
|
873 | 866 | listing keys for "bookmarks" |
|
874 | 867 | invalid branchheads cache (served): tip differs |
|
875 | 868 | listing keys for "bookmarks" |
|
876 | 869 | 3 changesets found |
|
877 | 870 | list of changesets: |
|
878 | 871 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
879 | 872 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
880 | 873 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
881 | 874 | bundle2-output-bundle: "HG20", 4 parts total |
|
882 | 875 | bundle2-output-part: "replycaps" 155 bytes payload |
|
883 | 876 | bundle2-output-part: "check:heads" streamed payload |
|
884 | 877 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
885 | 878 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
886 | 879 | bundle2-input-bundle: with-transaction |
|
887 | 880 | bundle2-input-part: "replycaps" supported |
|
888 | 881 | bundle2-input-part: total payload size 155 |
|
889 | 882 | bundle2-input-part: "check:heads" supported |
|
890 | 883 | bundle2-input-part: total payload size 20 |
|
891 | 884 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
892 | 885 | adding changesets |
|
893 | 886 | add changeset ef1ea85a6374 |
|
894 | 887 | add changeset f9cafe1212c8 |
|
895 | 888 | add changeset 911600dab2ae |
|
896 | 889 | adding manifests |
|
897 | 890 | adding file changes |
|
898 | 891 | adding foo/Bar/file.txt revisions |
|
899 | 892 | adding foo/file.txt revisions |
|
900 | 893 | adding quux/file.py revisions |
|
901 | 894 | added 3 changesets with 3 changes to 3 files |
|
902 | 895 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
903 | 896 | acl: checking access for user "barney" |
|
904 | 897 | error: pretxnchangegroup.acl hook raised an exception: [Errno 2] No such file or directory: '../acl.config' |
|
905 | 898 | bundle2-input-part: total payload size 1606 |
|
906 | 899 | bundle2-input-bundle: 3 parts total |
|
907 | 900 | transaction abort! |
|
908 | 901 | rollback completed |
|
909 | 902 | abort: No such file or directory: ../acl.config |
|
910 | 903 | no rollback information available |
|
911 | 904 | 0:6675d58eff77 |
|
912 | 905 | |
|
913 | 906 | |
|
914 | 907 | betty is allowed inside foo/ by a acl.config file |
|
915 | 908 | |
|
916 | 909 | $ echo '[acl.allow]' >> acl.config |
|
917 | 910 | $ echo 'foo/** = betty' >> acl.config |
|
918 | 911 | $ do_push betty |
|
919 | 912 | Pushing as user betty |
|
920 | 913 | hgrc = """ |
|
921 | 914 | [hooks] |
|
922 | 915 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
923 | 916 | [acl] |
|
924 | 917 | sources = push |
|
925 | 918 | [acl.allow] |
|
926 | 919 | foo/** = fred |
|
927 | 920 | [acl.deny] |
|
928 | 921 | foo/bar/** = fred |
|
929 | 922 | foo/Bar/** = fred |
|
930 | 923 | [acl.allow] |
|
931 | 924 | ** = barney |
|
932 | 925 | **/*.txt = wilma |
|
933 | 926 | [acl] |
|
934 | 927 | config = ../acl.config |
|
935 | 928 | """ |
|
936 | 929 | acl.config = """ |
|
937 | 930 | [acl.allow] |
|
938 | 931 | foo/** = betty |
|
939 | 932 | """ |
|
940 | 933 | pushing to ../b |
|
941 | 934 | query 1; heads |
|
942 | 935 | searching for changes |
|
943 | 936 | all remote heads known locally |
|
944 | 937 | listing keys for "phases" |
|
945 | 938 | checking for updated bookmarks |
|
946 | 939 | listing keys for "bookmarks" |
|
947 | 940 | invalid branchheads cache (served): tip differs |
|
948 | 941 | listing keys for "bookmarks" |
|
949 | 942 | 3 changesets found |
|
950 | 943 | list of changesets: |
|
951 | 944 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
952 | 945 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
953 | 946 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
954 | 947 | bundle2-output-bundle: "HG20", 4 parts total |
|
955 | 948 | bundle2-output-part: "replycaps" 155 bytes payload |
|
956 | 949 | bundle2-output-part: "check:heads" streamed payload |
|
957 | 950 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
958 | 951 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
959 | 952 | bundle2-input-bundle: with-transaction |
|
960 | 953 | bundle2-input-part: "replycaps" supported |
|
961 | 954 | bundle2-input-part: total payload size 155 |
|
962 | 955 | bundle2-input-part: "check:heads" supported |
|
963 | 956 | bundle2-input-part: total payload size 20 |
|
964 | 957 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
965 | 958 | adding changesets |
|
966 | 959 | add changeset ef1ea85a6374 |
|
967 | 960 | add changeset f9cafe1212c8 |
|
968 | 961 | add changeset 911600dab2ae |
|
969 | 962 | adding manifests |
|
970 | 963 | adding file changes |
|
971 | 964 | adding foo/Bar/file.txt revisions |
|
972 | 965 | adding foo/file.txt revisions |
|
973 | 966 | adding quux/file.py revisions |
|
974 | 967 | added 3 changesets with 3 changes to 3 files |
|
975 | 968 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
976 | 969 | acl: checking access for user "betty" |
|
977 | 970 | acl: acl.allow.branches not enabled |
|
978 | 971 | acl: acl.deny.branches not enabled |
|
979 | 972 | acl: acl.allow enabled, 1 entries for user betty |
|
980 | 973 | acl: acl.deny enabled, 0 entries for user betty |
|
981 | 974 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
982 | 975 | acl: path access granted: "ef1ea85a6374" |
|
983 | 976 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
984 | 977 | acl: path access granted: "f9cafe1212c8" |
|
985 | 978 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
986 | 979 | error: pretxnchangegroup.acl hook failed: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
987 | 980 | bundle2-input-part: total payload size 1606 |
|
988 | 981 | bundle2-input-bundle: 3 parts total |
|
989 | 982 | transaction abort! |
|
990 | 983 | rollback completed |
|
991 | 984 | abort: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
992 | 985 | no rollback information available |
|
993 | 986 | 0:6675d58eff77 |
|
994 | 987 | |
|
995 | 988 | |
|
996 | 989 | acl.config can set only [acl.allow]/[acl.deny] |
|
997 | 990 | |
|
998 | 991 | $ echo '[hooks]' >> acl.config |
|
999 | 992 | $ echo 'changegroup.acl = false' >> acl.config |
|
1000 | 993 | $ do_push barney |
|
1001 | 994 | Pushing as user barney |
|
1002 | 995 | hgrc = """ |
|
1003 | 996 | [hooks] |
|
1004 | 997 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1005 | 998 | [acl] |
|
1006 | 999 | sources = push |
|
1007 | 1000 | [acl.allow] |
|
1008 | 1001 | foo/** = fred |
|
1009 | 1002 | [acl.deny] |
|
1010 | 1003 | foo/bar/** = fred |
|
1011 | 1004 | foo/Bar/** = fred |
|
1012 | 1005 | [acl.allow] |
|
1013 | 1006 | ** = barney |
|
1014 | 1007 | **/*.txt = wilma |
|
1015 | 1008 | [acl] |
|
1016 | 1009 | config = ../acl.config |
|
1017 | 1010 | """ |
|
1018 | 1011 | acl.config = """ |
|
1019 | 1012 | [acl.allow] |
|
1020 | 1013 | foo/** = betty |
|
1021 | 1014 | [hooks] |
|
1022 | 1015 | changegroup.acl = false |
|
1023 | 1016 | """ |
|
1024 | 1017 | pushing to ../b |
|
1025 | 1018 | query 1; heads |
|
1026 | 1019 | searching for changes |
|
1027 | 1020 | all remote heads known locally |
|
1028 | 1021 | listing keys for "phases" |
|
1029 | 1022 | checking for updated bookmarks |
|
1030 | 1023 | listing keys for "bookmarks" |
|
1031 | 1024 | invalid branchheads cache (served): tip differs |
|
1032 | 1025 | listing keys for "bookmarks" |
|
1033 | 1026 | 3 changesets found |
|
1034 | 1027 | list of changesets: |
|
1035 | 1028 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1036 | 1029 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1037 | 1030 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1038 | 1031 | bundle2-output-bundle: "HG20", 4 parts total |
|
1039 | 1032 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1040 | 1033 | bundle2-output-part: "check:heads" streamed payload |
|
1041 | 1034 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1042 | 1035 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1043 | 1036 | bundle2-input-bundle: with-transaction |
|
1044 | 1037 | bundle2-input-part: "replycaps" supported |
|
1045 | 1038 | bundle2-input-part: total payload size 155 |
|
1046 | 1039 | bundle2-input-part: "check:heads" supported |
|
1047 | 1040 | bundle2-input-part: total payload size 20 |
|
1048 | 1041 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1049 | 1042 | adding changesets |
|
1050 | 1043 | add changeset ef1ea85a6374 |
|
1051 | 1044 | add changeset f9cafe1212c8 |
|
1052 | 1045 | add changeset 911600dab2ae |
|
1053 | 1046 | adding manifests |
|
1054 | 1047 | adding file changes |
|
1055 | 1048 | adding foo/Bar/file.txt revisions |
|
1056 | 1049 | adding foo/file.txt revisions |
|
1057 | 1050 | adding quux/file.py revisions |
|
1058 | 1051 | added 3 changesets with 3 changes to 3 files |
|
1059 | 1052 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1060 | 1053 | acl: checking access for user "barney" |
|
1061 | 1054 | acl: acl.allow.branches not enabled |
|
1062 | 1055 | acl: acl.deny.branches not enabled |
|
1063 | 1056 | acl: acl.allow enabled, 1 entries for user barney |
|
1064 | 1057 | acl: acl.deny enabled, 0 entries for user barney |
|
1065 | 1058 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1066 | 1059 | acl: path access granted: "ef1ea85a6374" |
|
1067 | 1060 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1068 | 1061 | acl: path access granted: "f9cafe1212c8" |
|
1069 | 1062 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1070 | 1063 | acl: path access granted: "911600dab2ae" |
|
1071 | 1064 | bundle2-input-part: total payload size 1606 |
|
1072 | 1065 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1073 | 1066 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1074 | 1067 | bundle2-input-bundle: 3 parts total |
|
1075 | 1068 | updating the branch cache |
|
1076 | 1069 | bundle2-output-bundle: "HG20", 2 parts total |
|
1077 | 1070 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1078 | 1071 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1079 | 1072 | bundle2-input-bundle: with-transaction |
|
1080 | 1073 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1081 | 1074 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1082 | 1075 | bundle2-input-bundle: 1 parts total |
|
1083 | 1076 | listing keys for "phases" |
|
1084 | 1077 | repository tip rolled back to revision 0 (undo push) |
|
1085 | 1078 | 0:6675d58eff77 |
|
1086 | 1079 | |
|
1087 | 1080 | |
|
1088 | 1081 | asterisk |
|
1089 | 1082 | |
|
1090 | 1083 | $ init_config |
|
1091 | 1084 | |
|
1092 | 1085 | asterisk test |
|
1093 | 1086 | |
|
1094 | 1087 | $ echo '[acl.allow]' >> $config |
|
1095 | 1088 | $ echo "** = fred" >> $config |
|
1096 | 1089 | |
|
1097 | 1090 | fred is always allowed |
|
1098 | 1091 | |
|
1099 | 1092 | $ do_push fred |
|
1100 | 1093 | Pushing as user fred |
|
1101 | 1094 | hgrc = """ |
|
1102 | 1095 | [hooks] |
|
1103 | 1096 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1104 | 1097 | [acl] |
|
1105 | 1098 | sources = push |
|
1106 | 1099 | [extensions] |
|
1107 | 1100 | [acl.allow] |
|
1108 | 1101 | ** = fred |
|
1109 | 1102 | """ |
|
1110 | 1103 | pushing to ../b |
|
1111 | 1104 | query 1; heads |
|
1112 | 1105 | searching for changes |
|
1113 | 1106 | all remote heads known locally |
|
1114 | 1107 | listing keys for "phases" |
|
1115 | 1108 | checking for updated bookmarks |
|
1116 | 1109 | listing keys for "bookmarks" |
|
1117 | 1110 | invalid branchheads cache (served): tip differs |
|
1118 | 1111 | listing keys for "bookmarks" |
|
1119 | 1112 | 3 changesets found |
|
1120 | 1113 | list of changesets: |
|
1121 | 1114 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1122 | 1115 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1123 | 1116 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1124 | 1117 | bundle2-output-bundle: "HG20", 4 parts total |
|
1125 | 1118 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1126 | 1119 | bundle2-output-part: "check:heads" streamed payload |
|
1127 | 1120 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1128 | 1121 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1129 | 1122 | bundle2-input-bundle: with-transaction |
|
1130 | 1123 | bundle2-input-part: "replycaps" supported |
|
1131 | 1124 | bundle2-input-part: total payload size 155 |
|
1132 | 1125 | bundle2-input-part: "check:heads" supported |
|
1133 | 1126 | bundle2-input-part: total payload size 20 |
|
1134 | 1127 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1135 | 1128 | adding changesets |
|
1136 | 1129 | add changeset ef1ea85a6374 |
|
1137 | 1130 | add changeset f9cafe1212c8 |
|
1138 | 1131 | add changeset 911600dab2ae |
|
1139 | 1132 | adding manifests |
|
1140 | 1133 | adding file changes |
|
1141 | 1134 | adding foo/Bar/file.txt revisions |
|
1142 | 1135 | adding foo/file.txt revisions |
|
1143 | 1136 | adding quux/file.py revisions |
|
1144 | 1137 | added 3 changesets with 3 changes to 3 files |
|
1145 | 1138 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1146 | 1139 | acl: checking access for user "fred" |
|
1147 | 1140 | acl: acl.allow.branches not enabled |
|
1148 | 1141 | acl: acl.deny.branches not enabled |
|
1149 | 1142 | acl: acl.allow enabled, 1 entries for user fred |
|
1150 | 1143 | acl: acl.deny not enabled |
|
1151 | 1144 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1152 | 1145 | acl: path access granted: "ef1ea85a6374" |
|
1153 | 1146 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1154 | 1147 | acl: path access granted: "f9cafe1212c8" |
|
1155 | 1148 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1156 | 1149 | acl: path access granted: "911600dab2ae" |
|
1157 | 1150 | bundle2-input-part: total payload size 1606 |
|
1158 | 1151 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1159 | 1152 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1160 | 1153 | bundle2-input-bundle: 3 parts total |
|
1161 | 1154 | updating the branch cache |
|
1162 | 1155 | bundle2-output-bundle: "HG20", 2 parts total |
|
1163 | 1156 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1164 | 1157 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1165 | 1158 | bundle2-input-bundle: with-transaction |
|
1166 | 1159 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1167 | 1160 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1168 | 1161 | bundle2-input-bundle: 1 parts total |
|
1169 | 1162 | listing keys for "phases" |
|
1170 | 1163 | repository tip rolled back to revision 0 (undo push) |
|
1171 | 1164 | 0:6675d58eff77 |
|
1172 | 1165 | |
|
1173 | 1166 | |
|
1174 | 1167 | $ echo '[acl.deny]' >> $config |
|
1175 | 1168 | $ echo "foo/Bar/** = *" >> $config |
|
1176 | 1169 | |
|
1177 | 1170 | no one is allowed inside foo/Bar/ |
|
1178 | 1171 | |
|
1179 | 1172 | $ do_push fred |
|
1180 | 1173 | Pushing as user fred |
|
1181 | 1174 | hgrc = """ |
|
1182 | 1175 | [hooks] |
|
1183 | 1176 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1184 | 1177 | [acl] |
|
1185 | 1178 | sources = push |
|
1186 | 1179 | [extensions] |
|
1187 | 1180 | [acl.allow] |
|
1188 | 1181 | ** = fred |
|
1189 | 1182 | [acl.deny] |
|
1190 | 1183 | foo/Bar/** = * |
|
1191 | 1184 | """ |
|
1192 | 1185 | pushing to ../b |
|
1193 | 1186 | query 1; heads |
|
1194 | 1187 | searching for changes |
|
1195 | 1188 | all remote heads known locally |
|
1196 | 1189 | listing keys for "phases" |
|
1197 | 1190 | checking for updated bookmarks |
|
1198 | 1191 | listing keys for "bookmarks" |
|
1199 | 1192 | invalid branchheads cache (served): tip differs |
|
1200 | 1193 | listing keys for "bookmarks" |
|
1201 | 1194 | 3 changesets found |
|
1202 | 1195 | list of changesets: |
|
1203 | 1196 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1204 | 1197 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1205 | 1198 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1206 | 1199 | bundle2-output-bundle: "HG20", 4 parts total |
|
1207 | 1200 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1208 | 1201 | bundle2-output-part: "check:heads" streamed payload |
|
1209 | 1202 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1210 | 1203 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1211 | 1204 | bundle2-input-bundle: with-transaction |
|
1212 | 1205 | bundle2-input-part: "replycaps" supported |
|
1213 | 1206 | bundle2-input-part: total payload size 155 |
|
1214 | 1207 | bundle2-input-part: "check:heads" supported |
|
1215 | 1208 | bundle2-input-part: total payload size 20 |
|
1216 | 1209 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1217 | 1210 | adding changesets |
|
1218 | 1211 | add changeset ef1ea85a6374 |
|
1219 | 1212 | add changeset f9cafe1212c8 |
|
1220 | 1213 | add changeset 911600dab2ae |
|
1221 | 1214 | adding manifests |
|
1222 | 1215 | adding file changes |
|
1223 | 1216 | adding foo/Bar/file.txt revisions |
|
1224 | 1217 | adding foo/file.txt revisions |
|
1225 | 1218 | adding quux/file.py revisions |
|
1226 | 1219 | added 3 changesets with 3 changes to 3 files |
|
1227 | 1220 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1228 | 1221 | acl: checking access for user "fred" |
|
1229 | 1222 | acl: acl.allow.branches not enabled |
|
1230 | 1223 | acl: acl.deny.branches not enabled |
|
1231 | 1224 | acl: acl.allow enabled, 1 entries for user fred |
|
1232 | 1225 | acl: acl.deny enabled, 1 entries for user fred |
|
1233 | 1226 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1234 | 1227 | acl: path access granted: "ef1ea85a6374" |
|
1235 | 1228 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1236 | 1229 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
1237 | 1230 | bundle2-input-part: total payload size 1606 |
|
1238 | 1231 | bundle2-input-bundle: 3 parts total |
|
1239 | 1232 | transaction abort! |
|
1240 | 1233 | rollback completed |
|
1241 | 1234 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
1242 | 1235 | no rollback information available |
|
1243 | 1236 | 0:6675d58eff77 |
|
1244 | 1237 | |
|
1245 | 1238 | |
|
1246 | 1239 | Groups |
|
1247 | 1240 | |
|
1248 | 1241 | $ init_config |
|
1249 | 1242 | |
|
1250 | 1243 | OS-level groups |
|
1251 | 1244 | |
|
1252 | 1245 | $ echo '[acl.allow]' >> $config |
|
1253 | 1246 | $ echo "** = @group1" >> $config |
|
1254 | 1247 | |
|
1255 | 1248 | @group1 is always allowed |
|
1256 | 1249 | |
|
1257 | 1250 | $ do_push fred |
|
1258 | 1251 | Pushing as user fred |
|
1259 | 1252 | hgrc = """ |
|
1260 | 1253 | [hooks] |
|
1261 | 1254 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1262 | 1255 | [acl] |
|
1263 | 1256 | sources = push |
|
1264 | 1257 | [extensions] |
|
1265 | 1258 | [acl.allow] |
|
1266 | 1259 | ** = @group1 |
|
1267 | 1260 | """ |
|
1268 | 1261 | pushing to ../b |
|
1269 | 1262 | query 1; heads |
|
1270 | 1263 | searching for changes |
|
1271 | 1264 | all remote heads known locally |
|
1272 | 1265 | listing keys for "phases" |
|
1273 | 1266 | checking for updated bookmarks |
|
1274 | 1267 | listing keys for "bookmarks" |
|
1275 | 1268 | invalid branchheads cache (served): tip differs |
|
1276 | 1269 | listing keys for "bookmarks" |
|
1277 | 1270 | 3 changesets found |
|
1278 | 1271 | list of changesets: |
|
1279 | 1272 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1280 | 1273 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1281 | 1274 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1282 | 1275 | bundle2-output-bundle: "HG20", 4 parts total |
|
1283 | 1276 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1284 | 1277 | bundle2-output-part: "check:heads" streamed payload |
|
1285 | 1278 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1286 | 1279 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1287 | 1280 | bundle2-input-bundle: with-transaction |
|
1288 | 1281 | bundle2-input-part: "replycaps" supported |
|
1289 | 1282 | bundle2-input-part: total payload size 155 |
|
1290 | 1283 | bundle2-input-part: "check:heads" supported |
|
1291 | 1284 | bundle2-input-part: total payload size 20 |
|
1292 | 1285 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1293 | 1286 | adding changesets |
|
1294 | 1287 | add changeset ef1ea85a6374 |
|
1295 | 1288 | add changeset f9cafe1212c8 |
|
1296 | 1289 | add changeset 911600dab2ae |
|
1297 | 1290 | adding manifests |
|
1298 | 1291 | adding file changes |
|
1299 | 1292 | adding foo/Bar/file.txt revisions |
|
1300 | 1293 | adding foo/file.txt revisions |
|
1301 | 1294 | adding quux/file.py revisions |
|
1302 | 1295 | added 3 changesets with 3 changes to 3 files |
|
1303 | 1296 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1304 | 1297 | acl: checking access for user "fred" |
|
1305 | 1298 | acl: acl.allow.branches not enabled |
|
1306 | 1299 | acl: acl.deny.branches not enabled |
|
1307 | 1300 | acl: "group1" not defined in [acl.groups] |
|
1308 | 1301 | acl: acl.allow enabled, 1 entries for user fred |
|
1309 | 1302 | acl: acl.deny not enabled |
|
1310 | 1303 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1311 | 1304 | acl: path access granted: "ef1ea85a6374" |
|
1312 | 1305 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1313 | 1306 | acl: path access granted: "f9cafe1212c8" |
|
1314 | 1307 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1315 | 1308 | acl: path access granted: "911600dab2ae" |
|
1316 | 1309 | bundle2-input-part: total payload size 1606 |
|
1317 | 1310 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1318 | 1311 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1319 | 1312 | bundle2-input-bundle: 3 parts total |
|
1320 | 1313 | updating the branch cache |
|
1321 | 1314 | bundle2-output-bundle: "HG20", 2 parts total |
|
1322 | 1315 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1323 | 1316 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1324 | 1317 | bundle2-input-bundle: with-transaction |
|
1325 | 1318 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1326 | 1319 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1327 | 1320 | bundle2-input-bundle: 1 parts total |
|
1328 | 1321 | listing keys for "phases" |
|
1329 | 1322 | repository tip rolled back to revision 0 (undo push) |
|
1330 | 1323 | 0:6675d58eff77 |
|
1331 | 1324 | |
|
1332 | 1325 | |
|
1333 | 1326 | $ echo '[acl.deny]' >> $config |
|
1334 | 1327 | $ echo "foo/Bar/** = @group1" >> $config |
|
1335 | 1328 | |
|
1336 | 1329 | @group is allowed inside anything but foo/Bar/ |
|
1337 | 1330 | |
|
1338 | 1331 | $ do_push fred |
|
1339 | 1332 | Pushing as user fred |
|
1340 | 1333 | hgrc = """ |
|
1341 | 1334 | [hooks] |
|
1342 | 1335 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1343 | 1336 | [acl] |
|
1344 | 1337 | sources = push |
|
1345 | 1338 | [extensions] |
|
1346 | 1339 | [acl.allow] |
|
1347 | 1340 | ** = @group1 |
|
1348 | 1341 | [acl.deny] |
|
1349 | 1342 | foo/Bar/** = @group1 |
|
1350 | 1343 | """ |
|
1351 | 1344 | pushing to ../b |
|
1352 | 1345 | query 1; heads |
|
1353 | 1346 | searching for changes |
|
1354 | 1347 | all remote heads known locally |
|
1355 | 1348 | listing keys for "phases" |
|
1356 | 1349 | checking for updated bookmarks |
|
1357 | 1350 | listing keys for "bookmarks" |
|
1358 | 1351 | invalid branchheads cache (served): tip differs |
|
1359 | 1352 | listing keys for "bookmarks" |
|
1360 | 1353 | 3 changesets found |
|
1361 | 1354 | list of changesets: |
|
1362 | 1355 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1363 | 1356 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1364 | 1357 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1365 | 1358 | bundle2-output-bundle: "HG20", 4 parts total |
|
1366 | 1359 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1367 | 1360 | bundle2-output-part: "check:heads" streamed payload |
|
1368 | 1361 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1369 | 1362 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1370 | 1363 | bundle2-input-bundle: with-transaction |
|
1371 | 1364 | bundle2-input-part: "replycaps" supported |
|
1372 | 1365 | bundle2-input-part: total payload size 155 |
|
1373 | 1366 | bundle2-input-part: "check:heads" supported |
|
1374 | 1367 | bundle2-input-part: total payload size 20 |
|
1375 | 1368 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1376 | 1369 | adding changesets |
|
1377 | 1370 | add changeset ef1ea85a6374 |
|
1378 | 1371 | add changeset f9cafe1212c8 |
|
1379 | 1372 | add changeset 911600dab2ae |
|
1380 | 1373 | adding manifests |
|
1381 | 1374 | adding file changes |
|
1382 | 1375 | adding foo/Bar/file.txt revisions |
|
1383 | 1376 | adding foo/file.txt revisions |
|
1384 | 1377 | adding quux/file.py revisions |
|
1385 | 1378 | added 3 changesets with 3 changes to 3 files |
|
1386 | 1379 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1387 | 1380 | acl: checking access for user "fred" |
|
1388 | 1381 | acl: acl.allow.branches not enabled |
|
1389 | 1382 | acl: acl.deny.branches not enabled |
|
1390 | 1383 | acl: "group1" not defined in [acl.groups] |
|
1391 | 1384 | acl: acl.allow enabled, 1 entries for user fred |
|
1392 | 1385 | acl: "group1" not defined in [acl.groups] |
|
1393 | 1386 | acl: acl.deny enabled, 1 entries for user fred |
|
1394 | 1387 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1395 | 1388 | acl: path access granted: "ef1ea85a6374" |
|
1396 | 1389 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1397 | 1390 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
1398 | 1391 | bundle2-input-part: total payload size 1606 |
|
1399 | 1392 | bundle2-input-bundle: 3 parts total |
|
1400 | 1393 | transaction abort! |
|
1401 | 1394 | rollback completed |
|
1402 | 1395 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
1403 | 1396 | no rollback information available |
|
1404 | 1397 | 0:6675d58eff77 |
|
1405 | 1398 | |
|
1406 | 1399 | |
|
1407 | 1400 | Invalid group |
|
1408 | 1401 | |
|
1409 | 1402 | Disable the fakegroups trick to get real failures |
|
1410 | 1403 | |
|
1411 | 1404 | $ grep -v fakegroups $config > config.tmp |
|
1412 | 1405 | $ mv config.tmp $config |
|
1413 | 1406 | $ echo '[acl.allow]' >> $config |
|
1414 | 1407 | $ echo "** = @unlikelytoexist" >> $config |
|
1415 | 1408 | $ do_push fred 2>&1 | grep unlikelytoexist |
|
1416 | 1409 | ** = @unlikelytoexist |
|
1417 | 1410 | acl: "unlikelytoexist" not defined in [acl.groups] |
|
1418 | 1411 | error: pretxnchangegroup.acl hook failed: group 'unlikelytoexist' is undefined |
|
1419 | 1412 | abort: group 'unlikelytoexist' is undefined |
|
1420 | 1413 | |
|
1421 | 1414 | |
|
1422 | 1415 | Branch acl tests setup |
|
1423 | 1416 | |
|
1424 | 1417 | $ init_config |
|
1425 | 1418 | $ cd b |
|
1426 | 1419 | $ hg up |
|
1427 | 1420 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1428 | 1421 | $ hg branch foobar |
|
1429 | 1422 | marked working directory as branch foobar |
|
1430 | 1423 | (branches are permanent and global, did you want a bookmark?) |
|
1431 | 1424 | $ hg commit -m 'create foobar' |
|
1432 | 1425 | $ echo 'foo contents' > abc.txt |
|
1433 | 1426 | $ hg add abc.txt |
|
1434 | 1427 | $ hg commit -m 'foobar contents' |
|
1435 | 1428 | $ cd .. |
|
1436 | 1429 | $ hg --cwd a pull ../b |
|
1437 | 1430 | pulling from ../b |
|
1438 | 1431 | searching for changes |
|
1439 | 1432 | adding changesets |
|
1440 | 1433 | adding manifests |
|
1441 | 1434 | adding file changes |
|
1442 | 1435 | added 2 changesets with 1 changes to 1 files (+1 heads) |
|
1443 | 1436 | (run 'hg heads' to see heads) |
|
1444 | 1437 | |
|
1445 | 1438 | Create additional changeset on foobar branch |
|
1446 | 1439 | |
|
1447 | 1440 | $ cd a |
|
1448 | 1441 | $ hg up -C foobar |
|
1449 | 1442 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1450 | 1443 | $ echo 'foo contents2' > abc.txt |
|
1451 | 1444 | $ hg commit -m 'foobar contents2' |
|
1452 | 1445 | $ cd .. |
|
1453 | 1446 | |
|
1454 | 1447 | |
|
1455 | 1448 | No branch acls specified |
|
1456 | 1449 | |
|
1457 | 1450 | $ do_push astro |
|
1458 | 1451 | Pushing as user astro |
|
1459 | 1452 | hgrc = """ |
|
1460 | 1453 | [hooks] |
|
1461 | 1454 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1462 | 1455 | [acl] |
|
1463 | 1456 | sources = push |
|
1464 | 1457 | [extensions] |
|
1465 | 1458 | """ |
|
1466 | 1459 | pushing to ../b |
|
1467 | 1460 | query 1; heads |
|
1468 | 1461 | searching for changes |
|
1469 | 1462 | all remote heads known locally |
|
1470 | 1463 | listing keys for "phases" |
|
1471 | 1464 | checking for updated bookmarks |
|
1472 | 1465 | listing keys for "bookmarks" |
|
1473 | 1466 | listing keys for "bookmarks" |
|
1474 | 1467 | 4 changesets found |
|
1475 | 1468 | list of changesets: |
|
1476 | 1469 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1477 | 1470 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1478 | 1471 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1479 | 1472 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1480 | 1473 | bundle2-output-bundle: "HG20", 5 parts total |
|
1481 | 1474 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1482 | 1475 | bundle2-output-part: "check:heads" streamed payload |
|
1483 | 1476 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1484 | 1477 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1485 | 1478 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1486 | 1479 | bundle2-input-bundle: with-transaction |
|
1487 | 1480 | bundle2-input-part: "replycaps" supported |
|
1488 | 1481 | bundle2-input-part: total payload size 155 |
|
1489 | 1482 | bundle2-input-part: "check:heads" supported |
|
1490 | 1483 | bundle2-input-part: total payload size 20 |
|
1491 | 1484 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1492 | 1485 | adding changesets |
|
1493 | 1486 | add changeset ef1ea85a6374 |
|
1494 | 1487 | add changeset f9cafe1212c8 |
|
1495 | 1488 | add changeset 911600dab2ae |
|
1496 | 1489 | add changeset e8fc755d4d82 |
|
1497 | 1490 | adding manifests |
|
1498 | 1491 | adding file changes |
|
1499 | 1492 | adding abc.txt revisions |
|
1500 | 1493 | adding foo/Bar/file.txt revisions |
|
1501 | 1494 | adding foo/file.txt revisions |
|
1502 | 1495 | adding quux/file.py revisions |
|
1503 | 1496 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1504 | 1497 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1505 | 1498 | acl: checking access for user "astro" |
|
1506 | 1499 | acl: acl.allow.branches not enabled |
|
1507 | 1500 | acl: acl.deny.branches not enabled |
|
1508 | 1501 | acl: acl.allow not enabled |
|
1509 | 1502 | acl: acl.deny not enabled |
|
1510 | 1503 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1511 | 1504 | acl: path access granted: "ef1ea85a6374" |
|
1512 | 1505 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1513 | 1506 | acl: path access granted: "f9cafe1212c8" |
|
1514 | 1507 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1515 | 1508 | acl: path access granted: "911600dab2ae" |
|
1516 | 1509 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" |
|
1517 | 1510 | acl: path access granted: "e8fc755d4d82" |
|
1518 | 1511 | bundle2-input-part: total payload size 2101 |
|
1519 | 1512 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1520 | 1513 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1521 | 1514 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1522 | 1515 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" |
|
1523 | 1516 | bundle2-input-bundle: 4 parts total |
|
1524 | 1517 | updating the branch cache |
|
1525 | 1518 | bundle2-output-bundle: "HG20", 3 parts total |
|
1526 | 1519 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1527 | 1520 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1528 | 1521 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1529 | 1522 | bundle2-input-bundle: with-transaction |
|
1530 | 1523 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1531 | 1524 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1532 | 1525 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1533 | 1526 | bundle2-input-bundle: 2 parts total |
|
1534 | 1527 | listing keys for "phases" |
|
1535 | 1528 | repository tip rolled back to revision 2 (undo push) |
|
1536 | 1529 | 2:fb35475503ef |
|
1537 | 1530 | |
|
1538 | 1531 | |
|
1539 | 1532 | Branch acl deny test |
|
1540 | 1533 | |
|
1541 | 1534 | $ echo "[acl.deny.branches]" >> $config |
|
1542 | 1535 | $ echo "foobar = *" >> $config |
|
1543 | 1536 | $ do_push astro |
|
1544 | 1537 | Pushing as user astro |
|
1545 | 1538 | hgrc = """ |
|
1546 | 1539 | [hooks] |
|
1547 | 1540 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1548 | 1541 | [acl] |
|
1549 | 1542 | sources = push |
|
1550 | 1543 | [extensions] |
|
1551 | 1544 | [acl.deny.branches] |
|
1552 | 1545 | foobar = * |
|
1553 | 1546 | """ |
|
1554 | 1547 | pushing to ../b |
|
1555 | 1548 | query 1; heads |
|
1556 | 1549 | searching for changes |
|
1557 | 1550 | all remote heads known locally |
|
1558 | 1551 | listing keys for "phases" |
|
1559 | 1552 | checking for updated bookmarks |
|
1560 | 1553 | listing keys for "bookmarks" |
|
1561 | 1554 | listing keys for "bookmarks" |
|
1562 | 1555 | 4 changesets found |
|
1563 | 1556 | list of changesets: |
|
1564 | 1557 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1565 | 1558 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1566 | 1559 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1567 | 1560 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1568 | 1561 | bundle2-output-bundle: "HG20", 5 parts total |
|
1569 | 1562 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1570 | 1563 | bundle2-output-part: "check:heads" streamed payload |
|
1571 | 1564 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1572 | 1565 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1573 | 1566 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1574 | 1567 | bundle2-input-bundle: with-transaction |
|
1575 | 1568 | bundle2-input-part: "replycaps" supported |
|
1576 | 1569 | bundle2-input-part: total payload size 155 |
|
1577 | 1570 | bundle2-input-part: "check:heads" supported |
|
1578 | 1571 | bundle2-input-part: total payload size 20 |
|
1579 | 1572 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1580 | 1573 | adding changesets |
|
1581 | 1574 | add changeset ef1ea85a6374 |
|
1582 | 1575 | add changeset f9cafe1212c8 |
|
1583 | 1576 | add changeset 911600dab2ae |
|
1584 | 1577 | add changeset e8fc755d4d82 |
|
1585 | 1578 | adding manifests |
|
1586 | 1579 | adding file changes |
|
1587 | 1580 | adding abc.txt revisions |
|
1588 | 1581 | adding foo/Bar/file.txt revisions |
|
1589 | 1582 | adding foo/file.txt revisions |
|
1590 | 1583 | adding quux/file.py revisions |
|
1591 | 1584 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1592 | 1585 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1593 | 1586 | acl: checking access for user "astro" |
|
1594 | 1587 | acl: acl.allow.branches not enabled |
|
1595 | 1588 | acl: acl.deny.branches enabled, 1 entries for user astro |
|
1596 | 1589 | acl: acl.allow not enabled |
|
1597 | 1590 | acl: acl.deny not enabled |
|
1598 | 1591 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1599 | 1592 | acl: path access granted: "ef1ea85a6374" |
|
1600 | 1593 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1601 | 1594 | acl: path access granted: "f9cafe1212c8" |
|
1602 | 1595 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1603 | 1596 | acl: path access granted: "911600dab2ae" |
|
1604 | 1597 | error: pretxnchangegroup.acl hook failed: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82") |
|
1605 | 1598 | bundle2-input-part: total payload size 2101 |
|
1606 | 1599 | bundle2-input-bundle: 4 parts total |
|
1607 | 1600 | transaction abort! |
|
1608 | 1601 | rollback completed |
|
1609 | 1602 | abort: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82") |
|
1610 | 1603 | no rollback information available |
|
1611 | 1604 | 2:fb35475503ef |
|
1612 | 1605 | |
|
1613 | 1606 | |
|
1614 | 1607 | Branch acl empty allow test |
|
1615 | 1608 | |
|
1616 | 1609 | $ init_config |
|
1617 | 1610 | $ echo "[acl.allow.branches]" >> $config |
|
1618 | 1611 | $ do_push astro |
|
1619 | 1612 | Pushing as user astro |
|
1620 | 1613 | hgrc = """ |
|
1621 | 1614 | [hooks] |
|
1622 | 1615 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1623 | 1616 | [acl] |
|
1624 | 1617 | sources = push |
|
1625 | 1618 | [extensions] |
|
1626 | 1619 | [acl.allow.branches] |
|
1627 | 1620 | """ |
|
1628 | 1621 | pushing to ../b |
|
1629 | 1622 | query 1; heads |
|
1630 | 1623 | searching for changes |
|
1631 | 1624 | all remote heads known locally |
|
1632 | 1625 | listing keys for "phases" |
|
1633 | 1626 | checking for updated bookmarks |
|
1634 | 1627 | listing keys for "bookmarks" |
|
1635 | 1628 | listing keys for "bookmarks" |
|
1636 | 1629 | 4 changesets found |
|
1637 | 1630 | list of changesets: |
|
1638 | 1631 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1639 | 1632 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1640 | 1633 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1641 | 1634 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1642 | 1635 | bundle2-output-bundle: "HG20", 5 parts total |
|
1643 | 1636 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1644 | 1637 | bundle2-output-part: "check:heads" streamed payload |
|
1645 | 1638 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1646 | 1639 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1647 | 1640 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1648 | 1641 | bundle2-input-bundle: with-transaction |
|
1649 | 1642 | bundle2-input-part: "replycaps" supported |
|
1650 | 1643 | bundle2-input-part: total payload size 155 |
|
1651 | 1644 | bundle2-input-part: "check:heads" supported |
|
1652 | 1645 | bundle2-input-part: total payload size 20 |
|
1653 | 1646 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1654 | 1647 | adding changesets |
|
1655 | 1648 | add changeset ef1ea85a6374 |
|
1656 | 1649 | add changeset f9cafe1212c8 |
|
1657 | 1650 | add changeset 911600dab2ae |
|
1658 | 1651 | add changeset e8fc755d4d82 |
|
1659 | 1652 | adding manifests |
|
1660 | 1653 | adding file changes |
|
1661 | 1654 | adding abc.txt revisions |
|
1662 | 1655 | adding foo/Bar/file.txt revisions |
|
1663 | 1656 | adding foo/file.txt revisions |
|
1664 | 1657 | adding quux/file.py revisions |
|
1665 | 1658 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1666 | 1659 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1667 | 1660 | acl: checking access for user "astro" |
|
1668 | 1661 | acl: acl.allow.branches enabled, 0 entries for user astro |
|
1669 | 1662 | acl: acl.deny.branches not enabled |
|
1670 | 1663 | acl: acl.allow not enabled |
|
1671 | 1664 | acl: acl.deny not enabled |
|
1672 | 1665 | error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") |
|
1673 | 1666 | bundle2-input-part: total payload size 2101 |
|
1674 | 1667 | bundle2-input-bundle: 4 parts total |
|
1675 | 1668 | transaction abort! |
|
1676 | 1669 | rollback completed |
|
1677 | 1670 | abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") |
|
1678 | 1671 | no rollback information available |
|
1679 | 1672 | 2:fb35475503ef |
|
1680 | 1673 | |
|
1681 | 1674 | |
|
1682 | 1675 | Branch acl allow other |
|
1683 | 1676 | |
|
1684 | 1677 | $ init_config |
|
1685 | 1678 | $ echo "[acl.allow.branches]" >> $config |
|
1686 | 1679 | $ echo "* = george" >> $config |
|
1687 | 1680 | $ do_push astro |
|
1688 | 1681 | Pushing as user astro |
|
1689 | 1682 | hgrc = """ |
|
1690 | 1683 | [hooks] |
|
1691 | 1684 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1692 | 1685 | [acl] |
|
1693 | 1686 | sources = push |
|
1694 | 1687 | [extensions] |
|
1695 | 1688 | [acl.allow.branches] |
|
1696 | 1689 | * = george |
|
1697 | 1690 | """ |
|
1698 | 1691 | pushing to ../b |
|
1699 | 1692 | query 1; heads |
|
1700 | 1693 | searching for changes |
|
1701 | 1694 | all remote heads known locally |
|
1702 | 1695 | listing keys for "phases" |
|
1703 | 1696 | checking for updated bookmarks |
|
1704 | 1697 | listing keys for "bookmarks" |
|
1705 | 1698 | listing keys for "bookmarks" |
|
1706 | 1699 | 4 changesets found |
|
1707 | 1700 | list of changesets: |
|
1708 | 1701 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1709 | 1702 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1710 | 1703 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1711 | 1704 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1712 | 1705 | bundle2-output-bundle: "HG20", 5 parts total |
|
1713 | 1706 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1714 | 1707 | bundle2-output-part: "check:heads" streamed payload |
|
1715 | 1708 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1716 | 1709 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1717 | 1710 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1718 | 1711 | bundle2-input-bundle: with-transaction |
|
1719 | 1712 | bundle2-input-part: "replycaps" supported |
|
1720 | 1713 | bundle2-input-part: total payload size 155 |
|
1721 | 1714 | bundle2-input-part: "check:heads" supported |
|
1722 | 1715 | bundle2-input-part: total payload size 20 |
|
1723 | 1716 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1724 | 1717 | adding changesets |
|
1725 | 1718 | add changeset ef1ea85a6374 |
|
1726 | 1719 | add changeset f9cafe1212c8 |
|
1727 | 1720 | add changeset 911600dab2ae |
|
1728 | 1721 | add changeset e8fc755d4d82 |
|
1729 | 1722 | adding manifests |
|
1730 | 1723 | adding file changes |
|
1731 | 1724 | adding abc.txt revisions |
|
1732 | 1725 | adding foo/Bar/file.txt revisions |
|
1733 | 1726 | adding foo/file.txt revisions |
|
1734 | 1727 | adding quux/file.py revisions |
|
1735 | 1728 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1736 | 1729 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1737 | 1730 | acl: checking access for user "astro" |
|
1738 | 1731 | acl: acl.allow.branches enabled, 0 entries for user astro |
|
1739 | 1732 | acl: acl.deny.branches not enabled |
|
1740 | 1733 | acl: acl.allow not enabled |
|
1741 | 1734 | acl: acl.deny not enabled |
|
1742 | 1735 | error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") |
|
1743 | 1736 | bundle2-input-part: total payload size 2101 |
|
1744 | 1737 | bundle2-input-bundle: 4 parts total |
|
1745 | 1738 | transaction abort! |
|
1746 | 1739 | rollback completed |
|
1747 | 1740 | abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") |
|
1748 | 1741 | no rollback information available |
|
1749 | 1742 | 2:fb35475503ef |
|
1750 | 1743 | |
|
1751 | 1744 | $ do_push george |
|
1752 | 1745 | Pushing as user george |
|
1753 | 1746 | hgrc = """ |
|
1754 | 1747 | [hooks] |
|
1755 | 1748 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1756 | 1749 | [acl] |
|
1757 | 1750 | sources = push |
|
1758 | 1751 | [extensions] |
|
1759 | 1752 | [acl.allow.branches] |
|
1760 | 1753 | * = george |
|
1761 | 1754 | """ |
|
1762 | 1755 | pushing to ../b |
|
1763 | 1756 | query 1; heads |
|
1764 | 1757 | searching for changes |
|
1765 | 1758 | all remote heads known locally |
|
1766 | 1759 | listing keys for "phases" |
|
1767 | 1760 | checking for updated bookmarks |
|
1768 | 1761 | listing keys for "bookmarks" |
|
1769 | 1762 | listing keys for "bookmarks" |
|
1770 | 1763 | 4 changesets found |
|
1771 | 1764 | list of changesets: |
|
1772 | 1765 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1773 | 1766 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1774 | 1767 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1775 | 1768 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1776 | 1769 | bundle2-output-bundle: "HG20", 5 parts total |
|
1777 | 1770 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1778 | 1771 | bundle2-output-part: "check:heads" streamed payload |
|
1779 | 1772 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1780 | 1773 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1781 | 1774 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1782 | 1775 | bundle2-input-bundle: with-transaction |
|
1783 | 1776 | bundle2-input-part: "replycaps" supported |
|
1784 | 1777 | bundle2-input-part: total payload size 155 |
|
1785 | 1778 | bundle2-input-part: "check:heads" supported |
|
1786 | 1779 | bundle2-input-part: total payload size 20 |
|
1787 | 1780 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1788 | 1781 | adding changesets |
|
1789 | 1782 | add changeset ef1ea85a6374 |
|
1790 | 1783 | add changeset f9cafe1212c8 |
|
1791 | 1784 | add changeset 911600dab2ae |
|
1792 | 1785 | add changeset e8fc755d4d82 |
|
1793 | 1786 | adding manifests |
|
1794 | 1787 | adding file changes |
|
1795 | 1788 | adding abc.txt revisions |
|
1796 | 1789 | adding foo/Bar/file.txt revisions |
|
1797 | 1790 | adding foo/file.txt revisions |
|
1798 | 1791 | adding quux/file.py revisions |
|
1799 | 1792 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1800 | 1793 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1801 | 1794 | acl: checking access for user "george" |
|
1802 | 1795 | acl: acl.allow.branches enabled, 1 entries for user george |
|
1803 | 1796 | acl: acl.deny.branches not enabled |
|
1804 | 1797 | acl: acl.allow not enabled |
|
1805 | 1798 | acl: acl.deny not enabled |
|
1806 | 1799 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1807 | 1800 | acl: path access granted: "ef1ea85a6374" |
|
1808 | 1801 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1809 | 1802 | acl: path access granted: "f9cafe1212c8" |
|
1810 | 1803 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1811 | 1804 | acl: path access granted: "911600dab2ae" |
|
1812 | 1805 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" |
|
1813 | 1806 | acl: path access granted: "e8fc755d4d82" |
|
1814 | 1807 | bundle2-input-part: total payload size 2101 |
|
1815 | 1808 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1816 | 1809 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1817 | 1810 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1818 | 1811 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" |
|
1819 | 1812 | bundle2-input-bundle: 4 parts total |
|
1820 | 1813 | updating the branch cache |
|
1821 | 1814 | bundle2-output-bundle: "HG20", 3 parts total |
|
1822 | 1815 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1823 | 1816 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1824 | 1817 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1825 | 1818 | bundle2-input-bundle: with-transaction |
|
1826 | 1819 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1827 | 1820 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1828 | 1821 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1829 | 1822 | bundle2-input-bundle: 2 parts total |
|
1830 | 1823 | listing keys for "phases" |
|
1831 | 1824 | repository tip rolled back to revision 2 (undo push) |
|
1832 | 1825 | 2:fb35475503ef |
|
1833 | 1826 | |
|
1834 | 1827 | |
|
1835 | 1828 | Branch acl conflicting allow |
|
1836 | 1829 | asterisk ends up applying to all branches and allowing george to |
|
1837 | 1830 | push foobar into the remote |
|
1838 | 1831 | |
|
1839 | 1832 | $ init_config |
|
1840 | 1833 | $ echo "[acl.allow.branches]" >> $config |
|
1841 | 1834 | $ echo "foobar = astro" >> $config |
|
1842 | 1835 | $ echo "* = george" >> $config |
|
1843 | 1836 | $ do_push george |
|
1844 | 1837 | Pushing as user george |
|
1845 | 1838 | hgrc = """ |
|
1846 | 1839 | [hooks] |
|
1847 | 1840 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1848 | 1841 | [acl] |
|
1849 | 1842 | sources = push |
|
1850 | 1843 | [extensions] |
|
1851 | 1844 | [acl.allow.branches] |
|
1852 | 1845 | foobar = astro |
|
1853 | 1846 | * = george |
|
1854 | 1847 | """ |
|
1855 | 1848 | pushing to ../b |
|
1856 | 1849 | query 1; heads |
|
1857 | 1850 | searching for changes |
|
1858 | 1851 | all remote heads known locally |
|
1859 | 1852 | listing keys for "phases" |
|
1860 | 1853 | checking for updated bookmarks |
|
1861 | 1854 | listing keys for "bookmarks" |
|
1862 | 1855 | listing keys for "bookmarks" |
|
1863 | 1856 | 4 changesets found |
|
1864 | 1857 | list of changesets: |
|
1865 | 1858 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1866 | 1859 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1867 | 1860 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1868 | 1861 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1869 | 1862 | bundle2-output-bundle: "HG20", 5 parts total |
|
1870 | 1863 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1871 | 1864 | bundle2-output-part: "check:heads" streamed payload |
|
1872 | 1865 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1873 | 1866 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1874 | 1867 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1875 | 1868 | bundle2-input-bundle: with-transaction |
|
1876 | 1869 | bundle2-input-part: "replycaps" supported |
|
1877 | 1870 | bundle2-input-part: total payload size 155 |
|
1878 | 1871 | bundle2-input-part: "check:heads" supported |
|
1879 | 1872 | bundle2-input-part: total payload size 20 |
|
1880 | 1873 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1881 | 1874 | adding changesets |
|
1882 | 1875 | add changeset ef1ea85a6374 |
|
1883 | 1876 | add changeset f9cafe1212c8 |
|
1884 | 1877 | add changeset 911600dab2ae |
|
1885 | 1878 | add changeset e8fc755d4d82 |
|
1886 | 1879 | adding manifests |
|
1887 | 1880 | adding file changes |
|
1888 | 1881 | adding abc.txt revisions |
|
1889 | 1882 | adding foo/Bar/file.txt revisions |
|
1890 | 1883 | adding foo/file.txt revisions |
|
1891 | 1884 | adding quux/file.py revisions |
|
1892 | 1885 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1893 | 1886 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1894 | 1887 | acl: checking access for user "george" |
|
1895 | 1888 | acl: acl.allow.branches enabled, 1 entries for user george |
|
1896 | 1889 | acl: acl.deny.branches not enabled |
|
1897 | 1890 | acl: acl.allow not enabled |
|
1898 | 1891 | acl: acl.deny not enabled |
|
1899 | 1892 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1900 | 1893 | acl: path access granted: "ef1ea85a6374" |
|
1901 | 1894 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1902 | 1895 | acl: path access granted: "f9cafe1212c8" |
|
1903 | 1896 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1904 | 1897 | acl: path access granted: "911600dab2ae" |
|
1905 | 1898 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" |
|
1906 | 1899 | acl: path access granted: "e8fc755d4d82" |
|
1907 | 1900 | bundle2-input-part: total payload size 2101 |
|
1908 | 1901 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1909 | 1902 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1910 | 1903 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1911 | 1904 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" |
|
1912 | 1905 | bundle2-input-bundle: 4 parts total |
|
1913 | 1906 | updating the branch cache |
|
1914 | 1907 | bundle2-output-bundle: "HG20", 3 parts total |
|
1915 | 1908 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1916 | 1909 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1917 | 1910 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1918 | 1911 | bundle2-input-bundle: with-transaction |
|
1919 | 1912 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1920 | 1913 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1921 | 1914 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1922 | 1915 | bundle2-input-bundle: 2 parts total |
|
1923 | 1916 | listing keys for "phases" |
|
1924 | 1917 | repository tip rolled back to revision 2 (undo push) |
|
1925 | 1918 | 2:fb35475503ef |
|
1926 | 1919 | |
|
1927 | 1920 | Branch acl conflicting deny |
|
1928 | 1921 | |
|
1929 | 1922 | $ init_config |
|
1930 | 1923 | $ echo "[acl.deny.branches]" >> $config |
|
1931 | 1924 | $ echo "foobar = astro" >> $config |
|
1932 | 1925 | $ echo "default = astro" >> $config |
|
1933 | 1926 | $ echo "* = george" >> $config |
|
1934 | 1927 | $ do_push george |
|
1935 | 1928 | Pushing as user george |
|
1936 | 1929 | hgrc = """ |
|
1937 | 1930 | [hooks] |
|
1938 | 1931 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1939 | 1932 | [acl] |
|
1940 | 1933 | sources = push |
|
1941 | 1934 | [extensions] |
|
1942 | 1935 | [acl.deny.branches] |
|
1943 | 1936 | foobar = astro |
|
1944 | 1937 | default = astro |
|
1945 | 1938 | * = george |
|
1946 | 1939 | """ |
|
1947 | 1940 | pushing to ../b |
|
1948 | 1941 | query 1; heads |
|
1949 | 1942 | searching for changes |
|
1950 | 1943 | all remote heads known locally |
|
1951 | 1944 | listing keys for "phases" |
|
1952 | 1945 | checking for updated bookmarks |
|
1953 | 1946 | listing keys for "bookmarks" |
|
1954 | 1947 | listing keys for "bookmarks" |
|
1955 | 1948 | 4 changesets found |
|
1956 | 1949 | list of changesets: |
|
1957 | 1950 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1958 | 1951 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1959 | 1952 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1960 | 1953 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1961 | 1954 | bundle2-output-bundle: "HG20", 5 parts total |
|
1962 | 1955 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1963 | 1956 | bundle2-output-part: "check:heads" streamed payload |
|
1964 | 1957 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1965 | 1958 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1966 | 1959 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1967 | 1960 | bundle2-input-bundle: with-transaction |
|
1968 | 1961 | bundle2-input-part: "replycaps" supported |
|
1969 | 1962 | bundle2-input-part: total payload size 155 |
|
1970 | 1963 | bundle2-input-part: "check:heads" supported |
|
1971 | 1964 | bundle2-input-part: total payload size 20 |
|
1972 | 1965 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1973 | 1966 | adding changesets |
|
1974 | 1967 | add changeset ef1ea85a6374 |
|
1975 | 1968 | add changeset f9cafe1212c8 |
|
1976 | 1969 | add changeset 911600dab2ae |
|
1977 | 1970 | add changeset e8fc755d4d82 |
|
1978 | 1971 | adding manifests |
|
1979 | 1972 | adding file changes |
|
1980 | 1973 | adding abc.txt revisions |
|
1981 | 1974 | adding foo/Bar/file.txt revisions |
|
1982 | 1975 | adding foo/file.txt revisions |
|
1983 | 1976 | adding quux/file.py revisions |
|
1984 | 1977 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1985 | 1978 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1986 | 1979 | acl: checking access for user "george" |
|
1987 | 1980 | acl: acl.allow.branches not enabled |
|
1988 | 1981 | acl: acl.deny.branches enabled, 1 entries for user george |
|
1989 | 1982 | acl: acl.allow not enabled |
|
1990 | 1983 | acl: acl.deny not enabled |
|
1991 | 1984 | error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") |
|
1992 | 1985 | bundle2-input-part: total payload size 2101 |
|
1993 | 1986 | bundle2-input-bundle: 4 parts total |
|
1994 | 1987 | transaction abort! |
|
1995 | 1988 | rollback completed |
|
1996 | 1989 | abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") |
|
1997 | 1990 | no rollback information available |
|
1998 | 1991 | 2:fb35475503ef |
|
1999 | 1992 | |
|
2000 | 1993 | User 'astro' must not be denied |
|
2001 | 1994 | |
|
2002 | 1995 | $ init_config |
|
2003 | 1996 | $ echo "[acl.deny.branches]" >> $config |
|
2004 | 1997 | $ echo "default = !astro" >> $config |
|
2005 | 1998 | $ do_push astro |
|
2006 | 1999 | Pushing as user astro |
|
2007 | 2000 | hgrc = """ |
|
2008 | 2001 | [hooks] |
|
2009 | 2002 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
2010 | 2003 | [acl] |
|
2011 | 2004 | sources = push |
|
2012 | 2005 | [extensions] |
|
2013 | 2006 | [acl.deny.branches] |
|
2014 | 2007 | default = !astro |
|
2015 | 2008 | """ |
|
2016 | 2009 | pushing to ../b |
|
2017 | 2010 | query 1; heads |
|
2018 | 2011 | searching for changes |
|
2019 | 2012 | all remote heads known locally |
|
2020 | 2013 | listing keys for "phases" |
|
2021 | 2014 | checking for updated bookmarks |
|
2022 | 2015 | listing keys for "bookmarks" |
|
2023 | 2016 | listing keys for "bookmarks" |
|
2024 | 2017 | 4 changesets found |
|
2025 | 2018 | list of changesets: |
|
2026 | 2019 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
2027 | 2020 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
2028 | 2021 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
2029 | 2022 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
2030 | 2023 | bundle2-output-bundle: "HG20", 5 parts total |
|
2031 | 2024 | bundle2-output-part: "replycaps" 155 bytes payload |
|
2032 | 2025 | bundle2-output-part: "check:heads" streamed payload |
|
2033 | 2026 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
2034 | 2027 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
2035 | 2028 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
2036 | 2029 | bundle2-input-bundle: with-transaction |
|
2037 | 2030 | bundle2-input-part: "replycaps" supported |
|
2038 | 2031 | bundle2-input-part: total payload size 155 |
|
2039 | 2032 | bundle2-input-part: "check:heads" supported |
|
2040 | 2033 | bundle2-input-part: total payload size 20 |
|
2041 | 2034 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
2042 | 2035 | adding changesets |
|
2043 | 2036 | add changeset ef1ea85a6374 |
|
2044 | 2037 | add changeset f9cafe1212c8 |
|
2045 | 2038 | add changeset 911600dab2ae |
|
2046 | 2039 | add changeset e8fc755d4d82 |
|
2047 | 2040 | adding manifests |
|
2048 | 2041 | adding file changes |
|
2049 | 2042 | adding abc.txt revisions |
|
2050 | 2043 | adding foo/Bar/file.txt revisions |
|
2051 | 2044 | adding foo/file.txt revisions |
|
2052 | 2045 | adding quux/file.py revisions |
|
2053 | 2046 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
2054 | 2047 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
2055 | 2048 | acl: checking access for user "astro" |
|
2056 | 2049 | acl: acl.allow.branches not enabled |
|
2057 | 2050 | acl: acl.deny.branches enabled, 0 entries for user astro |
|
2058 | 2051 | acl: acl.allow not enabled |
|
2059 | 2052 | acl: acl.deny not enabled |
|
2060 | 2053 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
2061 | 2054 | acl: path access granted: "ef1ea85a6374" |
|
2062 | 2055 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
2063 | 2056 | acl: path access granted: "f9cafe1212c8" |
|
2064 | 2057 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
2065 | 2058 | acl: path access granted: "911600dab2ae" |
|
2066 | 2059 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" |
|
2067 | 2060 | acl: path access granted: "e8fc755d4d82" |
|
2068 | 2061 | bundle2-input-part: total payload size 2101 |
|
2069 | 2062 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
2070 | 2063 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
2071 | 2064 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
2072 | 2065 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" |
|
2073 | 2066 | bundle2-input-bundle: 4 parts total |
|
2074 | 2067 | updating the branch cache |
|
2075 | 2068 | bundle2-output-bundle: "HG20", 3 parts total |
|
2076 | 2069 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
2077 | 2070 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
2078 | 2071 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
2079 | 2072 | bundle2-input-bundle: with-transaction |
|
2080 | 2073 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
2081 | 2074 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
2082 | 2075 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
2083 | 2076 | bundle2-input-bundle: 2 parts total |
|
2084 | 2077 | listing keys for "phases" |
|
2085 | 2078 | repository tip rolled back to revision 2 (undo push) |
|
2086 | 2079 | 2:fb35475503ef |
|
2087 | 2080 | |
|
2088 | 2081 | |
|
2089 | 2082 | Non-astro users must be denied |
|
2090 | 2083 | |
|
2091 | 2084 | $ do_push george |
|
2092 | 2085 | Pushing as user george |
|
2093 | 2086 | hgrc = """ |
|
2094 | 2087 | [hooks] |
|
2095 | 2088 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
2096 | 2089 | [acl] |
|
2097 | 2090 | sources = push |
|
2098 | 2091 | [extensions] |
|
2099 | 2092 | [acl.deny.branches] |
|
2100 | 2093 | default = !astro |
|
2101 | 2094 | """ |
|
2102 | 2095 | pushing to ../b |
|
2103 | 2096 | query 1; heads |
|
2104 | 2097 | searching for changes |
|
2105 | 2098 | all remote heads known locally |
|
2106 | 2099 | listing keys for "phases" |
|
2107 | 2100 | checking for updated bookmarks |
|
2108 | 2101 | listing keys for "bookmarks" |
|
2109 | 2102 | listing keys for "bookmarks" |
|
2110 | 2103 | 4 changesets found |
|
2111 | 2104 | list of changesets: |
|
2112 | 2105 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
2113 | 2106 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
2114 | 2107 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
2115 | 2108 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
2116 | 2109 | bundle2-output-bundle: "HG20", 5 parts total |
|
2117 | 2110 | bundle2-output-part: "replycaps" 155 bytes payload |
|
2118 | 2111 | bundle2-output-part: "check:heads" streamed payload |
|
2119 | 2112 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
2120 | 2113 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
2121 | 2114 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
2122 | 2115 | bundle2-input-bundle: with-transaction |
|
2123 | 2116 | bundle2-input-part: "replycaps" supported |
|
2124 | 2117 | bundle2-input-part: total payload size 155 |
|
2125 | 2118 | bundle2-input-part: "check:heads" supported |
|
2126 | 2119 | bundle2-input-part: total payload size 20 |
|
2127 | 2120 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
2128 | 2121 | adding changesets |
|
2129 | 2122 | add changeset ef1ea85a6374 |
|
2130 | 2123 | add changeset f9cafe1212c8 |
|
2131 | 2124 | add changeset 911600dab2ae |
|
2132 | 2125 | add changeset e8fc755d4d82 |
|
2133 | 2126 | adding manifests |
|
2134 | 2127 | adding file changes |
|
2135 | 2128 | adding abc.txt revisions |
|
2136 | 2129 | adding foo/Bar/file.txt revisions |
|
2137 | 2130 | adding foo/file.txt revisions |
|
2138 | 2131 | adding quux/file.py revisions |
|
2139 | 2132 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
2140 | 2133 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
2141 | 2134 | acl: checking access for user "george" |
|
2142 | 2135 | acl: acl.allow.branches not enabled |
|
2143 | 2136 | acl: acl.deny.branches enabled, 1 entries for user george |
|
2144 | 2137 | acl: acl.allow not enabled |
|
2145 | 2138 | acl: acl.deny not enabled |
|
2146 | 2139 | error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") |
|
2147 | 2140 | bundle2-input-part: total payload size 2101 |
|
2148 | 2141 | bundle2-input-bundle: 4 parts total |
|
2149 | 2142 | transaction abort! |
|
2150 | 2143 | rollback completed |
|
2151 | 2144 | abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") |
|
2152 | 2145 | no rollback information available |
|
2153 | 2146 | 2:fb35475503ef |
|
2154 | 2147 | |
|
2155 | 2148 |
General Comments 0
You need to be logged in to leave comments.
Login now