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