Show More
@@ -1,529 +1,535 b'' | |||||
1 | # changelog.py - changelog class for mercurial |
|
1 | # changelog.py - changelog class for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.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 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import collections |
|
10 | import collections | |
11 |
|
11 | |||
12 | from .i18n import _ |
|
12 | from .i18n import _ | |
13 | from .node import ( |
|
13 | from .node import ( | |
14 | bin, |
|
14 | bin, | |
15 | hex, |
|
15 | hex, | |
16 | nullid, |
|
16 | nullid, | |
17 | ) |
|
17 | ) | |
18 |
|
18 | |||
19 | from . import ( |
|
19 | from . import ( | |
20 | encoding, |
|
20 | encoding, | |
21 | error, |
|
21 | error, | |
22 | revlog, |
|
22 | revlog, | |
23 | util, |
|
23 | util, | |
24 | ) |
|
24 | ) | |
25 |
|
25 | |||
26 | _defaultextra = {'branch': 'default'} |
|
26 | _defaultextra = {'branch': 'default'} | |
27 |
|
27 | |||
28 | def _string_escape(text): |
|
28 | def _string_escape(text): | |
29 | """ |
|
29 | """ | |
30 | >>> d = {'nl': chr(10), 'bs': chr(92), 'cr': chr(13), 'nul': chr(0)} |
|
30 | >>> d = {'nl': chr(10), 'bs': chr(92), 'cr': chr(13), 'nul': chr(0)} | |
31 | >>> s = "ab%(nl)scd%(bs)s%(bs)sn%(nul)sab%(cr)scd%(bs)s%(nl)s" % d |
|
31 | >>> s = "ab%(nl)scd%(bs)s%(bs)sn%(nul)sab%(cr)scd%(bs)s%(nl)s" % d | |
32 | >>> s |
|
32 | >>> s | |
33 | 'ab\\ncd\\\\\\\\n\\x00ab\\rcd\\\\\\n' |
|
33 | 'ab\\ncd\\\\\\\\n\\x00ab\\rcd\\\\\\n' | |
34 | >>> res = _string_escape(s) |
|
34 | >>> res = _string_escape(s) | |
35 | >>> s == res.decode('string_escape') |
|
35 | >>> s == res.decode('string_escape') | |
36 | True |
|
36 | True | |
37 | """ |
|
37 | """ | |
38 | # subset of the string_escape codec |
|
38 | # subset of the string_escape codec | |
39 | text = text.replace('\\', '\\\\').replace('\n', '\\n').replace('\r', '\\r') |
|
39 | text = text.replace('\\', '\\\\').replace('\n', '\\n').replace('\r', '\\r') | |
40 | return text.replace('\0', '\\0') |
|
40 | return text.replace('\0', '\\0') | |
41 |
|
41 | |||
42 | def decodeextra(text): |
|
42 | def decodeextra(text): | |
43 | """ |
|
43 | """ | |
44 | >>> sorted(decodeextra(encodeextra({'foo': 'bar', 'baz': chr(0) + '2'}) |
|
44 | >>> sorted(decodeextra(encodeextra({'foo': 'bar', 'baz': chr(0) + '2'}) | |
45 | ... ).iteritems()) |
|
45 | ... ).iteritems()) | |
46 | [('baz', '\\x002'), ('branch', 'default'), ('foo', 'bar')] |
|
46 | [('baz', '\\x002'), ('branch', 'default'), ('foo', 'bar')] | |
47 | >>> sorted(decodeextra(encodeextra({'foo': 'bar', |
|
47 | >>> sorted(decodeextra(encodeextra({'foo': 'bar', | |
48 | ... 'baz': chr(92) + chr(0) + '2'}) |
|
48 | ... 'baz': chr(92) + chr(0) + '2'}) | |
49 | ... ).iteritems()) |
|
49 | ... ).iteritems()) | |
50 | [('baz', '\\\\\\x002'), ('branch', 'default'), ('foo', 'bar')] |
|
50 | [('baz', '\\\\\\x002'), ('branch', 'default'), ('foo', 'bar')] | |
51 | """ |
|
51 | """ | |
52 | extra = _defaultextra.copy() |
|
52 | extra = _defaultextra.copy() | |
53 | for l in text.split('\0'): |
|
53 | for l in text.split('\0'): | |
54 | if l: |
|
54 | if l: | |
55 | if '\\0' in l: |
|
55 | if '\\0' in l: | |
56 | # fix up \0 without getting into trouble with \\0 |
|
56 | # fix up \0 without getting into trouble with \\0 | |
57 | l = l.replace('\\\\', '\\\\\n') |
|
57 | l = l.replace('\\\\', '\\\\\n') | |
58 | l = l.replace('\\0', '\0') |
|
58 | l = l.replace('\\0', '\0') | |
59 | l = l.replace('\n', '') |
|
59 | l = l.replace('\n', '') | |
60 | k, v = l.decode('string_escape').split(':', 1) |
|
60 | k, v = l.decode('string_escape').split(':', 1) | |
61 | extra[k] = v |
|
61 | extra[k] = v | |
62 | return extra |
|
62 | return extra | |
63 |
|
63 | |||
64 | def encodeextra(d): |
|
64 | def encodeextra(d): | |
65 | # keys must be sorted to produce a deterministic changelog entry |
|
65 | # keys must be sorted to produce a deterministic changelog entry | |
66 | items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)] |
|
66 | items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)] | |
67 | return "\0".join(items) |
|
67 | return "\0".join(items) | |
68 |
|
68 | |||
69 | def stripdesc(desc): |
|
69 | def stripdesc(desc): | |
70 | """strip trailing whitespace and leading and trailing empty lines""" |
|
70 | """strip trailing whitespace and leading and trailing empty lines""" | |
71 | return '\n'.join([l.rstrip() for l in desc.splitlines()]).strip('\n') |
|
71 | return '\n'.join([l.rstrip() for l in desc.splitlines()]).strip('\n') | |
72 |
|
72 | |||
73 | class appender(object): |
|
73 | class appender(object): | |
74 | '''the changelog index must be updated last on disk, so we use this class |
|
74 | '''the changelog index must be updated last on disk, so we use this class | |
75 | to delay writes to it''' |
|
75 | to delay writes to it''' | |
76 | def __init__(self, vfs, name, mode, buf): |
|
76 | def __init__(self, vfs, name, mode, buf): | |
77 | self.data = buf |
|
77 | self.data = buf | |
78 | fp = vfs(name, mode) |
|
78 | fp = vfs(name, mode) | |
79 | self.fp = fp |
|
79 | self.fp = fp | |
80 | self.offset = fp.tell() |
|
80 | self.offset = fp.tell() | |
81 | self.size = vfs.fstat(fp).st_size |
|
81 | self.size = vfs.fstat(fp).st_size | |
82 |
|
82 | |||
83 | def end(self): |
|
83 | def end(self): | |
84 | return self.size + len("".join(self.data)) |
|
84 | return self.size + len("".join(self.data)) | |
85 | def tell(self): |
|
85 | def tell(self): | |
86 | return self.offset |
|
86 | return self.offset | |
87 | def flush(self): |
|
87 | def flush(self): | |
88 | pass |
|
88 | pass | |
89 | def close(self): |
|
89 | def close(self): | |
90 | self.fp.close() |
|
90 | self.fp.close() | |
91 |
|
91 | |||
92 | def seek(self, offset, whence=0): |
|
92 | def seek(self, offset, whence=0): | |
93 | '''virtual file offset spans real file and data''' |
|
93 | '''virtual file offset spans real file and data''' | |
94 | if whence == 0: |
|
94 | if whence == 0: | |
95 | self.offset = offset |
|
95 | self.offset = offset | |
96 | elif whence == 1: |
|
96 | elif whence == 1: | |
97 | self.offset += offset |
|
97 | self.offset += offset | |
98 | elif whence == 2: |
|
98 | elif whence == 2: | |
99 | self.offset = self.end() + offset |
|
99 | self.offset = self.end() + offset | |
100 | if self.offset < self.size: |
|
100 | if self.offset < self.size: | |
101 | self.fp.seek(self.offset) |
|
101 | self.fp.seek(self.offset) | |
102 |
|
102 | |||
103 | def read(self, count=-1): |
|
103 | def read(self, count=-1): | |
104 | '''only trick here is reads that span real file and data''' |
|
104 | '''only trick here is reads that span real file and data''' | |
105 | ret = "" |
|
105 | ret = "" | |
106 | if self.offset < self.size: |
|
106 | if self.offset < self.size: | |
107 | s = self.fp.read(count) |
|
107 | s = self.fp.read(count) | |
108 | ret = s |
|
108 | ret = s | |
109 | self.offset += len(s) |
|
109 | self.offset += len(s) | |
110 | if count > 0: |
|
110 | if count > 0: | |
111 | count -= len(s) |
|
111 | count -= len(s) | |
112 | if count != 0: |
|
112 | if count != 0: | |
113 | doff = self.offset - self.size |
|
113 | doff = self.offset - self.size | |
114 | self.data.insert(0, "".join(self.data)) |
|
114 | self.data.insert(0, "".join(self.data)) | |
115 | del self.data[1:] |
|
115 | del self.data[1:] | |
116 | s = self.data[0][doff:doff + count] |
|
116 | s = self.data[0][doff:doff + count] | |
117 | self.offset += len(s) |
|
117 | self.offset += len(s) | |
118 | ret += s |
|
118 | ret += s | |
119 | return ret |
|
119 | return ret | |
120 |
|
120 | |||
121 | def write(self, s): |
|
121 | def write(self, s): | |
122 | self.data.append(str(s)) |
|
122 | self.data.append(str(s)) | |
123 | self.offset += len(s) |
|
123 | self.offset += len(s) | |
124 |
|
124 | |||
125 | def _divertopener(opener, target): |
|
125 | def _divertopener(opener, target): | |
126 | """build an opener that writes in 'target.a' instead of 'target'""" |
|
126 | """build an opener that writes in 'target.a' instead of 'target'""" | |
127 | def _divert(name, mode='r', checkambig=False): |
|
127 | def _divert(name, mode='r', checkambig=False): | |
128 | if name != target: |
|
128 | if name != target: | |
129 | return opener(name, mode) |
|
129 | return opener(name, mode) | |
130 | return opener(name + ".a", mode) |
|
130 | return opener(name + ".a", mode) | |
131 | return _divert |
|
131 | return _divert | |
132 |
|
132 | |||
133 | def _delayopener(opener, target, buf): |
|
133 | def _delayopener(opener, target, buf): | |
134 | """build an opener that stores chunks in 'buf' instead of 'target'""" |
|
134 | """build an opener that stores chunks in 'buf' instead of 'target'""" | |
135 | def _delay(name, mode='r', checkambig=False): |
|
135 | def _delay(name, mode='r', checkambig=False): | |
136 | if name != target: |
|
136 | if name != target: | |
137 | return opener(name, mode) |
|
137 | return opener(name, mode) | |
138 | return appender(opener, name, mode, buf) |
|
138 | return appender(opener, name, mode, buf) | |
139 | return _delay |
|
139 | return _delay | |
140 |
|
140 | |||
141 | _changelogrevision = collections.namedtuple(u'changelogrevision', |
|
141 | _changelogrevision = collections.namedtuple(u'changelogrevision', | |
142 | (u'manifest', u'user', u'date', |
|
142 | (u'manifest', u'user', u'date', | |
143 | u'files', u'description', |
|
143 | u'files', u'description', | |
144 | u'extra')) |
|
144 | u'extra')) | |
145 |
|
145 | |||
146 | class changelogrevision(object): |
|
146 | class changelogrevision(object): | |
147 | """Holds results of a parsed changelog revision. |
|
147 | """Holds results of a parsed changelog revision. | |
148 |
|
148 | |||
149 | Changelog revisions consist of multiple pieces of data, including |
|
149 | Changelog revisions consist of multiple pieces of data, including | |
150 | the manifest node, user, and date. This object exposes a view into |
|
150 | the manifest node, user, and date. This object exposes a view into | |
151 | the parsed object. |
|
151 | the parsed object. | |
152 | """ |
|
152 | """ | |
153 |
|
153 | |||
154 | __slots__ = ( |
|
154 | __slots__ = ( | |
155 | u'_offsets', |
|
155 | u'_offsets', | |
156 | u'_text', |
|
156 | u'_text', | |
157 | ) |
|
157 | ) | |
158 |
|
158 | |||
159 | def __new__(cls, text): |
|
159 | def __new__(cls, text): | |
160 | if not text: |
|
160 | if not text: | |
161 | return _changelogrevision( |
|
161 | return _changelogrevision( | |
162 | manifest=nullid, |
|
162 | manifest=nullid, | |
163 | user='', |
|
163 | user='', | |
164 | date=(0, 0), |
|
164 | date=(0, 0), | |
165 | files=[], |
|
165 | files=[], | |
166 | description='', |
|
166 | description='', | |
167 | extra=_defaultextra, |
|
167 | extra=_defaultextra, | |
168 | ) |
|
168 | ) | |
169 |
|
169 | |||
170 | self = super(changelogrevision, cls).__new__(cls) |
|
170 | self = super(changelogrevision, cls).__new__(cls) | |
171 | # We could return here and implement the following as an __init__. |
|
171 | # We could return here and implement the following as an __init__. | |
172 | # But doing it here is equivalent and saves an extra function call. |
|
172 | # But doing it here is equivalent and saves an extra function call. | |
173 |
|
173 | |||
174 | # format used: |
|
174 | # format used: | |
175 | # nodeid\n : manifest node in ascii |
|
175 | # nodeid\n : manifest node in ascii | |
176 | # user\n : user, no \n or \r allowed |
|
176 | # user\n : user, no \n or \r allowed | |
177 | # time tz extra\n : date (time is int or float, timezone is int) |
|
177 | # time tz extra\n : date (time is int or float, timezone is int) | |
178 | # : extra is metadata, encoded and separated by '\0' |
|
178 | # : extra is metadata, encoded and separated by '\0' | |
179 | # : older versions ignore it |
|
179 | # : older versions ignore it | |
180 | # files\n\n : files modified by the cset, no \n or \r allowed |
|
180 | # files\n\n : files modified by the cset, no \n or \r allowed | |
181 | # (.*) : comment (free text, ideally utf-8) |
|
181 | # (.*) : comment (free text, ideally utf-8) | |
182 | # |
|
182 | # | |
183 | # changelog v0 doesn't use extra |
|
183 | # changelog v0 doesn't use extra | |
184 |
|
184 | |||
185 | nl1 = text.index('\n') |
|
185 | nl1 = text.index('\n') | |
186 | nl2 = text.index('\n', nl1 + 1) |
|
186 | nl2 = text.index('\n', nl1 + 1) | |
187 | nl3 = text.index('\n', nl2 + 1) |
|
187 | nl3 = text.index('\n', nl2 + 1) | |
188 |
|
188 | |||
189 | # The list of files may be empty. Which means nl3 is the first of the |
|
189 | # The list of files may be empty. Which means nl3 is the first of the | |
190 | # double newline that precedes the description. |
|
190 | # double newline that precedes the description. | |
191 | if text[nl3 + 1] == '\n': |
|
191 | if text[nl3 + 1] == '\n': | |
192 | doublenl = nl3 |
|
192 | doublenl = nl3 | |
193 | else: |
|
193 | else: | |
194 | doublenl = text.index('\n\n', nl3 + 1) |
|
194 | doublenl = text.index('\n\n', nl3 + 1) | |
195 |
|
195 | |||
196 | self._offsets = (nl1, nl2, nl3, doublenl) |
|
196 | self._offsets = (nl1, nl2, nl3, doublenl) | |
197 | self._text = text |
|
197 | self._text = text | |
198 |
|
198 | |||
199 | return self |
|
199 | return self | |
200 |
|
200 | |||
201 | @property |
|
201 | @property | |
202 | def manifest(self): |
|
202 | def manifest(self): | |
203 | return bin(self._text[0:self._offsets[0]]) |
|
203 | return bin(self._text[0:self._offsets[0]]) | |
204 |
|
204 | |||
205 | @property |
|
205 | @property | |
206 | def user(self): |
|
206 | def user(self): | |
207 | off = self._offsets |
|
207 | off = self._offsets | |
208 | return encoding.tolocal(self._text[off[0] + 1:off[1]]) |
|
208 | return encoding.tolocal(self._text[off[0] + 1:off[1]]) | |
209 |
|
209 | |||
210 | @property |
|
210 | @property | |
211 | def _rawdate(self): |
|
211 | def _rawdate(self): | |
212 | off = self._offsets |
|
212 | off = self._offsets | |
213 | dateextra = self._text[off[1] + 1:off[2]] |
|
213 | dateextra = self._text[off[1] + 1:off[2]] | |
214 | return dateextra.split(' ', 2)[0:2] |
|
214 | return dateextra.split(' ', 2)[0:2] | |
215 |
|
215 | |||
216 | @property |
|
216 | @property | |
217 | def _rawextra(self): |
|
217 | def _rawextra(self): | |
218 | off = self._offsets |
|
218 | off = self._offsets | |
219 | dateextra = self._text[off[1] + 1:off[2]] |
|
219 | dateextra = self._text[off[1] + 1:off[2]] | |
220 | fields = dateextra.split(' ', 2) |
|
220 | fields = dateextra.split(' ', 2) | |
221 | if len(fields) != 3: |
|
221 | if len(fields) != 3: | |
222 | return None |
|
222 | return None | |
223 |
|
223 | |||
224 | return fields[2] |
|
224 | return fields[2] | |
225 |
|
225 | |||
226 | @property |
|
226 | @property | |
227 | def date(self): |
|
227 | def date(self): | |
228 | raw = self._rawdate |
|
228 | raw = self._rawdate | |
229 | time = float(raw[0]) |
|
229 | time = float(raw[0]) | |
230 | # Various tools did silly things with the timezone. |
|
230 | # Various tools did silly things with the timezone. | |
231 | try: |
|
231 | try: | |
232 | timezone = int(raw[1]) |
|
232 | timezone = int(raw[1]) | |
233 | except ValueError: |
|
233 | except ValueError: | |
234 | timezone = 0 |
|
234 | timezone = 0 | |
235 |
|
235 | |||
236 | return time, timezone |
|
236 | return time, timezone | |
237 |
|
237 | |||
238 | @property |
|
238 | @property | |
239 | def extra(self): |
|
239 | def extra(self): | |
240 | raw = self._rawextra |
|
240 | raw = self._rawextra | |
241 | if raw is None: |
|
241 | if raw is None: | |
242 | return _defaultextra |
|
242 | return _defaultextra | |
243 |
|
243 | |||
244 | return decodeextra(raw) |
|
244 | return decodeextra(raw) | |
245 |
|
245 | |||
246 | @property |
|
246 | @property | |
247 | def files(self): |
|
247 | def files(self): | |
248 | off = self._offsets |
|
248 | off = self._offsets | |
249 | if off[2] == off[3]: |
|
249 | if off[2] == off[3]: | |
250 | return [] |
|
250 | return [] | |
251 |
|
251 | |||
252 | return self._text[off[2] + 1:off[3]].split('\n') |
|
252 | return self._text[off[2] + 1:off[3]].split('\n') | |
253 |
|
253 | |||
254 | @property |
|
254 | @property | |
255 | def description(self): |
|
255 | def description(self): | |
256 | return encoding.tolocal(self._text[self._offsets[3] + 2:]) |
|
256 | return encoding.tolocal(self._text[self._offsets[3] + 2:]) | |
257 |
|
257 | |||
258 | class changelog(revlog.revlog): |
|
258 | class changelog(revlog.revlog): | |
259 | def __init__(self, opener): |
|
259 | def __init__(self, opener): | |
260 | revlog.revlog.__init__(self, opener, "00changelog.i", |
|
260 | revlog.revlog.__init__(self, opener, "00changelog.i", | |
261 | checkambig=True) |
|
261 | checkambig=True) | |
262 | if self._initempty: |
|
262 | if self._initempty: | |
263 | # changelogs don't benefit from generaldelta |
|
263 | # changelogs don't benefit from generaldelta | |
264 | self.version &= ~revlog.REVLOGGENERALDELTA |
|
264 | self.version &= ~revlog.REVLOGGENERALDELTA | |
265 | self._generaldelta = False |
|
265 | self._generaldelta = False | |
|
266 | ||||
|
267 | # Delta chains for changelogs tend to be very small because entries | |||
|
268 | # tend to be small and don't delta well with each. So disable delta | |||
|
269 | # chains. | |||
|
270 | self._storedeltachains = False | |||
|
271 | ||||
266 | self._realopener = opener |
|
272 | self._realopener = opener | |
267 | self._delayed = False |
|
273 | self._delayed = False | |
268 | self._delaybuf = None |
|
274 | self._delaybuf = None | |
269 | self._divert = False |
|
275 | self._divert = False | |
270 | self.filteredrevs = frozenset() |
|
276 | self.filteredrevs = frozenset() | |
271 |
|
277 | |||
272 | def tip(self): |
|
278 | def tip(self): | |
273 | """filtered version of revlog.tip""" |
|
279 | """filtered version of revlog.tip""" | |
274 | for i in xrange(len(self) -1, -2, -1): |
|
280 | for i in xrange(len(self) -1, -2, -1): | |
275 | if i not in self.filteredrevs: |
|
281 | if i not in self.filteredrevs: | |
276 | return self.node(i) |
|
282 | return self.node(i) | |
277 |
|
283 | |||
278 | def __contains__(self, rev): |
|
284 | def __contains__(self, rev): | |
279 | """filtered version of revlog.__contains__""" |
|
285 | """filtered version of revlog.__contains__""" | |
280 | return (0 <= rev < len(self) |
|
286 | return (0 <= rev < len(self) | |
281 | and rev not in self.filteredrevs) |
|
287 | and rev not in self.filteredrevs) | |
282 |
|
288 | |||
283 | def __iter__(self): |
|
289 | def __iter__(self): | |
284 | """filtered version of revlog.__iter__""" |
|
290 | """filtered version of revlog.__iter__""" | |
285 | if len(self.filteredrevs) == 0: |
|
291 | if len(self.filteredrevs) == 0: | |
286 | return revlog.revlog.__iter__(self) |
|
292 | return revlog.revlog.__iter__(self) | |
287 |
|
293 | |||
288 | def filterediter(): |
|
294 | def filterediter(): | |
289 | for i in xrange(len(self)): |
|
295 | for i in xrange(len(self)): | |
290 | if i not in self.filteredrevs: |
|
296 | if i not in self.filteredrevs: | |
291 | yield i |
|
297 | yield i | |
292 |
|
298 | |||
293 | return filterediter() |
|
299 | return filterediter() | |
294 |
|
300 | |||
295 | def revs(self, start=0, stop=None): |
|
301 | def revs(self, start=0, stop=None): | |
296 | """filtered version of revlog.revs""" |
|
302 | """filtered version of revlog.revs""" | |
297 | for i in super(changelog, self).revs(start, stop): |
|
303 | for i in super(changelog, self).revs(start, stop): | |
298 | if i not in self.filteredrevs: |
|
304 | if i not in self.filteredrevs: | |
299 | yield i |
|
305 | yield i | |
300 |
|
306 | |||
301 | @util.propertycache |
|
307 | @util.propertycache | |
302 | def nodemap(self): |
|
308 | def nodemap(self): | |
303 | # XXX need filtering too |
|
309 | # XXX need filtering too | |
304 | self.rev(self.node(0)) |
|
310 | self.rev(self.node(0)) | |
305 | return self._nodecache |
|
311 | return self._nodecache | |
306 |
|
312 | |||
307 | def reachableroots(self, minroot, heads, roots, includepath=False): |
|
313 | def reachableroots(self, minroot, heads, roots, includepath=False): | |
308 | return self.index.reachableroots2(minroot, heads, roots, includepath) |
|
314 | return self.index.reachableroots2(minroot, heads, roots, includepath) | |
309 |
|
315 | |||
310 | def headrevs(self): |
|
316 | def headrevs(self): | |
311 | if self.filteredrevs: |
|
317 | if self.filteredrevs: | |
312 | try: |
|
318 | try: | |
313 | return self.index.headrevsfiltered(self.filteredrevs) |
|
319 | return self.index.headrevsfiltered(self.filteredrevs) | |
314 | # AttributeError covers non-c-extension environments and |
|
320 | # AttributeError covers non-c-extension environments and | |
315 | # old c extensions without filter handling. |
|
321 | # old c extensions without filter handling. | |
316 | except AttributeError: |
|
322 | except AttributeError: | |
317 | return self._headrevs() |
|
323 | return self._headrevs() | |
318 |
|
324 | |||
319 | return super(changelog, self).headrevs() |
|
325 | return super(changelog, self).headrevs() | |
320 |
|
326 | |||
321 | def strip(self, *args, **kwargs): |
|
327 | def strip(self, *args, **kwargs): | |
322 | # XXX make something better than assert |
|
328 | # XXX make something better than assert | |
323 | # We can't expect proper strip behavior if we are filtered. |
|
329 | # We can't expect proper strip behavior if we are filtered. | |
324 | assert not self.filteredrevs |
|
330 | assert not self.filteredrevs | |
325 | super(changelog, self).strip(*args, **kwargs) |
|
331 | super(changelog, self).strip(*args, **kwargs) | |
326 |
|
332 | |||
327 | def rev(self, node): |
|
333 | def rev(self, node): | |
328 | """filtered version of revlog.rev""" |
|
334 | """filtered version of revlog.rev""" | |
329 | r = super(changelog, self).rev(node) |
|
335 | r = super(changelog, self).rev(node) | |
330 | if r in self.filteredrevs: |
|
336 | if r in self.filteredrevs: | |
331 | raise error.FilteredLookupError(hex(node), self.indexfile, |
|
337 | raise error.FilteredLookupError(hex(node), self.indexfile, | |
332 | _('filtered node')) |
|
338 | _('filtered node')) | |
333 | return r |
|
339 | return r | |
334 |
|
340 | |||
335 | def node(self, rev): |
|
341 | def node(self, rev): | |
336 | """filtered version of revlog.node""" |
|
342 | """filtered version of revlog.node""" | |
337 | if rev in self.filteredrevs: |
|
343 | if rev in self.filteredrevs: | |
338 | raise error.FilteredIndexError(rev) |
|
344 | raise error.FilteredIndexError(rev) | |
339 | return super(changelog, self).node(rev) |
|
345 | return super(changelog, self).node(rev) | |
340 |
|
346 | |||
341 | def linkrev(self, rev): |
|
347 | def linkrev(self, rev): | |
342 | """filtered version of revlog.linkrev""" |
|
348 | """filtered version of revlog.linkrev""" | |
343 | if rev in self.filteredrevs: |
|
349 | if rev in self.filteredrevs: | |
344 | raise error.FilteredIndexError(rev) |
|
350 | raise error.FilteredIndexError(rev) | |
345 | return super(changelog, self).linkrev(rev) |
|
351 | return super(changelog, self).linkrev(rev) | |
346 |
|
352 | |||
347 | def parentrevs(self, rev): |
|
353 | def parentrevs(self, rev): | |
348 | """filtered version of revlog.parentrevs""" |
|
354 | """filtered version of revlog.parentrevs""" | |
349 | if rev in self.filteredrevs: |
|
355 | if rev in self.filteredrevs: | |
350 | raise error.FilteredIndexError(rev) |
|
356 | raise error.FilteredIndexError(rev) | |
351 | return super(changelog, self).parentrevs(rev) |
|
357 | return super(changelog, self).parentrevs(rev) | |
352 |
|
358 | |||
353 | def flags(self, rev): |
|
359 | def flags(self, rev): | |
354 | """filtered version of revlog.flags""" |
|
360 | """filtered version of revlog.flags""" | |
355 | if rev in self.filteredrevs: |
|
361 | if rev in self.filteredrevs: | |
356 | raise error.FilteredIndexError(rev) |
|
362 | raise error.FilteredIndexError(rev) | |
357 | return super(changelog, self).flags(rev) |
|
363 | return super(changelog, self).flags(rev) | |
358 |
|
364 | |||
359 | def delayupdate(self, tr): |
|
365 | def delayupdate(self, tr): | |
360 | "delay visibility of index updates to other readers" |
|
366 | "delay visibility of index updates to other readers" | |
361 |
|
367 | |||
362 | if not self._delayed: |
|
368 | if not self._delayed: | |
363 | if len(self) == 0: |
|
369 | if len(self) == 0: | |
364 | self._divert = True |
|
370 | self._divert = True | |
365 | if self._realopener.exists(self.indexfile + '.a'): |
|
371 | if self._realopener.exists(self.indexfile + '.a'): | |
366 | self._realopener.unlink(self.indexfile + '.a') |
|
372 | self._realopener.unlink(self.indexfile + '.a') | |
367 | self.opener = _divertopener(self._realopener, self.indexfile) |
|
373 | self.opener = _divertopener(self._realopener, self.indexfile) | |
368 | else: |
|
374 | else: | |
369 | self._delaybuf = [] |
|
375 | self._delaybuf = [] | |
370 | self.opener = _delayopener(self._realopener, self.indexfile, |
|
376 | self.opener = _delayopener(self._realopener, self.indexfile, | |
371 | self._delaybuf) |
|
377 | self._delaybuf) | |
372 | self._delayed = True |
|
378 | self._delayed = True | |
373 | tr.addpending('cl-%i' % id(self), self._writepending) |
|
379 | tr.addpending('cl-%i' % id(self), self._writepending) | |
374 | tr.addfinalize('cl-%i' % id(self), self._finalize) |
|
380 | tr.addfinalize('cl-%i' % id(self), self._finalize) | |
375 |
|
381 | |||
376 | def _finalize(self, tr): |
|
382 | def _finalize(self, tr): | |
377 | "finalize index updates" |
|
383 | "finalize index updates" | |
378 | self._delayed = False |
|
384 | self._delayed = False | |
379 | self.opener = self._realopener |
|
385 | self.opener = self._realopener | |
380 | # move redirected index data back into place |
|
386 | # move redirected index data back into place | |
381 | if self._divert: |
|
387 | if self._divert: | |
382 | assert not self._delaybuf |
|
388 | assert not self._delaybuf | |
383 | tmpname = self.indexfile + ".a" |
|
389 | tmpname = self.indexfile + ".a" | |
384 | nfile = self.opener.open(tmpname) |
|
390 | nfile = self.opener.open(tmpname) | |
385 | nfile.close() |
|
391 | nfile.close() | |
386 | self.opener.rename(tmpname, self.indexfile, checkambig=True) |
|
392 | self.opener.rename(tmpname, self.indexfile, checkambig=True) | |
387 | elif self._delaybuf: |
|
393 | elif self._delaybuf: | |
388 | fp = self.opener(self.indexfile, 'a', checkambig=True) |
|
394 | fp = self.opener(self.indexfile, 'a', checkambig=True) | |
389 | fp.write("".join(self._delaybuf)) |
|
395 | fp.write("".join(self._delaybuf)) | |
390 | fp.close() |
|
396 | fp.close() | |
391 | self._delaybuf = None |
|
397 | self._delaybuf = None | |
392 | self._divert = False |
|
398 | self._divert = False | |
393 | # split when we're done |
|
399 | # split when we're done | |
394 | self.checkinlinesize(tr) |
|
400 | self.checkinlinesize(tr) | |
395 |
|
401 | |||
396 | def readpending(self, file): |
|
402 | def readpending(self, file): | |
397 | """read index data from a "pending" file |
|
403 | """read index data from a "pending" file | |
398 |
|
404 | |||
399 | During a transaction, the actual changeset data is already stored in the |
|
405 | During a transaction, the actual changeset data is already stored in the | |
400 | main file, but not yet finalized in the on-disk index. Instead, a |
|
406 | main file, but not yet finalized in the on-disk index. Instead, a | |
401 | "pending" index is written by the transaction logic. If this function |
|
407 | "pending" index is written by the transaction logic. If this function | |
402 | is running, we are likely in a subprocess invoked in a hook. The |
|
408 | is running, we are likely in a subprocess invoked in a hook. The | |
403 | subprocess is informed that it is within a transaction and needs to |
|
409 | subprocess is informed that it is within a transaction and needs to | |
404 | access its content. |
|
410 | access its content. | |
405 |
|
411 | |||
406 | This function will read all the index data out of the pending file and |
|
412 | This function will read all the index data out of the pending file and | |
407 | overwrite the main index.""" |
|
413 | overwrite the main index.""" | |
408 |
|
414 | |||
409 | if not self.opener.exists(file): |
|
415 | if not self.opener.exists(file): | |
410 | return # no pending data for changelog |
|
416 | return # no pending data for changelog | |
411 | r = revlog.revlog(self.opener, file) |
|
417 | r = revlog.revlog(self.opener, file) | |
412 | self.index = r.index |
|
418 | self.index = r.index | |
413 | self.nodemap = r.nodemap |
|
419 | self.nodemap = r.nodemap | |
414 | self._nodecache = r._nodecache |
|
420 | self._nodecache = r._nodecache | |
415 | self._chunkcache = r._chunkcache |
|
421 | self._chunkcache = r._chunkcache | |
416 |
|
422 | |||
417 | def _writepending(self, tr): |
|
423 | def _writepending(self, tr): | |
418 | "create a file containing the unfinalized state for pretxnchangegroup" |
|
424 | "create a file containing the unfinalized state for pretxnchangegroup" | |
419 | if self._delaybuf: |
|
425 | if self._delaybuf: | |
420 | # make a temporary copy of the index |
|
426 | # make a temporary copy of the index | |
421 | fp1 = self._realopener(self.indexfile) |
|
427 | fp1 = self._realopener(self.indexfile) | |
422 | pendingfilename = self.indexfile + ".a" |
|
428 | pendingfilename = self.indexfile + ".a" | |
423 | # register as a temp file to ensure cleanup on failure |
|
429 | # register as a temp file to ensure cleanup on failure | |
424 | tr.registertmp(pendingfilename) |
|
430 | tr.registertmp(pendingfilename) | |
425 | # write existing data |
|
431 | # write existing data | |
426 | fp2 = self._realopener(pendingfilename, "w") |
|
432 | fp2 = self._realopener(pendingfilename, "w") | |
427 | fp2.write(fp1.read()) |
|
433 | fp2.write(fp1.read()) | |
428 | # add pending data |
|
434 | # add pending data | |
429 | fp2.write("".join(self._delaybuf)) |
|
435 | fp2.write("".join(self._delaybuf)) | |
430 | fp2.close() |
|
436 | fp2.close() | |
431 | # switch modes so finalize can simply rename |
|
437 | # switch modes so finalize can simply rename | |
432 | self._delaybuf = None |
|
438 | self._delaybuf = None | |
433 | self._divert = True |
|
439 | self._divert = True | |
434 | self.opener = _divertopener(self._realopener, self.indexfile) |
|
440 | self.opener = _divertopener(self._realopener, self.indexfile) | |
435 |
|
441 | |||
436 | if self._divert: |
|
442 | if self._divert: | |
437 | return True |
|
443 | return True | |
438 |
|
444 | |||
439 | return False |
|
445 | return False | |
440 |
|
446 | |||
441 | def checkinlinesize(self, tr, fp=None): |
|
447 | def checkinlinesize(self, tr, fp=None): | |
442 | if not self._delayed: |
|
448 | if not self._delayed: | |
443 | revlog.revlog.checkinlinesize(self, tr, fp) |
|
449 | revlog.revlog.checkinlinesize(self, tr, fp) | |
444 |
|
450 | |||
445 | def read(self, node): |
|
451 | def read(self, node): | |
446 | """Obtain data from a parsed changelog revision. |
|
452 | """Obtain data from a parsed changelog revision. | |
447 |
|
453 | |||
448 | Returns a 6-tuple of: |
|
454 | Returns a 6-tuple of: | |
449 |
|
455 | |||
450 | - manifest node in binary |
|
456 | - manifest node in binary | |
451 | - author/user as a localstr |
|
457 | - author/user as a localstr | |
452 | - date as a 2-tuple of (time, timezone) |
|
458 | - date as a 2-tuple of (time, timezone) | |
453 | - list of files |
|
459 | - list of files | |
454 | - commit message as a localstr |
|
460 | - commit message as a localstr | |
455 | - dict of extra metadata |
|
461 | - dict of extra metadata | |
456 |
|
462 | |||
457 | Unless you need to access all fields, consider calling |
|
463 | Unless you need to access all fields, consider calling | |
458 | ``changelogrevision`` instead, as it is faster for partial object |
|
464 | ``changelogrevision`` instead, as it is faster for partial object | |
459 | access. |
|
465 | access. | |
460 | """ |
|
466 | """ | |
461 | c = changelogrevision(self.revision(node)) |
|
467 | c = changelogrevision(self.revision(node)) | |
462 | return ( |
|
468 | return ( | |
463 | c.manifest, |
|
469 | c.manifest, | |
464 | c.user, |
|
470 | c.user, | |
465 | c.date, |
|
471 | c.date, | |
466 | c.files, |
|
472 | c.files, | |
467 | c.description, |
|
473 | c.description, | |
468 | c.extra |
|
474 | c.extra | |
469 | ) |
|
475 | ) | |
470 |
|
476 | |||
471 | def changelogrevision(self, nodeorrev): |
|
477 | def changelogrevision(self, nodeorrev): | |
472 | """Obtain a ``changelogrevision`` for a node or revision.""" |
|
478 | """Obtain a ``changelogrevision`` for a node or revision.""" | |
473 | return changelogrevision(self.revision(nodeorrev)) |
|
479 | return changelogrevision(self.revision(nodeorrev)) | |
474 |
|
480 | |||
475 | def readfiles(self, node): |
|
481 | def readfiles(self, node): | |
476 | """ |
|
482 | """ | |
477 | short version of read that only returns the files modified by the cset |
|
483 | short version of read that only returns the files modified by the cset | |
478 | """ |
|
484 | """ | |
479 | text = self.revision(node) |
|
485 | text = self.revision(node) | |
480 | if not text: |
|
486 | if not text: | |
481 | return [] |
|
487 | return [] | |
482 | last = text.index("\n\n") |
|
488 | last = text.index("\n\n") | |
483 | l = text[:last].split('\n') |
|
489 | l = text[:last].split('\n') | |
484 | return l[3:] |
|
490 | return l[3:] | |
485 |
|
491 | |||
486 | def add(self, manifest, files, desc, transaction, p1, p2, |
|
492 | def add(self, manifest, files, desc, transaction, p1, p2, | |
487 | user, date=None, extra=None): |
|
493 | user, date=None, extra=None): | |
488 | # Convert to UTF-8 encoded bytestrings as the very first |
|
494 | # Convert to UTF-8 encoded bytestrings as the very first | |
489 | # thing: calling any method on a localstr object will turn it |
|
495 | # thing: calling any method on a localstr object will turn it | |
490 | # into a str object and the cached UTF-8 string is thus lost. |
|
496 | # into a str object and the cached UTF-8 string is thus lost. | |
491 | user, desc = encoding.fromlocal(user), encoding.fromlocal(desc) |
|
497 | user, desc = encoding.fromlocal(user), encoding.fromlocal(desc) | |
492 |
|
498 | |||
493 | user = user.strip() |
|
499 | user = user.strip() | |
494 | # An empty username or a username with a "\n" will make the |
|
500 | # An empty username or a username with a "\n" will make the | |
495 | # revision text contain two "\n\n" sequences -> corrupt |
|
501 | # revision text contain two "\n\n" sequences -> corrupt | |
496 | # repository since read cannot unpack the revision. |
|
502 | # repository since read cannot unpack the revision. | |
497 | if not user: |
|
503 | if not user: | |
498 | raise error.RevlogError(_("empty username")) |
|
504 | raise error.RevlogError(_("empty username")) | |
499 | if "\n" in user: |
|
505 | if "\n" in user: | |
500 | raise error.RevlogError(_("username %s contains a newline") |
|
506 | raise error.RevlogError(_("username %s contains a newline") | |
501 | % repr(user)) |
|
507 | % repr(user)) | |
502 |
|
508 | |||
503 | desc = stripdesc(desc) |
|
509 | desc = stripdesc(desc) | |
504 |
|
510 | |||
505 | if date: |
|
511 | if date: | |
506 | parseddate = "%d %d" % util.parsedate(date) |
|
512 | parseddate = "%d %d" % util.parsedate(date) | |
507 | else: |
|
513 | else: | |
508 | parseddate = "%d %d" % util.makedate() |
|
514 | parseddate = "%d %d" % util.makedate() | |
509 | if extra: |
|
515 | if extra: | |
510 | branch = extra.get("branch") |
|
516 | branch = extra.get("branch") | |
511 | if branch in ("default", ""): |
|
517 | if branch in ("default", ""): | |
512 | del extra["branch"] |
|
518 | del extra["branch"] | |
513 | elif branch in (".", "null", "tip"): |
|
519 | elif branch in (".", "null", "tip"): | |
514 | raise error.RevlogError(_('the name \'%s\' is reserved') |
|
520 | raise error.RevlogError(_('the name \'%s\' is reserved') | |
515 | % branch) |
|
521 | % branch) | |
516 | if extra: |
|
522 | if extra: | |
517 | extra = encodeextra(extra) |
|
523 | extra = encodeextra(extra) | |
518 | parseddate = "%s %s" % (parseddate, extra) |
|
524 | parseddate = "%s %s" % (parseddate, extra) | |
519 | l = [hex(manifest), user, parseddate] + sorted(files) + ["", desc] |
|
525 | l = [hex(manifest), user, parseddate] + sorted(files) + ["", desc] | |
520 | text = "\n".join(l) |
|
526 | text = "\n".join(l) | |
521 | return self.addrevision(text, transaction, len(self), p1, p2) |
|
527 | return self.addrevision(text, transaction, len(self), p1, p2) | |
522 |
|
528 | |||
523 | def branchinfo(self, rev): |
|
529 | def branchinfo(self, rev): | |
524 | """return the branch name and open/close state of a revision |
|
530 | """return the branch name and open/close state of a revision | |
525 |
|
531 | |||
526 | This function exists because creating a changectx object |
|
532 | This function exists because creating a changectx object | |
527 | just to access this is costly.""" |
|
533 | just to access this is costly.""" | |
528 | extra = self.read(rev)[5] |
|
534 | extra = self.read(rev)[5] | |
529 | return encoding.tolocal(extra.get("branch")), 'close' in extra |
|
535 | return encoding.tolocal(extra.get("branch")), 'close' in extra |
@@ -1,2148 +1,2148 b'' | |||||
1 | > do_push() |
|
1 | > do_push() | |
2 | > { |
|
2 | > { | |
3 | > user=$1 |
|
3 | > user=$1 | |
4 | > shift |
|
4 | > shift | |
5 | > echo "Pushing as user $user" |
|
5 | > echo "Pushing as user $user" | |
6 | > echo 'hgrc = """' |
|
6 | > echo 'hgrc = """' | |
7 | > sed -n '/\[[ha]/,$p' b/.hg/hgrc | grep -v fakegroups.py |
|
7 | > sed -n '/\[[ha]/,$p' b/.hg/hgrc | grep -v fakegroups.py | |
8 | > echo '"""' |
|
8 | > echo '"""' | |
9 | > if test -f acl.config; then |
|
9 | > if test -f acl.config; then | |
10 | > echo 'acl.config = """' |
|
10 | > echo 'acl.config = """' | |
11 | > cat acl.config |
|
11 | > cat acl.config | |
12 | > echo '"""' |
|
12 | > echo '"""' | |
13 | > fi |
|
13 | > fi | |
14 | > # On AIX /etc/profile sets LOGNAME read-only. So |
|
14 | > # On AIX /etc/profile sets LOGNAME read-only. So | |
15 | > # LOGNAME=$user hg --cws a --debug push ../b |
|
15 | > # LOGNAME=$user hg --cws a --debug push ../b | |
16 | > # fails with "This variable is read only." |
|
16 | > # fails with "This variable is read only." | |
17 | > # Use env to work around this. |
|
17 | > # Use env to work around this. | |
18 | > env LOGNAME=$user hg --cwd a --debug push ../b |
|
18 | > env LOGNAME=$user hg --cwd a --debug push ../b | |
19 | > hg --cwd b rollback |
|
19 | > hg --cwd b rollback | |
20 | > hg --cwd b --quiet tip |
|
20 | > hg --cwd b --quiet tip | |
21 | > echo |
|
21 | > echo | |
22 | > } |
|
22 | > } | |
23 |
|
23 | |||
24 | > init_config() |
|
24 | > init_config() | |
25 | > { |
|
25 | > { | |
26 | > cat > fakegroups.py <<EOF |
|
26 | > cat > fakegroups.py <<EOF | |
27 | > from hgext import acl |
|
27 | > from hgext import acl | |
28 | > def fakegetusers(ui, group): |
|
28 | > def fakegetusers(ui, group): | |
29 | > try: |
|
29 | > try: | |
30 | > return acl._getusersorig(ui, group) |
|
30 | > return acl._getusersorig(ui, group) | |
31 | > except: |
|
31 | > except: | |
32 | > return ["fred", "betty"] |
|
32 | > return ["fred", "betty"] | |
33 | > acl._getusersorig = acl._getusers |
|
33 | > acl._getusersorig = acl._getusers | |
34 | > acl._getusers = fakegetusers |
|
34 | > acl._getusers = fakegetusers | |
35 | > EOF |
|
35 | > EOF | |
36 | > rm -f acl.config |
|
36 | > rm -f acl.config | |
37 | > cat > $config <<EOF |
|
37 | > cat > $config <<EOF | |
38 | > [hooks] |
|
38 | > [hooks] | |
39 | > pretxnchangegroup.acl = python:hgext.acl.hook |
|
39 | > pretxnchangegroup.acl = python:hgext.acl.hook | |
40 | > [acl] |
|
40 | > [acl] | |
41 | > sources = push |
|
41 | > sources = push | |
42 | > [extensions] |
|
42 | > [extensions] | |
43 | > f=`pwd`/fakegroups.py |
|
43 | > f=`pwd`/fakegroups.py | |
44 | > EOF |
|
44 | > EOF | |
45 | > } |
|
45 | > } | |
46 |
|
46 | |||
47 | $ 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 | $ config=b/.hg/hgrc |
|
73 | $ config=b/.hg/hgrc | |
74 |
|
74 | |||
75 | Extension disabled for lack of a hook |
|
75 | Extension disabled for lack of a hook | |
76 |
|
76 | |||
77 | $ do_push fred |
|
77 | $ do_push fred | |
78 | Pushing as user fred |
|
78 | Pushing as user fred | |
79 | hgrc = """ |
|
79 | hgrc = """ | |
80 | """ |
|
80 | """ | |
81 | pushing to ../b |
|
81 | pushing to ../b | |
82 | query 1; heads |
|
82 | query 1; heads | |
83 | searching for changes |
|
83 | searching for changes | |
84 | all remote heads known locally |
|
84 | all remote heads known locally | |
85 | listing keys for "phases" |
|
85 | listing keys for "phases" | |
86 | checking for updated bookmarks |
|
86 | checking for updated bookmarks | |
87 | listing keys for "bookmarks" |
|
87 | listing keys for "bookmarks" | |
88 | listing keys for "bookmarks" |
|
88 | listing keys for "bookmarks" | |
89 | 3 changesets found |
|
89 | 3 changesets found | |
90 | list of changesets: |
|
90 | list of changesets: | |
91 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
91 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
92 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
92 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
93 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
93 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
94 | bundle2-output-bundle: "HG20", 4 parts total |
|
94 | bundle2-output-bundle: "HG20", 4 parts total | |
95 | bundle2-output-part: "replycaps" 155 bytes payload |
|
95 | bundle2-output-part: "replycaps" 155 bytes payload | |
96 | bundle2-output-part: "check:heads" streamed payload |
|
96 | bundle2-output-part: "check:heads" streamed payload | |
97 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
97 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
98 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
98 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
99 | bundle2-input-bundle: with-transaction |
|
99 | bundle2-input-bundle: with-transaction | |
100 | bundle2-input-part: "replycaps" supported |
|
100 | bundle2-input-part: "replycaps" supported | |
101 | bundle2-input-part: total payload size 155 |
|
101 | bundle2-input-part: total payload size 155 | |
102 | bundle2-input-part: "check:heads" supported |
|
102 | bundle2-input-part: "check:heads" supported | |
103 | bundle2-input-part: total payload size 20 |
|
103 | bundle2-input-part: total payload size 20 | |
104 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
104 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
105 | adding changesets |
|
105 | adding changesets | |
106 | add changeset ef1ea85a6374 |
|
106 | add changeset ef1ea85a6374 | |
107 | add changeset f9cafe1212c8 |
|
107 | add changeset f9cafe1212c8 | |
108 | add changeset 911600dab2ae |
|
108 | add changeset 911600dab2ae | |
109 | adding manifests |
|
109 | adding manifests | |
110 | adding file changes |
|
110 | adding file changes | |
111 | adding foo/Bar/file.txt revisions |
|
111 | adding foo/Bar/file.txt revisions | |
112 | adding foo/file.txt revisions |
|
112 | adding foo/file.txt revisions | |
113 | adding quux/file.py revisions |
|
113 | adding quux/file.py revisions | |
114 | added 3 changesets with 3 changes to 3 files |
|
114 | added 3 changesets with 3 changes to 3 files | |
115 | updating the branch cache |
|
115 | updating the branch cache | |
116 | bundle2-input-part: total payload size 1606 |
|
116 | bundle2-input-part: total payload size 1606 | |
117 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
117 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
118 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
118 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
119 | bundle2-input-bundle: 3 parts total |
|
119 | bundle2-input-bundle: 3 parts total | |
120 | bundle2-output-bundle: "HG20", 2 parts total |
|
120 | bundle2-output-bundle: "HG20", 2 parts total | |
121 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
121 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
122 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
122 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
123 | bundle2-input-bundle: with-transaction |
|
123 | bundle2-input-bundle: with-transaction | |
124 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
124 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
125 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
125 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
126 | bundle2-input-bundle: 1 parts total |
|
126 | bundle2-input-bundle: 1 parts total | |
127 | listing keys for "phases" |
|
127 | listing keys for "phases" | |
128 | repository tip rolled back to revision 0 (undo push) |
|
128 | repository tip rolled back to revision 0 (undo push) | |
129 | 0:6675d58eff77 |
|
129 | 0:6675d58eff77 | |
130 |
|
130 | |||
131 |
|
131 | |||
132 | $ echo '[hooks]' >> $config |
|
132 | $ echo '[hooks]' >> $config | |
133 | $ echo 'pretxnchangegroup.acl = python:hgext.acl.hook' >> $config |
|
133 | $ echo 'pretxnchangegroup.acl = python:hgext.acl.hook' >> $config | |
134 |
|
134 | |||
135 | Extension disabled for lack of acl.sources |
|
135 | Extension disabled for lack of acl.sources | |
136 |
|
136 | |||
137 | $ do_push fred |
|
137 | $ do_push fred | |
138 | Pushing as user fred |
|
138 | Pushing as user fred | |
139 | hgrc = """ |
|
139 | hgrc = """ | |
140 | [hooks] |
|
140 | [hooks] | |
141 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
141 | pretxnchangegroup.acl = python:hgext.acl.hook | |
142 | """ |
|
142 | """ | |
143 | pushing to ../b |
|
143 | pushing to ../b | |
144 | query 1; heads |
|
144 | query 1; heads | |
145 | searching for changes |
|
145 | searching for changes | |
146 | all remote heads known locally |
|
146 | all remote heads known locally | |
147 | listing keys for "phases" |
|
147 | listing keys for "phases" | |
148 | checking for updated bookmarks |
|
148 | checking for updated bookmarks | |
149 | listing keys for "bookmarks" |
|
149 | listing keys for "bookmarks" | |
150 | invalid branchheads cache (served): tip differs |
|
150 | invalid branchheads cache (served): tip differs | |
151 | listing keys for "bookmarks" |
|
151 | listing keys for "bookmarks" | |
152 | 3 changesets found |
|
152 | 3 changesets found | |
153 | list of changesets: |
|
153 | list of changesets: | |
154 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
154 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
155 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
155 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
156 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
156 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
157 | bundle2-output-bundle: "HG20", 4 parts total |
|
157 | bundle2-output-bundle: "HG20", 4 parts total | |
158 | bundle2-output-part: "replycaps" 155 bytes payload |
|
158 | bundle2-output-part: "replycaps" 155 bytes payload | |
159 | bundle2-output-part: "check:heads" streamed payload |
|
159 | bundle2-output-part: "check:heads" streamed payload | |
160 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
160 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
161 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
161 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
162 | bundle2-input-bundle: with-transaction |
|
162 | bundle2-input-bundle: with-transaction | |
163 | bundle2-input-part: "replycaps" supported |
|
163 | bundle2-input-part: "replycaps" supported | |
164 | bundle2-input-part: total payload size 155 |
|
164 | bundle2-input-part: total payload size 155 | |
165 | bundle2-input-part: "check:heads" supported |
|
165 | bundle2-input-part: "check:heads" supported | |
166 | bundle2-input-part: total payload size 20 |
|
166 | bundle2-input-part: total payload size 20 | |
167 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
167 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
168 | adding changesets |
|
168 | adding changesets | |
169 | add changeset ef1ea85a6374 |
|
169 | add changeset ef1ea85a6374 | |
170 | add changeset f9cafe1212c8 |
|
170 | add changeset f9cafe1212c8 | |
171 | add changeset 911600dab2ae |
|
171 | add changeset 911600dab2ae | |
172 | adding manifests |
|
172 | adding manifests | |
173 | adding file changes |
|
173 | adding file changes | |
174 | adding foo/Bar/file.txt revisions |
|
174 | adding foo/Bar/file.txt revisions | |
175 | adding foo/file.txt revisions |
|
175 | adding foo/file.txt revisions | |
176 | adding quux/file.py revisions |
|
176 | adding quux/file.py revisions | |
177 | added 3 changesets with 3 changes to 3 files |
|
177 | added 3 changesets with 3 changes to 3 files | |
178 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
178 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
179 | acl: changes have source "push" - skipping |
|
179 | acl: changes have source "push" - skipping | |
180 | updating the branch cache |
|
180 | updating the branch cache | |
181 | bundle2-input-part: total payload size 1606 |
|
181 | bundle2-input-part: total payload size 1606 | |
182 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
182 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
183 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
183 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
184 | bundle2-input-bundle: 3 parts total |
|
184 | bundle2-input-bundle: 3 parts total | |
185 | bundle2-output-bundle: "HG20", 2 parts total |
|
185 | bundle2-output-bundle: "HG20", 2 parts total | |
186 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
186 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
187 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
187 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
188 | bundle2-input-bundle: with-transaction |
|
188 | bundle2-input-bundle: with-transaction | |
189 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
189 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
190 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
190 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
191 | bundle2-input-bundle: 1 parts total |
|
191 | bundle2-input-bundle: 1 parts total | |
192 | listing keys for "phases" |
|
192 | listing keys for "phases" | |
193 | repository tip rolled back to revision 0 (undo push) |
|
193 | repository tip rolled back to revision 0 (undo push) | |
194 | 0:6675d58eff77 |
|
194 | 0:6675d58eff77 | |
195 |
|
195 | |||
196 |
|
196 | |||
197 | No [acl.allow]/[acl.deny] |
|
197 | No [acl.allow]/[acl.deny] | |
198 |
|
198 | |||
199 | $ echo '[acl]' >> $config |
|
199 | $ echo '[acl]' >> $config | |
200 | $ echo 'sources = push' >> $config |
|
200 | $ echo 'sources = push' >> $config | |
201 | $ do_push fred |
|
201 | $ do_push fred | |
202 | Pushing as user fred |
|
202 | Pushing as user fred | |
203 | hgrc = """ |
|
203 | hgrc = """ | |
204 | [hooks] |
|
204 | [hooks] | |
205 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
205 | pretxnchangegroup.acl = python:hgext.acl.hook | |
206 | [acl] |
|
206 | [acl] | |
207 | sources = push |
|
207 | sources = push | |
208 | """ |
|
208 | """ | |
209 | pushing to ../b |
|
209 | pushing to ../b | |
210 | query 1; heads |
|
210 | query 1; heads | |
211 | searching for changes |
|
211 | searching for changes | |
212 | all remote heads known locally |
|
212 | all remote heads known locally | |
213 | listing keys for "phases" |
|
213 | listing keys for "phases" | |
214 | checking for updated bookmarks |
|
214 | checking for updated bookmarks | |
215 | listing keys for "bookmarks" |
|
215 | listing keys for "bookmarks" | |
216 | invalid branchheads cache (served): tip differs |
|
216 | invalid branchheads cache (served): tip differs | |
217 | listing keys for "bookmarks" |
|
217 | listing keys for "bookmarks" | |
218 | 3 changesets found |
|
218 | 3 changesets found | |
219 | list of changesets: |
|
219 | list of changesets: | |
220 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
220 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
221 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
221 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
222 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
222 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
223 | bundle2-output-bundle: "HG20", 4 parts total |
|
223 | bundle2-output-bundle: "HG20", 4 parts total | |
224 | bundle2-output-part: "replycaps" 155 bytes payload |
|
224 | bundle2-output-part: "replycaps" 155 bytes payload | |
225 | bundle2-output-part: "check:heads" streamed payload |
|
225 | bundle2-output-part: "check:heads" streamed payload | |
226 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
226 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
227 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
227 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
228 | bundle2-input-bundle: with-transaction |
|
228 | bundle2-input-bundle: with-transaction | |
229 | bundle2-input-part: "replycaps" supported |
|
229 | bundle2-input-part: "replycaps" supported | |
230 | bundle2-input-part: total payload size 155 |
|
230 | bundle2-input-part: total payload size 155 | |
231 | bundle2-input-part: "check:heads" supported |
|
231 | bundle2-input-part: "check:heads" supported | |
232 | bundle2-input-part: total payload size 20 |
|
232 | bundle2-input-part: total payload size 20 | |
233 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
233 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
234 | adding changesets |
|
234 | adding changesets | |
235 | add changeset ef1ea85a6374 |
|
235 | add changeset ef1ea85a6374 | |
236 | add changeset f9cafe1212c8 |
|
236 | add changeset f9cafe1212c8 | |
237 | add changeset 911600dab2ae |
|
237 | add changeset 911600dab2ae | |
238 | adding manifests |
|
238 | adding manifests | |
239 | adding file changes |
|
239 | adding file changes | |
240 | adding foo/Bar/file.txt revisions |
|
240 | adding foo/Bar/file.txt revisions | |
241 | adding foo/file.txt revisions |
|
241 | adding foo/file.txt revisions | |
242 | adding quux/file.py revisions |
|
242 | adding quux/file.py revisions | |
243 | added 3 changesets with 3 changes to 3 files |
|
243 | added 3 changesets with 3 changes to 3 files | |
244 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
244 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
245 | acl: checking access for user "fred" |
|
245 | acl: checking access for user "fred" | |
246 | acl: acl.allow.branches not enabled |
|
246 | acl: acl.allow.branches not enabled | |
247 | acl: acl.deny.branches not enabled |
|
247 | acl: acl.deny.branches not enabled | |
248 | acl: acl.allow not enabled |
|
248 | acl: acl.allow not enabled | |
249 | acl: acl.deny not enabled |
|
249 | acl: acl.deny not enabled | |
250 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
250 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
251 | acl: path access granted: "ef1ea85a6374" |
|
251 | acl: path access granted: "ef1ea85a6374" | |
252 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
252 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
253 | acl: path access granted: "f9cafe1212c8" |
|
253 | acl: path access granted: "f9cafe1212c8" | |
254 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
254 | acl: branch access granted: "911600dab2ae" on branch "default" | |
255 | acl: path access granted: "911600dab2ae" |
|
255 | acl: path access granted: "911600dab2ae" | |
256 | updating the branch cache |
|
256 | updating the branch cache | |
257 | bundle2-input-part: total payload size 1606 |
|
257 | bundle2-input-part: total payload size 1606 | |
258 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
258 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
259 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
259 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
260 | bundle2-input-bundle: 3 parts total |
|
260 | bundle2-input-bundle: 3 parts total | |
261 | bundle2-output-bundle: "HG20", 2 parts total |
|
261 | bundle2-output-bundle: "HG20", 2 parts total | |
262 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
262 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
263 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
263 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
264 | bundle2-input-bundle: with-transaction |
|
264 | bundle2-input-bundle: with-transaction | |
265 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
265 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
266 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
266 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
267 | bundle2-input-bundle: 1 parts total |
|
267 | bundle2-input-bundle: 1 parts total | |
268 | listing keys for "phases" |
|
268 | listing keys for "phases" | |
269 | repository tip rolled back to revision 0 (undo push) |
|
269 | repository tip rolled back to revision 0 (undo push) | |
270 | 0:6675d58eff77 |
|
270 | 0:6675d58eff77 | |
271 |
|
271 | |||
272 |
|
272 | |||
273 | Empty [acl.allow] |
|
273 | Empty [acl.allow] | |
274 |
|
274 | |||
275 | $ echo '[acl.allow]' >> $config |
|
275 | $ echo '[acl.allow]' >> $config | |
276 | $ do_push fred |
|
276 | $ do_push fred | |
277 | Pushing as user fred |
|
277 | Pushing as user fred | |
278 | hgrc = """ |
|
278 | hgrc = """ | |
279 | [hooks] |
|
279 | [hooks] | |
280 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
280 | pretxnchangegroup.acl = python:hgext.acl.hook | |
281 | [acl] |
|
281 | [acl] | |
282 | sources = push |
|
282 | sources = push | |
283 | [acl.allow] |
|
283 | [acl.allow] | |
284 | """ |
|
284 | """ | |
285 | pushing to ../b |
|
285 | pushing to ../b | |
286 | query 1; heads |
|
286 | query 1; heads | |
287 | searching for changes |
|
287 | searching for changes | |
288 | all remote heads known locally |
|
288 | all remote heads known locally | |
289 | listing keys for "phases" |
|
289 | listing keys for "phases" | |
290 | checking for updated bookmarks |
|
290 | checking for updated bookmarks | |
291 | listing keys for "bookmarks" |
|
291 | listing keys for "bookmarks" | |
292 | invalid branchheads cache (served): tip differs |
|
292 | invalid branchheads cache (served): tip differs | |
293 | listing keys for "bookmarks" |
|
293 | listing keys for "bookmarks" | |
294 | 3 changesets found |
|
294 | 3 changesets found | |
295 | list of changesets: |
|
295 | list of changesets: | |
296 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
296 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
297 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
297 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
298 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
298 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
299 | bundle2-output-bundle: "HG20", 4 parts total |
|
299 | bundle2-output-bundle: "HG20", 4 parts total | |
300 | bundle2-output-part: "replycaps" 155 bytes payload |
|
300 | bundle2-output-part: "replycaps" 155 bytes payload | |
301 | bundle2-output-part: "check:heads" streamed payload |
|
301 | bundle2-output-part: "check:heads" streamed payload | |
302 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
302 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
303 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
303 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
304 | bundle2-input-bundle: with-transaction |
|
304 | bundle2-input-bundle: with-transaction | |
305 | bundle2-input-part: "replycaps" supported |
|
305 | bundle2-input-part: "replycaps" supported | |
306 | bundle2-input-part: total payload size 155 |
|
306 | bundle2-input-part: total payload size 155 | |
307 | bundle2-input-part: "check:heads" supported |
|
307 | bundle2-input-part: "check:heads" supported | |
308 | bundle2-input-part: total payload size 20 |
|
308 | bundle2-input-part: total payload size 20 | |
309 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
309 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
310 | adding changesets |
|
310 | adding changesets | |
311 | add changeset ef1ea85a6374 |
|
311 | add changeset ef1ea85a6374 | |
312 | add changeset f9cafe1212c8 |
|
312 | add changeset f9cafe1212c8 | |
313 | add changeset 911600dab2ae |
|
313 | add changeset 911600dab2ae | |
314 | adding manifests |
|
314 | adding manifests | |
315 | adding file changes |
|
315 | adding file changes | |
316 | adding foo/Bar/file.txt revisions |
|
316 | adding foo/Bar/file.txt revisions | |
317 | adding foo/file.txt revisions |
|
317 | adding foo/file.txt revisions | |
318 | adding quux/file.py revisions |
|
318 | adding quux/file.py revisions | |
319 | added 3 changesets with 3 changes to 3 files |
|
319 | added 3 changesets with 3 changes to 3 files | |
320 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
320 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
321 | acl: checking access for user "fred" |
|
321 | acl: checking access for user "fred" | |
322 | acl: acl.allow.branches not enabled |
|
322 | acl: acl.allow.branches not enabled | |
323 | acl: acl.deny.branches not enabled |
|
323 | acl: acl.deny.branches not enabled | |
324 | acl: acl.allow enabled, 0 entries for user fred |
|
324 | acl: acl.allow enabled, 0 entries for user fred | |
325 | acl: acl.deny not enabled |
|
325 | acl: acl.deny not enabled | |
326 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
326 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
327 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
327 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") | |
328 | bundle2-input-part: total payload size 1606 |
|
328 | bundle2-input-part: total payload size 1606 | |
329 | bundle2-input-bundle: 3 parts total |
|
329 | bundle2-input-bundle: 3 parts total | |
330 | transaction abort! |
|
330 | transaction abort! | |
331 | rollback completed |
|
331 | rollback completed | |
332 | abort: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
332 | abort: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") | |
333 | no rollback information available |
|
333 | no rollback information available | |
334 | 0:6675d58eff77 |
|
334 | 0:6675d58eff77 | |
335 |
|
335 | |||
336 |
|
336 | |||
337 | fred is allowed inside foo/ |
|
337 | fred is allowed inside foo/ | |
338 |
|
338 | |||
339 | $ echo 'foo/** = fred' >> $config |
|
339 | $ echo 'foo/** = fred' >> $config | |
340 | $ do_push fred |
|
340 | $ do_push fred | |
341 | Pushing as user fred |
|
341 | Pushing as user fred | |
342 | hgrc = """ |
|
342 | hgrc = """ | |
343 | [hooks] |
|
343 | [hooks] | |
344 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
344 | pretxnchangegroup.acl = python:hgext.acl.hook | |
345 | [acl] |
|
345 | [acl] | |
346 | sources = push |
|
346 | sources = push | |
347 | [acl.allow] |
|
347 | [acl.allow] | |
348 | foo/** = fred |
|
348 | foo/** = fred | |
349 | """ |
|
349 | """ | |
350 | pushing to ../b |
|
350 | pushing to ../b | |
351 | query 1; heads |
|
351 | query 1; heads | |
352 | searching for changes |
|
352 | searching for changes | |
353 | all remote heads known locally |
|
353 | all remote heads known locally | |
354 | listing keys for "phases" |
|
354 | listing keys for "phases" | |
355 | checking for updated bookmarks |
|
355 | checking for updated bookmarks | |
356 | listing keys for "bookmarks" |
|
356 | listing keys for "bookmarks" | |
357 | invalid branchheads cache (served): tip differs |
|
357 | invalid branchheads cache (served): tip differs | |
358 | listing keys for "bookmarks" |
|
358 | listing keys for "bookmarks" | |
359 | 3 changesets found |
|
359 | 3 changesets found | |
360 | list of changesets: |
|
360 | list of changesets: | |
361 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
361 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
362 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
362 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
363 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
363 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
364 | bundle2-output-bundle: "HG20", 4 parts total |
|
364 | bundle2-output-bundle: "HG20", 4 parts total | |
365 | bundle2-output-part: "replycaps" 155 bytes payload |
|
365 | bundle2-output-part: "replycaps" 155 bytes payload | |
366 | bundle2-output-part: "check:heads" streamed payload |
|
366 | bundle2-output-part: "check:heads" streamed payload | |
367 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
367 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
368 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
368 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
369 | bundle2-input-bundle: with-transaction |
|
369 | bundle2-input-bundle: with-transaction | |
370 | bundle2-input-part: "replycaps" supported |
|
370 | bundle2-input-part: "replycaps" supported | |
371 | bundle2-input-part: total payload size 155 |
|
371 | bundle2-input-part: total payload size 155 | |
372 | bundle2-input-part: "check:heads" supported |
|
372 | bundle2-input-part: "check:heads" supported | |
373 | bundle2-input-part: total payload size 20 |
|
373 | bundle2-input-part: total payload size 20 | |
374 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
374 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
375 | adding changesets |
|
375 | adding changesets | |
376 | add changeset ef1ea85a6374 |
|
376 | add changeset ef1ea85a6374 | |
377 | add changeset f9cafe1212c8 |
|
377 | add changeset f9cafe1212c8 | |
378 | add changeset 911600dab2ae |
|
378 | add changeset 911600dab2ae | |
379 | adding manifests |
|
379 | adding manifests | |
380 | adding file changes |
|
380 | adding file changes | |
381 | adding foo/Bar/file.txt revisions |
|
381 | adding foo/Bar/file.txt revisions | |
382 | adding foo/file.txt revisions |
|
382 | adding foo/file.txt revisions | |
383 | adding quux/file.py revisions |
|
383 | adding quux/file.py revisions | |
384 | added 3 changesets with 3 changes to 3 files |
|
384 | added 3 changesets with 3 changes to 3 files | |
385 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
385 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
386 | acl: checking access for user "fred" |
|
386 | acl: checking access for user "fred" | |
387 | acl: acl.allow.branches not enabled |
|
387 | acl: acl.allow.branches not enabled | |
388 | acl: acl.deny.branches not enabled |
|
388 | acl: acl.deny.branches not enabled | |
389 | acl: acl.allow enabled, 1 entries for user fred |
|
389 | acl: acl.allow enabled, 1 entries for user fred | |
390 | acl: acl.deny not enabled |
|
390 | acl: acl.deny not enabled | |
391 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
391 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
392 | acl: path access granted: "ef1ea85a6374" |
|
392 | acl: path access granted: "ef1ea85a6374" | |
393 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
393 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
394 | acl: path access granted: "f9cafe1212c8" |
|
394 | acl: path access granted: "f9cafe1212c8" | |
395 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
395 | acl: branch access granted: "911600dab2ae" on branch "default" | |
396 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
396 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") | |
397 | bundle2-input-part: total payload size 1606 |
|
397 | bundle2-input-part: total payload size 1606 | |
398 | bundle2-input-bundle: 3 parts total |
|
398 | bundle2-input-bundle: 3 parts total | |
399 | transaction abort! |
|
399 | transaction abort! | |
400 | rollback completed |
|
400 | rollback completed | |
401 | abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
401 | abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") | |
402 | no rollback information available |
|
402 | no rollback information available | |
403 | 0:6675d58eff77 |
|
403 | 0:6675d58eff77 | |
404 |
|
404 | |||
405 |
|
405 | |||
406 | Empty [acl.deny] |
|
406 | Empty [acl.deny] | |
407 |
|
407 | |||
408 | $ echo '[acl.deny]' >> $config |
|
408 | $ echo '[acl.deny]' >> $config | |
409 | $ do_push barney |
|
409 | $ do_push barney | |
410 | Pushing as user barney |
|
410 | Pushing as user barney | |
411 | hgrc = """ |
|
411 | hgrc = """ | |
412 | [hooks] |
|
412 | [hooks] | |
413 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
413 | pretxnchangegroup.acl = python:hgext.acl.hook | |
414 | [acl] |
|
414 | [acl] | |
415 | sources = push |
|
415 | sources = push | |
416 | [acl.allow] |
|
416 | [acl.allow] | |
417 | foo/** = fred |
|
417 | foo/** = fred | |
418 | [acl.deny] |
|
418 | [acl.deny] | |
419 | """ |
|
419 | """ | |
420 | pushing to ../b |
|
420 | pushing to ../b | |
421 | query 1; heads |
|
421 | query 1; heads | |
422 | searching for changes |
|
422 | searching for changes | |
423 | all remote heads known locally |
|
423 | all remote heads known locally | |
424 | listing keys for "phases" |
|
424 | listing keys for "phases" | |
425 | checking for updated bookmarks |
|
425 | checking for updated bookmarks | |
426 | listing keys for "bookmarks" |
|
426 | listing keys for "bookmarks" | |
427 | invalid branchheads cache (served): tip differs |
|
427 | invalid branchheads cache (served): tip differs | |
428 | listing keys for "bookmarks" |
|
428 | listing keys for "bookmarks" | |
429 | 3 changesets found |
|
429 | 3 changesets found | |
430 | list of changesets: |
|
430 | list of changesets: | |
431 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
431 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
432 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
432 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
433 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
433 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
434 | bundle2-output-bundle: "HG20", 4 parts total |
|
434 | bundle2-output-bundle: "HG20", 4 parts total | |
435 | bundle2-output-part: "replycaps" 155 bytes payload |
|
435 | bundle2-output-part: "replycaps" 155 bytes payload | |
436 | bundle2-output-part: "check:heads" streamed payload |
|
436 | bundle2-output-part: "check:heads" streamed payload | |
437 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
437 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
438 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
438 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
439 | bundle2-input-bundle: with-transaction |
|
439 | bundle2-input-bundle: with-transaction | |
440 | bundle2-input-part: "replycaps" supported |
|
440 | bundle2-input-part: "replycaps" supported | |
441 | bundle2-input-part: total payload size 155 |
|
441 | bundle2-input-part: total payload size 155 | |
442 | bundle2-input-part: "check:heads" supported |
|
442 | bundle2-input-part: "check:heads" supported | |
443 | bundle2-input-part: total payload size 20 |
|
443 | bundle2-input-part: total payload size 20 | |
444 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
444 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
445 | adding changesets |
|
445 | adding changesets | |
446 | add changeset ef1ea85a6374 |
|
446 | add changeset ef1ea85a6374 | |
447 | add changeset f9cafe1212c8 |
|
447 | add changeset f9cafe1212c8 | |
448 | add changeset 911600dab2ae |
|
448 | add changeset 911600dab2ae | |
449 | adding manifests |
|
449 | adding manifests | |
450 | adding file changes |
|
450 | adding file changes | |
451 | adding foo/Bar/file.txt revisions |
|
451 | adding foo/Bar/file.txt revisions | |
452 | adding foo/file.txt revisions |
|
452 | adding foo/file.txt revisions | |
453 | adding quux/file.py revisions |
|
453 | adding quux/file.py revisions | |
454 | added 3 changesets with 3 changes to 3 files |
|
454 | added 3 changesets with 3 changes to 3 files | |
455 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
455 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
456 | acl: checking access for user "barney" |
|
456 | acl: checking access for user "barney" | |
457 | acl: acl.allow.branches not enabled |
|
457 | acl: acl.allow.branches not enabled | |
458 | acl: acl.deny.branches not enabled |
|
458 | acl: acl.deny.branches not enabled | |
459 | acl: acl.allow enabled, 0 entries for user barney |
|
459 | acl: acl.allow enabled, 0 entries for user barney | |
460 | acl: acl.deny enabled, 0 entries for user barney |
|
460 | acl: acl.deny enabled, 0 entries for user barney | |
461 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
461 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
462 | error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
462 | error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") | |
463 | bundle2-input-part: total payload size 1606 |
|
463 | bundle2-input-part: total payload size 1606 | |
464 | bundle2-input-bundle: 3 parts total |
|
464 | bundle2-input-bundle: 3 parts total | |
465 | transaction abort! |
|
465 | transaction abort! | |
466 | rollback completed |
|
466 | rollback completed | |
467 | abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
467 | abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") | |
468 | no rollback information available |
|
468 | no rollback information available | |
469 | 0:6675d58eff77 |
|
469 | 0:6675d58eff77 | |
470 |
|
470 | |||
471 |
|
471 | |||
472 | fred is allowed inside foo/, but not foo/bar/ (case matters) |
|
472 | fred is allowed inside foo/, but not foo/bar/ (case matters) | |
473 |
|
473 | |||
474 | $ echo 'foo/bar/** = fred' >> $config |
|
474 | $ echo 'foo/bar/** = fred' >> $config | |
475 | $ do_push fred |
|
475 | $ do_push fred | |
476 | Pushing as user fred |
|
476 | Pushing as user fred | |
477 | hgrc = """ |
|
477 | hgrc = """ | |
478 | [hooks] |
|
478 | [hooks] | |
479 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
479 | pretxnchangegroup.acl = python:hgext.acl.hook | |
480 | [acl] |
|
480 | [acl] | |
481 | sources = push |
|
481 | sources = push | |
482 | [acl.allow] |
|
482 | [acl.allow] | |
483 | foo/** = fred |
|
483 | foo/** = fred | |
484 | [acl.deny] |
|
484 | [acl.deny] | |
485 | foo/bar/** = fred |
|
485 | foo/bar/** = fred | |
486 | """ |
|
486 | """ | |
487 | pushing to ../b |
|
487 | pushing to ../b | |
488 | query 1; heads |
|
488 | query 1; heads | |
489 | searching for changes |
|
489 | searching for changes | |
490 | all remote heads known locally |
|
490 | all remote heads known locally | |
491 | listing keys for "phases" |
|
491 | listing keys for "phases" | |
492 | checking for updated bookmarks |
|
492 | checking for updated bookmarks | |
493 | listing keys for "bookmarks" |
|
493 | listing keys for "bookmarks" | |
494 | invalid branchheads cache (served): tip differs |
|
494 | invalid branchheads cache (served): tip differs | |
495 | listing keys for "bookmarks" |
|
495 | listing keys for "bookmarks" | |
496 | 3 changesets found |
|
496 | 3 changesets found | |
497 | list of changesets: |
|
497 | list of changesets: | |
498 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
498 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
499 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
499 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
500 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
500 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
501 | bundle2-output-bundle: "HG20", 4 parts total |
|
501 | bundle2-output-bundle: "HG20", 4 parts total | |
502 | bundle2-output-part: "replycaps" 155 bytes payload |
|
502 | bundle2-output-part: "replycaps" 155 bytes payload | |
503 | bundle2-output-part: "check:heads" streamed payload |
|
503 | bundle2-output-part: "check:heads" streamed payload | |
504 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
504 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
505 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
505 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
506 | bundle2-input-bundle: with-transaction |
|
506 | bundle2-input-bundle: with-transaction | |
507 | bundle2-input-part: "replycaps" supported |
|
507 | bundle2-input-part: "replycaps" supported | |
508 | bundle2-input-part: total payload size 155 |
|
508 | bundle2-input-part: total payload size 155 | |
509 | bundle2-input-part: "check:heads" supported |
|
509 | bundle2-input-part: "check:heads" supported | |
510 | bundle2-input-part: total payload size 20 |
|
510 | bundle2-input-part: total payload size 20 | |
511 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
511 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
512 | adding changesets |
|
512 | adding changesets | |
513 | add changeset ef1ea85a6374 |
|
513 | add changeset ef1ea85a6374 | |
514 | add changeset f9cafe1212c8 |
|
514 | add changeset f9cafe1212c8 | |
515 | add changeset 911600dab2ae |
|
515 | add changeset 911600dab2ae | |
516 | adding manifests |
|
516 | adding manifests | |
517 | adding file changes |
|
517 | adding file changes | |
518 | adding foo/Bar/file.txt revisions |
|
518 | adding foo/Bar/file.txt revisions | |
519 | adding foo/file.txt revisions |
|
519 | adding foo/file.txt revisions | |
520 | adding quux/file.py revisions |
|
520 | adding quux/file.py revisions | |
521 | added 3 changesets with 3 changes to 3 files |
|
521 | added 3 changesets with 3 changes to 3 files | |
522 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
522 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
523 | acl: checking access for user "fred" |
|
523 | acl: checking access for user "fred" | |
524 | acl: acl.allow.branches not enabled |
|
524 | acl: acl.allow.branches not enabled | |
525 | acl: acl.deny.branches not enabled |
|
525 | acl: acl.deny.branches not enabled | |
526 | acl: acl.allow enabled, 1 entries for user fred |
|
526 | acl: acl.allow enabled, 1 entries for user fred | |
527 | acl: acl.deny enabled, 1 entries for user fred |
|
527 | acl: acl.deny enabled, 1 entries for user fred | |
528 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
528 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
529 | acl: path access granted: "ef1ea85a6374" |
|
529 | acl: path access granted: "ef1ea85a6374" | |
530 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
530 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
531 | acl: path access granted: "f9cafe1212c8" |
|
531 | acl: path access granted: "f9cafe1212c8" | |
532 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
532 | acl: branch access granted: "911600dab2ae" on branch "default" | |
533 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
533 | error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") | |
534 | bundle2-input-part: total payload size 1606 |
|
534 | bundle2-input-part: total payload size 1606 | |
535 | bundle2-input-bundle: 3 parts total |
|
535 | bundle2-input-bundle: 3 parts total | |
536 | transaction abort! |
|
536 | transaction abort! | |
537 | rollback completed |
|
537 | rollback completed | |
538 | abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
538 | abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae") | |
539 | no rollback information available |
|
539 | no rollback information available | |
540 | 0:6675d58eff77 |
|
540 | 0:6675d58eff77 | |
541 |
|
541 | |||
542 |
|
542 | |||
543 | fred is allowed inside foo/, but not foo/Bar/ |
|
543 | fred is allowed inside foo/, but not foo/Bar/ | |
544 |
|
544 | |||
545 | $ echo 'foo/Bar/** = fred' >> $config |
|
545 | $ echo 'foo/Bar/** = fred' >> $config | |
546 | $ do_push fred |
|
546 | $ do_push fred | |
547 | Pushing as user fred |
|
547 | Pushing as user fred | |
548 | hgrc = """ |
|
548 | hgrc = """ | |
549 | [hooks] |
|
549 | [hooks] | |
550 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
550 | pretxnchangegroup.acl = python:hgext.acl.hook | |
551 | [acl] |
|
551 | [acl] | |
552 | sources = push |
|
552 | sources = push | |
553 | [acl.allow] |
|
553 | [acl.allow] | |
554 | foo/** = fred |
|
554 | foo/** = fred | |
555 | [acl.deny] |
|
555 | [acl.deny] | |
556 | foo/bar/** = fred |
|
556 | foo/bar/** = fred | |
557 | foo/Bar/** = fred |
|
557 | foo/Bar/** = fred | |
558 | """ |
|
558 | """ | |
559 | pushing to ../b |
|
559 | pushing to ../b | |
560 | query 1; heads |
|
560 | query 1; heads | |
561 | searching for changes |
|
561 | searching for changes | |
562 | all remote heads known locally |
|
562 | all remote heads known locally | |
563 | listing keys for "phases" |
|
563 | listing keys for "phases" | |
564 | checking for updated bookmarks |
|
564 | checking for updated bookmarks | |
565 | listing keys for "bookmarks" |
|
565 | listing keys for "bookmarks" | |
566 | invalid branchheads cache (served): tip differs |
|
566 | invalid branchheads cache (served): tip differs | |
567 | listing keys for "bookmarks" |
|
567 | listing keys for "bookmarks" | |
568 | 3 changesets found |
|
568 | 3 changesets found | |
569 | list of changesets: |
|
569 | list of changesets: | |
570 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
570 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
571 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
571 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
572 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
572 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
573 | bundle2-output-bundle: "HG20", 4 parts total |
|
573 | bundle2-output-bundle: "HG20", 4 parts total | |
574 | bundle2-output-part: "replycaps" 155 bytes payload |
|
574 | bundle2-output-part: "replycaps" 155 bytes payload | |
575 | bundle2-output-part: "check:heads" streamed payload |
|
575 | bundle2-output-part: "check:heads" streamed payload | |
576 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
576 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
577 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
577 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
578 | bundle2-input-bundle: with-transaction |
|
578 | bundle2-input-bundle: with-transaction | |
579 | bundle2-input-part: "replycaps" supported |
|
579 | bundle2-input-part: "replycaps" supported | |
580 | bundle2-input-part: total payload size 155 |
|
580 | bundle2-input-part: total payload size 155 | |
581 | bundle2-input-part: "check:heads" supported |
|
581 | bundle2-input-part: "check:heads" supported | |
582 | bundle2-input-part: total payload size 20 |
|
582 | bundle2-input-part: total payload size 20 | |
583 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
583 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
584 | adding changesets |
|
584 | adding changesets | |
585 | add changeset ef1ea85a6374 |
|
585 | add changeset ef1ea85a6374 | |
586 | add changeset f9cafe1212c8 |
|
586 | add changeset f9cafe1212c8 | |
587 | add changeset 911600dab2ae |
|
587 | add changeset 911600dab2ae | |
588 | adding manifests |
|
588 | adding manifests | |
589 | adding file changes |
|
589 | adding file changes | |
590 | adding foo/Bar/file.txt revisions |
|
590 | adding foo/Bar/file.txt revisions | |
591 | adding foo/file.txt revisions |
|
591 | adding foo/file.txt revisions | |
592 | adding quux/file.py revisions |
|
592 | adding quux/file.py revisions | |
593 | added 3 changesets with 3 changes to 3 files |
|
593 | added 3 changesets with 3 changes to 3 files | |
594 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
594 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
595 | acl: checking access for user "fred" |
|
595 | acl: checking access for user "fred" | |
596 | acl: acl.allow.branches not enabled |
|
596 | acl: acl.allow.branches not enabled | |
597 | acl: acl.deny.branches not enabled |
|
597 | acl: acl.deny.branches not enabled | |
598 | acl: acl.allow enabled, 1 entries for user fred |
|
598 | acl: acl.allow enabled, 1 entries for user fred | |
599 | acl: acl.deny enabled, 2 entries for user fred |
|
599 | acl: acl.deny enabled, 2 entries for user fred | |
600 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
600 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
601 | acl: path access granted: "ef1ea85a6374" |
|
601 | acl: path access granted: "ef1ea85a6374" | |
602 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
602 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
603 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
603 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") | |
604 | bundle2-input-part: total payload size 1606 |
|
604 | bundle2-input-part: total payload size 1606 | |
605 | bundle2-input-bundle: 3 parts total |
|
605 | bundle2-input-bundle: 3 parts total | |
606 | transaction abort! |
|
606 | transaction abort! | |
607 | rollback completed |
|
607 | rollback completed | |
608 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
608 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") | |
609 | no rollback information available |
|
609 | no rollback information available | |
610 | 0:6675d58eff77 |
|
610 | 0:6675d58eff77 | |
611 |
|
611 | |||
612 |
|
612 | |||
613 | $ echo 'barney is not mentioned => not allowed anywhere' |
|
613 | $ echo 'barney is not mentioned => not allowed anywhere' | |
614 | barney is not mentioned => not allowed anywhere |
|
614 | barney is not mentioned => not allowed anywhere | |
615 | $ do_push barney |
|
615 | $ do_push barney | |
616 | Pushing as user barney |
|
616 | Pushing as user barney | |
617 | hgrc = """ |
|
617 | hgrc = """ | |
618 | [hooks] |
|
618 | [hooks] | |
619 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
619 | pretxnchangegroup.acl = python:hgext.acl.hook | |
620 | [acl] |
|
620 | [acl] | |
621 | sources = push |
|
621 | sources = push | |
622 | [acl.allow] |
|
622 | [acl.allow] | |
623 | foo/** = fred |
|
623 | foo/** = fred | |
624 | [acl.deny] |
|
624 | [acl.deny] | |
625 | foo/bar/** = fred |
|
625 | foo/bar/** = fred | |
626 | foo/Bar/** = fred |
|
626 | foo/Bar/** = fred | |
627 | """ |
|
627 | """ | |
628 | pushing to ../b |
|
628 | pushing to ../b | |
629 | query 1; heads |
|
629 | query 1; heads | |
630 | searching for changes |
|
630 | searching for changes | |
631 | all remote heads known locally |
|
631 | all remote heads known locally | |
632 | listing keys for "phases" |
|
632 | listing keys for "phases" | |
633 | checking for updated bookmarks |
|
633 | checking for updated bookmarks | |
634 | listing keys for "bookmarks" |
|
634 | listing keys for "bookmarks" | |
635 | invalid branchheads cache (served): tip differs |
|
635 | invalid branchheads cache (served): tip differs | |
636 | listing keys for "bookmarks" |
|
636 | listing keys for "bookmarks" | |
637 | 3 changesets found |
|
637 | 3 changesets found | |
638 | list of changesets: |
|
638 | list of changesets: | |
639 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
639 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
640 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
640 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
641 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
641 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
642 | bundle2-output-bundle: "HG20", 4 parts total |
|
642 | bundle2-output-bundle: "HG20", 4 parts total | |
643 | bundle2-output-part: "replycaps" 155 bytes payload |
|
643 | bundle2-output-part: "replycaps" 155 bytes payload | |
644 | bundle2-output-part: "check:heads" streamed payload |
|
644 | bundle2-output-part: "check:heads" streamed payload | |
645 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
645 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
646 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
646 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
647 | bundle2-input-bundle: with-transaction |
|
647 | bundle2-input-bundle: with-transaction | |
648 | bundle2-input-part: "replycaps" supported |
|
648 | bundle2-input-part: "replycaps" supported | |
649 | bundle2-input-part: total payload size 155 |
|
649 | bundle2-input-part: total payload size 155 | |
650 | bundle2-input-part: "check:heads" supported |
|
650 | bundle2-input-part: "check:heads" supported | |
651 | bundle2-input-part: total payload size 20 |
|
651 | bundle2-input-part: total payload size 20 | |
652 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
652 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
653 | adding changesets |
|
653 | adding changesets | |
654 | add changeset ef1ea85a6374 |
|
654 | add changeset ef1ea85a6374 | |
655 | add changeset f9cafe1212c8 |
|
655 | add changeset f9cafe1212c8 | |
656 | add changeset 911600dab2ae |
|
656 | add changeset 911600dab2ae | |
657 | adding manifests |
|
657 | adding manifests | |
658 | adding file changes |
|
658 | adding file changes | |
659 | adding foo/Bar/file.txt revisions |
|
659 | adding foo/Bar/file.txt revisions | |
660 | adding foo/file.txt revisions |
|
660 | adding foo/file.txt revisions | |
661 | adding quux/file.py revisions |
|
661 | adding quux/file.py revisions | |
662 | added 3 changesets with 3 changes to 3 files |
|
662 | added 3 changesets with 3 changes to 3 files | |
663 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
663 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
664 | acl: checking access for user "barney" |
|
664 | acl: checking access for user "barney" | |
665 | acl: acl.allow.branches not enabled |
|
665 | acl: acl.allow.branches not enabled | |
666 | acl: acl.deny.branches not enabled |
|
666 | acl: acl.deny.branches not enabled | |
667 | acl: acl.allow enabled, 0 entries for user barney |
|
667 | acl: acl.allow enabled, 0 entries for user barney | |
668 | acl: acl.deny enabled, 0 entries for user barney |
|
668 | acl: acl.deny enabled, 0 entries for user barney | |
669 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
669 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
670 | error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
670 | error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") | |
671 | bundle2-input-part: total payload size 1606 |
|
671 | bundle2-input-part: total payload size 1606 | |
672 | bundle2-input-bundle: 3 parts total |
|
672 | bundle2-input-bundle: 3 parts total | |
673 | transaction abort! |
|
673 | transaction abort! | |
674 | rollback completed |
|
674 | rollback completed | |
675 | abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") |
|
675 | abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374") | |
676 | no rollback information available |
|
676 | no rollback information available | |
677 | 0:6675d58eff77 |
|
677 | 0:6675d58eff77 | |
678 |
|
678 | |||
679 |
|
679 | |||
680 | barney is allowed everywhere |
|
680 | barney is allowed everywhere | |
681 |
|
681 | |||
682 | $ echo '[acl.allow]' >> $config |
|
682 | $ echo '[acl.allow]' >> $config | |
683 | $ echo '** = barney' >> $config |
|
683 | $ echo '** = barney' >> $config | |
684 | $ do_push barney |
|
684 | $ do_push barney | |
685 | Pushing as user barney |
|
685 | Pushing as user barney | |
686 | hgrc = """ |
|
686 | hgrc = """ | |
687 | [hooks] |
|
687 | [hooks] | |
688 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
688 | pretxnchangegroup.acl = python:hgext.acl.hook | |
689 | [acl] |
|
689 | [acl] | |
690 | sources = push |
|
690 | sources = push | |
691 | [acl.allow] |
|
691 | [acl.allow] | |
692 | foo/** = fred |
|
692 | foo/** = fred | |
693 | [acl.deny] |
|
693 | [acl.deny] | |
694 | foo/bar/** = fred |
|
694 | foo/bar/** = fred | |
695 | foo/Bar/** = fred |
|
695 | foo/Bar/** = fred | |
696 | [acl.allow] |
|
696 | [acl.allow] | |
697 | ** = barney |
|
697 | ** = barney | |
698 | """ |
|
698 | """ | |
699 | pushing to ../b |
|
699 | pushing to ../b | |
700 | query 1; heads |
|
700 | query 1; heads | |
701 | searching for changes |
|
701 | searching for changes | |
702 | all remote heads known locally |
|
702 | all remote heads known locally | |
703 | listing keys for "phases" |
|
703 | listing keys for "phases" | |
704 | checking for updated bookmarks |
|
704 | checking for updated bookmarks | |
705 | listing keys for "bookmarks" |
|
705 | listing keys for "bookmarks" | |
706 | invalid branchheads cache (served): tip differs |
|
706 | invalid branchheads cache (served): tip differs | |
707 | listing keys for "bookmarks" |
|
707 | listing keys for "bookmarks" | |
708 | 3 changesets found |
|
708 | 3 changesets found | |
709 | list of changesets: |
|
709 | list of changesets: | |
710 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
710 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
711 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
711 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
712 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
712 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
713 | bundle2-output-bundle: "HG20", 4 parts total |
|
713 | bundle2-output-bundle: "HG20", 4 parts total | |
714 | bundle2-output-part: "replycaps" 155 bytes payload |
|
714 | bundle2-output-part: "replycaps" 155 bytes payload | |
715 | bundle2-output-part: "check:heads" streamed payload |
|
715 | bundle2-output-part: "check:heads" streamed payload | |
716 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
716 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
717 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
717 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
718 | bundle2-input-bundle: with-transaction |
|
718 | bundle2-input-bundle: with-transaction | |
719 | bundle2-input-part: "replycaps" supported |
|
719 | bundle2-input-part: "replycaps" supported | |
720 | bundle2-input-part: total payload size 155 |
|
720 | bundle2-input-part: total payload size 155 | |
721 | bundle2-input-part: "check:heads" supported |
|
721 | bundle2-input-part: "check:heads" supported | |
722 | bundle2-input-part: total payload size 20 |
|
722 | bundle2-input-part: total payload size 20 | |
723 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
723 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
724 | adding changesets |
|
724 | adding changesets | |
725 | add changeset ef1ea85a6374 |
|
725 | add changeset ef1ea85a6374 | |
726 | add changeset f9cafe1212c8 |
|
726 | add changeset f9cafe1212c8 | |
727 | add changeset 911600dab2ae |
|
727 | add changeset 911600dab2ae | |
728 | adding manifests |
|
728 | adding manifests | |
729 | adding file changes |
|
729 | adding file changes | |
730 | adding foo/Bar/file.txt revisions |
|
730 | adding foo/Bar/file.txt revisions | |
731 | adding foo/file.txt revisions |
|
731 | adding foo/file.txt revisions | |
732 | adding quux/file.py revisions |
|
732 | adding quux/file.py revisions | |
733 | added 3 changesets with 3 changes to 3 files |
|
733 | added 3 changesets with 3 changes to 3 files | |
734 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
734 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
735 | acl: checking access for user "barney" |
|
735 | acl: checking access for user "barney" | |
736 | acl: acl.allow.branches not enabled |
|
736 | acl: acl.allow.branches not enabled | |
737 | acl: acl.deny.branches not enabled |
|
737 | acl: acl.deny.branches not enabled | |
738 | acl: acl.allow enabled, 1 entries for user barney |
|
738 | acl: acl.allow enabled, 1 entries for user barney | |
739 | acl: acl.deny enabled, 0 entries for user barney |
|
739 | acl: acl.deny enabled, 0 entries for user barney | |
740 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
740 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
741 | acl: path access granted: "ef1ea85a6374" |
|
741 | acl: path access granted: "ef1ea85a6374" | |
742 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
742 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
743 | acl: path access granted: "f9cafe1212c8" |
|
743 | acl: path access granted: "f9cafe1212c8" | |
744 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
744 | acl: branch access granted: "911600dab2ae" on branch "default" | |
745 | acl: path access granted: "911600dab2ae" |
|
745 | acl: path access granted: "911600dab2ae" | |
746 | updating the branch cache |
|
746 | updating the branch cache | |
747 | bundle2-input-part: total payload size 1606 |
|
747 | bundle2-input-part: total payload size 1606 | |
748 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
748 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
749 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
749 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
750 | bundle2-input-bundle: 3 parts total |
|
750 | bundle2-input-bundle: 3 parts total | |
751 | bundle2-output-bundle: "HG20", 2 parts total |
|
751 | bundle2-output-bundle: "HG20", 2 parts total | |
752 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
752 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
753 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
753 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
754 | bundle2-input-bundle: with-transaction |
|
754 | bundle2-input-bundle: with-transaction | |
755 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
755 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
756 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
756 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
757 | bundle2-input-bundle: 1 parts total |
|
757 | bundle2-input-bundle: 1 parts total | |
758 | listing keys for "phases" |
|
758 | listing keys for "phases" | |
759 | repository tip rolled back to revision 0 (undo push) |
|
759 | repository tip rolled back to revision 0 (undo push) | |
760 | 0:6675d58eff77 |
|
760 | 0:6675d58eff77 | |
761 |
|
761 | |||
762 |
|
762 | |||
763 | wilma can change files with a .txt extension |
|
763 | wilma can change files with a .txt extension | |
764 |
|
764 | |||
765 | $ echo '**/*.txt = wilma' >> $config |
|
765 | $ echo '**/*.txt = wilma' >> $config | |
766 | $ do_push wilma |
|
766 | $ do_push wilma | |
767 | Pushing as user wilma |
|
767 | Pushing as user wilma | |
768 | hgrc = """ |
|
768 | hgrc = """ | |
769 | [hooks] |
|
769 | [hooks] | |
770 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
770 | pretxnchangegroup.acl = python:hgext.acl.hook | |
771 | [acl] |
|
771 | [acl] | |
772 | sources = push |
|
772 | sources = push | |
773 | [acl.allow] |
|
773 | [acl.allow] | |
774 | foo/** = fred |
|
774 | foo/** = fred | |
775 | [acl.deny] |
|
775 | [acl.deny] | |
776 | foo/bar/** = fred |
|
776 | foo/bar/** = fred | |
777 | foo/Bar/** = fred |
|
777 | foo/Bar/** = fred | |
778 | [acl.allow] |
|
778 | [acl.allow] | |
779 | ** = barney |
|
779 | ** = barney | |
780 | **/*.txt = wilma |
|
780 | **/*.txt = wilma | |
781 | """ |
|
781 | """ | |
782 | pushing to ../b |
|
782 | pushing to ../b | |
783 | query 1; heads |
|
783 | query 1; heads | |
784 | searching for changes |
|
784 | searching for changes | |
785 | all remote heads known locally |
|
785 | all remote heads known locally | |
786 | listing keys for "phases" |
|
786 | listing keys for "phases" | |
787 | checking for updated bookmarks |
|
787 | checking for updated bookmarks | |
788 | listing keys for "bookmarks" |
|
788 | listing keys for "bookmarks" | |
789 | invalid branchheads cache (served): tip differs |
|
789 | invalid branchheads cache (served): tip differs | |
790 | listing keys for "bookmarks" |
|
790 | listing keys for "bookmarks" | |
791 | 3 changesets found |
|
791 | 3 changesets found | |
792 | list of changesets: |
|
792 | list of changesets: | |
793 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
793 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
794 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
794 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
795 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
795 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
796 | bundle2-output-bundle: "HG20", 4 parts total |
|
796 | bundle2-output-bundle: "HG20", 4 parts total | |
797 | bundle2-output-part: "replycaps" 155 bytes payload |
|
797 | bundle2-output-part: "replycaps" 155 bytes payload | |
798 | bundle2-output-part: "check:heads" streamed payload |
|
798 | bundle2-output-part: "check:heads" streamed payload | |
799 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
799 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
800 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
800 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
801 | bundle2-input-bundle: with-transaction |
|
801 | bundle2-input-bundle: with-transaction | |
802 | bundle2-input-part: "replycaps" supported |
|
802 | bundle2-input-part: "replycaps" supported | |
803 | bundle2-input-part: total payload size 155 |
|
803 | bundle2-input-part: total payload size 155 | |
804 | bundle2-input-part: "check:heads" supported |
|
804 | bundle2-input-part: "check:heads" supported | |
805 | bundle2-input-part: total payload size 20 |
|
805 | bundle2-input-part: total payload size 20 | |
806 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
806 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
807 | adding changesets |
|
807 | adding changesets | |
808 | add changeset ef1ea85a6374 |
|
808 | add changeset ef1ea85a6374 | |
809 | add changeset f9cafe1212c8 |
|
809 | add changeset f9cafe1212c8 | |
810 | add changeset 911600dab2ae |
|
810 | add changeset 911600dab2ae | |
811 | adding manifests |
|
811 | adding manifests | |
812 | adding file changes |
|
812 | adding file changes | |
813 | adding foo/Bar/file.txt revisions |
|
813 | adding foo/Bar/file.txt revisions | |
814 | adding foo/file.txt revisions |
|
814 | adding foo/file.txt revisions | |
815 | adding quux/file.py revisions |
|
815 | adding quux/file.py revisions | |
816 | added 3 changesets with 3 changes to 3 files |
|
816 | added 3 changesets with 3 changes to 3 files | |
817 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
817 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
818 | acl: checking access for user "wilma" |
|
818 | acl: checking access for user "wilma" | |
819 | acl: acl.allow.branches not enabled |
|
819 | acl: acl.allow.branches not enabled | |
820 | acl: acl.deny.branches not enabled |
|
820 | acl: acl.deny.branches not enabled | |
821 | acl: acl.allow enabled, 1 entries for user wilma |
|
821 | acl: acl.allow enabled, 1 entries for user wilma | |
822 | acl: acl.deny enabled, 0 entries for user wilma |
|
822 | acl: acl.deny enabled, 0 entries for user wilma | |
823 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
823 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
824 | acl: path access granted: "ef1ea85a6374" |
|
824 | acl: path access granted: "ef1ea85a6374" | |
825 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
825 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
826 | acl: path access granted: "f9cafe1212c8" |
|
826 | acl: path access granted: "f9cafe1212c8" | |
827 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
827 | acl: branch access granted: "911600dab2ae" on branch "default" | |
828 | error: pretxnchangegroup.acl hook failed: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
828 | error: pretxnchangegroup.acl hook failed: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae") | |
829 | bundle2-input-part: total payload size 1606 |
|
829 | bundle2-input-part: total payload size 1606 | |
830 | bundle2-input-bundle: 3 parts total |
|
830 | bundle2-input-bundle: 3 parts total | |
831 | transaction abort! |
|
831 | transaction abort! | |
832 | rollback completed |
|
832 | rollback completed | |
833 | abort: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
833 | abort: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae") | |
834 | no rollback information available |
|
834 | no rollback information available | |
835 | 0:6675d58eff77 |
|
835 | 0:6675d58eff77 | |
836 |
|
836 | |||
837 |
|
837 | |||
838 | file specified by acl.config does not exist |
|
838 | file specified by acl.config does not exist | |
839 |
|
839 | |||
840 | $ echo '[acl]' >> $config |
|
840 | $ echo '[acl]' >> $config | |
841 | $ echo 'config = ../acl.config' >> $config |
|
841 | $ echo 'config = ../acl.config' >> $config | |
842 | $ do_push barney |
|
842 | $ do_push barney | |
843 | Pushing as user barney |
|
843 | Pushing as user barney | |
844 | hgrc = """ |
|
844 | hgrc = """ | |
845 | [hooks] |
|
845 | [hooks] | |
846 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
846 | pretxnchangegroup.acl = python:hgext.acl.hook | |
847 | [acl] |
|
847 | [acl] | |
848 | sources = push |
|
848 | sources = push | |
849 | [acl.allow] |
|
849 | [acl.allow] | |
850 | foo/** = fred |
|
850 | foo/** = fred | |
851 | [acl.deny] |
|
851 | [acl.deny] | |
852 | foo/bar/** = fred |
|
852 | foo/bar/** = fred | |
853 | foo/Bar/** = fred |
|
853 | foo/Bar/** = fred | |
854 | [acl.allow] |
|
854 | [acl.allow] | |
855 | ** = barney |
|
855 | ** = barney | |
856 | **/*.txt = wilma |
|
856 | **/*.txt = wilma | |
857 | [acl] |
|
857 | [acl] | |
858 | config = ../acl.config |
|
858 | config = ../acl.config | |
859 | """ |
|
859 | """ | |
860 | pushing to ../b |
|
860 | pushing to ../b | |
861 | query 1; heads |
|
861 | query 1; heads | |
862 | searching for changes |
|
862 | searching for changes | |
863 | all remote heads known locally |
|
863 | all remote heads known locally | |
864 | listing keys for "phases" |
|
864 | listing keys for "phases" | |
865 | checking for updated bookmarks |
|
865 | checking for updated bookmarks | |
866 | listing keys for "bookmarks" |
|
866 | listing keys for "bookmarks" | |
867 | invalid branchheads cache (served): tip differs |
|
867 | invalid branchheads cache (served): tip differs | |
868 | listing keys for "bookmarks" |
|
868 | listing keys for "bookmarks" | |
869 | 3 changesets found |
|
869 | 3 changesets found | |
870 | list of changesets: |
|
870 | list of changesets: | |
871 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
871 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
872 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
872 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
873 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
873 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
874 | bundle2-output-bundle: "HG20", 4 parts total |
|
874 | bundle2-output-bundle: "HG20", 4 parts total | |
875 | bundle2-output-part: "replycaps" 155 bytes payload |
|
875 | bundle2-output-part: "replycaps" 155 bytes payload | |
876 | bundle2-output-part: "check:heads" streamed payload |
|
876 | bundle2-output-part: "check:heads" streamed payload | |
877 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
877 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
878 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
878 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
879 | bundle2-input-bundle: with-transaction |
|
879 | bundle2-input-bundle: with-transaction | |
880 | bundle2-input-part: "replycaps" supported |
|
880 | bundle2-input-part: "replycaps" supported | |
881 | bundle2-input-part: total payload size 155 |
|
881 | bundle2-input-part: total payload size 155 | |
882 | bundle2-input-part: "check:heads" supported |
|
882 | bundle2-input-part: "check:heads" supported | |
883 | bundle2-input-part: total payload size 20 |
|
883 | bundle2-input-part: total payload size 20 | |
884 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
884 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
885 | adding changesets |
|
885 | adding changesets | |
886 | add changeset ef1ea85a6374 |
|
886 | add changeset ef1ea85a6374 | |
887 | add changeset f9cafe1212c8 |
|
887 | add changeset f9cafe1212c8 | |
888 | add changeset 911600dab2ae |
|
888 | add changeset 911600dab2ae | |
889 | adding manifests |
|
889 | adding manifests | |
890 | adding file changes |
|
890 | adding file changes | |
891 | adding foo/Bar/file.txt revisions |
|
891 | adding foo/Bar/file.txt revisions | |
892 | adding foo/file.txt revisions |
|
892 | adding foo/file.txt revisions | |
893 | adding quux/file.py revisions |
|
893 | adding quux/file.py revisions | |
894 | added 3 changesets with 3 changes to 3 files |
|
894 | added 3 changesets with 3 changes to 3 files | |
895 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
895 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
896 | acl: checking access for user "barney" |
|
896 | acl: checking access for user "barney" | |
897 | error: pretxnchangegroup.acl hook raised an exception: [Errno 2] No such file or directory: '../acl.config' |
|
897 | error: pretxnchangegroup.acl hook raised an exception: [Errno 2] No such file or directory: '../acl.config' | |
898 | bundle2-input-part: total payload size 1606 |
|
898 | bundle2-input-part: total payload size 1606 | |
899 | bundle2-input-bundle: 3 parts total |
|
899 | bundle2-input-bundle: 3 parts total | |
900 | transaction abort! |
|
900 | transaction abort! | |
901 | rollback completed |
|
901 | rollback completed | |
902 | abort: No such file or directory: ../acl.config |
|
902 | abort: No such file or directory: ../acl.config | |
903 | no rollback information available |
|
903 | no rollback information available | |
904 | 0:6675d58eff77 |
|
904 | 0:6675d58eff77 | |
905 |
|
905 | |||
906 |
|
906 | |||
907 | betty is allowed inside foo/ by a acl.config file |
|
907 | betty is allowed inside foo/ by a acl.config file | |
908 |
|
908 | |||
909 | $ echo '[acl.allow]' >> acl.config |
|
909 | $ echo '[acl.allow]' >> acl.config | |
910 | $ echo 'foo/** = betty' >> acl.config |
|
910 | $ echo 'foo/** = betty' >> acl.config | |
911 | $ do_push betty |
|
911 | $ do_push betty | |
912 | Pushing as user betty |
|
912 | Pushing as user betty | |
913 | hgrc = """ |
|
913 | hgrc = """ | |
914 | [hooks] |
|
914 | [hooks] | |
915 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
915 | pretxnchangegroup.acl = python:hgext.acl.hook | |
916 | [acl] |
|
916 | [acl] | |
917 | sources = push |
|
917 | sources = push | |
918 | [acl.allow] |
|
918 | [acl.allow] | |
919 | foo/** = fred |
|
919 | foo/** = fred | |
920 | [acl.deny] |
|
920 | [acl.deny] | |
921 | foo/bar/** = fred |
|
921 | foo/bar/** = fred | |
922 | foo/Bar/** = fred |
|
922 | foo/Bar/** = fred | |
923 | [acl.allow] |
|
923 | [acl.allow] | |
924 | ** = barney |
|
924 | ** = barney | |
925 | **/*.txt = wilma |
|
925 | **/*.txt = wilma | |
926 | [acl] |
|
926 | [acl] | |
927 | config = ../acl.config |
|
927 | config = ../acl.config | |
928 | """ |
|
928 | """ | |
929 | acl.config = """ |
|
929 | acl.config = """ | |
930 | [acl.allow] |
|
930 | [acl.allow] | |
931 | foo/** = betty |
|
931 | foo/** = betty | |
932 | """ |
|
932 | """ | |
933 | pushing to ../b |
|
933 | pushing to ../b | |
934 | query 1; heads |
|
934 | query 1; heads | |
935 | searching for changes |
|
935 | searching for changes | |
936 | all remote heads known locally |
|
936 | all remote heads known locally | |
937 | listing keys for "phases" |
|
937 | listing keys for "phases" | |
938 | checking for updated bookmarks |
|
938 | checking for updated bookmarks | |
939 | listing keys for "bookmarks" |
|
939 | listing keys for "bookmarks" | |
940 | invalid branchheads cache (served): tip differs |
|
940 | invalid branchheads cache (served): tip differs | |
941 | listing keys for "bookmarks" |
|
941 | listing keys for "bookmarks" | |
942 | 3 changesets found |
|
942 | 3 changesets found | |
943 | list of changesets: |
|
943 | list of changesets: | |
944 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
944 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
945 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
945 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
946 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
946 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
947 | bundle2-output-bundle: "HG20", 4 parts total |
|
947 | bundle2-output-bundle: "HG20", 4 parts total | |
948 | bundle2-output-part: "replycaps" 155 bytes payload |
|
948 | bundle2-output-part: "replycaps" 155 bytes payload | |
949 | bundle2-output-part: "check:heads" streamed payload |
|
949 | bundle2-output-part: "check:heads" streamed payload | |
950 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
950 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
951 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
951 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
952 | bundle2-input-bundle: with-transaction |
|
952 | bundle2-input-bundle: with-transaction | |
953 | bundle2-input-part: "replycaps" supported |
|
953 | bundle2-input-part: "replycaps" supported | |
954 | bundle2-input-part: total payload size 155 |
|
954 | bundle2-input-part: total payload size 155 | |
955 | bundle2-input-part: "check:heads" supported |
|
955 | bundle2-input-part: "check:heads" supported | |
956 | bundle2-input-part: total payload size 20 |
|
956 | bundle2-input-part: total payload size 20 | |
957 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
957 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
958 | adding changesets |
|
958 | adding changesets | |
959 | add changeset ef1ea85a6374 |
|
959 | add changeset ef1ea85a6374 | |
960 | add changeset f9cafe1212c8 |
|
960 | add changeset f9cafe1212c8 | |
961 | add changeset 911600dab2ae |
|
961 | add changeset 911600dab2ae | |
962 | adding manifests |
|
962 | adding manifests | |
963 | adding file changes |
|
963 | adding file changes | |
964 | adding foo/Bar/file.txt revisions |
|
964 | adding foo/Bar/file.txt revisions | |
965 | adding foo/file.txt revisions |
|
965 | adding foo/file.txt revisions | |
966 | adding quux/file.py revisions |
|
966 | adding quux/file.py revisions | |
967 | added 3 changesets with 3 changes to 3 files |
|
967 | added 3 changesets with 3 changes to 3 files | |
968 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
968 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
969 | acl: checking access for user "betty" |
|
969 | acl: checking access for user "betty" | |
970 | acl: acl.allow.branches not enabled |
|
970 | acl: acl.allow.branches not enabled | |
971 | acl: acl.deny.branches not enabled |
|
971 | acl: acl.deny.branches not enabled | |
972 | acl: acl.allow enabled, 1 entries for user betty |
|
972 | acl: acl.allow enabled, 1 entries for user betty | |
973 | acl: acl.deny enabled, 0 entries for user betty |
|
973 | acl: acl.deny enabled, 0 entries for user betty | |
974 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
974 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
975 | acl: path access granted: "ef1ea85a6374" |
|
975 | acl: path access granted: "ef1ea85a6374" | |
976 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
976 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
977 | acl: path access granted: "f9cafe1212c8" |
|
977 | acl: path access granted: "f9cafe1212c8" | |
978 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
978 | acl: branch access granted: "911600dab2ae" on branch "default" | |
979 | error: pretxnchangegroup.acl hook failed: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
979 | error: pretxnchangegroup.acl hook failed: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae") | |
980 | bundle2-input-part: total payload size 1606 |
|
980 | bundle2-input-part: total payload size 1606 | |
981 | bundle2-input-bundle: 3 parts total |
|
981 | bundle2-input-bundle: 3 parts total | |
982 | transaction abort! |
|
982 | transaction abort! | |
983 | rollback completed |
|
983 | rollback completed | |
984 | abort: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae") |
|
984 | abort: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae") | |
985 | no rollback information available |
|
985 | no rollback information available | |
986 | 0:6675d58eff77 |
|
986 | 0:6675d58eff77 | |
987 |
|
987 | |||
988 |
|
988 | |||
989 | acl.config can set only [acl.allow]/[acl.deny] |
|
989 | acl.config can set only [acl.allow]/[acl.deny] | |
990 |
|
990 | |||
991 | $ echo '[hooks]' >> acl.config |
|
991 | $ echo '[hooks]' >> acl.config | |
992 | $ echo 'changegroup.acl = false' >> acl.config |
|
992 | $ echo 'changegroup.acl = false' >> acl.config | |
993 | $ do_push barney |
|
993 | $ do_push barney | |
994 | Pushing as user barney |
|
994 | Pushing as user barney | |
995 | hgrc = """ |
|
995 | hgrc = """ | |
996 | [hooks] |
|
996 | [hooks] | |
997 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
997 | pretxnchangegroup.acl = python:hgext.acl.hook | |
998 | [acl] |
|
998 | [acl] | |
999 | sources = push |
|
999 | sources = push | |
1000 | [acl.allow] |
|
1000 | [acl.allow] | |
1001 | foo/** = fred |
|
1001 | foo/** = fred | |
1002 | [acl.deny] |
|
1002 | [acl.deny] | |
1003 | foo/bar/** = fred |
|
1003 | foo/bar/** = fred | |
1004 | foo/Bar/** = fred |
|
1004 | foo/Bar/** = fred | |
1005 | [acl.allow] |
|
1005 | [acl.allow] | |
1006 | ** = barney |
|
1006 | ** = barney | |
1007 | **/*.txt = wilma |
|
1007 | **/*.txt = wilma | |
1008 | [acl] |
|
1008 | [acl] | |
1009 | config = ../acl.config |
|
1009 | config = ../acl.config | |
1010 | """ |
|
1010 | """ | |
1011 | acl.config = """ |
|
1011 | acl.config = """ | |
1012 | [acl.allow] |
|
1012 | [acl.allow] | |
1013 | foo/** = betty |
|
1013 | foo/** = betty | |
1014 | [hooks] |
|
1014 | [hooks] | |
1015 | changegroup.acl = false |
|
1015 | changegroup.acl = false | |
1016 | """ |
|
1016 | """ | |
1017 | pushing to ../b |
|
1017 | pushing to ../b | |
1018 | query 1; heads |
|
1018 | query 1; heads | |
1019 | searching for changes |
|
1019 | searching for changes | |
1020 | all remote heads known locally |
|
1020 | all remote heads known locally | |
1021 | listing keys for "phases" |
|
1021 | listing keys for "phases" | |
1022 | checking for updated bookmarks |
|
1022 | checking for updated bookmarks | |
1023 | listing keys for "bookmarks" |
|
1023 | listing keys for "bookmarks" | |
1024 | invalid branchheads cache (served): tip differs |
|
1024 | invalid branchheads cache (served): tip differs | |
1025 | listing keys for "bookmarks" |
|
1025 | listing keys for "bookmarks" | |
1026 | 3 changesets found |
|
1026 | 3 changesets found | |
1027 | list of changesets: |
|
1027 | list of changesets: | |
1028 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1028 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1029 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1029 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1030 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1030 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1031 | bundle2-output-bundle: "HG20", 4 parts total |
|
1031 | bundle2-output-bundle: "HG20", 4 parts total | |
1032 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1032 | bundle2-output-part: "replycaps" 155 bytes payload | |
1033 | bundle2-output-part: "check:heads" streamed payload |
|
1033 | bundle2-output-part: "check:heads" streamed payload | |
1034 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1034 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1035 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1035 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1036 | bundle2-input-bundle: with-transaction |
|
1036 | bundle2-input-bundle: with-transaction | |
1037 | bundle2-input-part: "replycaps" supported |
|
1037 | bundle2-input-part: "replycaps" supported | |
1038 | bundle2-input-part: total payload size 155 |
|
1038 | bundle2-input-part: total payload size 155 | |
1039 | bundle2-input-part: "check:heads" supported |
|
1039 | bundle2-input-part: "check:heads" supported | |
1040 | bundle2-input-part: total payload size 20 |
|
1040 | bundle2-input-part: total payload size 20 | |
1041 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1041 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1042 | adding changesets |
|
1042 | adding changesets | |
1043 | add changeset ef1ea85a6374 |
|
1043 | add changeset ef1ea85a6374 | |
1044 | add changeset f9cafe1212c8 |
|
1044 | add changeset f9cafe1212c8 | |
1045 | add changeset 911600dab2ae |
|
1045 | add changeset 911600dab2ae | |
1046 | adding manifests |
|
1046 | adding manifests | |
1047 | adding file changes |
|
1047 | adding file changes | |
1048 | adding foo/Bar/file.txt revisions |
|
1048 | adding foo/Bar/file.txt revisions | |
1049 | adding foo/file.txt revisions |
|
1049 | adding foo/file.txt revisions | |
1050 | adding quux/file.py revisions |
|
1050 | adding quux/file.py revisions | |
1051 | added 3 changesets with 3 changes to 3 files |
|
1051 | added 3 changesets with 3 changes to 3 files | |
1052 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1052 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1053 | acl: checking access for user "barney" |
|
1053 | acl: checking access for user "barney" | |
1054 | acl: acl.allow.branches not enabled |
|
1054 | acl: acl.allow.branches not enabled | |
1055 | acl: acl.deny.branches not enabled |
|
1055 | acl: acl.deny.branches not enabled | |
1056 | acl: acl.allow enabled, 1 entries for user barney |
|
1056 | acl: acl.allow enabled, 1 entries for user barney | |
1057 | acl: acl.deny enabled, 0 entries for user barney |
|
1057 | acl: acl.deny enabled, 0 entries for user barney | |
1058 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1058 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1059 | acl: path access granted: "ef1ea85a6374" |
|
1059 | acl: path access granted: "ef1ea85a6374" | |
1060 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1060 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1061 | acl: path access granted: "f9cafe1212c8" |
|
1061 | acl: path access granted: "f9cafe1212c8" | |
1062 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1062 | acl: branch access granted: "911600dab2ae" on branch "default" | |
1063 | acl: path access granted: "911600dab2ae" |
|
1063 | acl: path access granted: "911600dab2ae" | |
1064 | updating the branch cache |
|
1064 | updating the branch cache | |
1065 | bundle2-input-part: total payload size 1606 |
|
1065 | bundle2-input-part: total payload size 1606 | |
1066 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1066 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1067 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1067 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
1068 | bundle2-input-bundle: 3 parts total |
|
1068 | bundle2-input-bundle: 3 parts total | |
1069 | bundle2-output-bundle: "HG20", 2 parts total |
|
1069 | bundle2-output-bundle: "HG20", 2 parts total | |
1070 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1070 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1071 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1071 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1072 | bundle2-input-bundle: with-transaction |
|
1072 | bundle2-input-bundle: with-transaction | |
1073 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1073 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1074 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1074 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1075 | bundle2-input-bundle: 1 parts total |
|
1075 | bundle2-input-bundle: 1 parts total | |
1076 | listing keys for "phases" |
|
1076 | listing keys for "phases" | |
1077 | repository tip rolled back to revision 0 (undo push) |
|
1077 | repository tip rolled back to revision 0 (undo push) | |
1078 | 0:6675d58eff77 |
|
1078 | 0:6675d58eff77 | |
1079 |
|
1079 | |||
1080 |
|
1080 | |||
1081 | asterisk |
|
1081 | asterisk | |
1082 |
|
1082 | |||
1083 | $ init_config |
|
1083 | $ init_config | |
1084 |
|
1084 | |||
1085 | asterisk test |
|
1085 | asterisk test | |
1086 |
|
1086 | |||
1087 | $ echo '[acl.allow]' >> $config |
|
1087 | $ echo '[acl.allow]' >> $config | |
1088 | $ echo "** = fred" >> $config |
|
1088 | $ echo "** = fred" >> $config | |
1089 |
|
1089 | |||
1090 | fred is always allowed |
|
1090 | fred is always allowed | |
1091 |
|
1091 | |||
1092 | $ do_push fred |
|
1092 | $ do_push fred | |
1093 | Pushing as user fred |
|
1093 | Pushing as user fred | |
1094 | hgrc = """ |
|
1094 | hgrc = """ | |
1095 | [hooks] |
|
1095 | [hooks] | |
1096 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1096 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1097 | [acl] |
|
1097 | [acl] | |
1098 | sources = push |
|
1098 | sources = push | |
1099 | [extensions] |
|
1099 | [extensions] | |
1100 | [acl.allow] |
|
1100 | [acl.allow] | |
1101 | ** = fred |
|
1101 | ** = fred | |
1102 | """ |
|
1102 | """ | |
1103 | pushing to ../b |
|
1103 | pushing to ../b | |
1104 | query 1; heads |
|
1104 | query 1; heads | |
1105 | searching for changes |
|
1105 | searching for changes | |
1106 | all remote heads known locally |
|
1106 | all remote heads known locally | |
1107 | listing keys for "phases" |
|
1107 | listing keys for "phases" | |
1108 | checking for updated bookmarks |
|
1108 | checking for updated bookmarks | |
1109 | listing keys for "bookmarks" |
|
1109 | listing keys for "bookmarks" | |
1110 | invalid branchheads cache (served): tip differs |
|
1110 | invalid branchheads cache (served): tip differs | |
1111 | listing keys for "bookmarks" |
|
1111 | listing keys for "bookmarks" | |
1112 | 3 changesets found |
|
1112 | 3 changesets found | |
1113 | list of changesets: |
|
1113 | list of changesets: | |
1114 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1114 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1115 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1115 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1116 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1116 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1117 | bundle2-output-bundle: "HG20", 4 parts total |
|
1117 | bundle2-output-bundle: "HG20", 4 parts total | |
1118 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1118 | bundle2-output-part: "replycaps" 155 bytes payload | |
1119 | bundle2-output-part: "check:heads" streamed payload |
|
1119 | bundle2-output-part: "check:heads" streamed payload | |
1120 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1120 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1121 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1121 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1122 | bundle2-input-bundle: with-transaction |
|
1122 | bundle2-input-bundle: with-transaction | |
1123 | bundle2-input-part: "replycaps" supported |
|
1123 | bundle2-input-part: "replycaps" supported | |
1124 | bundle2-input-part: total payload size 155 |
|
1124 | bundle2-input-part: total payload size 155 | |
1125 | bundle2-input-part: "check:heads" supported |
|
1125 | bundle2-input-part: "check:heads" supported | |
1126 | bundle2-input-part: total payload size 20 |
|
1126 | bundle2-input-part: total payload size 20 | |
1127 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1127 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1128 | adding changesets |
|
1128 | adding changesets | |
1129 | add changeset ef1ea85a6374 |
|
1129 | add changeset ef1ea85a6374 | |
1130 | add changeset f9cafe1212c8 |
|
1130 | add changeset f9cafe1212c8 | |
1131 | add changeset 911600dab2ae |
|
1131 | add changeset 911600dab2ae | |
1132 | adding manifests |
|
1132 | adding manifests | |
1133 | adding file changes |
|
1133 | adding file changes | |
1134 | adding foo/Bar/file.txt revisions |
|
1134 | adding foo/Bar/file.txt revisions | |
1135 | adding foo/file.txt revisions |
|
1135 | adding foo/file.txt revisions | |
1136 | adding quux/file.py revisions |
|
1136 | adding quux/file.py revisions | |
1137 | added 3 changesets with 3 changes to 3 files |
|
1137 | added 3 changesets with 3 changes to 3 files | |
1138 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1138 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1139 | acl: checking access for user "fred" |
|
1139 | acl: checking access for user "fred" | |
1140 | acl: acl.allow.branches not enabled |
|
1140 | acl: acl.allow.branches not enabled | |
1141 | acl: acl.deny.branches not enabled |
|
1141 | acl: acl.deny.branches not enabled | |
1142 | acl: acl.allow enabled, 1 entries for user fred |
|
1142 | acl: acl.allow enabled, 1 entries for user fred | |
1143 | acl: acl.deny not enabled |
|
1143 | acl: acl.deny not enabled | |
1144 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1144 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1145 | acl: path access granted: "ef1ea85a6374" |
|
1145 | acl: path access granted: "ef1ea85a6374" | |
1146 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1146 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1147 | acl: path access granted: "f9cafe1212c8" |
|
1147 | acl: path access granted: "f9cafe1212c8" | |
1148 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1148 | acl: branch access granted: "911600dab2ae" on branch "default" | |
1149 | acl: path access granted: "911600dab2ae" |
|
1149 | acl: path access granted: "911600dab2ae" | |
1150 | updating the branch cache |
|
1150 | updating the branch cache | |
1151 | bundle2-input-part: total payload size 1606 |
|
1151 | bundle2-input-part: total payload size 1606 | |
1152 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1152 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1153 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1153 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
1154 | bundle2-input-bundle: 3 parts total |
|
1154 | bundle2-input-bundle: 3 parts total | |
1155 | bundle2-output-bundle: "HG20", 2 parts total |
|
1155 | bundle2-output-bundle: "HG20", 2 parts total | |
1156 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1156 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1157 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1157 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1158 | bundle2-input-bundle: with-transaction |
|
1158 | bundle2-input-bundle: with-transaction | |
1159 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1159 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1160 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1160 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1161 | bundle2-input-bundle: 1 parts total |
|
1161 | bundle2-input-bundle: 1 parts total | |
1162 | listing keys for "phases" |
|
1162 | listing keys for "phases" | |
1163 | repository tip rolled back to revision 0 (undo push) |
|
1163 | repository tip rolled back to revision 0 (undo push) | |
1164 | 0:6675d58eff77 |
|
1164 | 0:6675d58eff77 | |
1165 |
|
1165 | |||
1166 |
|
1166 | |||
1167 | $ echo '[acl.deny]' >> $config |
|
1167 | $ echo '[acl.deny]' >> $config | |
1168 | $ echo "foo/Bar/** = *" >> $config |
|
1168 | $ echo "foo/Bar/** = *" >> $config | |
1169 |
|
1169 | |||
1170 | no one is allowed inside foo/Bar/ |
|
1170 | no one is allowed inside foo/Bar/ | |
1171 |
|
1171 | |||
1172 | $ do_push fred |
|
1172 | $ do_push fred | |
1173 | Pushing as user fred |
|
1173 | Pushing as user fred | |
1174 | hgrc = """ |
|
1174 | hgrc = """ | |
1175 | [hooks] |
|
1175 | [hooks] | |
1176 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1176 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1177 | [acl] |
|
1177 | [acl] | |
1178 | sources = push |
|
1178 | sources = push | |
1179 | [extensions] |
|
1179 | [extensions] | |
1180 | [acl.allow] |
|
1180 | [acl.allow] | |
1181 | ** = fred |
|
1181 | ** = fred | |
1182 | [acl.deny] |
|
1182 | [acl.deny] | |
1183 | foo/Bar/** = * |
|
1183 | foo/Bar/** = * | |
1184 | """ |
|
1184 | """ | |
1185 | pushing to ../b |
|
1185 | pushing to ../b | |
1186 | query 1; heads |
|
1186 | query 1; heads | |
1187 | searching for changes |
|
1187 | searching for changes | |
1188 | all remote heads known locally |
|
1188 | all remote heads known locally | |
1189 | listing keys for "phases" |
|
1189 | listing keys for "phases" | |
1190 | checking for updated bookmarks |
|
1190 | checking for updated bookmarks | |
1191 | listing keys for "bookmarks" |
|
1191 | listing keys for "bookmarks" | |
1192 | invalid branchheads cache (served): tip differs |
|
1192 | invalid branchheads cache (served): tip differs | |
1193 | listing keys for "bookmarks" |
|
1193 | listing keys for "bookmarks" | |
1194 | 3 changesets found |
|
1194 | 3 changesets found | |
1195 | list of changesets: |
|
1195 | list of changesets: | |
1196 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1196 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1197 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1197 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1198 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1198 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1199 | bundle2-output-bundle: "HG20", 4 parts total |
|
1199 | bundle2-output-bundle: "HG20", 4 parts total | |
1200 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1200 | bundle2-output-part: "replycaps" 155 bytes payload | |
1201 | bundle2-output-part: "check:heads" streamed payload |
|
1201 | bundle2-output-part: "check:heads" streamed payload | |
1202 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1202 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1203 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1203 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1204 | bundle2-input-bundle: with-transaction |
|
1204 | bundle2-input-bundle: with-transaction | |
1205 | bundle2-input-part: "replycaps" supported |
|
1205 | bundle2-input-part: "replycaps" supported | |
1206 | bundle2-input-part: total payload size 155 |
|
1206 | bundle2-input-part: total payload size 155 | |
1207 | bundle2-input-part: "check:heads" supported |
|
1207 | bundle2-input-part: "check:heads" supported | |
1208 | bundle2-input-part: total payload size 20 |
|
1208 | bundle2-input-part: total payload size 20 | |
1209 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1209 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1210 | adding changesets |
|
1210 | adding changesets | |
1211 | add changeset ef1ea85a6374 |
|
1211 | add changeset ef1ea85a6374 | |
1212 | add changeset f9cafe1212c8 |
|
1212 | add changeset f9cafe1212c8 | |
1213 | add changeset 911600dab2ae |
|
1213 | add changeset 911600dab2ae | |
1214 | adding manifests |
|
1214 | adding manifests | |
1215 | adding file changes |
|
1215 | adding file changes | |
1216 | adding foo/Bar/file.txt revisions |
|
1216 | adding foo/Bar/file.txt revisions | |
1217 | adding foo/file.txt revisions |
|
1217 | adding foo/file.txt revisions | |
1218 | adding quux/file.py revisions |
|
1218 | adding quux/file.py revisions | |
1219 | added 3 changesets with 3 changes to 3 files |
|
1219 | added 3 changesets with 3 changes to 3 files | |
1220 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1220 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1221 | acl: checking access for user "fred" |
|
1221 | acl: checking access for user "fred" | |
1222 | acl: acl.allow.branches not enabled |
|
1222 | acl: acl.allow.branches not enabled | |
1223 | acl: acl.deny.branches not enabled |
|
1223 | acl: acl.deny.branches not enabled | |
1224 | acl: acl.allow enabled, 1 entries for user fred |
|
1224 | acl: acl.allow enabled, 1 entries for user fred | |
1225 | acl: acl.deny enabled, 1 entries for user fred |
|
1225 | acl: acl.deny enabled, 1 entries for user fred | |
1226 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1226 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1227 | acl: path access granted: "ef1ea85a6374" |
|
1227 | acl: path access granted: "ef1ea85a6374" | |
1228 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1228 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1229 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
1229 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") | |
1230 | bundle2-input-part: total payload size 1606 |
|
1230 | bundle2-input-part: total payload size 1606 | |
1231 | bundle2-input-bundle: 3 parts total |
|
1231 | bundle2-input-bundle: 3 parts total | |
1232 | transaction abort! |
|
1232 | transaction abort! | |
1233 | rollback completed |
|
1233 | rollback completed | |
1234 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
1234 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") | |
1235 | no rollback information available |
|
1235 | no rollback information available | |
1236 | 0:6675d58eff77 |
|
1236 | 0:6675d58eff77 | |
1237 |
|
1237 | |||
1238 |
|
1238 | |||
1239 | Groups |
|
1239 | Groups | |
1240 |
|
1240 | |||
1241 | $ init_config |
|
1241 | $ init_config | |
1242 |
|
1242 | |||
1243 | OS-level groups |
|
1243 | OS-level groups | |
1244 |
|
1244 | |||
1245 | $ echo '[acl.allow]' >> $config |
|
1245 | $ echo '[acl.allow]' >> $config | |
1246 | $ echo "** = @group1" >> $config |
|
1246 | $ echo "** = @group1" >> $config | |
1247 |
|
1247 | |||
1248 | @group1 is always allowed |
|
1248 | @group1 is always allowed | |
1249 |
|
1249 | |||
1250 | $ do_push fred |
|
1250 | $ do_push fred | |
1251 | Pushing as user fred |
|
1251 | Pushing as user fred | |
1252 | hgrc = """ |
|
1252 | hgrc = """ | |
1253 | [hooks] |
|
1253 | [hooks] | |
1254 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1254 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1255 | [acl] |
|
1255 | [acl] | |
1256 | sources = push |
|
1256 | sources = push | |
1257 | [extensions] |
|
1257 | [extensions] | |
1258 | [acl.allow] |
|
1258 | [acl.allow] | |
1259 | ** = @group1 |
|
1259 | ** = @group1 | |
1260 | """ |
|
1260 | """ | |
1261 | pushing to ../b |
|
1261 | pushing to ../b | |
1262 | query 1; heads |
|
1262 | query 1; heads | |
1263 | searching for changes |
|
1263 | searching for changes | |
1264 | all remote heads known locally |
|
1264 | all remote heads known locally | |
1265 | listing keys for "phases" |
|
1265 | listing keys for "phases" | |
1266 | checking for updated bookmarks |
|
1266 | checking for updated bookmarks | |
1267 | listing keys for "bookmarks" |
|
1267 | listing keys for "bookmarks" | |
1268 | invalid branchheads cache (served): tip differs |
|
1268 | invalid branchheads cache (served): tip differs | |
1269 | listing keys for "bookmarks" |
|
1269 | listing keys for "bookmarks" | |
1270 | 3 changesets found |
|
1270 | 3 changesets found | |
1271 | list of changesets: |
|
1271 | list of changesets: | |
1272 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1272 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1273 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1273 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1274 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1274 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1275 | bundle2-output-bundle: "HG20", 4 parts total |
|
1275 | bundle2-output-bundle: "HG20", 4 parts total | |
1276 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1276 | bundle2-output-part: "replycaps" 155 bytes payload | |
1277 | bundle2-output-part: "check:heads" streamed payload |
|
1277 | bundle2-output-part: "check:heads" streamed payload | |
1278 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1278 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1279 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1279 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1280 | bundle2-input-bundle: with-transaction |
|
1280 | bundle2-input-bundle: with-transaction | |
1281 | bundle2-input-part: "replycaps" supported |
|
1281 | bundle2-input-part: "replycaps" supported | |
1282 | bundle2-input-part: total payload size 155 |
|
1282 | bundle2-input-part: total payload size 155 | |
1283 | bundle2-input-part: "check:heads" supported |
|
1283 | bundle2-input-part: "check:heads" supported | |
1284 | bundle2-input-part: total payload size 20 |
|
1284 | bundle2-input-part: total payload size 20 | |
1285 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1285 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1286 | adding changesets |
|
1286 | adding changesets | |
1287 | add changeset ef1ea85a6374 |
|
1287 | add changeset ef1ea85a6374 | |
1288 | add changeset f9cafe1212c8 |
|
1288 | add changeset f9cafe1212c8 | |
1289 | add changeset 911600dab2ae |
|
1289 | add changeset 911600dab2ae | |
1290 | adding manifests |
|
1290 | adding manifests | |
1291 | adding file changes |
|
1291 | adding file changes | |
1292 | adding foo/Bar/file.txt revisions |
|
1292 | adding foo/Bar/file.txt revisions | |
1293 | adding foo/file.txt revisions |
|
1293 | adding foo/file.txt revisions | |
1294 | adding quux/file.py revisions |
|
1294 | adding quux/file.py revisions | |
1295 | added 3 changesets with 3 changes to 3 files |
|
1295 | added 3 changesets with 3 changes to 3 files | |
1296 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1296 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1297 | acl: checking access for user "fred" |
|
1297 | acl: checking access for user "fred" | |
1298 | acl: acl.allow.branches not enabled |
|
1298 | acl: acl.allow.branches not enabled | |
1299 | acl: acl.deny.branches not enabled |
|
1299 | acl: acl.deny.branches not enabled | |
1300 | acl: "group1" not defined in [acl.groups] |
|
1300 | acl: "group1" not defined in [acl.groups] | |
1301 | acl: acl.allow enabled, 1 entries for user fred |
|
1301 | acl: acl.allow enabled, 1 entries for user fred | |
1302 | acl: acl.deny not enabled |
|
1302 | acl: acl.deny not enabled | |
1303 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1303 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1304 | acl: path access granted: "ef1ea85a6374" |
|
1304 | acl: path access granted: "ef1ea85a6374" | |
1305 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1305 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1306 | acl: path access granted: "f9cafe1212c8" |
|
1306 | acl: path access granted: "f9cafe1212c8" | |
1307 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1307 | acl: branch access granted: "911600dab2ae" on branch "default" | |
1308 | acl: path access granted: "911600dab2ae" |
|
1308 | acl: path access granted: "911600dab2ae" | |
1309 | updating the branch cache |
|
1309 | updating the branch cache | |
1310 | bundle2-input-part: total payload size 1606 |
|
1310 | bundle2-input-part: total payload size 1606 | |
1311 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1311 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1312 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1312 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
1313 | bundle2-input-bundle: 3 parts total |
|
1313 | bundle2-input-bundle: 3 parts total | |
1314 | bundle2-output-bundle: "HG20", 2 parts total |
|
1314 | bundle2-output-bundle: "HG20", 2 parts total | |
1315 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1315 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1316 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1316 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1317 | bundle2-input-bundle: with-transaction |
|
1317 | bundle2-input-bundle: with-transaction | |
1318 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1318 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1319 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1319 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1320 | bundle2-input-bundle: 1 parts total |
|
1320 | bundle2-input-bundle: 1 parts total | |
1321 | listing keys for "phases" |
|
1321 | listing keys for "phases" | |
1322 | repository tip rolled back to revision 0 (undo push) |
|
1322 | repository tip rolled back to revision 0 (undo push) | |
1323 | 0:6675d58eff77 |
|
1323 | 0:6675d58eff77 | |
1324 |
|
1324 | |||
1325 |
|
1325 | |||
1326 | $ echo '[acl.deny]' >> $config |
|
1326 | $ echo '[acl.deny]' >> $config | |
1327 | $ echo "foo/Bar/** = @group1" >> $config |
|
1327 | $ echo "foo/Bar/** = @group1" >> $config | |
1328 |
|
1328 | |||
1329 | @group is allowed inside anything but foo/Bar/ |
|
1329 | @group is allowed inside anything but foo/Bar/ | |
1330 |
|
1330 | |||
1331 | $ do_push fred |
|
1331 | $ do_push fred | |
1332 | Pushing as user fred |
|
1332 | Pushing as user fred | |
1333 | hgrc = """ |
|
1333 | hgrc = """ | |
1334 | [hooks] |
|
1334 | [hooks] | |
1335 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1335 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1336 | [acl] |
|
1336 | [acl] | |
1337 | sources = push |
|
1337 | sources = push | |
1338 | [extensions] |
|
1338 | [extensions] | |
1339 | [acl.allow] |
|
1339 | [acl.allow] | |
1340 | ** = @group1 |
|
1340 | ** = @group1 | |
1341 | [acl.deny] |
|
1341 | [acl.deny] | |
1342 | foo/Bar/** = @group1 |
|
1342 | foo/Bar/** = @group1 | |
1343 | """ |
|
1343 | """ | |
1344 | pushing to ../b |
|
1344 | pushing to ../b | |
1345 | query 1; heads |
|
1345 | query 1; heads | |
1346 | searching for changes |
|
1346 | searching for changes | |
1347 | all remote heads known locally |
|
1347 | all remote heads known locally | |
1348 | listing keys for "phases" |
|
1348 | listing keys for "phases" | |
1349 | checking for updated bookmarks |
|
1349 | checking for updated bookmarks | |
1350 | listing keys for "bookmarks" |
|
1350 | listing keys for "bookmarks" | |
1351 | invalid branchheads cache (served): tip differs |
|
1351 | invalid branchheads cache (served): tip differs | |
1352 | listing keys for "bookmarks" |
|
1352 | listing keys for "bookmarks" | |
1353 | 3 changesets found |
|
1353 | 3 changesets found | |
1354 | list of changesets: |
|
1354 | list of changesets: | |
1355 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1355 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1356 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1356 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1357 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1357 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1358 | bundle2-output-bundle: "HG20", 4 parts total |
|
1358 | bundle2-output-bundle: "HG20", 4 parts total | |
1359 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1359 | bundle2-output-part: "replycaps" 155 bytes payload | |
1360 | bundle2-output-part: "check:heads" streamed payload |
|
1360 | bundle2-output-part: "check:heads" streamed payload | |
1361 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1361 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1362 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1362 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1363 | bundle2-input-bundle: with-transaction |
|
1363 | bundle2-input-bundle: with-transaction | |
1364 | bundle2-input-part: "replycaps" supported |
|
1364 | bundle2-input-part: "replycaps" supported | |
1365 | bundle2-input-part: total payload size 155 |
|
1365 | bundle2-input-part: total payload size 155 | |
1366 | bundle2-input-part: "check:heads" supported |
|
1366 | bundle2-input-part: "check:heads" supported | |
1367 | bundle2-input-part: total payload size 20 |
|
1367 | bundle2-input-part: total payload size 20 | |
1368 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1368 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1369 | adding changesets |
|
1369 | adding changesets | |
1370 | add changeset ef1ea85a6374 |
|
1370 | add changeset ef1ea85a6374 | |
1371 | add changeset f9cafe1212c8 |
|
1371 | add changeset f9cafe1212c8 | |
1372 | add changeset 911600dab2ae |
|
1372 | add changeset 911600dab2ae | |
1373 | adding manifests |
|
1373 | adding manifests | |
1374 | adding file changes |
|
1374 | adding file changes | |
1375 | adding foo/Bar/file.txt revisions |
|
1375 | adding foo/Bar/file.txt revisions | |
1376 | adding foo/file.txt revisions |
|
1376 | adding foo/file.txt revisions | |
1377 | adding quux/file.py revisions |
|
1377 | adding quux/file.py revisions | |
1378 | added 3 changesets with 3 changes to 3 files |
|
1378 | added 3 changesets with 3 changes to 3 files | |
1379 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1379 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1380 | acl: checking access for user "fred" |
|
1380 | acl: checking access for user "fred" | |
1381 | acl: acl.allow.branches not enabled |
|
1381 | acl: acl.allow.branches not enabled | |
1382 | acl: acl.deny.branches not enabled |
|
1382 | acl: acl.deny.branches not enabled | |
1383 | acl: "group1" not defined in [acl.groups] |
|
1383 | acl: "group1" not defined in [acl.groups] | |
1384 | acl: acl.allow enabled, 1 entries for user fred |
|
1384 | acl: acl.allow enabled, 1 entries for user fred | |
1385 | acl: "group1" not defined in [acl.groups] |
|
1385 | acl: "group1" not defined in [acl.groups] | |
1386 | acl: acl.deny enabled, 1 entries for user fred |
|
1386 | acl: acl.deny enabled, 1 entries for user fred | |
1387 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1387 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1388 | acl: path access granted: "ef1ea85a6374" |
|
1388 | acl: path access granted: "ef1ea85a6374" | |
1389 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1389 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1390 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
1390 | error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") | |
1391 | bundle2-input-part: total payload size 1606 |
|
1391 | bundle2-input-part: total payload size 1606 | |
1392 | bundle2-input-bundle: 3 parts total |
|
1392 | bundle2-input-bundle: 3 parts total | |
1393 | transaction abort! |
|
1393 | transaction abort! | |
1394 | rollback completed |
|
1394 | rollback completed | |
1395 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") |
|
1395 | abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8") | |
1396 | no rollback information available |
|
1396 | no rollback information available | |
1397 | 0:6675d58eff77 |
|
1397 | 0:6675d58eff77 | |
1398 |
|
1398 | |||
1399 |
|
1399 | |||
1400 | Invalid group |
|
1400 | Invalid group | |
1401 |
|
1401 | |||
1402 | Disable the fakegroups trick to get real failures |
|
1402 | Disable the fakegroups trick to get real failures | |
1403 |
|
1403 | |||
1404 | $ grep -v fakegroups $config > config.tmp |
|
1404 | $ grep -v fakegroups $config > config.tmp | |
1405 | $ mv config.tmp $config |
|
1405 | $ mv config.tmp $config | |
1406 | $ echo '[acl.allow]' >> $config |
|
1406 | $ echo '[acl.allow]' >> $config | |
1407 | $ echo "** = @unlikelytoexist" >> $config |
|
1407 | $ echo "** = @unlikelytoexist" >> $config | |
1408 | $ do_push fred 2>&1 | grep unlikelytoexist |
|
1408 | $ do_push fred 2>&1 | grep unlikelytoexist | |
1409 | ** = @unlikelytoexist |
|
1409 | ** = @unlikelytoexist | |
1410 | acl: "unlikelytoexist" not defined in [acl.groups] |
|
1410 | acl: "unlikelytoexist" not defined in [acl.groups] | |
1411 | error: pretxnchangegroup.acl hook failed: group 'unlikelytoexist' is undefined |
|
1411 | error: pretxnchangegroup.acl hook failed: group 'unlikelytoexist' is undefined | |
1412 | abort: group 'unlikelytoexist' is undefined |
|
1412 | abort: group 'unlikelytoexist' is undefined | |
1413 |
|
1413 | |||
1414 |
|
1414 | |||
1415 | Branch acl tests setup |
|
1415 | Branch acl tests setup | |
1416 |
|
1416 | |||
1417 | $ init_config |
|
1417 | $ init_config | |
1418 | $ cd b |
|
1418 | $ cd b | |
1419 | $ hg up |
|
1419 | $ hg up | |
1420 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1420 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1421 | $ hg branch foobar |
|
1421 | $ hg branch foobar | |
1422 | marked working directory as branch foobar |
|
1422 | marked working directory as branch foobar | |
1423 | (branches are permanent and global, did you want a bookmark?) |
|
1423 | (branches are permanent and global, did you want a bookmark?) | |
1424 | $ hg commit -m 'create foobar' |
|
1424 | $ hg commit -m 'create foobar' | |
1425 | $ echo 'foo contents' > abc.txt |
|
1425 | $ echo 'foo contents' > abc.txt | |
1426 | $ hg add abc.txt |
|
1426 | $ hg add abc.txt | |
1427 | $ hg commit -m 'foobar contents' |
|
1427 | $ hg commit -m 'foobar contents' | |
1428 | $ cd .. |
|
1428 | $ cd .. | |
1429 | $ hg --cwd a pull ../b |
|
1429 | $ hg --cwd a pull ../b | |
1430 | pulling from ../b |
|
1430 | pulling from ../b | |
1431 | searching for changes |
|
1431 | searching for changes | |
1432 | adding changesets |
|
1432 | adding changesets | |
1433 | adding manifests |
|
1433 | adding manifests | |
1434 | adding file changes |
|
1434 | adding file changes | |
1435 | added 2 changesets with 1 changes to 1 files (+1 heads) |
|
1435 | added 2 changesets with 1 changes to 1 files (+1 heads) | |
1436 | (run 'hg heads' to see heads) |
|
1436 | (run 'hg heads' to see heads) | |
1437 |
|
1437 | |||
1438 | Create additional changeset on foobar branch |
|
1438 | Create additional changeset on foobar branch | |
1439 |
|
1439 | |||
1440 | $ cd a |
|
1440 | $ cd a | |
1441 | $ hg up -C foobar |
|
1441 | $ hg up -C foobar | |
1442 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1442 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1443 | $ echo 'foo contents2' > abc.txt |
|
1443 | $ echo 'foo contents2' > abc.txt | |
1444 | $ hg commit -m 'foobar contents2' |
|
1444 | $ hg commit -m 'foobar contents2' | |
1445 | $ cd .. |
|
1445 | $ cd .. | |
1446 |
|
1446 | |||
1447 |
|
1447 | |||
1448 | No branch acls specified |
|
1448 | No branch acls specified | |
1449 |
|
1449 | |||
1450 | $ do_push astro |
|
1450 | $ do_push astro | |
1451 | Pushing as user astro |
|
1451 | Pushing as user astro | |
1452 | hgrc = """ |
|
1452 | hgrc = """ | |
1453 | [hooks] |
|
1453 | [hooks] | |
1454 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1454 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1455 | [acl] |
|
1455 | [acl] | |
1456 | sources = push |
|
1456 | sources = push | |
1457 | [extensions] |
|
1457 | [extensions] | |
1458 | """ |
|
1458 | """ | |
1459 | pushing to ../b |
|
1459 | pushing to ../b | |
1460 | query 1; heads |
|
1460 | query 1; heads | |
1461 | searching for changes |
|
1461 | searching for changes | |
1462 | all remote heads known locally |
|
1462 | all remote heads known locally | |
1463 | listing keys for "phases" |
|
1463 | listing keys for "phases" | |
1464 | checking for updated bookmarks |
|
1464 | checking for updated bookmarks | |
1465 | listing keys for "bookmarks" |
|
1465 | listing keys for "bookmarks" | |
1466 | listing keys for "bookmarks" |
|
1466 | listing keys for "bookmarks" | |
1467 | 4 changesets found |
|
1467 | 4 changesets found | |
1468 | list of changesets: |
|
1468 | list of changesets: | |
1469 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1469 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1470 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1470 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1471 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1471 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1472 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1472 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
1473 | bundle2-output-bundle: "HG20", 5 parts total |
|
1473 | bundle2-output-bundle: "HG20", 5 parts total | |
1474 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1474 | bundle2-output-part: "replycaps" 155 bytes payload | |
1475 | bundle2-output-part: "check:heads" streamed payload |
|
1475 | bundle2-output-part: "check:heads" streamed payload | |
1476 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1476 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1477 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1477 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1478 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1478 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1479 | bundle2-input-bundle: with-transaction |
|
1479 | bundle2-input-bundle: with-transaction | |
1480 | bundle2-input-part: "replycaps" supported |
|
1480 | bundle2-input-part: "replycaps" supported | |
1481 | bundle2-input-part: total payload size 155 |
|
1481 | bundle2-input-part: total payload size 155 | |
1482 | bundle2-input-part: "check:heads" supported |
|
1482 | bundle2-input-part: "check:heads" supported | |
1483 | bundle2-input-part: total payload size 20 |
|
1483 | bundle2-input-part: total payload size 20 | |
1484 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1484 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1485 | adding changesets |
|
1485 | adding changesets | |
1486 | add changeset ef1ea85a6374 |
|
1486 | add changeset ef1ea85a6374 | |
1487 | add changeset f9cafe1212c8 |
|
1487 | add changeset f9cafe1212c8 | |
1488 | add changeset 911600dab2ae |
|
1488 | add changeset 911600dab2ae | |
1489 | add changeset e8fc755d4d82 |
|
1489 | add changeset e8fc755d4d82 | |
1490 | adding manifests |
|
1490 | adding manifests | |
1491 | adding file changes |
|
1491 | adding file changes | |
1492 | adding abc.txt revisions |
|
1492 | adding abc.txt revisions | |
1493 | adding foo/Bar/file.txt revisions |
|
1493 | adding foo/Bar/file.txt revisions | |
1494 | adding foo/file.txt revisions |
|
1494 | adding foo/file.txt revisions | |
1495 | adding quux/file.py revisions |
|
1495 | adding quux/file.py revisions | |
1496 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1496 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
1497 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1497 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1498 | acl: checking access for user "astro" |
|
1498 | acl: checking access for user "astro" | |
1499 | acl: acl.allow.branches not enabled |
|
1499 | acl: acl.allow.branches not enabled | |
1500 | acl: acl.deny.branches not enabled |
|
1500 | acl: acl.deny.branches not enabled | |
1501 | acl: acl.allow not enabled |
|
1501 | acl: acl.allow not enabled | |
1502 | acl: acl.deny not enabled |
|
1502 | acl: acl.deny not enabled | |
1503 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1503 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1504 | acl: path access granted: "ef1ea85a6374" |
|
1504 | acl: path access granted: "ef1ea85a6374" | |
1505 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1505 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1506 | acl: path access granted: "f9cafe1212c8" |
|
1506 | acl: path access granted: "f9cafe1212c8" | |
1507 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1507 | acl: branch access granted: "911600dab2ae" on branch "default" | |
1508 | acl: path access granted: "911600dab2ae" |
|
1508 | acl: path access granted: "911600dab2ae" | |
1509 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" |
|
1509 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" | |
1510 | acl: path access granted: "e8fc755d4d82" |
|
1510 | acl: path access granted: "e8fc755d4d82" | |
1511 | updating the branch cache |
|
1511 | updating the branch cache | |
1512 |
bundle2-input-part: total payload size 21 |
|
1512 | bundle2-input-part: total payload size 2139 | |
1513 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1513 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1514 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1514 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
1515 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1515 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1516 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" |
|
1516 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" | |
1517 | bundle2-input-bundle: 4 parts total |
|
1517 | bundle2-input-bundle: 4 parts total | |
1518 | bundle2-output-bundle: "HG20", 3 parts total |
|
1518 | bundle2-output-bundle: "HG20", 3 parts total | |
1519 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1519 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1520 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1520 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1521 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1521 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1522 | bundle2-input-bundle: with-transaction |
|
1522 | bundle2-input-bundle: with-transaction | |
1523 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1523 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1524 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1524 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1525 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1525 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1526 | bundle2-input-bundle: 2 parts total |
|
1526 | bundle2-input-bundle: 2 parts total | |
1527 | listing keys for "phases" |
|
1527 | listing keys for "phases" | |
1528 | repository tip rolled back to revision 2 (undo push) |
|
1528 | repository tip rolled back to revision 2 (undo push) | |
1529 | 2:fb35475503ef |
|
1529 | 2:fb35475503ef | |
1530 |
|
1530 | |||
1531 |
|
1531 | |||
1532 | Branch acl deny test |
|
1532 | Branch acl deny test | |
1533 |
|
1533 | |||
1534 | $ echo "[acl.deny.branches]" >> $config |
|
1534 | $ echo "[acl.deny.branches]" >> $config | |
1535 | $ echo "foobar = *" >> $config |
|
1535 | $ echo "foobar = *" >> $config | |
1536 | $ do_push astro |
|
1536 | $ do_push astro | |
1537 | Pushing as user astro |
|
1537 | Pushing as user astro | |
1538 | hgrc = """ |
|
1538 | hgrc = """ | |
1539 | [hooks] |
|
1539 | [hooks] | |
1540 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1540 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1541 | [acl] |
|
1541 | [acl] | |
1542 | sources = push |
|
1542 | sources = push | |
1543 | [extensions] |
|
1543 | [extensions] | |
1544 | [acl.deny.branches] |
|
1544 | [acl.deny.branches] | |
1545 | foobar = * |
|
1545 | foobar = * | |
1546 | """ |
|
1546 | """ | |
1547 | pushing to ../b |
|
1547 | pushing to ../b | |
1548 | query 1; heads |
|
1548 | query 1; heads | |
1549 | searching for changes |
|
1549 | searching for changes | |
1550 | all remote heads known locally |
|
1550 | all remote heads known locally | |
1551 | listing keys for "phases" |
|
1551 | listing keys for "phases" | |
1552 | checking for updated bookmarks |
|
1552 | checking for updated bookmarks | |
1553 | listing keys for "bookmarks" |
|
1553 | listing keys for "bookmarks" | |
1554 | listing keys for "bookmarks" |
|
1554 | listing keys for "bookmarks" | |
1555 | 4 changesets found |
|
1555 | 4 changesets found | |
1556 | list of changesets: |
|
1556 | list of changesets: | |
1557 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1557 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1558 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1558 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1559 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1559 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1560 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1560 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
1561 | bundle2-output-bundle: "HG20", 5 parts total |
|
1561 | bundle2-output-bundle: "HG20", 5 parts total | |
1562 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1562 | bundle2-output-part: "replycaps" 155 bytes payload | |
1563 | bundle2-output-part: "check:heads" streamed payload |
|
1563 | bundle2-output-part: "check:heads" streamed payload | |
1564 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1564 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1565 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1565 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1566 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1566 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1567 | bundle2-input-bundle: with-transaction |
|
1567 | bundle2-input-bundle: with-transaction | |
1568 | bundle2-input-part: "replycaps" supported |
|
1568 | bundle2-input-part: "replycaps" supported | |
1569 | bundle2-input-part: total payload size 155 |
|
1569 | bundle2-input-part: total payload size 155 | |
1570 | bundle2-input-part: "check:heads" supported |
|
1570 | bundle2-input-part: "check:heads" supported | |
1571 | bundle2-input-part: total payload size 20 |
|
1571 | bundle2-input-part: total payload size 20 | |
1572 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1572 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1573 | adding changesets |
|
1573 | adding changesets | |
1574 | add changeset ef1ea85a6374 |
|
1574 | add changeset ef1ea85a6374 | |
1575 | add changeset f9cafe1212c8 |
|
1575 | add changeset f9cafe1212c8 | |
1576 | add changeset 911600dab2ae |
|
1576 | add changeset 911600dab2ae | |
1577 | add changeset e8fc755d4d82 |
|
1577 | add changeset e8fc755d4d82 | |
1578 | adding manifests |
|
1578 | adding manifests | |
1579 | adding file changes |
|
1579 | adding file changes | |
1580 | adding abc.txt revisions |
|
1580 | adding abc.txt revisions | |
1581 | adding foo/Bar/file.txt revisions |
|
1581 | adding foo/Bar/file.txt revisions | |
1582 | adding foo/file.txt revisions |
|
1582 | adding foo/file.txt revisions | |
1583 | adding quux/file.py revisions |
|
1583 | adding quux/file.py revisions | |
1584 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1584 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
1585 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1585 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1586 | acl: checking access for user "astro" |
|
1586 | acl: checking access for user "astro" | |
1587 | acl: acl.allow.branches not enabled |
|
1587 | acl: acl.allow.branches not enabled | |
1588 | acl: acl.deny.branches enabled, 1 entries for user astro |
|
1588 | acl: acl.deny.branches enabled, 1 entries for user astro | |
1589 | acl: acl.allow not enabled |
|
1589 | acl: acl.allow not enabled | |
1590 | acl: acl.deny not enabled |
|
1590 | acl: acl.deny not enabled | |
1591 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1591 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1592 | acl: path access granted: "ef1ea85a6374" |
|
1592 | acl: path access granted: "ef1ea85a6374" | |
1593 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1593 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1594 | acl: path access granted: "f9cafe1212c8" |
|
1594 | acl: path access granted: "f9cafe1212c8" | |
1595 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1595 | acl: branch access granted: "911600dab2ae" on branch "default" | |
1596 | acl: path access granted: "911600dab2ae" |
|
1596 | acl: path access granted: "911600dab2ae" | |
1597 | error: pretxnchangegroup.acl hook failed: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82") |
|
1597 | error: pretxnchangegroup.acl hook failed: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82") | |
1598 |
bundle2-input-part: total payload size 21 |
|
1598 | bundle2-input-part: total payload size 2139 | |
1599 | bundle2-input-bundle: 4 parts total |
|
1599 | bundle2-input-bundle: 4 parts total | |
1600 | transaction abort! |
|
1600 | transaction abort! | |
1601 | rollback completed |
|
1601 | rollback completed | |
1602 | abort: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82") |
|
1602 | abort: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82") | |
1603 | no rollback information available |
|
1603 | no rollback information available | |
1604 | 2:fb35475503ef |
|
1604 | 2:fb35475503ef | |
1605 |
|
1605 | |||
1606 |
|
1606 | |||
1607 | Branch acl empty allow test |
|
1607 | Branch acl empty allow test | |
1608 |
|
1608 | |||
1609 | $ init_config |
|
1609 | $ init_config | |
1610 | $ echo "[acl.allow.branches]" >> $config |
|
1610 | $ echo "[acl.allow.branches]" >> $config | |
1611 | $ do_push astro |
|
1611 | $ do_push astro | |
1612 | Pushing as user astro |
|
1612 | Pushing as user astro | |
1613 | hgrc = """ |
|
1613 | hgrc = """ | |
1614 | [hooks] |
|
1614 | [hooks] | |
1615 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1615 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1616 | [acl] |
|
1616 | [acl] | |
1617 | sources = push |
|
1617 | sources = push | |
1618 | [extensions] |
|
1618 | [extensions] | |
1619 | [acl.allow.branches] |
|
1619 | [acl.allow.branches] | |
1620 | """ |
|
1620 | """ | |
1621 | pushing to ../b |
|
1621 | pushing to ../b | |
1622 | query 1; heads |
|
1622 | query 1; heads | |
1623 | searching for changes |
|
1623 | searching for changes | |
1624 | all remote heads known locally |
|
1624 | all remote heads known locally | |
1625 | listing keys for "phases" |
|
1625 | listing keys for "phases" | |
1626 | checking for updated bookmarks |
|
1626 | checking for updated bookmarks | |
1627 | listing keys for "bookmarks" |
|
1627 | listing keys for "bookmarks" | |
1628 | listing keys for "bookmarks" |
|
1628 | listing keys for "bookmarks" | |
1629 | 4 changesets found |
|
1629 | 4 changesets found | |
1630 | list of changesets: |
|
1630 | list of changesets: | |
1631 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1631 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1632 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1632 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1633 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1633 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1634 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1634 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
1635 | bundle2-output-bundle: "HG20", 5 parts total |
|
1635 | bundle2-output-bundle: "HG20", 5 parts total | |
1636 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1636 | bundle2-output-part: "replycaps" 155 bytes payload | |
1637 | bundle2-output-part: "check:heads" streamed payload |
|
1637 | bundle2-output-part: "check:heads" streamed payload | |
1638 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1638 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1639 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1639 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1640 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1640 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1641 | bundle2-input-bundle: with-transaction |
|
1641 | bundle2-input-bundle: with-transaction | |
1642 | bundle2-input-part: "replycaps" supported |
|
1642 | bundle2-input-part: "replycaps" supported | |
1643 | bundle2-input-part: total payload size 155 |
|
1643 | bundle2-input-part: total payload size 155 | |
1644 | bundle2-input-part: "check:heads" supported |
|
1644 | bundle2-input-part: "check:heads" supported | |
1645 | bundle2-input-part: total payload size 20 |
|
1645 | bundle2-input-part: total payload size 20 | |
1646 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1646 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1647 | adding changesets |
|
1647 | adding changesets | |
1648 | add changeset ef1ea85a6374 |
|
1648 | add changeset ef1ea85a6374 | |
1649 | add changeset f9cafe1212c8 |
|
1649 | add changeset f9cafe1212c8 | |
1650 | add changeset 911600dab2ae |
|
1650 | add changeset 911600dab2ae | |
1651 | add changeset e8fc755d4d82 |
|
1651 | add changeset e8fc755d4d82 | |
1652 | adding manifests |
|
1652 | adding manifests | |
1653 | adding file changes |
|
1653 | adding file changes | |
1654 | adding abc.txt revisions |
|
1654 | adding abc.txt revisions | |
1655 | adding foo/Bar/file.txt revisions |
|
1655 | adding foo/Bar/file.txt revisions | |
1656 | adding foo/file.txt revisions |
|
1656 | adding foo/file.txt revisions | |
1657 | adding quux/file.py revisions |
|
1657 | adding quux/file.py revisions | |
1658 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1658 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
1659 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1659 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1660 | acl: checking access for user "astro" |
|
1660 | acl: checking access for user "astro" | |
1661 | acl: acl.allow.branches enabled, 0 entries for user astro |
|
1661 | acl: acl.allow.branches enabled, 0 entries for user astro | |
1662 | acl: acl.deny.branches not enabled |
|
1662 | acl: acl.deny.branches not enabled | |
1663 | acl: acl.allow not enabled |
|
1663 | acl: acl.allow not enabled | |
1664 | acl: acl.deny not enabled |
|
1664 | acl: acl.deny not enabled | |
1665 | error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") |
|
1665 | error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") | |
1666 |
bundle2-input-part: total payload size 21 |
|
1666 | bundle2-input-part: total payload size 2139 | |
1667 | bundle2-input-bundle: 4 parts total |
|
1667 | bundle2-input-bundle: 4 parts total | |
1668 | transaction abort! |
|
1668 | transaction abort! | |
1669 | rollback completed |
|
1669 | rollback completed | |
1670 | abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") |
|
1670 | abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") | |
1671 | no rollback information available |
|
1671 | no rollback information available | |
1672 | 2:fb35475503ef |
|
1672 | 2:fb35475503ef | |
1673 |
|
1673 | |||
1674 |
|
1674 | |||
1675 | Branch acl allow other |
|
1675 | Branch acl allow other | |
1676 |
|
1676 | |||
1677 | $ init_config |
|
1677 | $ init_config | |
1678 | $ echo "[acl.allow.branches]" >> $config |
|
1678 | $ echo "[acl.allow.branches]" >> $config | |
1679 | $ echo "* = george" >> $config |
|
1679 | $ echo "* = george" >> $config | |
1680 | $ do_push astro |
|
1680 | $ do_push astro | |
1681 | Pushing as user astro |
|
1681 | Pushing as user astro | |
1682 | hgrc = """ |
|
1682 | hgrc = """ | |
1683 | [hooks] |
|
1683 | [hooks] | |
1684 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1684 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1685 | [acl] |
|
1685 | [acl] | |
1686 | sources = push |
|
1686 | sources = push | |
1687 | [extensions] |
|
1687 | [extensions] | |
1688 | [acl.allow.branches] |
|
1688 | [acl.allow.branches] | |
1689 | * = george |
|
1689 | * = george | |
1690 | """ |
|
1690 | """ | |
1691 | pushing to ../b |
|
1691 | pushing to ../b | |
1692 | query 1; heads |
|
1692 | query 1; heads | |
1693 | searching for changes |
|
1693 | searching for changes | |
1694 | all remote heads known locally |
|
1694 | all remote heads known locally | |
1695 | listing keys for "phases" |
|
1695 | listing keys for "phases" | |
1696 | checking for updated bookmarks |
|
1696 | checking for updated bookmarks | |
1697 | listing keys for "bookmarks" |
|
1697 | listing keys for "bookmarks" | |
1698 | listing keys for "bookmarks" |
|
1698 | listing keys for "bookmarks" | |
1699 | 4 changesets found |
|
1699 | 4 changesets found | |
1700 | list of changesets: |
|
1700 | list of changesets: | |
1701 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1701 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1702 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1702 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1703 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1703 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1704 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1704 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
1705 | bundle2-output-bundle: "HG20", 5 parts total |
|
1705 | bundle2-output-bundle: "HG20", 5 parts total | |
1706 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1706 | bundle2-output-part: "replycaps" 155 bytes payload | |
1707 | bundle2-output-part: "check:heads" streamed payload |
|
1707 | bundle2-output-part: "check:heads" streamed payload | |
1708 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1708 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1709 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1709 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1710 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1710 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1711 | bundle2-input-bundle: with-transaction |
|
1711 | bundle2-input-bundle: with-transaction | |
1712 | bundle2-input-part: "replycaps" supported |
|
1712 | bundle2-input-part: "replycaps" supported | |
1713 | bundle2-input-part: total payload size 155 |
|
1713 | bundle2-input-part: total payload size 155 | |
1714 | bundle2-input-part: "check:heads" supported |
|
1714 | bundle2-input-part: "check:heads" supported | |
1715 | bundle2-input-part: total payload size 20 |
|
1715 | bundle2-input-part: total payload size 20 | |
1716 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1716 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1717 | adding changesets |
|
1717 | adding changesets | |
1718 | add changeset ef1ea85a6374 |
|
1718 | add changeset ef1ea85a6374 | |
1719 | add changeset f9cafe1212c8 |
|
1719 | add changeset f9cafe1212c8 | |
1720 | add changeset 911600dab2ae |
|
1720 | add changeset 911600dab2ae | |
1721 | add changeset e8fc755d4d82 |
|
1721 | add changeset e8fc755d4d82 | |
1722 | adding manifests |
|
1722 | adding manifests | |
1723 | adding file changes |
|
1723 | adding file changes | |
1724 | adding abc.txt revisions |
|
1724 | adding abc.txt revisions | |
1725 | adding foo/Bar/file.txt revisions |
|
1725 | adding foo/Bar/file.txt revisions | |
1726 | adding foo/file.txt revisions |
|
1726 | adding foo/file.txt revisions | |
1727 | adding quux/file.py revisions |
|
1727 | adding quux/file.py revisions | |
1728 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1728 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
1729 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1729 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1730 | acl: checking access for user "astro" |
|
1730 | acl: checking access for user "astro" | |
1731 | acl: acl.allow.branches enabled, 0 entries for user astro |
|
1731 | acl: acl.allow.branches enabled, 0 entries for user astro | |
1732 | acl: acl.deny.branches not enabled |
|
1732 | acl: acl.deny.branches not enabled | |
1733 | acl: acl.allow not enabled |
|
1733 | acl: acl.allow not enabled | |
1734 | acl: acl.deny not enabled |
|
1734 | acl: acl.deny not enabled | |
1735 | error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") |
|
1735 | error: pretxnchangegroup.acl hook failed: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") | |
1736 |
bundle2-input-part: total payload size 21 |
|
1736 | bundle2-input-part: total payload size 2139 | |
1737 | bundle2-input-bundle: 4 parts total |
|
1737 | bundle2-input-bundle: 4 parts total | |
1738 | transaction abort! |
|
1738 | transaction abort! | |
1739 | rollback completed |
|
1739 | rollback completed | |
1740 | abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") |
|
1740 | abort: acl: user "astro" not allowed on branch "default" (changeset "ef1ea85a6374") | |
1741 | no rollback information available |
|
1741 | no rollback information available | |
1742 | 2:fb35475503ef |
|
1742 | 2:fb35475503ef | |
1743 |
|
1743 | |||
1744 | $ do_push george |
|
1744 | $ do_push george | |
1745 | Pushing as user george |
|
1745 | Pushing as user george | |
1746 | hgrc = """ |
|
1746 | hgrc = """ | |
1747 | [hooks] |
|
1747 | [hooks] | |
1748 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1748 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1749 | [acl] |
|
1749 | [acl] | |
1750 | sources = push |
|
1750 | sources = push | |
1751 | [extensions] |
|
1751 | [extensions] | |
1752 | [acl.allow.branches] |
|
1752 | [acl.allow.branches] | |
1753 | * = george |
|
1753 | * = george | |
1754 | """ |
|
1754 | """ | |
1755 | pushing to ../b |
|
1755 | pushing to ../b | |
1756 | query 1; heads |
|
1756 | query 1; heads | |
1757 | searching for changes |
|
1757 | searching for changes | |
1758 | all remote heads known locally |
|
1758 | all remote heads known locally | |
1759 | listing keys for "phases" |
|
1759 | listing keys for "phases" | |
1760 | checking for updated bookmarks |
|
1760 | checking for updated bookmarks | |
1761 | listing keys for "bookmarks" |
|
1761 | listing keys for "bookmarks" | |
1762 | listing keys for "bookmarks" |
|
1762 | listing keys for "bookmarks" | |
1763 | 4 changesets found |
|
1763 | 4 changesets found | |
1764 | list of changesets: |
|
1764 | list of changesets: | |
1765 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1765 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1766 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1766 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1767 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1767 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1768 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1768 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
1769 | bundle2-output-bundle: "HG20", 5 parts total |
|
1769 | bundle2-output-bundle: "HG20", 5 parts total | |
1770 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1770 | bundle2-output-part: "replycaps" 155 bytes payload | |
1771 | bundle2-output-part: "check:heads" streamed payload |
|
1771 | bundle2-output-part: "check:heads" streamed payload | |
1772 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1772 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1773 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1773 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1774 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1774 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1775 | bundle2-input-bundle: with-transaction |
|
1775 | bundle2-input-bundle: with-transaction | |
1776 | bundle2-input-part: "replycaps" supported |
|
1776 | bundle2-input-part: "replycaps" supported | |
1777 | bundle2-input-part: total payload size 155 |
|
1777 | bundle2-input-part: total payload size 155 | |
1778 | bundle2-input-part: "check:heads" supported |
|
1778 | bundle2-input-part: "check:heads" supported | |
1779 | bundle2-input-part: total payload size 20 |
|
1779 | bundle2-input-part: total payload size 20 | |
1780 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1780 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1781 | adding changesets |
|
1781 | adding changesets | |
1782 | add changeset ef1ea85a6374 |
|
1782 | add changeset ef1ea85a6374 | |
1783 | add changeset f9cafe1212c8 |
|
1783 | add changeset f9cafe1212c8 | |
1784 | add changeset 911600dab2ae |
|
1784 | add changeset 911600dab2ae | |
1785 | add changeset e8fc755d4d82 |
|
1785 | add changeset e8fc755d4d82 | |
1786 | adding manifests |
|
1786 | adding manifests | |
1787 | adding file changes |
|
1787 | adding file changes | |
1788 | adding abc.txt revisions |
|
1788 | adding abc.txt revisions | |
1789 | adding foo/Bar/file.txt revisions |
|
1789 | adding foo/Bar/file.txt revisions | |
1790 | adding foo/file.txt revisions |
|
1790 | adding foo/file.txt revisions | |
1791 | adding quux/file.py revisions |
|
1791 | adding quux/file.py revisions | |
1792 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1792 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
1793 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1793 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1794 | acl: checking access for user "george" |
|
1794 | acl: checking access for user "george" | |
1795 | acl: acl.allow.branches enabled, 1 entries for user george |
|
1795 | acl: acl.allow.branches enabled, 1 entries for user george | |
1796 | acl: acl.deny.branches not enabled |
|
1796 | acl: acl.deny.branches not enabled | |
1797 | acl: acl.allow not enabled |
|
1797 | acl: acl.allow not enabled | |
1798 | acl: acl.deny not enabled |
|
1798 | acl: acl.deny not enabled | |
1799 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1799 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1800 | acl: path access granted: "ef1ea85a6374" |
|
1800 | acl: path access granted: "ef1ea85a6374" | |
1801 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1801 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1802 | acl: path access granted: "f9cafe1212c8" |
|
1802 | acl: path access granted: "f9cafe1212c8" | |
1803 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1803 | acl: branch access granted: "911600dab2ae" on branch "default" | |
1804 | acl: path access granted: "911600dab2ae" |
|
1804 | acl: path access granted: "911600dab2ae" | |
1805 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" |
|
1805 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" | |
1806 | acl: path access granted: "e8fc755d4d82" |
|
1806 | acl: path access granted: "e8fc755d4d82" | |
1807 | updating the branch cache |
|
1807 | updating the branch cache | |
1808 |
bundle2-input-part: total payload size 21 |
|
1808 | bundle2-input-part: total payload size 2139 | |
1809 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1809 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1810 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1810 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
1811 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1811 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1812 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" |
|
1812 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" | |
1813 | bundle2-input-bundle: 4 parts total |
|
1813 | bundle2-input-bundle: 4 parts total | |
1814 | bundle2-output-bundle: "HG20", 3 parts total |
|
1814 | bundle2-output-bundle: "HG20", 3 parts total | |
1815 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1815 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1816 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1816 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1817 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1817 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1818 | bundle2-input-bundle: with-transaction |
|
1818 | bundle2-input-bundle: with-transaction | |
1819 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1819 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1820 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1820 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1821 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1821 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1822 | bundle2-input-bundle: 2 parts total |
|
1822 | bundle2-input-bundle: 2 parts total | |
1823 | listing keys for "phases" |
|
1823 | listing keys for "phases" | |
1824 | repository tip rolled back to revision 2 (undo push) |
|
1824 | repository tip rolled back to revision 2 (undo push) | |
1825 | 2:fb35475503ef |
|
1825 | 2:fb35475503ef | |
1826 |
|
1826 | |||
1827 |
|
1827 | |||
1828 | Branch acl conflicting allow |
|
1828 | Branch acl conflicting allow | |
1829 | asterisk ends up applying to all branches and allowing george to |
|
1829 | asterisk ends up applying to all branches and allowing george to | |
1830 | push foobar into the remote |
|
1830 | push foobar into the remote | |
1831 |
|
1831 | |||
1832 | $ init_config |
|
1832 | $ init_config | |
1833 | $ echo "[acl.allow.branches]" >> $config |
|
1833 | $ echo "[acl.allow.branches]" >> $config | |
1834 | $ echo "foobar = astro" >> $config |
|
1834 | $ echo "foobar = astro" >> $config | |
1835 | $ echo "* = george" >> $config |
|
1835 | $ echo "* = george" >> $config | |
1836 | $ do_push george |
|
1836 | $ do_push george | |
1837 | Pushing as user george |
|
1837 | Pushing as user george | |
1838 | hgrc = """ |
|
1838 | hgrc = """ | |
1839 | [hooks] |
|
1839 | [hooks] | |
1840 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1840 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1841 | [acl] |
|
1841 | [acl] | |
1842 | sources = push |
|
1842 | sources = push | |
1843 | [extensions] |
|
1843 | [extensions] | |
1844 | [acl.allow.branches] |
|
1844 | [acl.allow.branches] | |
1845 | foobar = astro |
|
1845 | foobar = astro | |
1846 | * = george |
|
1846 | * = george | |
1847 | """ |
|
1847 | """ | |
1848 | pushing to ../b |
|
1848 | pushing to ../b | |
1849 | query 1; heads |
|
1849 | query 1; heads | |
1850 | searching for changes |
|
1850 | searching for changes | |
1851 | all remote heads known locally |
|
1851 | all remote heads known locally | |
1852 | listing keys for "phases" |
|
1852 | listing keys for "phases" | |
1853 | checking for updated bookmarks |
|
1853 | checking for updated bookmarks | |
1854 | listing keys for "bookmarks" |
|
1854 | listing keys for "bookmarks" | |
1855 | listing keys for "bookmarks" |
|
1855 | listing keys for "bookmarks" | |
1856 | 4 changesets found |
|
1856 | 4 changesets found | |
1857 | list of changesets: |
|
1857 | list of changesets: | |
1858 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1858 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1859 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1859 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1860 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1860 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1861 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1861 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
1862 | bundle2-output-bundle: "HG20", 5 parts total |
|
1862 | bundle2-output-bundle: "HG20", 5 parts total | |
1863 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1863 | bundle2-output-part: "replycaps" 155 bytes payload | |
1864 | bundle2-output-part: "check:heads" streamed payload |
|
1864 | bundle2-output-part: "check:heads" streamed payload | |
1865 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1865 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1866 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1866 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1867 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1867 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1868 | bundle2-input-bundle: with-transaction |
|
1868 | bundle2-input-bundle: with-transaction | |
1869 | bundle2-input-part: "replycaps" supported |
|
1869 | bundle2-input-part: "replycaps" supported | |
1870 | bundle2-input-part: total payload size 155 |
|
1870 | bundle2-input-part: total payload size 155 | |
1871 | bundle2-input-part: "check:heads" supported |
|
1871 | bundle2-input-part: "check:heads" supported | |
1872 | bundle2-input-part: total payload size 20 |
|
1872 | bundle2-input-part: total payload size 20 | |
1873 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1873 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1874 | adding changesets |
|
1874 | adding changesets | |
1875 | add changeset ef1ea85a6374 |
|
1875 | add changeset ef1ea85a6374 | |
1876 | add changeset f9cafe1212c8 |
|
1876 | add changeset f9cafe1212c8 | |
1877 | add changeset 911600dab2ae |
|
1877 | add changeset 911600dab2ae | |
1878 | add changeset e8fc755d4d82 |
|
1878 | add changeset e8fc755d4d82 | |
1879 | adding manifests |
|
1879 | adding manifests | |
1880 | adding file changes |
|
1880 | adding file changes | |
1881 | adding abc.txt revisions |
|
1881 | adding abc.txt revisions | |
1882 | adding foo/Bar/file.txt revisions |
|
1882 | adding foo/Bar/file.txt revisions | |
1883 | adding foo/file.txt revisions |
|
1883 | adding foo/file.txt revisions | |
1884 | adding quux/file.py revisions |
|
1884 | adding quux/file.py revisions | |
1885 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1885 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
1886 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1886 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1887 | acl: checking access for user "george" |
|
1887 | acl: checking access for user "george" | |
1888 | acl: acl.allow.branches enabled, 1 entries for user george |
|
1888 | acl: acl.allow.branches enabled, 1 entries for user george | |
1889 | acl: acl.deny.branches not enabled |
|
1889 | acl: acl.deny.branches not enabled | |
1890 | acl: acl.allow not enabled |
|
1890 | acl: acl.allow not enabled | |
1891 | acl: acl.deny not enabled |
|
1891 | acl: acl.deny not enabled | |
1892 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
1892 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
1893 | acl: path access granted: "ef1ea85a6374" |
|
1893 | acl: path access granted: "ef1ea85a6374" | |
1894 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
1894 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
1895 | acl: path access granted: "f9cafe1212c8" |
|
1895 | acl: path access granted: "f9cafe1212c8" | |
1896 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
1896 | acl: branch access granted: "911600dab2ae" on branch "default" | |
1897 | acl: path access granted: "911600dab2ae" |
|
1897 | acl: path access granted: "911600dab2ae" | |
1898 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" |
|
1898 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" | |
1899 | acl: path access granted: "e8fc755d4d82" |
|
1899 | acl: path access granted: "e8fc755d4d82" | |
1900 | updating the branch cache |
|
1900 | updating the branch cache | |
1901 |
bundle2-input-part: total payload size 21 |
|
1901 | bundle2-input-part: total payload size 2139 | |
1902 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1902 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1903 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
1903 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
1904 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
1904 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
1905 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" |
|
1905 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" | |
1906 | bundle2-input-bundle: 4 parts total |
|
1906 | bundle2-input-bundle: 4 parts total | |
1907 | bundle2-output-bundle: "HG20", 3 parts total |
|
1907 | bundle2-output-bundle: "HG20", 3 parts total | |
1908 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
1908 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
1909 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1909 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1910 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
1910 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
1911 | bundle2-input-bundle: with-transaction |
|
1911 | bundle2-input-bundle: with-transaction | |
1912 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
1912 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
1913 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1913 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1914 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
1914 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
1915 | bundle2-input-bundle: 2 parts total |
|
1915 | bundle2-input-bundle: 2 parts total | |
1916 | listing keys for "phases" |
|
1916 | listing keys for "phases" | |
1917 | repository tip rolled back to revision 2 (undo push) |
|
1917 | repository tip rolled back to revision 2 (undo push) | |
1918 | 2:fb35475503ef |
|
1918 | 2:fb35475503ef | |
1919 |
|
1919 | |||
1920 | Branch acl conflicting deny |
|
1920 | Branch acl conflicting deny | |
1921 |
|
1921 | |||
1922 | $ init_config |
|
1922 | $ init_config | |
1923 | $ echo "[acl.deny.branches]" >> $config |
|
1923 | $ echo "[acl.deny.branches]" >> $config | |
1924 | $ echo "foobar = astro" >> $config |
|
1924 | $ echo "foobar = astro" >> $config | |
1925 | $ echo "default = astro" >> $config |
|
1925 | $ echo "default = astro" >> $config | |
1926 | $ echo "* = george" >> $config |
|
1926 | $ echo "* = george" >> $config | |
1927 | $ do_push george |
|
1927 | $ do_push george | |
1928 | Pushing as user george |
|
1928 | Pushing as user george | |
1929 | hgrc = """ |
|
1929 | hgrc = """ | |
1930 | [hooks] |
|
1930 | [hooks] | |
1931 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
1931 | pretxnchangegroup.acl = python:hgext.acl.hook | |
1932 | [acl] |
|
1932 | [acl] | |
1933 | sources = push |
|
1933 | sources = push | |
1934 | [extensions] |
|
1934 | [extensions] | |
1935 | [acl.deny.branches] |
|
1935 | [acl.deny.branches] | |
1936 | foobar = astro |
|
1936 | foobar = astro | |
1937 | default = astro |
|
1937 | default = astro | |
1938 | * = george |
|
1938 | * = george | |
1939 | """ |
|
1939 | """ | |
1940 | pushing to ../b |
|
1940 | pushing to ../b | |
1941 | query 1; heads |
|
1941 | query 1; heads | |
1942 | searching for changes |
|
1942 | searching for changes | |
1943 | all remote heads known locally |
|
1943 | all remote heads known locally | |
1944 | listing keys for "phases" |
|
1944 | listing keys for "phases" | |
1945 | checking for updated bookmarks |
|
1945 | checking for updated bookmarks | |
1946 | listing keys for "bookmarks" |
|
1946 | listing keys for "bookmarks" | |
1947 | listing keys for "bookmarks" |
|
1947 | listing keys for "bookmarks" | |
1948 | 4 changesets found |
|
1948 | 4 changesets found | |
1949 | list of changesets: |
|
1949 | list of changesets: | |
1950 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
1950 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
1951 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
1951 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
1952 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
1952 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
1953 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
1953 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
1954 | bundle2-output-bundle: "HG20", 5 parts total |
|
1954 | bundle2-output-bundle: "HG20", 5 parts total | |
1955 | bundle2-output-part: "replycaps" 155 bytes payload |
|
1955 | bundle2-output-part: "replycaps" 155 bytes payload | |
1956 | bundle2-output-part: "check:heads" streamed payload |
|
1956 | bundle2-output-part: "check:heads" streamed payload | |
1957 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
1957 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
1958 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1958 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1959 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
1959 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
1960 | bundle2-input-bundle: with-transaction |
|
1960 | bundle2-input-bundle: with-transaction | |
1961 | bundle2-input-part: "replycaps" supported |
|
1961 | bundle2-input-part: "replycaps" supported | |
1962 | bundle2-input-part: total payload size 155 |
|
1962 | bundle2-input-part: total payload size 155 | |
1963 | bundle2-input-part: "check:heads" supported |
|
1963 | bundle2-input-part: "check:heads" supported | |
1964 | bundle2-input-part: total payload size 20 |
|
1964 | bundle2-input-part: total payload size 20 | |
1965 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
1965 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
1966 | adding changesets |
|
1966 | adding changesets | |
1967 | add changeset ef1ea85a6374 |
|
1967 | add changeset ef1ea85a6374 | |
1968 | add changeset f9cafe1212c8 |
|
1968 | add changeset f9cafe1212c8 | |
1969 | add changeset 911600dab2ae |
|
1969 | add changeset 911600dab2ae | |
1970 | add changeset e8fc755d4d82 |
|
1970 | add changeset e8fc755d4d82 | |
1971 | adding manifests |
|
1971 | adding manifests | |
1972 | adding file changes |
|
1972 | adding file changes | |
1973 | adding abc.txt revisions |
|
1973 | adding abc.txt revisions | |
1974 | adding foo/Bar/file.txt revisions |
|
1974 | adding foo/Bar/file.txt revisions | |
1975 | adding foo/file.txt revisions |
|
1975 | adding foo/file.txt revisions | |
1976 | adding quux/file.py revisions |
|
1976 | adding quux/file.py revisions | |
1977 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
1977 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
1978 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
1978 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
1979 | acl: checking access for user "george" |
|
1979 | acl: checking access for user "george" | |
1980 | acl: acl.allow.branches not enabled |
|
1980 | acl: acl.allow.branches not enabled | |
1981 | acl: acl.deny.branches enabled, 1 entries for user george |
|
1981 | acl: acl.deny.branches enabled, 1 entries for user george | |
1982 | acl: acl.allow not enabled |
|
1982 | acl: acl.allow not enabled | |
1983 | acl: acl.deny not enabled |
|
1983 | acl: acl.deny not enabled | |
1984 | error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") |
|
1984 | error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") | |
1985 |
bundle2-input-part: total payload size 21 |
|
1985 | bundle2-input-part: total payload size 2139 | |
1986 | bundle2-input-bundle: 4 parts total |
|
1986 | bundle2-input-bundle: 4 parts total | |
1987 | transaction abort! |
|
1987 | transaction abort! | |
1988 | rollback completed |
|
1988 | rollback completed | |
1989 | abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") |
|
1989 | abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") | |
1990 | no rollback information available |
|
1990 | no rollback information available | |
1991 | 2:fb35475503ef |
|
1991 | 2:fb35475503ef | |
1992 |
|
1992 | |||
1993 | User 'astro' must not be denied |
|
1993 | User 'astro' must not be denied | |
1994 |
|
1994 | |||
1995 | $ init_config |
|
1995 | $ init_config | |
1996 | $ echo "[acl.deny.branches]" >> $config |
|
1996 | $ echo "[acl.deny.branches]" >> $config | |
1997 | $ echo "default = !astro" >> $config |
|
1997 | $ echo "default = !astro" >> $config | |
1998 | $ do_push astro |
|
1998 | $ do_push astro | |
1999 | Pushing as user astro |
|
1999 | Pushing as user astro | |
2000 | hgrc = """ |
|
2000 | hgrc = """ | |
2001 | [hooks] |
|
2001 | [hooks] | |
2002 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
2002 | pretxnchangegroup.acl = python:hgext.acl.hook | |
2003 | [acl] |
|
2003 | [acl] | |
2004 | sources = push |
|
2004 | sources = push | |
2005 | [extensions] |
|
2005 | [extensions] | |
2006 | [acl.deny.branches] |
|
2006 | [acl.deny.branches] | |
2007 | default = !astro |
|
2007 | default = !astro | |
2008 | """ |
|
2008 | """ | |
2009 | pushing to ../b |
|
2009 | pushing to ../b | |
2010 | query 1; heads |
|
2010 | query 1; heads | |
2011 | searching for changes |
|
2011 | searching for changes | |
2012 | all remote heads known locally |
|
2012 | all remote heads known locally | |
2013 | listing keys for "phases" |
|
2013 | listing keys for "phases" | |
2014 | checking for updated bookmarks |
|
2014 | checking for updated bookmarks | |
2015 | listing keys for "bookmarks" |
|
2015 | listing keys for "bookmarks" | |
2016 | listing keys for "bookmarks" |
|
2016 | listing keys for "bookmarks" | |
2017 | 4 changesets found |
|
2017 | 4 changesets found | |
2018 | list of changesets: |
|
2018 | list of changesets: | |
2019 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
2019 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
2020 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
2020 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
2021 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
2021 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
2022 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
2022 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
2023 | bundle2-output-bundle: "HG20", 5 parts total |
|
2023 | bundle2-output-bundle: "HG20", 5 parts total | |
2024 | bundle2-output-part: "replycaps" 155 bytes payload |
|
2024 | bundle2-output-part: "replycaps" 155 bytes payload | |
2025 | bundle2-output-part: "check:heads" streamed payload |
|
2025 | bundle2-output-part: "check:heads" streamed payload | |
2026 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
2026 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
2027 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
2027 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
2028 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
2028 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
2029 | bundle2-input-bundle: with-transaction |
|
2029 | bundle2-input-bundle: with-transaction | |
2030 | bundle2-input-part: "replycaps" supported |
|
2030 | bundle2-input-part: "replycaps" supported | |
2031 | bundle2-input-part: total payload size 155 |
|
2031 | bundle2-input-part: total payload size 155 | |
2032 | bundle2-input-part: "check:heads" supported |
|
2032 | bundle2-input-part: "check:heads" supported | |
2033 | bundle2-input-part: total payload size 20 |
|
2033 | bundle2-input-part: total payload size 20 | |
2034 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
2034 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
2035 | adding changesets |
|
2035 | adding changesets | |
2036 | add changeset ef1ea85a6374 |
|
2036 | add changeset ef1ea85a6374 | |
2037 | add changeset f9cafe1212c8 |
|
2037 | add changeset f9cafe1212c8 | |
2038 | add changeset 911600dab2ae |
|
2038 | add changeset 911600dab2ae | |
2039 | add changeset e8fc755d4d82 |
|
2039 | add changeset e8fc755d4d82 | |
2040 | adding manifests |
|
2040 | adding manifests | |
2041 | adding file changes |
|
2041 | adding file changes | |
2042 | adding abc.txt revisions |
|
2042 | adding abc.txt revisions | |
2043 | adding foo/Bar/file.txt revisions |
|
2043 | adding foo/Bar/file.txt revisions | |
2044 | adding foo/file.txt revisions |
|
2044 | adding foo/file.txt revisions | |
2045 | adding quux/file.py revisions |
|
2045 | adding quux/file.py revisions | |
2046 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
2046 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
2047 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
2047 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
2048 | acl: checking access for user "astro" |
|
2048 | acl: checking access for user "astro" | |
2049 | acl: acl.allow.branches not enabled |
|
2049 | acl: acl.allow.branches not enabled | |
2050 | acl: acl.deny.branches enabled, 0 entries for user astro |
|
2050 | acl: acl.deny.branches enabled, 0 entries for user astro | |
2051 | acl: acl.allow not enabled |
|
2051 | acl: acl.allow not enabled | |
2052 | acl: acl.deny not enabled |
|
2052 | acl: acl.deny not enabled | |
2053 | acl: branch access granted: "ef1ea85a6374" on branch "default" |
|
2053 | acl: branch access granted: "ef1ea85a6374" on branch "default" | |
2054 | acl: path access granted: "ef1ea85a6374" |
|
2054 | acl: path access granted: "ef1ea85a6374" | |
2055 | acl: branch access granted: "f9cafe1212c8" on branch "default" |
|
2055 | acl: branch access granted: "f9cafe1212c8" on branch "default" | |
2056 | acl: path access granted: "f9cafe1212c8" |
|
2056 | acl: path access granted: "f9cafe1212c8" | |
2057 | acl: branch access granted: "911600dab2ae" on branch "default" |
|
2057 | acl: branch access granted: "911600dab2ae" on branch "default" | |
2058 | acl: path access granted: "911600dab2ae" |
|
2058 | acl: path access granted: "911600dab2ae" | |
2059 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" |
|
2059 | acl: branch access granted: "e8fc755d4d82" on branch "foobar" | |
2060 | acl: path access granted: "e8fc755d4d82" |
|
2060 | acl: path access granted: "e8fc755d4d82" | |
2061 | updating the branch cache |
|
2061 | updating the branch cache | |
2062 |
bundle2-input-part: total payload size 21 |
|
2062 | bundle2-input-part: total payload size 2139 | |
2063 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
2063 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
2064 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" |
|
2064 | pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955" | |
2065 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported |
|
2065 | bundle2-input-part: "pushkey" (params: 4 mandatory) supported | |
2066 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" |
|
2066 | pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01" | |
2067 | bundle2-input-bundle: 4 parts total |
|
2067 | bundle2-input-bundle: 4 parts total | |
2068 | bundle2-output-bundle: "HG20", 3 parts total |
|
2068 | bundle2-output-bundle: "HG20", 3 parts total | |
2069 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
2069 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |
2070 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
2070 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
2071 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload |
|
2071 | bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload | |
2072 | bundle2-input-bundle: with-transaction |
|
2072 | bundle2-input-bundle: with-transaction | |
2073 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
2073 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |
2074 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
2074 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
2075 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported |
|
2075 | bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported | |
2076 | bundle2-input-bundle: 2 parts total |
|
2076 | bundle2-input-bundle: 2 parts total | |
2077 | listing keys for "phases" |
|
2077 | listing keys for "phases" | |
2078 | repository tip rolled back to revision 2 (undo push) |
|
2078 | repository tip rolled back to revision 2 (undo push) | |
2079 | 2:fb35475503ef |
|
2079 | 2:fb35475503ef | |
2080 |
|
2080 | |||
2081 |
|
2081 | |||
2082 | Non-astro users must be denied |
|
2082 | Non-astro users must be denied | |
2083 |
|
2083 | |||
2084 | $ do_push george |
|
2084 | $ do_push george | |
2085 | Pushing as user george |
|
2085 | Pushing as user george | |
2086 | hgrc = """ |
|
2086 | hgrc = """ | |
2087 | [hooks] |
|
2087 | [hooks] | |
2088 | pretxnchangegroup.acl = python:hgext.acl.hook |
|
2088 | pretxnchangegroup.acl = python:hgext.acl.hook | |
2089 | [acl] |
|
2089 | [acl] | |
2090 | sources = push |
|
2090 | sources = push | |
2091 | [extensions] |
|
2091 | [extensions] | |
2092 | [acl.deny.branches] |
|
2092 | [acl.deny.branches] | |
2093 | default = !astro |
|
2093 | default = !astro | |
2094 | """ |
|
2094 | """ | |
2095 | pushing to ../b |
|
2095 | pushing to ../b | |
2096 | query 1; heads |
|
2096 | query 1; heads | |
2097 | searching for changes |
|
2097 | searching for changes | |
2098 | all remote heads known locally |
|
2098 | all remote heads known locally | |
2099 | listing keys for "phases" |
|
2099 | listing keys for "phases" | |
2100 | checking for updated bookmarks |
|
2100 | checking for updated bookmarks | |
2101 | listing keys for "bookmarks" |
|
2101 | listing keys for "bookmarks" | |
2102 | listing keys for "bookmarks" |
|
2102 | listing keys for "bookmarks" | |
2103 | 4 changesets found |
|
2103 | 4 changesets found | |
2104 | list of changesets: |
|
2104 | list of changesets: | |
2105 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 |
|
2105 | ef1ea85a6374b77d6da9dcda9541f498f2d17df7 | |
2106 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd |
|
2106 | f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd | |
2107 | 911600dab2ae7a9baff75958b84fe606851ce955 |
|
2107 | 911600dab2ae7a9baff75958b84fe606851ce955 | |
2108 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 |
|
2108 | e8fc755d4d8217ee5b0c2bb41558c40d43b92c01 | |
2109 | bundle2-output-bundle: "HG20", 5 parts total |
|
2109 | bundle2-output-bundle: "HG20", 5 parts total | |
2110 | bundle2-output-part: "replycaps" 155 bytes payload |
|
2110 | bundle2-output-part: "replycaps" 155 bytes payload | |
2111 | bundle2-output-part: "check:heads" streamed payload |
|
2111 | bundle2-output-part: "check:heads" streamed payload | |
2112 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
2112 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |
2113 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
2113 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
2114 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload |
|
2114 | bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload | |
2115 | bundle2-input-bundle: with-transaction |
|
2115 | bundle2-input-bundle: with-transaction | |
2116 | bundle2-input-part: "replycaps" supported |
|
2116 | bundle2-input-part: "replycaps" supported | |
2117 | bundle2-input-part: total payload size 155 |
|
2117 | bundle2-input-part: total payload size 155 | |
2118 | bundle2-input-part: "check:heads" supported |
|
2118 | bundle2-input-part: "check:heads" supported | |
2119 | bundle2-input-part: total payload size 20 |
|
2119 | bundle2-input-part: total payload size 20 | |
2120 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
2120 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |
2121 | adding changesets |
|
2121 | adding changesets | |
2122 | add changeset ef1ea85a6374 |
|
2122 | add changeset ef1ea85a6374 | |
2123 | add changeset f9cafe1212c8 |
|
2123 | add changeset f9cafe1212c8 | |
2124 | add changeset 911600dab2ae |
|
2124 | add changeset 911600dab2ae | |
2125 | add changeset e8fc755d4d82 |
|
2125 | add changeset e8fc755d4d82 | |
2126 | adding manifests |
|
2126 | adding manifests | |
2127 | adding file changes |
|
2127 | adding file changes | |
2128 | adding abc.txt revisions |
|
2128 | adding abc.txt revisions | |
2129 | adding foo/Bar/file.txt revisions |
|
2129 | adding foo/Bar/file.txt revisions | |
2130 | adding foo/file.txt revisions |
|
2130 | adding foo/file.txt revisions | |
2131 | adding quux/file.py revisions |
|
2131 | adding quux/file.py revisions | |
2132 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
2132 | added 4 changesets with 4 changes to 4 files (+1 heads) | |
2133 | calling hook pretxnchangegroup.acl: hgext.acl.hook |
|
2133 | calling hook pretxnchangegroup.acl: hgext.acl.hook | |
2134 | acl: checking access for user "george" |
|
2134 | acl: checking access for user "george" | |
2135 | acl: acl.allow.branches not enabled |
|
2135 | acl: acl.allow.branches not enabled | |
2136 | acl: acl.deny.branches enabled, 1 entries for user george |
|
2136 | acl: acl.deny.branches enabled, 1 entries for user george | |
2137 | acl: acl.allow not enabled |
|
2137 | acl: acl.allow not enabled | |
2138 | acl: acl.deny not enabled |
|
2138 | acl: acl.deny not enabled | |
2139 | error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") |
|
2139 | error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") | |
2140 |
bundle2-input-part: total payload size 21 |
|
2140 | bundle2-input-part: total payload size 2139 | |
2141 | bundle2-input-bundle: 4 parts total |
|
2141 | bundle2-input-bundle: 4 parts total | |
2142 | transaction abort! |
|
2142 | transaction abort! | |
2143 | rollback completed |
|
2143 | rollback completed | |
2144 | abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") |
|
2144 | abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374") | |
2145 | no rollback information available |
|
2145 | no rollback information available | |
2146 | 2:fb35475503ef |
|
2146 | 2:fb35475503ef | |
2147 |
|
2147 | |||
2148 |
|
2148 |
@@ -1,101 +1,101 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ echo foo > a |
|
3 | $ echo foo > a | |
4 | $ echo foo > b |
|
4 | $ echo foo > b | |
5 | $ hg add a b |
|
5 | $ hg add a b | |
6 |
|
6 | |||
7 | $ hg ci -m "test" |
|
7 | $ hg ci -m "test" | |
8 |
|
8 | |||
9 | $ echo blah > a |
|
9 | $ echo blah > a | |
10 |
|
10 | |||
11 | $ hg ci -m "branch a" |
|
11 | $ hg ci -m "branch a" | |
12 |
|
12 | |||
13 | $ hg co 0 |
|
13 | $ hg co 0 | |
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
15 |
|
15 | |||
16 | $ echo blah > b |
|
16 | $ echo blah > b | |
17 |
|
17 | |||
18 | $ hg ci -m "branch b" |
|
18 | $ hg ci -m "branch b" | |
19 | created new head |
|
19 | created new head | |
20 | $ HGMERGE=true hg merge 1 |
|
20 | $ HGMERGE=true hg merge 1 | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | (branch merge, don't forget to commit) |
|
22 | (branch merge, don't forget to commit) | |
23 |
|
23 | |||
24 | $ hg ci -m "merge b/a -> blah" |
|
24 | $ hg ci -m "merge b/a -> blah" | |
25 |
|
25 | |||
26 | $ hg co 1 |
|
26 | $ hg co 1 | |
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | $ HGMERGE=true hg merge 2 |
|
28 | $ HGMERGE=true hg merge 2 | |
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 | (branch merge, don't forget to commit) |
|
30 | (branch merge, don't forget to commit) | |
31 | $ hg ci -m "merge a/b -> blah" |
|
31 | $ hg ci -m "merge a/b -> blah" | |
32 | created new head |
|
32 | created new head | |
33 |
|
33 | |||
34 | $ hg log |
|
34 | $ hg log | |
35 | changeset: 4:2ee31f665a86 |
|
35 | changeset: 4:2ee31f665a86 | |
36 | tag: tip |
|
36 | tag: tip | |
37 | parent: 1:96155394af80 |
|
37 | parent: 1:96155394af80 | |
38 | parent: 2:92cc4c306b19 |
|
38 | parent: 2:92cc4c306b19 | |
39 | user: test |
|
39 | user: test | |
40 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
40 | date: Thu Jan 01 00:00:00 1970 +0000 | |
41 | summary: merge a/b -> blah |
|
41 | summary: merge a/b -> blah | |
42 |
|
42 | |||
43 | changeset: 3:e16a66a37edd |
|
43 | changeset: 3:e16a66a37edd | |
44 | parent: 2:92cc4c306b19 |
|
44 | parent: 2:92cc4c306b19 | |
45 | parent: 1:96155394af80 |
|
45 | parent: 1:96155394af80 | |
46 | user: test |
|
46 | user: test | |
47 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
47 | date: Thu Jan 01 00:00:00 1970 +0000 | |
48 | summary: merge b/a -> blah |
|
48 | summary: merge b/a -> blah | |
49 |
|
49 | |||
50 | changeset: 2:92cc4c306b19 |
|
50 | changeset: 2:92cc4c306b19 | |
51 | parent: 0:5e0375449e74 |
|
51 | parent: 0:5e0375449e74 | |
52 | user: test |
|
52 | user: test | |
53 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | summary: branch b |
|
54 | summary: branch b | |
55 |
|
55 | |||
56 | changeset: 1:96155394af80 |
|
56 | changeset: 1:96155394af80 | |
57 | user: test |
|
57 | user: test | |
58 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | summary: branch a |
|
59 | summary: branch a | |
60 |
|
60 | |||
61 | changeset: 0:5e0375449e74 |
|
61 | changeset: 0:5e0375449e74 | |
62 | user: test |
|
62 | user: test | |
63 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
63 | date: Thu Jan 01 00:00:00 1970 +0000 | |
64 | summary: test |
|
64 | summary: test | |
65 |
|
65 | |||
66 | $ hg debugindex --changelog |
|
66 | $ hg debugindex --changelog | |
67 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
67 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
68 | 0 0 60 ..... 0 5e0375449e74 000000000000 000000000000 (re) |
|
68 | 0 0 60 ..... 0 5e0375449e74 000000000000 000000000000 (re) | |
69 | 1 60 62 ..... 1 96155394af80 5e0375449e74 000000000000 (re) |
|
69 | 1 60 62 ..... 1 96155394af80 5e0375449e74 000000000000 (re) | |
70 | 2 122 62 ..... 2 92cc4c306b19 5e0375449e74 000000000000 (re) |
|
70 | 2 122 62 ..... 2 92cc4c306b19 5e0375449e74 000000000000 (re) | |
71 | 3 184 69 ..... 3 e16a66a37edd 92cc4c306b19 96155394af80 (re) |
|
71 | 3 184 69 ..... 3 e16a66a37edd 92cc4c306b19 96155394af80 (re) | |
72 |
4 253 |
|
72 | 4 253 69 ..... 4 2ee31f665a86 96155394af80 92cc4c306b19 (re) | |
73 |
|
73 | |||
74 | revision 1 |
|
74 | revision 1 | |
75 | $ hg manifest --debug 1 |
|
75 | $ hg manifest --debug 1 | |
76 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
76 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a | |
77 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 b |
|
77 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 b | |
78 | revision 2 |
|
78 | revision 2 | |
79 | $ hg manifest --debug 2 |
|
79 | $ hg manifest --debug 2 | |
80 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 a |
|
80 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 a | |
81 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
81 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b | |
82 | revision 3 |
|
82 | revision 3 | |
83 | $ hg manifest --debug 3 |
|
83 | $ hg manifest --debug 3 | |
84 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
84 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a | |
85 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
85 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b | |
86 | revision 4 |
|
86 | revision 4 | |
87 | $ hg manifest --debug 4 |
|
87 | $ hg manifest --debug 4 | |
88 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
88 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a | |
89 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
89 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b | |
90 |
|
90 | |||
91 | $ hg debugindex a |
|
91 | $ hg debugindex a | |
92 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
92 | rev offset length ..... linkrev nodeid p1 p2 (re) | |
93 | 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re) |
|
93 | 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re) | |
94 | 1 5 6 ..... 1 79d7492df40a 2ed2a3912a0b 000000000000 (re) |
|
94 | 1 5 6 ..... 1 79d7492df40a 2ed2a3912a0b 000000000000 (re) | |
95 |
|
95 | |||
96 | $ hg verify |
|
96 | $ hg verify | |
97 | checking changesets |
|
97 | checking changesets | |
98 | checking manifests |
|
98 | checking manifests | |
99 | crosschecking files in changesets and manifests |
|
99 | crosschecking files in changesets and manifests | |
100 | checking files |
|
100 | checking files | |
101 | 2 files, 5 changesets, 4 total revisions |
|
101 | 2 files, 5 changesets, 4 total revisions |
@@ -1,543 +1,543 b'' | |||||
1 | This test is a duplicate of 'test-http.t' feel free to factor out |
|
1 | This test is a duplicate of 'test-http.t' feel free to factor out | |
2 | parts that are not bundle1/bundle2 specific. |
|
2 | parts that are not bundle1/bundle2 specific. | |
3 |
|
3 | |||
4 | $ cat << EOF >> $HGRCPATH |
|
4 | $ cat << EOF >> $HGRCPATH | |
5 | > [devel] |
|
5 | > [devel] | |
6 | > # This test is dedicated to interaction through old bundle |
|
6 | > # This test is dedicated to interaction through old bundle | |
7 | > legacy.exchange = bundle1 |
|
7 | > legacy.exchange = bundle1 | |
8 | > [format] # temporary settings |
|
8 | > [format] # temporary settings | |
9 | > usegeneraldelta=yes |
|
9 | > usegeneraldelta=yes | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | This test tries to exercise the ssh functionality with a dummy script |
|
13 | This test tries to exercise the ssh functionality with a dummy script | |
14 |
|
14 | |||
15 | creating 'remote' repo |
|
15 | creating 'remote' repo | |
16 |
|
16 | |||
17 | $ hg init remote |
|
17 | $ hg init remote | |
18 | $ cd remote |
|
18 | $ cd remote | |
19 | $ echo this > foo |
|
19 | $ echo this > foo | |
20 | $ echo this > fooO |
|
20 | $ echo this > fooO | |
21 | $ hg ci -A -m "init" foo fooO |
|
21 | $ hg ci -A -m "init" foo fooO | |
22 |
|
22 | |||
23 | insert a closed branch (issue4428) |
|
23 | insert a closed branch (issue4428) | |
24 |
|
24 | |||
25 | $ hg up null |
|
25 | $ hg up null | |
26 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
26 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
27 | $ hg branch closed |
|
27 | $ hg branch closed | |
28 | marked working directory as branch closed |
|
28 | marked working directory as branch closed | |
29 | (branches are permanent and global, did you want a bookmark?) |
|
29 | (branches are permanent and global, did you want a bookmark?) | |
30 | $ hg ci -mc0 |
|
30 | $ hg ci -mc0 | |
31 | $ hg ci --close-branch -mc1 |
|
31 | $ hg ci --close-branch -mc1 | |
32 | $ hg up -q default |
|
32 | $ hg up -q default | |
33 |
|
33 | |||
34 | configure for serving |
|
34 | configure for serving | |
35 |
|
35 | |||
36 | $ cat <<EOF > .hg/hgrc |
|
36 | $ cat <<EOF > .hg/hgrc | |
37 | > [server] |
|
37 | > [server] | |
38 | > uncompressed = True |
|
38 | > uncompressed = True | |
39 | > |
|
39 | > | |
40 | > [hooks] |
|
40 | > [hooks] | |
41 | > changegroup = printenv.py changegroup-in-remote 0 ../dummylog |
|
41 | > changegroup = printenv.py changegroup-in-remote 0 ../dummylog | |
42 | > EOF |
|
42 | > EOF | |
43 | $ cd .. |
|
43 | $ cd .. | |
44 |
|
44 | |||
45 | repo not found error |
|
45 | repo not found error | |
46 |
|
46 | |||
47 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
47 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | |
48 | remote: abort: repository nonexistent not found! |
|
48 | remote: abort: repository nonexistent not found! | |
49 | abort: no suitable response from remote hg! |
|
49 | abort: no suitable response from remote hg! | |
50 | [255] |
|
50 | [255] | |
51 |
|
51 | |||
52 | non-existent absolute path |
|
52 | non-existent absolute path | |
53 |
|
53 | |||
54 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local |
|
54 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local | |
55 | remote: abort: repository /$TESTTMP/nonexistent not found! |
|
55 | remote: abort: repository /$TESTTMP/nonexistent not found! | |
56 | abort: no suitable response from remote hg! |
|
56 | abort: no suitable response from remote hg! | |
57 | [255] |
|
57 | [255] | |
58 |
|
58 | |||
59 | clone remote via stream |
|
59 | clone remote via stream | |
60 |
|
60 | |||
61 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream |
|
61 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream | |
62 | streaming all changes |
|
62 | streaming all changes | |
63 |
4 files to transfer, 6 |
|
63 | 4 files to transfer, 602 bytes of data | |
64 |
transferred 6 |
|
64 | transferred 602 bytes in * seconds (*) (glob) | |
65 | searching for changes |
|
65 | searching for changes | |
66 | no changes found |
|
66 | no changes found | |
67 | updating to branch default |
|
67 | updating to branch default | |
68 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
68 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 | $ cd local-stream |
|
69 | $ cd local-stream | |
70 | $ hg verify |
|
70 | $ hg verify | |
71 | checking changesets |
|
71 | checking changesets | |
72 | checking manifests |
|
72 | checking manifests | |
73 | crosschecking files in changesets and manifests |
|
73 | crosschecking files in changesets and manifests | |
74 | checking files |
|
74 | checking files | |
75 | 2 files, 3 changesets, 2 total revisions |
|
75 | 2 files, 3 changesets, 2 total revisions | |
76 | $ hg branches |
|
76 | $ hg branches | |
77 | default 0:1160648e36ce |
|
77 | default 0:1160648e36ce | |
78 | $ cd .. |
|
78 | $ cd .. | |
79 |
|
79 | |||
80 | clone bookmarks via stream |
|
80 | clone bookmarks via stream | |
81 |
|
81 | |||
82 | $ hg -R local-stream book mybook |
|
82 | $ hg -R local-stream book mybook | |
83 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2 |
|
83 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2 | |
84 | streaming all changes |
|
84 | streaming all changes | |
85 |
4 files to transfer, 6 |
|
85 | 4 files to transfer, 602 bytes of data | |
86 |
transferred 6 |
|
86 | transferred 602 bytes in * seconds (*) (glob) | |
87 | searching for changes |
|
87 | searching for changes | |
88 | no changes found |
|
88 | no changes found | |
89 | updating to branch default |
|
89 | updating to branch default | |
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 | $ cd stream2 |
|
91 | $ cd stream2 | |
92 | $ hg book |
|
92 | $ hg book | |
93 | mybook 0:1160648e36ce |
|
93 | mybook 0:1160648e36ce | |
94 | $ cd .. |
|
94 | $ cd .. | |
95 | $ rm -rf local-stream stream2 |
|
95 | $ rm -rf local-stream stream2 | |
96 |
|
96 | |||
97 | clone remote via pull |
|
97 | clone remote via pull | |
98 |
|
98 | |||
99 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local |
|
99 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local | |
100 | requesting all changes |
|
100 | requesting all changes | |
101 | adding changesets |
|
101 | adding changesets | |
102 | adding manifests |
|
102 | adding manifests | |
103 | adding file changes |
|
103 | adding file changes | |
104 | added 3 changesets with 2 changes to 2 files |
|
104 | added 3 changesets with 2 changes to 2 files | |
105 | updating to branch default |
|
105 | updating to branch default | |
106 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
106 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
107 |
|
107 | |||
108 | verify |
|
108 | verify | |
109 |
|
109 | |||
110 | $ cd local |
|
110 | $ cd local | |
111 | $ hg verify |
|
111 | $ hg verify | |
112 | checking changesets |
|
112 | checking changesets | |
113 | checking manifests |
|
113 | checking manifests | |
114 | crosschecking files in changesets and manifests |
|
114 | crosschecking files in changesets and manifests | |
115 | checking files |
|
115 | checking files | |
116 | 2 files, 3 changesets, 2 total revisions |
|
116 | 2 files, 3 changesets, 2 total revisions | |
117 | $ echo '[hooks]' >> .hg/hgrc |
|
117 | $ echo '[hooks]' >> .hg/hgrc | |
118 | $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc |
|
118 | $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc | |
119 |
|
119 | |||
120 | empty default pull |
|
120 | empty default pull | |
121 |
|
121 | |||
122 | $ hg paths |
|
122 | $ hg paths | |
123 | default = ssh://user@dummy/remote |
|
123 | default = ssh://user@dummy/remote | |
124 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" |
|
124 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" | |
125 | pulling from ssh://user@dummy/remote |
|
125 | pulling from ssh://user@dummy/remote | |
126 | searching for changes |
|
126 | searching for changes | |
127 | no changes found |
|
127 | no changes found | |
128 |
|
128 | |||
129 | pull from wrong ssh URL |
|
129 | pull from wrong ssh URL | |
130 |
|
130 | |||
131 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
|
131 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist | |
132 | pulling from ssh://user@dummy/doesnotexist |
|
132 | pulling from ssh://user@dummy/doesnotexist | |
133 | remote: abort: repository doesnotexist not found! |
|
133 | remote: abort: repository doesnotexist not found! | |
134 | abort: no suitable response from remote hg! |
|
134 | abort: no suitable response from remote hg! | |
135 | [255] |
|
135 | [255] | |
136 |
|
136 | |||
137 | local change |
|
137 | local change | |
138 |
|
138 | |||
139 | $ echo bleah > foo |
|
139 | $ echo bleah > foo | |
140 | $ hg ci -m "add" |
|
140 | $ hg ci -m "add" | |
141 |
|
141 | |||
142 | updating rc |
|
142 | updating rc | |
143 |
|
143 | |||
144 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
144 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
145 | $ echo "[ui]" >> .hg/hgrc |
|
145 | $ echo "[ui]" >> .hg/hgrc | |
146 | $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
|
146 | $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc | |
147 |
|
147 | |||
148 | find outgoing |
|
148 | find outgoing | |
149 |
|
149 | |||
150 | $ hg out ssh://user@dummy/remote |
|
150 | $ hg out ssh://user@dummy/remote | |
151 | comparing with ssh://user@dummy/remote |
|
151 | comparing with ssh://user@dummy/remote | |
152 | searching for changes |
|
152 | searching for changes | |
153 | changeset: 3:a28a9d1a809c |
|
153 | changeset: 3:a28a9d1a809c | |
154 | tag: tip |
|
154 | tag: tip | |
155 | parent: 0:1160648e36ce |
|
155 | parent: 0:1160648e36ce | |
156 | user: test |
|
156 | user: test | |
157 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
157 | date: Thu Jan 01 00:00:00 1970 +0000 | |
158 | summary: add |
|
158 | summary: add | |
159 |
|
159 | |||
160 |
|
160 | |||
161 | find incoming on the remote side |
|
161 | find incoming on the remote side | |
162 |
|
162 | |||
163 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
|
163 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local | |
164 | comparing with ssh://user@dummy/local |
|
164 | comparing with ssh://user@dummy/local | |
165 | searching for changes |
|
165 | searching for changes | |
166 | changeset: 3:a28a9d1a809c |
|
166 | changeset: 3:a28a9d1a809c | |
167 | tag: tip |
|
167 | tag: tip | |
168 | parent: 0:1160648e36ce |
|
168 | parent: 0:1160648e36ce | |
169 | user: test |
|
169 | user: test | |
170 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
170 | date: Thu Jan 01 00:00:00 1970 +0000 | |
171 | summary: add |
|
171 | summary: add | |
172 |
|
172 | |||
173 |
|
173 | |||
174 | find incoming on the remote side (using absolute path) |
|
174 | find incoming on the remote side (using absolute path) | |
175 |
|
175 | |||
176 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
|
176 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" | |
177 | comparing with ssh://user@dummy/$TESTTMP/local |
|
177 | comparing with ssh://user@dummy/$TESTTMP/local | |
178 | searching for changes |
|
178 | searching for changes | |
179 | changeset: 3:a28a9d1a809c |
|
179 | changeset: 3:a28a9d1a809c | |
180 | tag: tip |
|
180 | tag: tip | |
181 | parent: 0:1160648e36ce |
|
181 | parent: 0:1160648e36ce | |
182 | user: test |
|
182 | user: test | |
183 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
183 | date: Thu Jan 01 00:00:00 1970 +0000 | |
184 | summary: add |
|
184 | summary: add | |
185 |
|
185 | |||
186 |
|
186 | |||
187 | push |
|
187 | push | |
188 |
|
188 | |||
189 | $ hg push |
|
189 | $ hg push | |
190 | pushing to ssh://user@dummy/remote |
|
190 | pushing to ssh://user@dummy/remote | |
191 | searching for changes |
|
191 | searching for changes | |
192 | remote: adding changesets |
|
192 | remote: adding changesets | |
193 | remote: adding manifests |
|
193 | remote: adding manifests | |
194 | remote: adding file changes |
|
194 | remote: adding file changes | |
195 | remote: added 1 changesets with 1 changes to 1 files |
|
195 | remote: added 1 changesets with 1 changes to 1 files | |
196 | $ cd ../remote |
|
196 | $ cd ../remote | |
197 |
|
197 | |||
198 | check remote tip |
|
198 | check remote tip | |
199 |
|
199 | |||
200 | $ hg tip |
|
200 | $ hg tip | |
201 | changeset: 3:a28a9d1a809c |
|
201 | changeset: 3:a28a9d1a809c | |
202 | tag: tip |
|
202 | tag: tip | |
203 | parent: 0:1160648e36ce |
|
203 | parent: 0:1160648e36ce | |
204 | user: test |
|
204 | user: test | |
205 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
205 | date: Thu Jan 01 00:00:00 1970 +0000 | |
206 | summary: add |
|
206 | summary: add | |
207 |
|
207 | |||
208 | $ hg verify |
|
208 | $ hg verify | |
209 | checking changesets |
|
209 | checking changesets | |
210 | checking manifests |
|
210 | checking manifests | |
211 | crosschecking files in changesets and manifests |
|
211 | crosschecking files in changesets and manifests | |
212 | checking files |
|
212 | checking files | |
213 | 2 files, 4 changesets, 3 total revisions |
|
213 | 2 files, 4 changesets, 3 total revisions | |
214 | $ hg cat -r tip foo |
|
214 | $ hg cat -r tip foo | |
215 | bleah |
|
215 | bleah | |
216 | $ echo z > z |
|
216 | $ echo z > z | |
217 | $ hg ci -A -m z z |
|
217 | $ hg ci -A -m z z | |
218 | created new head |
|
218 | created new head | |
219 |
|
219 | |||
220 | test pushkeys and bookmarks |
|
220 | test pushkeys and bookmarks | |
221 |
|
221 | |||
222 | $ cd ../local |
|
222 | $ cd ../local | |
223 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces |
|
223 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces | |
224 | bookmarks |
|
224 | bookmarks | |
225 | namespaces |
|
225 | namespaces | |
226 | phases |
|
226 | phases | |
227 | $ hg book foo -r 0 |
|
227 | $ hg book foo -r 0 | |
228 | $ hg out -B |
|
228 | $ hg out -B | |
229 | comparing with ssh://user@dummy/remote |
|
229 | comparing with ssh://user@dummy/remote | |
230 | searching for changed bookmarks |
|
230 | searching for changed bookmarks | |
231 | foo 1160648e36ce |
|
231 | foo 1160648e36ce | |
232 | $ hg push -B foo |
|
232 | $ hg push -B foo | |
233 | pushing to ssh://user@dummy/remote |
|
233 | pushing to ssh://user@dummy/remote | |
234 | searching for changes |
|
234 | searching for changes | |
235 | no changes found |
|
235 | no changes found | |
236 | exporting bookmark foo |
|
236 | exporting bookmark foo | |
237 | [1] |
|
237 | [1] | |
238 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
|
238 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks | |
239 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
239 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
240 | $ hg book -f foo |
|
240 | $ hg book -f foo | |
241 | $ hg push --traceback |
|
241 | $ hg push --traceback | |
242 | pushing to ssh://user@dummy/remote |
|
242 | pushing to ssh://user@dummy/remote | |
243 | searching for changes |
|
243 | searching for changes | |
244 | no changes found |
|
244 | no changes found | |
245 | updating bookmark foo |
|
245 | updating bookmark foo | |
246 | [1] |
|
246 | [1] | |
247 | $ hg book -d foo |
|
247 | $ hg book -d foo | |
248 | $ hg in -B |
|
248 | $ hg in -B | |
249 | comparing with ssh://user@dummy/remote |
|
249 | comparing with ssh://user@dummy/remote | |
250 | searching for changed bookmarks |
|
250 | searching for changed bookmarks | |
251 | foo a28a9d1a809c |
|
251 | foo a28a9d1a809c | |
252 | $ hg book -f -r 0 foo |
|
252 | $ hg book -f -r 0 foo | |
253 | $ hg pull -B foo |
|
253 | $ hg pull -B foo | |
254 | pulling from ssh://user@dummy/remote |
|
254 | pulling from ssh://user@dummy/remote | |
255 | no changes found |
|
255 | no changes found | |
256 | updating bookmark foo |
|
256 | updating bookmark foo | |
257 | $ hg book -d foo |
|
257 | $ hg book -d foo | |
258 | $ hg push -B foo |
|
258 | $ hg push -B foo | |
259 | pushing to ssh://user@dummy/remote |
|
259 | pushing to ssh://user@dummy/remote | |
260 | searching for changes |
|
260 | searching for changes | |
261 | no changes found |
|
261 | no changes found | |
262 | deleting remote bookmark foo |
|
262 | deleting remote bookmark foo | |
263 | [1] |
|
263 | [1] | |
264 |
|
264 | |||
265 | a bad, evil hook that prints to stdout |
|
265 | a bad, evil hook that prints to stdout | |
266 |
|
266 | |||
267 | $ cat <<EOF > $TESTTMP/badhook |
|
267 | $ cat <<EOF > $TESTTMP/badhook | |
268 | > import sys |
|
268 | > import sys | |
269 | > sys.stdout.write("KABOOM\n") |
|
269 | > sys.stdout.write("KABOOM\n") | |
270 | > EOF |
|
270 | > EOF | |
271 |
|
271 | |||
272 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
272 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
273 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
273 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
274 | $ echo r > r |
|
274 | $ echo r > r | |
275 | $ hg ci -A -m z r |
|
275 | $ hg ci -A -m z r | |
276 |
|
276 | |||
277 | push should succeed even though it has an unexpected response |
|
277 | push should succeed even though it has an unexpected response | |
278 |
|
278 | |||
279 | $ hg push |
|
279 | $ hg push | |
280 | pushing to ssh://user@dummy/remote |
|
280 | pushing to ssh://user@dummy/remote | |
281 | searching for changes |
|
281 | searching for changes | |
282 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
282 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
283 | remote: adding changesets |
|
283 | remote: adding changesets | |
284 | remote: adding manifests |
|
284 | remote: adding manifests | |
285 | remote: adding file changes |
|
285 | remote: adding file changes | |
286 | remote: added 1 changesets with 1 changes to 1 files |
|
286 | remote: added 1 changesets with 1 changes to 1 files | |
287 | remote: KABOOM |
|
287 | remote: KABOOM | |
288 | $ hg -R ../remote heads |
|
288 | $ hg -R ../remote heads | |
289 | changeset: 5:1383141674ec |
|
289 | changeset: 5:1383141674ec | |
290 | tag: tip |
|
290 | tag: tip | |
291 | parent: 3:a28a9d1a809c |
|
291 | parent: 3:a28a9d1a809c | |
292 | user: test |
|
292 | user: test | |
293 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
293 | date: Thu Jan 01 00:00:00 1970 +0000 | |
294 | summary: z |
|
294 | summary: z | |
295 |
|
295 | |||
296 | changeset: 4:6c0482d977a3 |
|
296 | changeset: 4:6c0482d977a3 | |
297 | parent: 0:1160648e36ce |
|
297 | parent: 0:1160648e36ce | |
298 | user: test |
|
298 | user: test | |
299 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
299 | date: Thu Jan 01 00:00:00 1970 +0000 | |
300 | summary: z |
|
300 | summary: z | |
301 |
|
301 | |||
302 |
|
302 | |||
303 | clone bookmarks |
|
303 | clone bookmarks | |
304 |
|
304 | |||
305 | $ hg -R ../remote bookmark test |
|
305 | $ hg -R ../remote bookmark test | |
306 | $ hg -R ../remote bookmarks |
|
306 | $ hg -R ../remote bookmarks | |
307 | * test 4:6c0482d977a3 |
|
307 | * test 4:6c0482d977a3 | |
308 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
|
308 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks | |
309 | requesting all changes |
|
309 | requesting all changes | |
310 | adding changesets |
|
310 | adding changesets | |
311 | adding manifests |
|
311 | adding manifests | |
312 | adding file changes |
|
312 | adding file changes | |
313 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
313 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
314 | updating to branch default |
|
314 | updating to branch default | |
315 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
315 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
316 | $ hg -R local-bookmarks bookmarks |
|
316 | $ hg -R local-bookmarks bookmarks | |
317 | test 4:6c0482d977a3 |
|
317 | test 4:6c0482d977a3 | |
318 |
|
318 | |||
319 | passwords in ssh urls are not supported |
|
319 | passwords in ssh urls are not supported | |
320 | (we use a glob here because different Python versions give different |
|
320 | (we use a glob here because different Python versions give different | |
321 | results here) |
|
321 | results here) | |
322 |
|
322 | |||
323 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
323 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
324 | pushing to ssh://user:*@dummy/remote (glob) |
|
324 | pushing to ssh://user:*@dummy/remote (glob) | |
325 | abort: password in URL not supported! |
|
325 | abort: password in URL not supported! | |
326 | [255] |
|
326 | [255] | |
327 |
|
327 | |||
328 | $ cd .. |
|
328 | $ cd .. | |
329 |
|
329 | |||
330 | hide outer repo |
|
330 | hide outer repo | |
331 | $ hg init |
|
331 | $ hg init | |
332 |
|
332 | |||
333 | Test remote paths with spaces (issue2983): |
|
333 | Test remote paths with spaces (issue2983): | |
334 |
|
334 | |||
335 | $ hg init --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
335 | $ hg init --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
336 | $ touch "$TESTTMP/a repo/test" |
|
336 | $ touch "$TESTTMP/a repo/test" | |
337 | $ hg -R 'a repo' commit -A -m "test" |
|
337 | $ hg -R 'a repo' commit -A -m "test" | |
338 | adding test |
|
338 | adding test | |
339 | $ hg -R 'a repo' tag tag |
|
339 | $ hg -R 'a repo' tag tag | |
340 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
340 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
341 | 73649e48688a |
|
341 | 73649e48688a | |
342 |
|
342 | |||
343 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
|
343 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" | |
344 | abort: unknown revision 'noNoNO'! |
|
344 | abort: unknown revision 'noNoNO'! | |
345 | [255] |
|
345 | [255] | |
346 |
|
346 | |||
347 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
347 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
348 |
|
348 | |||
349 | $ hg clone --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
349 | $ hg clone --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
350 | destination directory: a repo |
|
350 | destination directory: a repo | |
351 | abort: destination 'a repo' is not empty |
|
351 | abort: destination 'a repo' is not empty | |
352 | [255] |
|
352 | [255] | |
353 |
|
353 | |||
354 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
354 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
355 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
355 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
356 | parameters: |
|
356 | parameters: | |
357 |
|
357 | |||
358 | $ cat > ssh.sh << EOF |
|
358 | $ cat > ssh.sh << EOF | |
359 | > userhost="\$1" |
|
359 | > userhost="\$1" | |
360 | > SSH_ORIGINAL_COMMAND="\$2" |
|
360 | > SSH_ORIGINAL_COMMAND="\$2" | |
361 | > export SSH_ORIGINAL_COMMAND |
|
361 | > export SSH_ORIGINAL_COMMAND | |
362 | > PYTHONPATH="$PYTHONPATH" |
|
362 | > PYTHONPATH="$PYTHONPATH" | |
363 | > export PYTHONPATH |
|
363 | > export PYTHONPATH | |
364 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
364 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
365 | > EOF |
|
365 | > EOF | |
366 |
|
366 | |||
367 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
367 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
368 | 73649e48688a |
|
368 | 73649e48688a | |
369 |
|
369 | |||
370 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
370 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
371 | remote: Illegal repository "$TESTTMP/a'repo" (glob) |
|
371 | remote: Illegal repository "$TESTTMP/a'repo" (glob) | |
372 | abort: no suitable response from remote hg! |
|
372 | abort: no suitable response from remote hg! | |
373 | [255] |
|
373 | [255] | |
374 |
|
374 | |||
375 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
375 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
376 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
376 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
377 | abort: no suitable response from remote hg! |
|
377 | abort: no suitable response from remote hg! | |
378 | [255] |
|
378 | [255] | |
379 |
|
379 | |||
380 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" python "$TESTDIR/../contrib/hg-ssh" |
|
380 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" python "$TESTDIR/../contrib/hg-ssh" | |
381 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation |
|
381 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation | |
382 | [255] |
|
382 | [255] | |
383 |
|
383 | |||
384 | Test hg-ssh in read-only mode: |
|
384 | Test hg-ssh in read-only mode: | |
385 |
|
385 | |||
386 | $ cat > ssh.sh << EOF |
|
386 | $ cat > ssh.sh << EOF | |
387 | > userhost="\$1" |
|
387 | > userhost="\$1" | |
388 | > SSH_ORIGINAL_COMMAND="\$2" |
|
388 | > SSH_ORIGINAL_COMMAND="\$2" | |
389 | > export SSH_ORIGINAL_COMMAND |
|
389 | > export SSH_ORIGINAL_COMMAND | |
390 | > PYTHONPATH="$PYTHONPATH" |
|
390 | > PYTHONPATH="$PYTHONPATH" | |
391 | > export PYTHONPATH |
|
391 | > export PYTHONPATH | |
392 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
392 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
393 | > EOF |
|
393 | > EOF | |
394 |
|
394 | |||
395 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
395 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
396 | requesting all changes |
|
396 | requesting all changes | |
397 | adding changesets |
|
397 | adding changesets | |
398 | adding manifests |
|
398 | adding manifests | |
399 | adding file changes |
|
399 | adding file changes | |
400 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
400 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
401 | updating to branch default |
|
401 | updating to branch default | |
402 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
402 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
403 |
|
403 | |||
404 | $ cd read-only-local |
|
404 | $ cd read-only-local | |
405 | $ echo "baz" > bar |
|
405 | $ echo "baz" > bar | |
406 | $ hg ci -A -m "unpushable commit" bar |
|
406 | $ hg ci -A -m "unpushable commit" bar | |
407 | $ hg push --ssh "sh ../ssh.sh" |
|
407 | $ hg push --ssh "sh ../ssh.sh" | |
408 | pushing to ssh://user@dummy/*/remote (glob) |
|
408 | pushing to ssh://user@dummy/*/remote (glob) | |
409 | searching for changes |
|
409 | searching for changes | |
410 | remote: Permission denied |
|
410 | remote: Permission denied | |
411 | remote: abort: pretxnopen.hg-ssh hook failed |
|
411 | remote: abort: pretxnopen.hg-ssh hook failed | |
412 | remote: Permission denied |
|
412 | remote: Permission denied | |
413 | remote: pushkey-abort: prepushkey.hg-ssh hook failed |
|
413 | remote: pushkey-abort: prepushkey.hg-ssh hook failed | |
414 | updating 6c0482d977a3 to public failed! |
|
414 | updating 6c0482d977a3 to public failed! | |
415 | [1] |
|
415 | [1] | |
416 |
|
416 | |||
417 | $ cd .. |
|
417 | $ cd .. | |
418 |
|
418 | |||
419 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
419 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
420 |
|
420 | |||
421 | $ hg clone remote stderr-ordering |
|
421 | $ hg clone remote stderr-ordering | |
422 | updating to branch default |
|
422 | updating to branch default | |
423 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
423 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
424 | $ cd stderr-ordering |
|
424 | $ cd stderr-ordering | |
425 | $ cat >> localwrite.py << EOF |
|
425 | $ cat >> localwrite.py << EOF | |
426 | > from mercurial import exchange, extensions |
|
426 | > from mercurial import exchange, extensions | |
427 | > |
|
427 | > | |
428 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
428 | > def wrappedpush(orig, repo, *args, **kwargs): | |
429 | > res = orig(repo, *args, **kwargs) |
|
429 | > res = orig(repo, *args, **kwargs) | |
430 | > repo.ui.write('local stdout\n') |
|
430 | > repo.ui.write('local stdout\n') | |
431 | > return res |
|
431 | > return res | |
432 | > |
|
432 | > | |
433 | > def extsetup(ui): |
|
433 | > def extsetup(ui): | |
434 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
434 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
435 | > EOF |
|
435 | > EOF | |
436 |
|
436 | |||
437 | $ cat >> .hg/hgrc << EOF |
|
437 | $ cat >> .hg/hgrc << EOF | |
438 | > [paths] |
|
438 | > [paths] | |
439 | > default-push = ssh://user@dummy/remote |
|
439 | > default-push = ssh://user@dummy/remote | |
440 | > [ui] |
|
440 | > [ui] | |
441 | > ssh = python "$TESTDIR/dummyssh" |
|
441 | > ssh = python "$TESTDIR/dummyssh" | |
442 | > [extensions] |
|
442 | > [extensions] | |
443 | > localwrite = localwrite.py |
|
443 | > localwrite = localwrite.py | |
444 | > EOF |
|
444 | > EOF | |
445 |
|
445 | |||
446 | $ echo localwrite > foo |
|
446 | $ echo localwrite > foo | |
447 | $ hg commit -m 'testing localwrite' |
|
447 | $ hg commit -m 'testing localwrite' | |
448 | $ hg push |
|
448 | $ hg push | |
449 | pushing to ssh://user@dummy/remote |
|
449 | pushing to ssh://user@dummy/remote | |
450 | searching for changes |
|
450 | searching for changes | |
451 | remote: adding changesets |
|
451 | remote: adding changesets | |
452 | remote: adding manifests |
|
452 | remote: adding manifests | |
453 | remote: adding file changes |
|
453 | remote: adding file changes | |
454 | remote: added 1 changesets with 1 changes to 1 files |
|
454 | remote: added 1 changesets with 1 changes to 1 files | |
455 | remote: KABOOM |
|
455 | remote: KABOOM | |
456 | local stdout |
|
456 | local stdout | |
457 |
|
457 | |||
458 | debug output |
|
458 | debug output | |
459 |
|
459 | |||
460 | $ hg pull --debug ssh://user@dummy/remote |
|
460 | $ hg pull --debug ssh://user@dummy/remote | |
461 | pulling from ssh://user@dummy/remote |
|
461 | pulling from ssh://user@dummy/remote | |
462 | running python ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) |
|
462 | running python ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) | |
463 | sending hello command |
|
463 | sending hello command | |
464 | sending between command |
|
464 | sending between command | |
465 | remote: 371 |
|
465 | remote: 371 | |
466 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 |
|
466 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 | |
467 | remote: 1 |
|
467 | remote: 1 | |
468 | preparing listkeys for "bookmarks" |
|
468 | preparing listkeys for "bookmarks" | |
469 | sending listkeys command |
|
469 | sending listkeys command | |
470 | received listkey for "bookmarks": 45 bytes |
|
470 | received listkey for "bookmarks": 45 bytes | |
471 | query 1; heads |
|
471 | query 1; heads | |
472 | sending batch command |
|
472 | sending batch command | |
473 | searching for changes |
|
473 | searching for changes | |
474 | all remote heads known locally |
|
474 | all remote heads known locally | |
475 | no changes found |
|
475 | no changes found | |
476 | preparing listkeys for "phases" |
|
476 | preparing listkeys for "phases" | |
477 | sending listkeys command |
|
477 | sending listkeys command | |
478 | received listkey for "phases": 15 bytes |
|
478 | received listkey for "phases": 15 bytes | |
479 | checking for updated bookmarks |
|
479 | checking for updated bookmarks | |
480 |
|
480 | |||
481 | $ cd .. |
|
481 | $ cd .. | |
482 |
|
482 | |||
483 | $ cat dummylog |
|
483 | $ cat dummylog | |
484 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
484 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
485 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
485 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
487 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
487 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio | |
488 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
488 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
490 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
490 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
492 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
492 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
493 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
493 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
495 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
495 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
497 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
497 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
498 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
498 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
505 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
505 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
506 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
506 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
507 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
507 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
508 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
508 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
509 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
509 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
510 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
510 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
511 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
511 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
512 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
512 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
513 | changegroup-in-remote hook: HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
513 | changegroup-in-remote hook: HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
514 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
514 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
515 |
|
515 | |||
516 | remote hook failure is attributed to remote |
|
516 | remote hook failure is attributed to remote | |
517 |
|
517 | |||
518 | $ cat > $TESTTMP/failhook << EOF |
|
518 | $ cat > $TESTTMP/failhook << EOF | |
519 | > def hook(ui, repo, **kwargs): |
|
519 | > def hook(ui, repo, **kwargs): | |
520 | > ui.write('hook failure!\n') |
|
520 | > ui.write('hook failure!\n') | |
521 | > ui.flush() |
|
521 | > ui.flush() | |
522 | > return 1 |
|
522 | > return 1 | |
523 | > EOF |
|
523 | > EOF | |
524 |
|
524 | |||
525 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
525 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
526 |
|
526 | |||
527 | $ hg -q --config ui.ssh="python $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
|
527 | $ hg -q --config ui.ssh="python $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout | |
528 | $ cd hookout |
|
528 | $ cd hookout | |
529 | $ touch hookfailure |
|
529 | $ touch hookfailure | |
530 | $ hg -q commit -A -m 'remote hook failure' |
|
530 | $ hg -q commit -A -m 'remote hook failure' | |
531 | $ hg --config ui.ssh="python $TESTDIR/dummyssh" push |
|
531 | $ hg --config ui.ssh="python $TESTDIR/dummyssh" push | |
532 | pushing to ssh://user@dummy/remote |
|
532 | pushing to ssh://user@dummy/remote | |
533 | searching for changes |
|
533 | searching for changes | |
534 | remote: adding changesets |
|
534 | remote: adding changesets | |
535 | remote: adding manifests |
|
535 | remote: adding manifests | |
536 | remote: adding file changes |
|
536 | remote: adding file changes | |
537 | remote: added 1 changesets with 1 changes to 1 files |
|
537 | remote: added 1 changesets with 1 changes to 1 files | |
538 | remote: hook failure! |
|
538 | remote: hook failure! | |
539 | remote: transaction abort! |
|
539 | remote: transaction abort! | |
540 | remote: rollback completed |
|
540 | remote: rollback completed | |
541 | remote: abort: pretxnchangegroup.fail hook failed |
|
541 | remote: abort: pretxnchangegroup.fail hook failed | |
542 | [1] |
|
542 | [1] | |
543 |
|
543 |
@@ -1,537 +1,537 b'' | |||||
1 |
|
1 | |||
2 | This test tries to exercise the ssh functionality with a dummy script |
|
2 | This test tries to exercise the ssh functionality with a dummy script | |
3 |
|
3 | |||
4 | $ cat <<EOF >> $HGRCPATH |
|
4 | $ cat <<EOF >> $HGRCPATH | |
5 | > [format] |
|
5 | > [format] | |
6 | > usegeneraldelta=yes |
|
6 | > usegeneraldelta=yes | |
7 | > EOF |
|
7 | > EOF | |
8 |
|
8 | |||
9 | creating 'remote' repo |
|
9 | creating 'remote' repo | |
10 |
|
10 | |||
11 | $ hg init remote |
|
11 | $ hg init remote | |
12 | $ cd remote |
|
12 | $ cd remote | |
13 | $ echo this > foo |
|
13 | $ echo this > foo | |
14 | $ echo this > fooO |
|
14 | $ echo this > fooO | |
15 | $ hg ci -A -m "init" foo fooO |
|
15 | $ hg ci -A -m "init" foo fooO | |
16 |
|
16 | |||
17 | insert a closed branch (issue4428) |
|
17 | insert a closed branch (issue4428) | |
18 |
|
18 | |||
19 | $ hg up null |
|
19 | $ hg up null | |
20 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
20 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
21 | $ hg branch closed |
|
21 | $ hg branch closed | |
22 | marked working directory as branch closed |
|
22 | marked working directory as branch closed | |
23 | (branches are permanent and global, did you want a bookmark?) |
|
23 | (branches are permanent and global, did you want a bookmark?) | |
24 | $ hg ci -mc0 |
|
24 | $ hg ci -mc0 | |
25 | $ hg ci --close-branch -mc1 |
|
25 | $ hg ci --close-branch -mc1 | |
26 | $ hg up -q default |
|
26 | $ hg up -q default | |
27 |
|
27 | |||
28 | configure for serving |
|
28 | configure for serving | |
29 |
|
29 | |||
30 | $ cat <<EOF > .hg/hgrc |
|
30 | $ cat <<EOF > .hg/hgrc | |
31 | > [server] |
|
31 | > [server] | |
32 | > uncompressed = True |
|
32 | > uncompressed = True | |
33 | > |
|
33 | > | |
34 | > [hooks] |
|
34 | > [hooks] | |
35 | > changegroup = printenv.py changegroup-in-remote 0 ../dummylog |
|
35 | > changegroup = printenv.py changegroup-in-remote 0 ../dummylog | |
36 | > EOF |
|
36 | > EOF | |
37 | $ cd .. |
|
37 | $ cd .. | |
38 |
|
38 | |||
39 | repo not found error |
|
39 | repo not found error | |
40 |
|
40 | |||
41 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
41 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | |
42 | remote: abort: repository nonexistent not found! |
|
42 | remote: abort: repository nonexistent not found! | |
43 | abort: no suitable response from remote hg! |
|
43 | abort: no suitable response from remote hg! | |
44 | [255] |
|
44 | [255] | |
45 |
|
45 | |||
46 | non-existent absolute path |
|
46 | non-existent absolute path | |
47 |
|
47 | |||
48 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local |
|
48 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local | |
49 | remote: abort: repository $TESTTMP/nonexistent not found! |
|
49 | remote: abort: repository $TESTTMP/nonexistent not found! | |
50 | abort: no suitable response from remote hg! |
|
50 | abort: no suitable response from remote hg! | |
51 | [255] |
|
51 | [255] | |
52 |
|
52 | |||
53 | clone remote via stream |
|
53 | clone remote via stream | |
54 |
|
54 | |||
55 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream |
|
55 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream | |
56 | streaming all changes |
|
56 | streaming all changes | |
57 |
4 files to transfer, 6 |
|
57 | 4 files to transfer, 602 bytes of data | |
58 |
transferred 6 |
|
58 | transferred 602 bytes in * seconds (*) (glob) | |
59 | searching for changes |
|
59 | searching for changes | |
60 | no changes found |
|
60 | no changes found | |
61 | updating to branch default |
|
61 | updating to branch default | |
62 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 | $ cd local-stream |
|
63 | $ cd local-stream | |
64 | $ hg verify |
|
64 | $ hg verify | |
65 | checking changesets |
|
65 | checking changesets | |
66 | checking manifests |
|
66 | checking manifests | |
67 | crosschecking files in changesets and manifests |
|
67 | crosschecking files in changesets and manifests | |
68 | checking files |
|
68 | checking files | |
69 | 2 files, 3 changesets, 2 total revisions |
|
69 | 2 files, 3 changesets, 2 total revisions | |
70 | $ hg branches |
|
70 | $ hg branches | |
71 | default 0:1160648e36ce |
|
71 | default 0:1160648e36ce | |
72 | $ cd .. |
|
72 | $ cd .. | |
73 |
|
73 | |||
74 | clone bookmarks via stream |
|
74 | clone bookmarks via stream | |
75 |
|
75 | |||
76 | $ hg -R local-stream book mybook |
|
76 | $ hg -R local-stream book mybook | |
77 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2 |
|
77 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2 | |
78 | streaming all changes |
|
78 | streaming all changes | |
79 |
4 files to transfer, 6 |
|
79 | 4 files to transfer, 602 bytes of data | |
80 |
transferred 6 |
|
80 | transferred 602 bytes in * seconds (*) (glob) | |
81 | searching for changes |
|
81 | searching for changes | |
82 | no changes found |
|
82 | no changes found | |
83 | updating to branch default |
|
83 | updating to branch default | |
84 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
84 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 | $ cd stream2 |
|
85 | $ cd stream2 | |
86 | $ hg book |
|
86 | $ hg book | |
87 | mybook 0:1160648e36ce |
|
87 | mybook 0:1160648e36ce | |
88 | $ cd .. |
|
88 | $ cd .. | |
89 | $ rm -rf local-stream stream2 |
|
89 | $ rm -rf local-stream stream2 | |
90 |
|
90 | |||
91 | clone remote via pull |
|
91 | clone remote via pull | |
92 |
|
92 | |||
93 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local |
|
93 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local | |
94 | requesting all changes |
|
94 | requesting all changes | |
95 | adding changesets |
|
95 | adding changesets | |
96 | adding manifests |
|
96 | adding manifests | |
97 | adding file changes |
|
97 | adding file changes | |
98 | added 3 changesets with 2 changes to 2 files |
|
98 | added 3 changesets with 2 changes to 2 files | |
99 | updating to branch default |
|
99 | updating to branch default | |
100 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
101 |
|
101 | |||
102 | verify |
|
102 | verify | |
103 |
|
103 | |||
104 | $ cd local |
|
104 | $ cd local | |
105 | $ hg verify |
|
105 | $ hg verify | |
106 | checking changesets |
|
106 | checking changesets | |
107 | checking manifests |
|
107 | checking manifests | |
108 | crosschecking files in changesets and manifests |
|
108 | crosschecking files in changesets and manifests | |
109 | checking files |
|
109 | checking files | |
110 | 2 files, 3 changesets, 2 total revisions |
|
110 | 2 files, 3 changesets, 2 total revisions | |
111 | $ echo '[hooks]' >> .hg/hgrc |
|
111 | $ echo '[hooks]' >> .hg/hgrc | |
112 | $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc |
|
112 | $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc | |
113 |
|
113 | |||
114 | empty default pull |
|
114 | empty default pull | |
115 |
|
115 | |||
116 | $ hg paths |
|
116 | $ hg paths | |
117 | default = ssh://user@dummy/remote |
|
117 | default = ssh://user@dummy/remote | |
118 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" |
|
118 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" | |
119 | pulling from ssh://user@dummy/remote |
|
119 | pulling from ssh://user@dummy/remote | |
120 | searching for changes |
|
120 | searching for changes | |
121 | no changes found |
|
121 | no changes found | |
122 |
|
122 | |||
123 | pull from wrong ssh URL |
|
123 | pull from wrong ssh URL | |
124 |
|
124 | |||
125 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
|
125 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist | |
126 | pulling from ssh://user@dummy/doesnotexist |
|
126 | pulling from ssh://user@dummy/doesnotexist | |
127 | remote: abort: repository doesnotexist not found! |
|
127 | remote: abort: repository doesnotexist not found! | |
128 | abort: no suitable response from remote hg! |
|
128 | abort: no suitable response from remote hg! | |
129 | [255] |
|
129 | [255] | |
130 |
|
130 | |||
131 | local change |
|
131 | local change | |
132 |
|
132 | |||
133 | $ echo bleah > foo |
|
133 | $ echo bleah > foo | |
134 | $ hg ci -m "add" |
|
134 | $ hg ci -m "add" | |
135 |
|
135 | |||
136 | updating rc |
|
136 | updating rc | |
137 |
|
137 | |||
138 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
138 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
139 | $ echo "[ui]" >> .hg/hgrc |
|
139 | $ echo "[ui]" >> .hg/hgrc | |
140 | $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
|
140 | $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc | |
141 |
|
141 | |||
142 | find outgoing |
|
142 | find outgoing | |
143 |
|
143 | |||
144 | $ hg out ssh://user@dummy/remote |
|
144 | $ hg out ssh://user@dummy/remote | |
145 | comparing with ssh://user@dummy/remote |
|
145 | comparing with ssh://user@dummy/remote | |
146 | searching for changes |
|
146 | searching for changes | |
147 | changeset: 3:a28a9d1a809c |
|
147 | changeset: 3:a28a9d1a809c | |
148 | tag: tip |
|
148 | tag: tip | |
149 | parent: 0:1160648e36ce |
|
149 | parent: 0:1160648e36ce | |
150 | user: test |
|
150 | user: test | |
151 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
151 | date: Thu Jan 01 00:00:00 1970 +0000 | |
152 | summary: add |
|
152 | summary: add | |
153 |
|
153 | |||
154 |
|
154 | |||
155 | find incoming on the remote side |
|
155 | find incoming on the remote side | |
156 |
|
156 | |||
157 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
|
157 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local | |
158 | comparing with ssh://user@dummy/local |
|
158 | comparing with ssh://user@dummy/local | |
159 | searching for changes |
|
159 | searching for changes | |
160 | changeset: 3:a28a9d1a809c |
|
160 | changeset: 3:a28a9d1a809c | |
161 | tag: tip |
|
161 | tag: tip | |
162 | parent: 0:1160648e36ce |
|
162 | parent: 0:1160648e36ce | |
163 | user: test |
|
163 | user: test | |
164 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
164 | date: Thu Jan 01 00:00:00 1970 +0000 | |
165 | summary: add |
|
165 | summary: add | |
166 |
|
166 | |||
167 |
|
167 | |||
168 | find incoming on the remote side (using absolute path) |
|
168 | find incoming on the remote side (using absolute path) | |
169 |
|
169 | |||
170 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
|
170 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" | |
171 | comparing with ssh://user@dummy/$TESTTMP/local |
|
171 | comparing with ssh://user@dummy/$TESTTMP/local | |
172 | searching for changes |
|
172 | searching for changes | |
173 | changeset: 3:a28a9d1a809c |
|
173 | changeset: 3:a28a9d1a809c | |
174 | tag: tip |
|
174 | tag: tip | |
175 | parent: 0:1160648e36ce |
|
175 | parent: 0:1160648e36ce | |
176 | user: test |
|
176 | user: test | |
177 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
177 | date: Thu Jan 01 00:00:00 1970 +0000 | |
178 | summary: add |
|
178 | summary: add | |
179 |
|
179 | |||
180 |
|
180 | |||
181 | push |
|
181 | push | |
182 |
|
182 | |||
183 | $ hg push |
|
183 | $ hg push | |
184 | pushing to ssh://user@dummy/remote |
|
184 | pushing to ssh://user@dummy/remote | |
185 | searching for changes |
|
185 | searching for changes | |
186 | remote: adding changesets |
|
186 | remote: adding changesets | |
187 | remote: adding manifests |
|
187 | remote: adding manifests | |
188 | remote: adding file changes |
|
188 | remote: adding file changes | |
189 | remote: added 1 changesets with 1 changes to 1 files |
|
189 | remote: added 1 changesets with 1 changes to 1 files | |
190 | $ cd ../remote |
|
190 | $ cd ../remote | |
191 |
|
191 | |||
192 | check remote tip |
|
192 | check remote tip | |
193 |
|
193 | |||
194 | $ hg tip |
|
194 | $ hg tip | |
195 | changeset: 3:a28a9d1a809c |
|
195 | changeset: 3:a28a9d1a809c | |
196 | tag: tip |
|
196 | tag: tip | |
197 | parent: 0:1160648e36ce |
|
197 | parent: 0:1160648e36ce | |
198 | user: test |
|
198 | user: test | |
199 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
199 | date: Thu Jan 01 00:00:00 1970 +0000 | |
200 | summary: add |
|
200 | summary: add | |
201 |
|
201 | |||
202 | $ hg verify |
|
202 | $ hg verify | |
203 | checking changesets |
|
203 | checking changesets | |
204 | checking manifests |
|
204 | checking manifests | |
205 | crosschecking files in changesets and manifests |
|
205 | crosschecking files in changesets and manifests | |
206 | checking files |
|
206 | checking files | |
207 | 2 files, 4 changesets, 3 total revisions |
|
207 | 2 files, 4 changesets, 3 total revisions | |
208 | $ hg cat -r tip foo |
|
208 | $ hg cat -r tip foo | |
209 | bleah |
|
209 | bleah | |
210 | $ echo z > z |
|
210 | $ echo z > z | |
211 | $ hg ci -A -m z z |
|
211 | $ hg ci -A -m z z | |
212 | created new head |
|
212 | created new head | |
213 |
|
213 | |||
214 | test pushkeys and bookmarks |
|
214 | test pushkeys and bookmarks | |
215 |
|
215 | |||
216 | $ cd ../local |
|
216 | $ cd ../local | |
217 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces |
|
217 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces | |
218 | bookmarks |
|
218 | bookmarks | |
219 | namespaces |
|
219 | namespaces | |
220 | phases |
|
220 | phases | |
221 | $ hg book foo -r 0 |
|
221 | $ hg book foo -r 0 | |
222 | $ hg out -B |
|
222 | $ hg out -B | |
223 | comparing with ssh://user@dummy/remote |
|
223 | comparing with ssh://user@dummy/remote | |
224 | searching for changed bookmarks |
|
224 | searching for changed bookmarks | |
225 | foo 1160648e36ce |
|
225 | foo 1160648e36ce | |
226 | $ hg push -B foo |
|
226 | $ hg push -B foo | |
227 | pushing to ssh://user@dummy/remote |
|
227 | pushing to ssh://user@dummy/remote | |
228 | searching for changes |
|
228 | searching for changes | |
229 | no changes found |
|
229 | no changes found | |
230 | exporting bookmark foo |
|
230 | exporting bookmark foo | |
231 | [1] |
|
231 | [1] | |
232 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
|
232 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks | |
233 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
233 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
234 | $ hg book -f foo |
|
234 | $ hg book -f foo | |
235 | $ hg push --traceback |
|
235 | $ hg push --traceback | |
236 | pushing to ssh://user@dummy/remote |
|
236 | pushing to ssh://user@dummy/remote | |
237 | searching for changes |
|
237 | searching for changes | |
238 | no changes found |
|
238 | no changes found | |
239 | updating bookmark foo |
|
239 | updating bookmark foo | |
240 | [1] |
|
240 | [1] | |
241 | $ hg book -d foo |
|
241 | $ hg book -d foo | |
242 | $ hg in -B |
|
242 | $ hg in -B | |
243 | comparing with ssh://user@dummy/remote |
|
243 | comparing with ssh://user@dummy/remote | |
244 | searching for changed bookmarks |
|
244 | searching for changed bookmarks | |
245 | foo a28a9d1a809c |
|
245 | foo a28a9d1a809c | |
246 | $ hg book -f -r 0 foo |
|
246 | $ hg book -f -r 0 foo | |
247 | $ hg pull -B foo |
|
247 | $ hg pull -B foo | |
248 | pulling from ssh://user@dummy/remote |
|
248 | pulling from ssh://user@dummy/remote | |
249 | no changes found |
|
249 | no changes found | |
250 | updating bookmark foo |
|
250 | updating bookmark foo | |
251 | $ hg book -d foo |
|
251 | $ hg book -d foo | |
252 | $ hg push -B foo |
|
252 | $ hg push -B foo | |
253 | pushing to ssh://user@dummy/remote |
|
253 | pushing to ssh://user@dummy/remote | |
254 | searching for changes |
|
254 | searching for changes | |
255 | no changes found |
|
255 | no changes found | |
256 | deleting remote bookmark foo |
|
256 | deleting remote bookmark foo | |
257 | [1] |
|
257 | [1] | |
258 |
|
258 | |||
259 | a bad, evil hook that prints to stdout |
|
259 | a bad, evil hook that prints to stdout | |
260 |
|
260 | |||
261 | $ cat <<EOF > $TESTTMP/badhook |
|
261 | $ cat <<EOF > $TESTTMP/badhook | |
262 | > import sys |
|
262 | > import sys | |
263 | > sys.stdout.write("KABOOM\n") |
|
263 | > sys.stdout.write("KABOOM\n") | |
264 | > EOF |
|
264 | > EOF | |
265 |
|
265 | |||
266 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
266 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
267 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
267 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
268 | $ echo r > r |
|
268 | $ echo r > r | |
269 | $ hg ci -A -m z r |
|
269 | $ hg ci -A -m z r | |
270 |
|
270 | |||
271 | push should succeed even though it has an unexpected response |
|
271 | push should succeed even though it has an unexpected response | |
272 |
|
272 | |||
273 | $ hg push |
|
273 | $ hg push | |
274 | pushing to ssh://user@dummy/remote |
|
274 | pushing to ssh://user@dummy/remote | |
275 | searching for changes |
|
275 | searching for changes | |
276 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
276 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
277 | remote: adding changesets |
|
277 | remote: adding changesets | |
278 | remote: adding manifests |
|
278 | remote: adding manifests | |
279 | remote: adding file changes |
|
279 | remote: adding file changes | |
280 | remote: added 1 changesets with 1 changes to 1 files |
|
280 | remote: added 1 changesets with 1 changes to 1 files | |
281 | remote: KABOOM |
|
281 | remote: KABOOM | |
282 | $ hg -R ../remote heads |
|
282 | $ hg -R ../remote heads | |
283 | changeset: 5:1383141674ec |
|
283 | changeset: 5:1383141674ec | |
284 | tag: tip |
|
284 | tag: tip | |
285 | parent: 3:a28a9d1a809c |
|
285 | parent: 3:a28a9d1a809c | |
286 | user: test |
|
286 | user: test | |
287 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
287 | date: Thu Jan 01 00:00:00 1970 +0000 | |
288 | summary: z |
|
288 | summary: z | |
289 |
|
289 | |||
290 | changeset: 4:6c0482d977a3 |
|
290 | changeset: 4:6c0482d977a3 | |
291 | parent: 0:1160648e36ce |
|
291 | parent: 0:1160648e36ce | |
292 | user: test |
|
292 | user: test | |
293 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
293 | date: Thu Jan 01 00:00:00 1970 +0000 | |
294 | summary: z |
|
294 | summary: z | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | clone bookmarks |
|
297 | clone bookmarks | |
298 |
|
298 | |||
299 | $ hg -R ../remote bookmark test |
|
299 | $ hg -R ../remote bookmark test | |
300 | $ hg -R ../remote bookmarks |
|
300 | $ hg -R ../remote bookmarks | |
301 | * test 4:6c0482d977a3 |
|
301 | * test 4:6c0482d977a3 | |
302 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
|
302 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks | |
303 | requesting all changes |
|
303 | requesting all changes | |
304 | adding changesets |
|
304 | adding changesets | |
305 | adding manifests |
|
305 | adding manifests | |
306 | adding file changes |
|
306 | adding file changes | |
307 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
307 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
308 | updating to branch default |
|
308 | updating to branch default | |
309 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
309 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
310 | $ hg -R local-bookmarks bookmarks |
|
310 | $ hg -R local-bookmarks bookmarks | |
311 | test 4:6c0482d977a3 |
|
311 | test 4:6c0482d977a3 | |
312 |
|
312 | |||
313 | passwords in ssh urls are not supported |
|
313 | passwords in ssh urls are not supported | |
314 | (we use a glob here because different Python versions give different |
|
314 | (we use a glob here because different Python versions give different | |
315 | results here) |
|
315 | results here) | |
316 |
|
316 | |||
317 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
317 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
318 | pushing to ssh://user:*@dummy/remote (glob) |
|
318 | pushing to ssh://user:*@dummy/remote (glob) | |
319 | abort: password in URL not supported! |
|
319 | abort: password in URL not supported! | |
320 | [255] |
|
320 | [255] | |
321 |
|
321 | |||
322 | $ cd .. |
|
322 | $ cd .. | |
323 |
|
323 | |||
324 | hide outer repo |
|
324 | hide outer repo | |
325 | $ hg init |
|
325 | $ hg init | |
326 |
|
326 | |||
327 | Test remote paths with spaces (issue2983): |
|
327 | Test remote paths with spaces (issue2983): | |
328 |
|
328 | |||
329 | $ hg init --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
329 | $ hg init --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
330 | $ touch "$TESTTMP/a repo/test" |
|
330 | $ touch "$TESTTMP/a repo/test" | |
331 | $ hg -R 'a repo' commit -A -m "test" |
|
331 | $ hg -R 'a repo' commit -A -m "test" | |
332 | adding test |
|
332 | adding test | |
333 | $ hg -R 'a repo' tag tag |
|
333 | $ hg -R 'a repo' tag tag | |
334 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
334 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
335 | 73649e48688a |
|
335 | 73649e48688a | |
336 |
|
336 | |||
337 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
|
337 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" | |
338 | abort: unknown revision 'noNoNO'! |
|
338 | abort: unknown revision 'noNoNO'! | |
339 | [255] |
|
339 | [255] | |
340 |
|
340 | |||
341 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
341 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
342 |
|
342 | |||
343 | $ hg clone --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
343 | $ hg clone --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
344 | destination directory: a repo |
|
344 | destination directory: a repo | |
345 | abort: destination 'a repo' is not empty |
|
345 | abort: destination 'a repo' is not empty | |
346 | [255] |
|
346 | [255] | |
347 |
|
347 | |||
348 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
348 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
349 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
349 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
350 | parameters: |
|
350 | parameters: | |
351 |
|
351 | |||
352 | $ cat > ssh.sh << EOF |
|
352 | $ cat > ssh.sh << EOF | |
353 | > userhost="\$1" |
|
353 | > userhost="\$1" | |
354 | > SSH_ORIGINAL_COMMAND="\$2" |
|
354 | > SSH_ORIGINAL_COMMAND="\$2" | |
355 | > export SSH_ORIGINAL_COMMAND |
|
355 | > export SSH_ORIGINAL_COMMAND | |
356 | > PYTHONPATH="$PYTHONPATH" |
|
356 | > PYTHONPATH="$PYTHONPATH" | |
357 | > export PYTHONPATH |
|
357 | > export PYTHONPATH | |
358 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
358 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
359 | > EOF |
|
359 | > EOF | |
360 |
|
360 | |||
361 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
361 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
362 | 73649e48688a |
|
362 | 73649e48688a | |
363 |
|
363 | |||
364 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
364 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
365 | remote: Illegal repository "$TESTTMP/a'repo" (glob) |
|
365 | remote: Illegal repository "$TESTTMP/a'repo" (glob) | |
366 | abort: no suitable response from remote hg! |
|
366 | abort: no suitable response from remote hg! | |
367 | [255] |
|
367 | [255] | |
368 |
|
368 | |||
369 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
369 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
370 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
370 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
371 | abort: no suitable response from remote hg! |
|
371 | abort: no suitable response from remote hg! | |
372 | [255] |
|
372 | [255] | |
373 |
|
373 | |||
374 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" |
|
374 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" | |
375 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
375 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
376 | [255] |
|
376 | [255] | |
377 |
|
377 | |||
378 | Test hg-ssh in read-only mode: |
|
378 | Test hg-ssh in read-only mode: | |
379 |
|
379 | |||
380 | $ cat > ssh.sh << EOF |
|
380 | $ cat > ssh.sh << EOF | |
381 | > userhost="\$1" |
|
381 | > userhost="\$1" | |
382 | > SSH_ORIGINAL_COMMAND="\$2" |
|
382 | > SSH_ORIGINAL_COMMAND="\$2" | |
383 | > export SSH_ORIGINAL_COMMAND |
|
383 | > export SSH_ORIGINAL_COMMAND | |
384 | > PYTHONPATH="$PYTHONPATH" |
|
384 | > PYTHONPATH="$PYTHONPATH" | |
385 | > export PYTHONPATH |
|
385 | > export PYTHONPATH | |
386 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
386 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
387 | > EOF |
|
387 | > EOF | |
388 |
|
388 | |||
389 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
389 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
390 | requesting all changes |
|
390 | requesting all changes | |
391 | adding changesets |
|
391 | adding changesets | |
392 | adding manifests |
|
392 | adding manifests | |
393 | adding file changes |
|
393 | adding file changes | |
394 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
394 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
395 | updating to branch default |
|
395 | updating to branch default | |
396 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
396 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
397 |
|
397 | |||
398 | $ cd read-only-local |
|
398 | $ cd read-only-local | |
399 | $ echo "baz" > bar |
|
399 | $ echo "baz" > bar | |
400 | $ hg ci -A -m "unpushable commit" bar |
|
400 | $ hg ci -A -m "unpushable commit" bar | |
401 | $ hg push --ssh "sh ../ssh.sh" |
|
401 | $ hg push --ssh "sh ../ssh.sh" | |
402 | pushing to ssh://user@dummy/*/remote (glob) |
|
402 | pushing to ssh://user@dummy/*/remote (glob) | |
403 | searching for changes |
|
403 | searching for changes | |
404 | remote: Permission denied |
|
404 | remote: Permission denied | |
405 | remote: pretxnopen.hg-ssh hook failed |
|
405 | remote: pretxnopen.hg-ssh hook failed | |
406 | abort: push failed on remote |
|
406 | abort: push failed on remote | |
407 | [255] |
|
407 | [255] | |
408 |
|
408 | |||
409 | $ cd .. |
|
409 | $ cd .. | |
410 |
|
410 | |||
411 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
411 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
412 |
|
412 | |||
413 | $ hg clone remote stderr-ordering |
|
413 | $ hg clone remote stderr-ordering | |
414 | updating to branch default |
|
414 | updating to branch default | |
415 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
415 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
416 | $ cd stderr-ordering |
|
416 | $ cd stderr-ordering | |
417 | $ cat >> localwrite.py << EOF |
|
417 | $ cat >> localwrite.py << EOF | |
418 | > from mercurial import exchange, extensions |
|
418 | > from mercurial import exchange, extensions | |
419 | > |
|
419 | > | |
420 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
420 | > def wrappedpush(orig, repo, *args, **kwargs): | |
421 | > res = orig(repo, *args, **kwargs) |
|
421 | > res = orig(repo, *args, **kwargs) | |
422 | > repo.ui.write('local stdout\n') |
|
422 | > repo.ui.write('local stdout\n') | |
423 | > return res |
|
423 | > return res | |
424 | > |
|
424 | > | |
425 | > def extsetup(ui): |
|
425 | > def extsetup(ui): | |
426 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
426 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
427 | > EOF |
|
427 | > EOF | |
428 |
|
428 | |||
429 | $ cat >> .hg/hgrc << EOF |
|
429 | $ cat >> .hg/hgrc << EOF | |
430 | > [paths] |
|
430 | > [paths] | |
431 | > default-push = ssh://user@dummy/remote |
|
431 | > default-push = ssh://user@dummy/remote | |
432 | > [ui] |
|
432 | > [ui] | |
433 | > ssh = python "$TESTDIR/dummyssh" |
|
433 | > ssh = python "$TESTDIR/dummyssh" | |
434 | > [extensions] |
|
434 | > [extensions] | |
435 | > localwrite = localwrite.py |
|
435 | > localwrite = localwrite.py | |
436 | > EOF |
|
436 | > EOF | |
437 |
|
437 | |||
438 | $ echo localwrite > foo |
|
438 | $ echo localwrite > foo | |
439 | $ hg commit -m 'testing localwrite' |
|
439 | $ hg commit -m 'testing localwrite' | |
440 | $ hg push |
|
440 | $ hg push | |
441 | pushing to ssh://user@dummy/remote |
|
441 | pushing to ssh://user@dummy/remote | |
442 | searching for changes |
|
442 | searching for changes | |
443 | remote: adding changesets |
|
443 | remote: adding changesets | |
444 | remote: adding manifests |
|
444 | remote: adding manifests | |
445 | remote: adding file changes |
|
445 | remote: adding file changes | |
446 | remote: added 1 changesets with 1 changes to 1 files |
|
446 | remote: added 1 changesets with 1 changes to 1 files | |
447 | remote: KABOOM |
|
447 | remote: KABOOM | |
448 | local stdout |
|
448 | local stdout | |
449 |
|
449 | |||
450 | debug output |
|
450 | debug output | |
451 |
|
451 | |||
452 | $ hg pull --debug ssh://user@dummy/remote |
|
452 | $ hg pull --debug ssh://user@dummy/remote | |
453 | pulling from ssh://user@dummy/remote |
|
453 | pulling from ssh://user@dummy/remote | |
454 | running python ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) |
|
454 | running python ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) | |
455 | sending hello command |
|
455 | sending hello command | |
456 | sending between command |
|
456 | sending between command | |
457 | remote: 371 |
|
457 | remote: 371 | |
458 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 |
|
458 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 | |
459 | remote: 1 |
|
459 | remote: 1 | |
460 | query 1; heads |
|
460 | query 1; heads | |
461 | sending batch command |
|
461 | sending batch command | |
462 | searching for changes |
|
462 | searching for changes | |
463 | all remote heads known locally |
|
463 | all remote heads known locally | |
464 | no changes found |
|
464 | no changes found | |
465 | sending getbundle command |
|
465 | sending getbundle command | |
466 | bundle2-input-bundle: with-transaction |
|
466 | bundle2-input-bundle: with-transaction | |
467 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
467 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
468 | bundle2-input-part: total payload size 15 |
|
468 | bundle2-input-part: total payload size 15 | |
469 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
469 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
470 | bundle2-input-part: total payload size 45 |
|
470 | bundle2-input-part: total payload size 45 | |
471 | bundle2-input-bundle: 1 parts total |
|
471 | bundle2-input-bundle: 1 parts total | |
472 | checking for updated bookmarks |
|
472 | checking for updated bookmarks | |
473 |
|
473 | |||
474 | $ cd .. |
|
474 | $ cd .. | |
475 |
|
475 | |||
476 | $ cat dummylog |
|
476 | $ cat dummylog | |
477 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
477 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
478 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio |
|
478 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio | |
479 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
479 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
480 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
480 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio | |
481 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
481 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
482 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
482 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
483 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
483 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
484 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
484 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
485 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
485 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
486 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
486 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
488 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
488 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
490 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
490 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
493 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
493 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
497 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
497 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
498 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
498 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
500 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
500 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
501 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
502 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
502 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
503 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
503 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
504 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
504 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
505 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
505 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
506 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
506 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
507 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
507 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
508 |
|
508 | |||
509 | remote hook failure is attributed to remote |
|
509 | remote hook failure is attributed to remote | |
510 |
|
510 | |||
511 | $ cat > $TESTTMP/failhook << EOF |
|
511 | $ cat > $TESTTMP/failhook << EOF | |
512 | > def hook(ui, repo, **kwargs): |
|
512 | > def hook(ui, repo, **kwargs): | |
513 | > ui.write('hook failure!\n') |
|
513 | > ui.write('hook failure!\n') | |
514 | > ui.flush() |
|
514 | > ui.flush() | |
515 | > return 1 |
|
515 | > return 1 | |
516 | > EOF |
|
516 | > EOF | |
517 |
|
517 | |||
518 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
518 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
519 |
|
519 | |||
520 | $ hg -q --config ui.ssh="python $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
|
520 | $ hg -q --config ui.ssh="python $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout | |
521 | $ cd hookout |
|
521 | $ cd hookout | |
522 | $ touch hookfailure |
|
522 | $ touch hookfailure | |
523 | $ hg -q commit -A -m 'remote hook failure' |
|
523 | $ hg -q commit -A -m 'remote hook failure' | |
524 | $ hg --config ui.ssh="python $TESTDIR/dummyssh" push |
|
524 | $ hg --config ui.ssh="python $TESTDIR/dummyssh" push | |
525 | pushing to ssh://user@dummy/remote |
|
525 | pushing to ssh://user@dummy/remote | |
526 | searching for changes |
|
526 | searching for changes | |
527 | remote: adding changesets |
|
527 | remote: adding changesets | |
528 | remote: adding manifests |
|
528 | remote: adding manifests | |
529 | remote: adding file changes |
|
529 | remote: adding file changes | |
530 | remote: added 1 changesets with 1 changes to 1 files |
|
530 | remote: added 1 changesets with 1 changes to 1 files | |
531 | remote: hook failure! |
|
531 | remote: hook failure! | |
532 | remote: transaction abort! |
|
532 | remote: transaction abort! | |
533 | remote: rollback completed |
|
533 | remote: rollback completed | |
534 | remote: pretxnchangegroup.fail hook failed |
|
534 | remote: pretxnchangegroup.fail hook failed | |
535 | abort: push failed on remote |
|
535 | abort: push failed on remote | |
536 | [255] |
|
536 | [255] | |
537 |
|
537 |
General Comments 0
You need to be logged in to leave comments.
Login now