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