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