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