##// END OF EJS Templates
branchmap: use mmap for faster revbranchcache loading...
Arseniy Alekseyev -
r52268:02e7d79e default
parent child Browse files
Show More
@@ -1,870 +1,931 b''
1 # branchmap.py - logic to computes, maintain and stores branchmap for local repo
1 # branchmap.py - logic to computes, maintain and stores branchmap for local repo
2 #
2 #
3 # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
3 # Copyright 2005-2007 Olivia Mackall <olivia@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
8
9 import struct
9 import struct
10
10
11 from .node import (
11 from .node import (
12 bin,
12 bin,
13 hex,
13 hex,
14 nullrev,
14 nullrev,
15 )
15 )
16
16
17 from typing import (
17 from typing import (
18 Callable,
18 Callable,
19 Dict,
19 Dict,
20 Iterable,
20 Iterable,
21 List,
21 List,
22 Optional,
22 Optional,
23 Set,
23 Set,
24 TYPE_CHECKING,
24 TYPE_CHECKING,
25 Tuple,
25 Tuple,
26 Union,
26 Union,
27 )
27 )
28
28
29 from . import (
29 from . import (
30 encoding,
30 encoding,
31 error,
31 error,
32 obsolete,
32 obsolete,
33 scmutil,
33 scmutil,
34 util,
34 util,
35 )
35 )
36
36
37 from .utils import (
37 from .utils import (
38 repoviewutil,
38 repoviewutil,
39 stringutil,
39 stringutil,
40 )
40 )
41
41
42 if TYPE_CHECKING:
42 if TYPE_CHECKING:
43 from . import localrepo
43 from . import localrepo
44
44
45 assert [localrepo]
45 assert [localrepo]
46
46
47 subsettable = repoviewutil.subsettable
47 subsettable = repoviewutil.subsettable
48
48
49 calcsize = struct.calcsize
49 calcsize = struct.calcsize
50 pack_into = struct.pack_into
50 pack_into = struct.pack_into
51 unpack_from = struct.unpack_from
51 unpack_from = struct.unpack_from
52
52
53
53
54 class BranchMapCache:
54 class BranchMapCache:
55 """mapping of filtered views of repo with their branchcache"""
55 """mapping of filtered views of repo with their branchcache"""
56
56
57 def __init__(self):
57 def __init__(self):
58 self._per_filter = {}
58 self._per_filter = {}
59
59
60 def __getitem__(self, repo):
60 def __getitem__(self, repo):
61 self.updatecache(repo)
61 self.updatecache(repo)
62 return self._per_filter[repo.filtername]
62 return self._per_filter[repo.filtername]
63
63
64 def updatecache(self, repo):
64 def updatecache(self, repo):
65 """Update the cache for the given filtered view on a repository"""
65 """Update the cache for the given filtered view on a repository"""
66 # This can trigger updates for the caches for subsets of the filtered
66 # This can trigger updates for the caches for subsets of the filtered
67 # view, e.g. when there is no cache for this filtered view or the cache
67 # view, e.g. when there is no cache for this filtered view or the cache
68 # is stale.
68 # is stale.
69
69
70 cl = repo.changelog
70 cl = repo.changelog
71 filtername = repo.filtername
71 filtername = repo.filtername
72 bcache = self._per_filter.get(filtername)
72 bcache = self._per_filter.get(filtername)
73 if bcache is None or not bcache.validfor(repo):
73 if bcache is None or not bcache.validfor(repo):
74 # cache object missing or cache object stale? Read from disk
74 # cache object missing or cache object stale? Read from disk
75 bcache = branchcache.fromfile(repo)
75 bcache = branchcache.fromfile(repo)
76
76
77 revs = []
77 revs = []
78 if bcache is None:
78 if bcache is None:
79 # no (fresh) cache available anymore, perhaps we can re-use
79 # no (fresh) cache available anymore, perhaps we can re-use
80 # the cache for a subset, then extend that to add info on missing
80 # the cache for a subset, then extend that to add info on missing
81 # revisions.
81 # revisions.
82 subsetname = subsettable.get(filtername)
82 subsetname = subsettable.get(filtername)
83 if subsetname is not None:
83 if subsetname is not None:
84 subset = repo.filtered(subsetname)
84 subset = repo.filtered(subsetname)
85 bcache = self[subset].copy()
85 bcache = self[subset].copy()
86 extrarevs = subset.changelog.filteredrevs - cl.filteredrevs
86 extrarevs = subset.changelog.filteredrevs - cl.filteredrevs
87 revs.extend(r for r in extrarevs if r <= bcache.tiprev)
87 revs.extend(r for r in extrarevs if r <= bcache.tiprev)
88 else:
88 else:
89 # nothing to fall back on, start empty.
89 # nothing to fall back on, start empty.
90 bcache = branchcache(repo)
90 bcache = branchcache(repo)
91
91
92 revs.extend(cl.revs(start=bcache.tiprev + 1))
92 revs.extend(cl.revs(start=bcache.tiprev + 1))
93 if revs:
93 if revs:
94 bcache.update(repo, revs)
94 bcache.update(repo, revs)
95
95
96 assert bcache.validfor(repo), filtername
96 assert bcache.validfor(repo), filtername
97 self._per_filter[repo.filtername] = bcache
97 self._per_filter[repo.filtername] = bcache
98
98
99 def replace(self, repo, remotebranchmap):
99 def replace(self, repo, remotebranchmap):
100 """Replace the branchmap cache for a repo with a branch mapping.
100 """Replace the branchmap cache for a repo with a branch mapping.
101
101
102 This is likely only called during clone with a branch map from a
102 This is likely only called during clone with a branch map from a
103 remote.
103 remote.
104
104
105 """
105 """
106 cl = repo.changelog
106 cl = repo.changelog
107 clrev = cl.rev
107 clrev = cl.rev
108 clbranchinfo = cl.branchinfo
108 clbranchinfo = cl.branchinfo
109 rbheads = []
109 rbheads = []
110 closed = set()
110 closed = set()
111 for bheads in remotebranchmap.values():
111 for bheads in remotebranchmap.values():
112 rbheads += bheads
112 rbheads += bheads
113 for h in bheads:
113 for h in bheads:
114 r = clrev(h)
114 r = clrev(h)
115 b, c = clbranchinfo(r)
115 b, c = clbranchinfo(r)
116 if c:
116 if c:
117 closed.add(h)
117 closed.add(h)
118
118
119 if rbheads:
119 if rbheads:
120 rtiprev = max((int(clrev(node)) for node in rbheads))
120 rtiprev = max((int(clrev(node)) for node in rbheads))
121 cache = branchcache(
121 cache = branchcache(
122 repo,
122 repo,
123 remotebranchmap,
123 remotebranchmap,
124 repo[rtiprev].node(),
124 repo[rtiprev].node(),
125 rtiprev,
125 rtiprev,
126 closednodes=closed,
126 closednodes=closed,
127 )
127 )
128
128
129 # Try to stick it as low as possible
129 # Try to stick it as low as possible
130 # filter above served are unlikely to be fetch from a clone
130 # filter above served are unlikely to be fetch from a clone
131 for candidate in (b'base', b'immutable', b'served'):
131 for candidate in (b'base', b'immutable', b'served'):
132 rview = repo.filtered(candidate)
132 rview = repo.filtered(candidate)
133 if cache.validfor(rview):
133 if cache.validfor(rview):
134 self._per_filter[candidate] = cache
134 self._per_filter[candidate] = cache
135 cache.write(rview)
135 cache.write(rview)
136 return
136 return
137
137
138 def clear(self):
138 def clear(self):
139 self._per_filter.clear()
139 self._per_filter.clear()
140
140
141 def write_delayed(self, repo):
141 def write_delayed(self, repo):
142 unfi = repo.unfiltered()
142 unfi = repo.unfiltered()
143 for filtername, cache in self._per_filter.items():
143 for filtername, cache in self._per_filter.items():
144 if cache._delayed:
144 if cache._delayed:
145 repo = unfi.filtered(filtername)
145 repo = unfi.filtered(filtername)
146 cache.write(repo)
146 cache.write(repo)
147
147
148
148
149 def _unknownnode(node):
149 def _unknownnode(node):
150 """raises ValueError when branchcache found a node which does not exists"""
150 """raises ValueError when branchcache found a node which does not exists"""
151 raise ValueError('node %s does not exist' % node.hex())
151 raise ValueError('node %s does not exist' % node.hex())
152
152
153
153
154 def _branchcachedesc(repo):
154 def _branchcachedesc(repo):
155 if repo.filtername is not None:
155 if repo.filtername is not None:
156 return b'branch cache (%s)' % repo.filtername
156 return b'branch cache (%s)' % repo.filtername
157 else:
157 else:
158 return b'branch cache'
158 return b'branch cache'
159
159
160
160
161 class branchcache:
161 class branchcache:
162 """A dict like object that hold branches heads cache.
162 """A dict like object that hold branches heads cache.
163
163
164 This cache is used to avoid costly computations to determine all the
164 This cache is used to avoid costly computations to determine all the
165 branch heads of a repo.
165 branch heads of a repo.
166
166
167 The cache is serialized on disk in the following format:
167 The cache is serialized on disk in the following format:
168
168
169 <tip hex node> <tip rev number> [optional filtered repo hex hash]
169 <tip hex node> <tip rev number> [optional filtered repo hex hash]
170 <branch head hex node> <open/closed state> <branch name>
170 <branch head hex node> <open/closed state> <branch name>
171 <branch head hex node> <open/closed state> <branch name>
171 <branch head hex node> <open/closed state> <branch name>
172 ...
172 ...
173
173
174 The first line is used to check if the cache is still valid. If the
174 The first line is used to check if the cache is still valid. If the
175 branch cache is for a filtered repo view, an optional third hash is
175 branch cache is for a filtered repo view, an optional third hash is
176 included that hashes the hashes of all filtered and obsolete revisions.
176 included that hashes the hashes of all filtered and obsolete revisions.
177
177
178 The open/closed state is represented by a single letter 'o' or 'c'.
178 The open/closed state is represented by a single letter 'o' or 'c'.
179 This field can be used to avoid changelog reads when determining if a
179 This field can be used to avoid changelog reads when determining if a
180 branch head closes a branch or not.
180 branch head closes a branch or not.
181 """
181 """
182
182
183 def __init__(
183 def __init__(
184 self,
184 self,
185 repo: "localrepo.localrepository",
185 repo: "localrepo.localrepository",
186 entries: Union[
186 entries: Union[
187 Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]]
187 Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]]
188 ] = (),
188 ] = (),
189 tipnode: Optional[bytes] = None,
189 tipnode: Optional[bytes] = None,
190 tiprev: Optional[int] = nullrev,
190 tiprev: Optional[int] = nullrev,
191 filteredhash: Optional[bytes] = None,
191 filteredhash: Optional[bytes] = None,
192 closednodes: Optional[Set[bytes]] = None,
192 closednodes: Optional[Set[bytes]] = None,
193 hasnode: Optional[Callable[[bytes], bool]] = None,
193 hasnode: Optional[Callable[[bytes], bool]] = None,
194 ) -> None:
194 ) -> None:
195 """hasnode is a function which can be used to verify whether changelog
195 """hasnode is a function which can be used to verify whether changelog
196 has a given node or not. If it's not provided, we assume that every node
196 has a given node or not. If it's not provided, we assume that every node
197 we have exists in changelog"""
197 we have exists in changelog"""
198 self._repo = repo
198 self._repo = repo
199 self._delayed = False
199 self._delayed = False
200 if tipnode is None:
200 if tipnode is None:
201 self.tipnode = repo.nullid
201 self.tipnode = repo.nullid
202 else:
202 else:
203 self.tipnode = tipnode
203 self.tipnode = tipnode
204 self.tiprev = tiprev
204 self.tiprev = tiprev
205 self.filteredhash = filteredhash
205 self.filteredhash = filteredhash
206 # closednodes is a set of nodes that close their branch. If the branch
206 # closednodes is a set of nodes that close their branch. If the branch
207 # cache has been updated, it may contain nodes that are no longer
207 # cache has been updated, it may contain nodes that are no longer
208 # heads.
208 # heads.
209 if closednodes is None:
209 if closednodes is None:
210 self._closednodes = set()
210 self._closednodes = set()
211 else:
211 else:
212 self._closednodes = closednodes
212 self._closednodes = closednodes
213 self._entries = dict(entries)
213 self._entries = dict(entries)
214 # whether closed nodes are verified or not
214 # whether closed nodes are verified or not
215 self._closedverified = False
215 self._closedverified = False
216 # branches for which nodes are verified
216 # branches for which nodes are verified
217 self._verifiedbranches = set()
217 self._verifiedbranches = set()
218 self._hasnode = hasnode
218 self._hasnode = hasnode
219 if self._hasnode is None:
219 if self._hasnode is None:
220 self._hasnode = lambda x: True
220 self._hasnode = lambda x: True
221
221
222 def _verifyclosed(self):
222 def _verifyclosed(self):
223 """verify the closed nodes we have"""
223 """verify the closed nodes we have"""
224 if self._closedverified:
224 if self._closedverified:
225 return
225 return
226 for node in self._closednodes:
226 for node in self._closednodes:
227 if not self._hasnode(node):
227 if not self._hasnode(node):
228 _unknownnode(node)
228 _unknownnode(node)
229
229
230 self._closedverified = True
230 self._closedverified = True
231
231
232 def _verifybranch(self, branch):
232 def _verifybranch(self, branch):
233 """verify head nodes for the given branch."""
233 """verify head nodes for the given branch."""
234 if branch not in self._entries or branch in self._verifiedbranches:
234 if branch not in self._entries or branch in self._verifiedbranches:
235 return
235 return
236 for n in self._entries[branch]:
236 for n in self._entries[branch]:
237 if not self._hasnode(n):
237 if not self._hasnode(n):
238 _unknownnode(n)
238 _unknownnode(n)
239
239
240 self._verifiedbranches.add(branch)
240 self._verifiedbranches.add(branch)
241
241
242 def _verifyall(self):
242 def _verifyall(self):
243 """verifies nodes of all the branches"""
243 """verifies nodes of all the branches"""
244 needverification = set(self._entries.keys()) - self._verifiedbranches
244 needverification = set(self._entries.keys()) - self._verifiedbranches
245 for b in needverification:
245 for b in needverification:
246 self._verifybranch(b)
246 self._verifybranch(b)
247
247
248 def __iter__(self):
248 def __iter__(self):
249 return iter(self._entries)
249 return iter(self._entries)
250
250
251 def __setitem__(self, key, value):
251 def __setitem__(self, key, value):
252 self._entries[key] = value
252 self._entries[key] = value
253
253
254 def __getitem__(self, key):
254 def __getitem__(self, key):
255 self._verifybranch(key)
255 self._verifybranch(key)
256 return self._entries[key]
256 return self._entries[key]
257
257
258 def __contains__(self, key):
258 def __contains__(self, key):
259 self._verifybranch(key)
259 self._verifybranch(key)
260 return key in self._entries
260 return key in self._entries
261
261
262 def iteritems(self):
262 def iteritems(self):
263 for k, v in self._entries.items():
263 for k, v in self._entries.items():
264 self._verifybranch(k)
264 self._verifybranch(k)
265 yield k, v
265 yield k, v
266
266
267 items = iteritems
267 items = iteritems
268
268
269 def hasbranch(self, label):
269 def hasbranch(self, label):
270 """checks whether a branch of this name exists or not"""
270 """checks whether a branch of this name exists or not"""
271 self._verifybranch(label)
271 self._verifybranch(label)
272 return label in self._entries
272 return label in self._entries
273
273
274 @classmethod
274 @classmethod
275 def fromfile(cls, repo):
275 def fromfile(cls, repo):
276 f = None
276 f = None
277 try:
277 try:
278 f = repo.cachevfs(cls._filename(repo))
278 f = repo.cachevfs(cls._filename(repo))
279 lineiter = iter(f)
279 lineiter = iter(f)
280 cachekey = next(lineiter).rstrip(b'\n').split(b" ", 2)
280 cachekey = next(lineiter).rstrip(b'\n').split(b" ", 2)
281 last, lrev = cachekey[:2]
281 last, lrev = cachekey[:2]
282 last, lrev = bin(last), int(lrev)
282 last, lrev = bin(last), int(lrev)
283 filteredhash = None
283 filteredhash = None
284 hasnode = repo.changelog.hasnode
284 hasnode = repo.changelog.hasnode
285 if len(cachekey) > 2:
285 if len(cachekey) > 2:
286 filteredhash = bin(cachekey[2])
286 filteredhash = bin(cachekey[2])
287 bcache = cls(
287 bcache = cls(
288 repo,
288 repo,
289 tipnode=last,
289 tipnode=last,
290 tiprev=lrev,
290 tiprev=lrev,
291 filteredhash=filteredhash,
291 filteredhash=filteredhash,
292 hasnode=hasnode,
292 hasnode=hasnode,
293 )
293 )
294 if not bcache.validfor(repo):
294 if not bcache.validfor(repo):
295 # invalidate the cache
295 # invalidate the cache
296 raise ValueError('tip differs')
296 raise ValueError('tip differs')
297 bcache.load(repo, lineiter)
297 bcache.load(repo, lineiter)
298 except (IOError, OSError):
298 except (IOError, OSError):
299 return None
299 return None
300
300
301 except Exception as inst:
301 except Exception as inst:
302 if repo.ui.debugflag:
302 if repo.ui.debugflag:
303 msg = b'invalid %s: %s\n'
303 msg = b'invalid %s: %s\n'
304 repo.ui.debug(
304 repo.ui.debug(
305 msg
305 msg
306 % (
306 % (
307 _branchcachedesc(repo),
307 _branchcachedesc(repo),
308 stringutil.forcebytestr(inst),
308 stringutil.forcebytestr(inst),
309 )
309 )
310 )
310 )
311 bcache = None
311 bcache = None
312
312
313 finally:
313 finally:
314 if f:
314 if f:
315 f.close()
315 f.close()
316
316
317 return bcache
317 return bcache
318
318
319 def load(self, repo, lineiter):
319 def load(self, repo, lineiter):
320 """fully loads the branchcache by reading from the file using the line
320 """fully loads the branchcache by reading from the file using the line
321 iterator passed"""
321 iterator passed"""
322 for line in lineiter:
322 for line in lineiter:
323 line = line.rstrip(b'\n')
323 line = line.rstrip(b'\n')
324 if not line:
324 if not line:
325 continue
325 continue
326 node, state, label = line.split(b" ", 2)
326 node, state, label = line.split(b" ", 2)
327 if state not in b'oc':
327 if state not in b'oc':
328 raise ValueError('invalid branch state')
328 raise ValueError('invalid branch state')
329 label = encoding.tolocal(label.strip())
329 label = encoding.tolocal(label.strip())
330 node = bin(node)
330 node = bin(node)
331 self._entries.setdefault(label, []).append(node)
331 self._entries.setdefault(label, []).append(node)
332 if state == b'c':
332 if state == b'c':
333 self._closednodes.add(node)
333 self._closednodes.add(node)
334
334
335 @staticmethod
335 @staticmethod
336 def _filename(repo):
336 def _filename(repo):
337 """name of a branchcache file for a given repo or repoview"""
337 """name of a branchcache file for a given repo or repoview"""
338 filename = b"branch2"
338 filename = b"branch2"
339 if repo.filtername:
339 if repo.filtername:
340 filename = b'%s-%s' % (filename, repo.filtername)
340 filename = b'%s-%s' % (filename, repo.filtername)
341 return filename
341 return filename
342
342
343 def validfor(self, repo):
343 def validfor(self, repo):
344 """check that cache contents are valid for (a subset of) this repo
344 """check that cache contents are valid for (a subset of) this repo
345
345
346 - False when the order of changesets changed or if we detect a strip.
346 - False when the order of changesets changed or if we detect a strip.
347 - True when cache is up-to-date for the current repo or its subset."""
347 - True when cache is up-to-date for the current repo or its subset."""
348 try:
348 try:
349 node = repo.changelog.node(self.tiprev)
349 node = repo.changelog.node(self.tiprev)
350 except IndexError:
350 except IndexError:
351 # changesets were stripped and now we don't even have enough to
351 # changesets were stripped and now we don't even have enough to
352 # find tiprev
352 # find tiprev
353 return False
353 return False
354 if self.tipnode != node:
354 if self.tipnode != node:
355 # tiprev doesn't correspond to tipnode: repo was stripped, or this
355 # tiprev doesn't correspond to tipnode: repo was stripped, or this
356 # repo has a different order of changesets
356 # repo has a different order of changesets
357 return False
357 return False
358 tiphash = scmutil.filteredhash(repo, self.tiprev, needobsolete=True)
358 tiphash = scmutil.filteredhash(repo, self.tiprev, needobsolete=True)
359 # hashes don't match if this repo view has a different set of filtered
359 # hashes don't match if this repo view has a different set of filtered
360 # revisions (e.g. due to phase changes) or obsolete revisions (e.g.
360 # revisions (e.g. due to phase changes) or obsolete revisions (e.g.
361 # history was rewritten)
361 # history was rewritten)
362 return self.filteredhash == tiphash
362 return self.filteredhash == tiphash
363
363
364 def _branchtip(self, heads):
364 def _branchtip(self, heads):
365 """Return tuple with last open head in heads and false,
365 """Return tuple with last open head in heads and false,
366 otherwise return last closed head and true."""
366 otherwise return last closed head and true."""
367 tip = heads[-1]
367 tip = heads[-1]
368 closed = True
368 closed = True
369 for h in reversed(heads):
369 for h in reversed(heads):
370 if h not in self._closednodes:
370 if h not in self._closednodes:
371 tip = h
371 tip = h
372 closed = False
372 closed = False
373 break
373 break
374 return tip, closed
374 return tip, closed
375
375
376 def branchtip(self, branch):
376 def branchtip(self, branch):
377 """Return the tipmost open head on branch head, otherwise return the
377 """Return the tipmost open head on branch head, otherwise return the
378 tipmost closed head on branch.
378 tipmost closed head on branch.
379 Raise KeyError for unknown branch."""
379 Raise KeyError for unknown branch."""
380 return self._branchtip(self[branch])[0]
380 return self._branchtip(self[branch])[0]
381
381
382 def iteropen(self, nodes):
382 def iteropen(self, nodes):
383 return (n for n in nodes if n not in self._closednodes)
383 return (n for n in nodes if n not in self._closednodes)
384
384
385 def branchheads(self, branch, closed=False):
385 def branchheads(self, branch, closed=False):
386 self._verifybranch(branch)
386 self._verifybranch(branch)
387 heads = self._entries[branch]
387 heads = self._entries[branch]
388 if not closed:
388 if not closed:
389 heads = list(self.iteropen(heads))
389 heads = list(self.iteropen(heads))
390 return heads
390 return heads
391
391
392 def iterbranches(self):
392 def iterbranches(self):
393 for bn, heads in self.items():
393 for bn, heads in self.items():
394 yield (bn, heads) + self._branchtip(heads)
394 yield (bn, heads) + self._branchtip(heads)
395
395
396 def iterheads(self):
396 def iterheads(self):
397 """returns all the heads"""
397 """returns all the heads"""
398 self._verifyall()
398 self._verifyall()
399 return self._entries.values()
399 return self._entries.values()
400
400
401 def copy(self):
401 def copy(self):
402 """return an deep copy of the branchcache object"""
402 """return an deep copy of the branchcache object"""
403 return type(self)(
403 return type(self)(
404 self._repo,
404 self._repo,
405 self._entries,
405 self._entries,
406 self.tipnode,
406 self.tipnode,
407 self.tiprev,
407 self.tiprev,
408 self.filteredhash,
408 self.filteredhash,
409 self._closednodes,
409 self._closednodes,
410 )
410 )
411
411
412 def write(self, repo):
412 def write(self, repo):
413 tr = repo.currenttransaction()
413 tr = repo.currenttransaction()
414 if not getattr(tr, 'finalized', True):
414 if not getattr(tr, 'finalized', True):
415 # Avoid premature writing.
415 # Avoid premature writing.
416 #
416 #
417 # (The cache warming setup by localrepo will update the file later.)
417 # (The cache warming setup by localrepo will update the file later.)
418 self._delayed = True
418 self._delayed = True
419 return
419 return
420 try:
420 try:
421 filename = self._filename(repo)
421 filename = self._filename(repo)
422 with repo.cachevfs(filename, b"w", atomictemp=True) as f:
422 with repo.cachevfs(filename, b"w", atomictemp=True) as f:
423 cachekey = [hex(self.tipnode), b'%d' % self.tiprev]
423 cachekey = [hex(self.tipnode), b'%d' % self.tiprev]
424 if self.filteredhash is not None:
424 if self.filteredhash is not None:
425 cachekey.append(hex(self.filteredhash))
425 cachekey.append(hex(self.filteredhash))
426 f.write(b" ".join(cachekey) + b'\n')
426 f.write(b" ".join(cachekey) + b'\n')
427 nodecount = 0
427 nodecount = 0
428 for label, nodes in sorted(self._entries.items()):
428 for label, nodes in sorted(self._entries.items()):
429 label = encoding.fromlocal(label)
429 label = encoding.fromlocal(label)
430 for node in nodes:
430 for node in nodes:
431 nodecount += 1
431 nodecount += 1
432 if node in self._closednodes:
432 if node in self._closednodes:
433 state = b'c'
433 state = b'c'
434 else:
434 else:
435 state = b'o'
435 state = b'o'
436 f.write(b"%s %s %s\n" % (hex(node), state, label))
436 f.write(b"%s %s %s\n" % (hex(node), state, label))
437 repo.ui.log(
437 repo.ui.log(
438 b'branchcache',
438 b'branchcache',
439 b'wrote %s with %d labels and %d nodes\n',
439 b'wrote %s with %d labels and %d nodes\n',
440 _branchcachedesc(repo),
440 _branchcachedesc(repo),
441 len(self._entries),
441 len(self._entries),
442 nodecount,
442 nodecount,
443 )
443 )
444 self._delayed = False
444 self._delayed = False
445 except (IOError, OSError, error.Abort) as inst:
445 except (IOError, OSError, error.Abort) as inst:
446 # Abort may be raised by read only opener, so log and continue
446 # Abort may be raised by read only opener, so log and continue
447 repo.ui.debug(
447 repo.ui.debug(
448 b"couldn't write branch cache: %s\n"
448 b"couldn't write branch cache: %s\n"
449 % stringutil.forcebytestr(inst)
449 % stringutil.forcebytestr(inst)
450 )
450 )
451
451
452 def update(self, repo, revgen):
452 def update(self, repo, revgen):
453 """Given a branchhead cache, self, that may have extra nodes or be
453 """Given a branchhead cache, self, that may have extra nodes or be
454 missing heads, and a generator of nodes that are strictly a superset of
454 missing heads, and a generator of nodes that are strictly a superset of
455 heads missing, this function updates self to be correct.
455 heads missing, this function updates self to be correct.
456 """
456 """
457 starttime = util.timer()
457 starttime = util.timer()
458 cl = repo.changelog
458 cl = repo.changelog
459 # collect new branch entries
459 # collect new branch entries
460 newbranches = {}
460 newbranches = {}
461 getbranchinfo = repo.revbranchcache().branchinfo
461 getbranchinfo = repo.revbranchcache().branchinfo
462 for r in revgen:
462 for r in revgen:
463 branch, closesbranch = getbranchinfo(r)
463 branch, closesbranch = getbranchinfo(r)
464 newbranches.setdefault(branch, []).append(r)
464 newbranches.setdefault(branch, []).append(r)
465 if closesbranch:
465 if closesbranch:
466 self._closednodes.add(cl.node(r))
466 self._closednodes.add(cl.node(r))
467
467
468 # new tip revision which we found after iterating items from new
468 # new tip revision which we found after iterating items from new
469 # branches
469 # branches
470 ntiprev = self.tiprev
470 ntiprev = self.tiprev
471
471
472 # Delay fetching the topological heads until they are needed.
472 # Delay fetching the topological heads until they are needed.
473 # A repository without non-continous branches can skip this part.
473 # A repository without non-continous branches can skip this part.
474 topoheads = None
474 topoheads = None
475
475
476 # If a changeset is visible, its parents must be visible too, so
476 # If a changeset is visible, its parents must be visible too, so
477 # use the faster unfiltered parent accessor.
477 # use the faster unfiltered parent accessor.
478 parentrevs = repo.unfiltered().changelog.parentrevs
478 parentrevs = repo.unfiltered().changelog.parentrevs
479
479
480 # Faster than using ctx.obsolete()
480 # Faster than using ctx.obsolete()
481 obsrevs = obsolete.getrevs(repo, b'obsolete')
481 obsrevs = obsolete.getrevs(repo, b'obsolete')
482
482
483 for branch, newheadrevs in newbranches.items():
483 for branch, newheadrevs in newbranches.items():
484 # For every branch, compute the new branchheads.
484 # For every branch, compute the new branchheads.
485 # A branchhead is a revision such that no descendant is on
485 # A branchhead is a revision such that no descendant is on
486 # the same branch.
486 # the same branch.
487 #
487 #
488 # The branchheads are computed iteratively in revision order.
488 # The branchheads are computed iteratively in revision order.
489 # This ensures topological order, i.e. parents are processed
489 # This ensures topological order, i.e. parents are processed
490 # before their children. Ancestors are inclusive here, i.e.
490 # before their children. Ancestors are inclusive here, i.e.
491 # any revision is an ancestor of itself.
491 # any revision is an ancestor of itself.
492 #
492 #
493 # Core observations:
493 # Core observations:
494 # - The current revision is always a branchhead for the
494 # - The current revision is always a branchhead for the
495 # repository up to that point.
495 # repository up to that point.
496 # - It is the first revision of the branch if and only if
496 # - It is the first revision of the branch if and only if
497 # there was no branchhead before. In that case, it is the
497 # there was no branchhead before. In that case, it is the
498 # only branchhead as there are no possible ancestors on
498 # only branchhead as there are no possible ancestors on
499 # the same branch.
499 # the same branch.
500 # - If a parent is on the same branch, a branchhead can
500 # - If a parent is on the same branch, a branchhead can
501 # only be an ancestor of that parent, if it is parent
501 # only be an ancestor of that parent, if it is parent
502 # itself. Otherwise it would have been removed as ancestor
502 # itself. Otherwise it would have been removed as ancestor
503 # of that parent before.
503 # of that parent before.
504 # - Therefore, if all parents are on the same branch, they
504 # - Therefore, if all parents are on the same branch, they
505 # can just be removed from the branchhead set.
505 # can just be removed from the branchhead set.
506 # - If one parent is on the same branch and the other is not
506 # - If one parent is on the same branch and the other is not
507 # and there was exactly one branchhead known, the existing
507 # and there was exactly one branchhead known, the existing
508 # branchhead can only be an ancestor if it is the parent.
508 # branchhead can only be an ancestor if it is the parent.
509 # Otherwise it would have been removed as ancestor of
509 # Otherwise it would have been removed as ancestor of
510 # the parent before. The other parent therefore can't have
510 # the parent before. The other parent therefore can't have
511 # a branchhead as ancestor.
511 # a branchhead as ancestor.
512 # - In all other cases, the parents on different branches
512 # - In all other cases, the parents on different branches
513 # could have a branchhead as ancestor. Those parents are
513 # could have a branchhead as ancestor. Those parents are
514 # kept in the "uncertain" set. If all branchheads are also
514 # kept in the "uncertain" set. If all branchheads are also
515 # topological heads, they can't have descendants and further
515 # topological heads, they can't have descendants and further
516 # checks can be skipped. Otherwise, the ancestors of the
516 # checks can be skipped. Otherwise, the ancestors of the
517 # "uncertain" set are removed from branchheads.
517 # "uncertain" set are removed from branchheads.
518 # This computation is heavy and avoided if at all possible.
518 # This computation is heavy and avoided if at all possible.
519 bheads = self._entries.get(branch, [])
519 bheads = self._entries.get(branch, [])
520 bheadset = {cl.rev(node) for node in bheads}
520 bheadset = {cl.rev(node) for node in bheads}
521 uncertain = set()
521 uncertain = set()
522 for newrev in sorted(newheadrevs):
522 for newrev in sorted(newheadrevs):
523 if newrev in obsrevs:
523 if newrev in obsrevs:
524 # We ignore obsolete changesets as they shouldn't be
524 # We ignore obsolete changesets as they shouldn't be
525 # considered heads.
525 # considered heads.
526 continue
526 continue
527
527
528 if not bheadset:
528 if not bheadset:
529 bheadset.add(newrev)
529 bheadset.add(newrev)
530 continue
530 continue
531
531
532 parents = [p for p in parentrevs(newrev) if p != nullrev]
532 parents = [p for p in parentrevs(newrev) if p != nullrev]
533 samebranch = set()
533 samebranch = set()
534 otherbranch = set()
534 otherbranch = set()
535 obsparents = set()
535 obsparents = set()
536 for p in parents:
536 for p in parents:
537 if p in obsrevs:
537 if p in obsrevs:
538 # We ignored this obsolete changeset earlier, but now
538 # We ignored this obsolete changeset earlier, but now
539 # that it has non-ignored children, we need to make
539 # that it has non-ignored children, we need to make
540 # sure their ancestors are not considered heads. To
540 # sure their ancestors are not considered heads. To
541 # achieve that, we will simply treat this obsolete
541 # achieve that, we will simply treat this obsolete
542 # changeset as a parent from other branch.
542 # changeset as a parent from other branch.
543 obsparents.add(p)
543 obsparents.add(p)
544 elif p in bheadset or getbranchinfo(p)[0] == branch:
544 elif p in bheadset or getbranchinfo(p)[0] == branch:
545 samebranch.add(p)
545 samebranch.add(p)
546 else:
546 else:
547 otherbranch.add(p)
547 otherbranch.add(p)
548 if not (len(bheadset) == len(samebranch) == 1):
548 if not (len(bheadset) == len(samebranch) == 1):
549 uncertain.update(otherbranch)
549 uncertain.update(otherbranch)
550 uncertain.update(obsparents)
550 uncertain.update(obsparents)
551 bheadset.difference_update(samebranch)
551 bheadset.difference_update(samebranch)
552 bheadset.add(newrev)
552 bheadset.add(newrev)
553
553
554 if uncertain:
554 if uncertain:
555 if topoheads is None:
555 if topoheads is None:
556 topoheads = set(cl.headrevs())
556 topoheads = set(cl.headrevs())
557 if bheadset - topoheads:
557 if bheadset - topoheads:
558 floorrev = min(bheadset)
558 floorrev = min(bheadset)
559 if floorrev <= max(uncertain):
559 if floorrev <= max(uncertain):
560 ancestors = set(cl.ancestors(uncertain, floorrev))
560 ancestors = set(cl.ancestors(uncertain, floorrev))
561 bheadset -= ancestors
561 bheadset -= ancestors
562 if bheadset:
562 if bheadset:
563 self[branch] = [cl.node(rev) for rev in sorted(bheadset)]
563 self[branch] = [cl.node(rev) for rev in sorted(bheadset)]
564 tiprev = max(newheadrevs)
564 tiprev = max(newheadrevs)
565 if tiprev > ntiprev:
565 if tiprev > ntiprev:
566 ntiprev = tiprev
566 ntiprev = tiprev
567
567
568 if ntiprev > self.tiprev:
568 if ntiprev > self.tiprev:
569 self.tiprev = ntiprev
569 self.tiprev = ntiprev
570 self.tipnode = cl.node(ntiprev)
570 self.tipnode = cl.node(ntiprev)
571
571
572 if not self.validfor(repo):
572 if not self.validfor(repo):
573 # old cache key is now invalid for the repo, but we've just updated
573 # old cache key is now invalid for the repo, but we've just updated
574 # the cache and we assume it's valid, so let's make the cache key
574 # the cache and we assume it's valid, so let's make the cache key
575 # valid as well by recomputing it from the cached data
575 # valid as well by recomputing it from the cached data
576 self.tipnode = repo.nullid
576 self.tipnode = repo.nullid
577 self.tiprev = nullrev
577 self.tiprev = nullrev
578 for heads in self.iterheads():
578 for heads in self.iterheads():
579 if not heads:
579 if not heads:
580 # all revisions on a branch are obsolete
580 # all revisions on a branch are obsolete
581 continue
581 continue
582 # note: tiprev is not necessarily the tip revision of repo,
582 # note: tiprev is not necessarily the tip revision of repo,
583 # because the tip could be obsolete (i.e. not a head)
583 # because the tip could be obsolete (i.e. not a head)
584 tiprev = max(cl.rev(node) for node in heads)
584 tiprev = max(cl.rev(node) for node in heads)
585 if tiprev > self.tiprev:
585 if tiprev > self.tiprev:
586 self.tipnode = cl.node(tiprev)
586 self.tipnode = cl.node(tiprev)
587 self.tiprev = tiprev
587 self.tiprev = tiprev
588 self.filteredhash = scmutil.filteredhash(
588 self.filteredhash = scmutil.filteredhash(
589 repo, self.tiprev, needobsolete=True
589 repo, self.tiprev, needobsolete=True
590 )
590 )
591
591
592 duration = util.timer() - starttime
592 duration = util.timer() - starttime
593 repo.ui.log(
593 repo.ui.log(
594 b'branchcache',
594 b'branchcache',
595 b'updated %s in %.4f seconds\n',
595 b'updated %s in %.4f seconds\n',
596 _branchcachedesc(repo),
596 _branchcachedesc(repo),
597 duration,
597 duration,
598 )
598 )
599
599
600 self.write(repo)
600 self.write(repo)
601
601
602
602
603 class remotebranchcache(branchcache):
603 class remotebranchcache(branchcache):
604 """Branchmap info for a remote connection, should not write locally"""
604 """Branchmap info for a remote connection, should not write locally"""
605
605
606 def write(self, repo):
606 def write(self, repo):
607 pass
607 pass
608
608
609
609
610 # Revision branch info cache
610 # Revision branch info cache
611
611
612 _rbcversion = b'-v1'
612 _rbcversion = b'-v1'
613 _rbcnames = b'rbc-names' + _rbcversion
613 _rbcnames = b'rbc-names' + _rbcversion
614 _rbcrevs = b'rbc-revs' + _rbcversion
614 _rbcrevs = b'rbc-revs' + _rbcversion
615 # [4 byte hash prefix][4 byte branch name number with sign bit indicating open]
615 # [4 byte hash prefix][4 byte branch name number with sign bit indicating open]
616 _rbcrecfmt = b'>4sI'
616 _rbcrecfmt = b'>4sI'
617 _rbcrecsize = calcsize(_rbcrecfmt)
617 _rbcrecsize = calcsize(_rbcrecfmt)
618 _rbcmininc = 64 * _rbcrecsize
618 _rbcmininc = 64 * _rbcrecsize
619 _rbcnodelen = 4
619 _rbcnodelen = 4
620 _rbcbranchidxmask = 0x7FFFFFFF
620 _rbcbranchidxmask = 0x7FFFFFFF
621 _rbccloseflag = 0x80000000
621 _rbccloseflag = 0x80000000
622
622
623
623
624 class rbcrevs:
625 """a byte string consisting of an immutable prefix followed by a mutable suffix"""
626
627 def __init__(self, revs):
628 self._prefix = revs
629 self._rest = bytearray()
630
631 def __len__(self):
632 return len(self._prefix) + len(self._rest)
633
634 def unpack_record(self, rbcrevidx):
635 if rbcrevidx < len(self._prefix):
636 return unpack_from(_rbcrecfmt, util.buffer(self._prefix), rbcrevidx)
637 else:
638 return unpack_from(
639 _rbcrecfmt,
640 util.buffer(self._rest),
641 rbcrevidx - len(self._prefix),
642 )
643
644 def make_mutable(self):
645 if len(self._prefix) > 0:
646 entirety = bytearray()
647 entirety[:] = self._prefix
648 entirety.extend(self._rest)
649 self._rest = entirety
650 self._prefix = bytearray()
651
652 def truncate(self, pos):
653 self.make_mutable()
654 del self._rest[pos:]
655
656 def pack_into(self, rbcrevidx, node, branchidx):
657 if rbcrevidx < len(self._prefix):
658 self.make_mutable()
659 buf = self._rest
660 start_offset = rbcrevidx - len(self._prefix)
661 end_offset = start_offset + _rbcrecsize
662
663 if len(self._rest) < end_offset:
664 # bytearray doesn't allocate extra space at least in Python 3.7.
665 # When multiple changesets are added in a row, precise resize would
666 # result in quadratic complexity. Overallocate to compensate by
667 # using the classic doubling technique for dynamic arrays instead.
668 # If there was a gap in the map before, less space will be reserved.
669 self._rest.extend(b'\0' * end_offset)
670 return pack_into(
671 _rbcrecfmt,
672 buf,
673 start_offset,
674 node,
675 branchidx,
676 )
677
678 def extend(self, extension):
679 return self._rest.extend(extension)
680
681 def slice(self, begin, end):
682 if begin < len(self._prefix):
683 acc = bytearray()
684 acc[:] = self._prefix[begin:end]
685 acc.extend(
686 self._rest[begin - len(self._prefix) : end - len(self._prefix)]
687 )
688 return acc
689 return self._rest[begin - len(self._prefix) : end - len(self._prefix)]
690
691
624 class revbranchcache:
692 class revbranchcache:
625 """Persistent cache, mapping from revision number to branch name and close.
693 """Persistent cache, mapping from revision number to branch name and close.
626 This is a low level cache, independent of filtering.
694 This is a low level cache, independent of filtering.
627
695
628 Branch names are stored in rbc-names in internal encoding separated by 0.
696 Branch names are stored in rbc-names in internal encoding separated by 0.
629 rbc-names is append-only, and each branch name is only stored once and will
697 rbc-names is append-only, and each branch name is only stored once and will
630 thus have a unique index.
698 thus have a unique index.
631
699
632 The branch info for each revision is stored in rbc-revs as constant size
700 The branch info for each revision is stored in rbc-revs as constant size
633 records. The whole file is read into memory, but it is only 'parsed' on
701 records. The whole file is read into memory, but it is only 'parsed' on
634 demand. The file is usually append-only but will be truncated if repo
702 demand. The file is usually append-only but will be truncated if repo
635 modification is detected.
703 modification is detected.
636 The record for each revision contains the first 4 bytes of the
704 The record for each revision contains the first 4 bytes of the
637 corresponding node hash, and the record is only used if it still matches.
705 corresponding node hash, and the record is only used if it still matches.
638 Even a completely trashed rbc-revs fill thus still give the right result
706 Even a completely trashed rbc-revs fill thus still give the right result
639 while converging towards full recovery ... assuming no incorrectly matching
707 while converging towards full recovery ... assuming no incorrectly matching
640 node hashes.
708 node hashes.
641 The record also contains 4 bytes where 31 bits contains the index of the
709 The record also contains 4 bytes where 31 bits contains the index of the
642 branch and the last bit indicate that it is a branch close commit.
710 branch and the last bit indicate that it is a branch close commit.
643 The usage pattern for rbc-revs is thus somewhat similar to 00changelog.i
711 The usage pattern for rbc-revs is thus somewhat similar to 00changelog.i
644 and will grow with it but be 1/8th of its size.
712 and will grow with it but be 1/8th of its size.
645 """
713 """
646
714
647 def __init__(self, repo, readonly=True):
715 def __init__(self, repo, readonly=True):
648 assert repo.filtername is None
716 assert repo.filtername is None
649 self._repo = repo
717 self._repo = repo
650 self._names = [] # branch names in local encoding with static index
718 self._names = [] # branch names in local encoding with static index
651 self._rbcrevs = bytearray()
719 self._rbcrevs = rbcrevs(bytearray())
652 self._rbcsnameslen = 0 # length of names read at _rbcsnameslen
720 self._rbcsnameslen = 0 # length of names read at _rbcsnameslen
653 try:
721 try:
654 bndata = repo.cachevfs.read(_rbcnames)
722 bndata = repo.cachevfs.read(_rbcnames)
655 self._rbcsnameslen = len(bndata) # for verification before writing
723 self._rbcsnameslen = len(bndata) # for verification before writing
656 if bndata:
724 if bndata:
657 self._names = [
725 self._names = [
658 encoding.tolocal(bn) for bn in bndata.split(b'\0')
726 encoding.tolocal(bn) for bn in bndata.split(b'\0')
659 ]
727 ]
660 except (IOError, OSError):
728 except (IOError, OSError):
661 if readonly:
729 if readonly:
662 # don't try to use cache - fall back to the slow path
730 # don't try to use cache - fall back to the slow path
663 self.branchinfo = self._branchinfo
731 self.branchinfo = self._branchinfo
664
732
665 if self._names:
733 if self._names:
666 try:
734 try:
735 if repo.ui.configbool(b'format', b'mmap-revbranchcache'):
736 with repo.cachevfs(_rbcrevs) as fp:
737 data = util.buffer(util.mmapread(fp))
738 else:
667 data = repo.cachevfs.read(_rbcrevs)
739 data = repo.cachevfs.read(_rbcrevs)
668 self._rbcrevs[:] = data
740 self._rbcrevs = rbcrevs(data)
669 except (IOError, OSError) as inst:
741 except (IOError, OSError) as inst:
670 repo.ui.debug(
742 repo.ui.debug(
671 b"couldn't read revision branch cache: %s\n"
743 b"couldn't read revision branch cache: %s\n"
672 % stringutil.forcebytestr(inst)
744 % stringutil.forcebytestr(inst)
673 )
745 )
674 # remember number of good records on disk
746 # remember number of good records on disk
675 self._rbcrevslen = min(
747 self._rbcrevslen = min(
676 len(self._rbcrevs) // _rbcrecsize, len(repo.changelog)
748 len(self._rbcrevs) // _rbcrecsize, len(repo.changelog)
677 )
749 )
678 if self._rbcrevslen == 0:
750 if self._rbcrevslen == 0:
679 self._names = []
751 self._names = []
680 self._rbcnamescount = len(self._names) # number of names read at
752 self._rbcnamescount = len(self._names) # number of names read at
681 # _rbcsnameslen
753 # _rbcsnameslen
682
754
683 def _clear(self):
755 def _clear(self):
684 self._rbcsnameslen = 0
756 self._rbcsnameslen = 0
685 del self._names[:]
757 del self._names[:]
686 self._rbcnamescount = 0
758 self._rbcnamescount = 0
687 self._rbcrevslen = len(self._repo.changelog)
759 self._rbcrevslen = len(self._repo.changelog)
688 self._rbcrevs = bytearray(self._rbcrevslen * _rbcrecsize)
760 self._rbcrevs = rbcrevs(bytearray(self._rbcrevslen * _rbcrecsize))
689 util.clearcachedproperty(self, b'_namesreverse')
761 util.clearcachedproperty(self, b'_namesreverse')
690
762
691 @util.propertycache
763 @util.propertycache
692 def _namesreverse(self):
764 def _namesreverse(self):
693 return {b: r for r, b in enumerate(self._names)}
765 return {b: r for r, b in enumerate(self._names)}
694
766
695 def branchinfo(self, rev):
767 def branchinfo(self, rev):
696 """Return branch name and close flag for rev, using and updating
768 """Return branch name and close flag for rev, using and updating
697 persistent cache."""
769 persistent cache."""
698 changelog = self._repo.changelog
770 changelog = self._repo.changelog
699 rbcrevidx = rev * _rbcrecsize
771 rbcrevidx = rev * _rbcrecsize
700
772
701 # avoid negative index, changelog.read(nullrev) is fast without cache
773 # avoid negative index, changelog.read(nullrev) is fast without cache
702 if rev == nullrev:
774 if rev == nullrev:
703 return changelog.branchinfo(rev)
775 return changelog.branchinfo(rev)
704
776
705 # if requested rev isn't allocated, grow and cache the rev info
777 # if requested rev isn't allocated, grow and cache the rev info
706 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize:
778 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize:
707 return self._branchinfo(rev)
779 return self._branchinfo(rev)
708
780
709 # fast path: extract data from cache, use it if node is matching
781 # fast path: extract data from cache, use it if node is matching
710 reponode = changelog.node(rev)[:_rbcnodelen]
782 reponode = changelog.node(rev)[:_rbcnodelen]
711 cachenode, branchidx = unpack_from(
783 cachenode, branchidx = self._rbcrevs.unpack_record(rbcrevidx)
712 _rbcrecfmt, util.buffer(self._rbcrevs), rbcrevidx
713 )
714 close = bool(branchidx & _rbccloseflag)
784 close = bool(branchidx & _rbccloseflag)
715 if close:
785 if close:
716 branchidx &= _rbcbranchidxmask
786 branchidx &= _rbcbranchidxmask
717 if cachenode == b'\0\0\0\0':
787 if cachenode == b'\0\0\0\0':
718 pass
788 pass
719 elif cachenode == reponode:
789 elif cachenode == reponode:
720 try:
790 try:
721 return self._names[branchidx], close
791 return self._names[branchidx], close
722 except IndexError:
792 except IndexError:
723 # recover from invalid reference to unknown branch
793 # recover from invalid reference to unknown branch
724 self._repo.ui.debug(
794 self._repo.ui.debug(
725 b"referenced branch names not found"
795 b"referenced branch names not found"
726 b" - rebuilding revision branch cache from scratch\n"
796 b" - rebuilding revision branch cache from scratch\n"
727 )
797 )
728 self._clear()
798 self._clear()
729 else:
799 else:
730 # rev/node map has changed, invalidate the cache from here up
800 # rev/node map has changed, invalidate the cache from here up
731 self._repo.ui.debug(
801 self._repo.ui.debug(
732 b"history modification detected - truncating "
802 b"history modification detected - truncating "
733 b"revision branch cache to revision %d\n" % rev
803 b"revision branch cache to revision %d\n" % rev
734 )
804 )
735 truncate = rbcrevidx + _rbcrecsize
805 truncate = rbcrevidx + _rbcrecsize
736 del self._rbcrevs[truncate:]
806 self._rbcrevs.truncate(truncate)
737 self._rbcrevslen = min(self._rbcrevslen, truncate)
807 self._rbcrevslen = min(self._rbcrevslen, truncate)
738
808
739 # fall back to slow path and make sure it will be written to disk
809 # fall back to slow path and make sure it will be written to disk
740 return self._branchinfo(rev)
810 return self._branchinfo(rev)
741
811
742 def _branchinfo(self, rev):
812 def _branchinfo(self, rev):
743 """Retrieve branch info from changelog and update _rbcrevs"""
813 """Retrieve branch info from changelog and update _rbcrevs"""
744 changelog = self._repo.changelog
814 changelog = self._repo.changelog
745 b, close = changelog.branchinfo(rev)
815 b, close = changelog.branchinfo(rev)
746 if b in self._namesreverse:
816 if b in self._namesreverse:
747 branchidx = self._namesreverse[b]
817 branchidx = self._namesreverse[b]
748 else:
818 else:
749 branchidx = len(self._names)
819 branchidx = len(self._names)
750 self._names.append(b)
820 self._names.append(b)
751 self._namesreverse[b] = branchidx
821 self._namesreverse[b] = branchidx
752 reponode = changelog.node(rev)
822 reponode = changelog.node(rev)
753 if close:
823 if close:
754 branchidx |= _rbccloseflag
824 branchidx |= _rbccloseflag
755 self._setcachedata(rev, reponode, branchidx)
825 self._setcachedata(rev, reponode, branchidx)
756 return b, close
826 return b, close
757
827
758 def setdata(self, rev, changelogrevision):
828 def setdata(self, rev, changelogrevision):
759 """add new data information to the cache"""
829 """add new data information to the cache"""
760 branch, close = changelogrevision.branchinfo
830 branch, close = changelogrevision.branchinfo
761
831
762 if branch in self._namesreverse:
832 if branch in self._namesreverse:
763 branchidx = self._namesreverse[branch]
833 branchidx = self._namesreverse[branch]
764 else:
834 else:
765 branchidx = len(self._names)
835 branchidx = len(self._names)
766 self._names.append(branch)
836 self._names.append(branch)
767 self._namesreverse[branch] = branchidx
837 self._namesreverse[branch] = branchidx
768 if close:
838 if close:
769 branchidx |= _rbccloseflag
839 branchidx |= _rbccloseflag
770 self._setcachedata(rev, self._repo.changelog.node(rev), branchidx)
840 self._setcachedata(rev, self._repo.changelog.node(rev), branchidx)
771 # If no cache data were readable (non exists, bad permission, etc)
841 # If no cache data were readable (non exists, bad permission, etc)
772 # the cache was bypassing itself by setting:
842 # the cache was bypassing itself by setting:
773 #
843 #
774 # self.branchinfo = self._branchinfo
844 # self.branchinfo = self._branchinfo
775 #
845 #
776 # Since we now have data in the cache, we need to drop this bypassing.
846 # Since we now have data in the cache, we need to drop this bypassing.
777 if 'branchinfo' in vars(self):
847 if 'branchinfo' in vars(self):
778 del self.branchinfo
848 del self.branchinfo
779
849
780 def _setcachedata(self, rev, node, branchidx):
850 def _setcachedata(self, rev, node, branchidx):
781 """Writes the node's branch data to the in-memory cache data."""
851 """Writes the node's branch data to the in-memory cache data."""
782 if rev == nullrev:
852 if rev == nullrev:
783 return
853 return
784 rbcrevidx = rev * _rbcrecsize
854 rbcrevidx = rev * _rbcrecsize
785 requiredsize = rbcrevidx + _rbcrecsize
855 self._rbcrevs.pack_into(rbcrevidx, node, branchidx)
786 rbccur = len(self._rbcrevs)
787 if rbccur < requiredsize:
788 # bytearray doesn't allocate extra space at least in Python 3.7.
789 # When multiple changesets are added in a row, precise resize would
790 # result in quadratic complexity. Overallocate to compensate by
791 # use the classic doubling technique for dynamic arrays instead.
792 # If there was a gap in the map before, less space will be reserved.
793 self._rbcrevs.extend(b'\0' * max(_rbcmininc, requiredsize))
794 pack_into(_rbcrecfmt, self._rbcrevs, rbcrevidx, node, branchidx)
795 self._rbcrevslen = min(self._rbcrevslen, rev)
856 self._rbcrevslen = min(self._rbcrevslen, rev)
796
857
797 tr = self._repo.currenttransaction()
858 tr = self._repo.currenttransaction()
798 if tr:
859 if tr:
799 tr.addfinalize(b'write-revbranchcache', self.write)
860 tr.addfinalize(b'write-revbranchcache', self.write)
800
861
801 def write(self, tr=None):
862 def write(self, tr=None):
802 """Save branch cache if it is dirty."""
863 """Save branch cache if it is dirty."""
803 repo = self._repo
864 repo = self._repo
804 wlock = None
865 wlock = None
805 step = b''
866 step = b''
806 try:
867 try:
807 # write the new names
868 # write the new names
808 if self._rbcnamescount < len(self._names):
869 if self._rbcnamescount < len(self._names):
809 wlock = repo.wlock(wait=False)
870 wlock = repo.wlock(wait=False)
810 step = b' names'
871 step = b' names'
811 self._writenames(repo)
872 self._writenames(repo)
812
873
813 # write the new revs
874 # write the new revs
814 start = self._rbcrevslen * _rbcrecsize
875 start = self._rbcrevslen * _rbcrecsize
815 if start != len(self._rbcrevs):
876 if start != len(self._rbcrevs):
816 step = b''
877 step = b''
817 if wlock is None:
878 if wlock is None:
818 wlock = repo.wlock(wait=False)
879 wlock = repo.wlock(wait=False)
819 self._writerevs(repo, start)
880 self._writerevs(repo, start)
820
881
821 except (IOError, OSError, error.Abort, error.LockError) as inst:
882 except (IOError, OSError, error.Abort, error.LockError) as inst:
822 repo.ui.debug(
883 repo.ui.debug(
823 b"couldn't write revision branch cache%s: %s\n"
884 b"couldn't write revision branch cache%s: %s\n"
824 % (step, stringutil.forcebytestr(inst))
885 % (step, stringutil.forcebytestr(inst))
825 )
886 )
826 finally:
887 finally:
827 if wlock is not None:
888 if wlock is not None:
828 wlock.release()
889 wlock.release()
829
890
830 def _writenames(self, repo):
891 def _writenames(self, repo):
831 """write the new branch names to revbranchcache"""
892 """write the new branch names to revbranchcache"""
832 if self._rbcnamescount != 0:
893 if self._rbcnamescount != 0:
833 f = repo.cachevfs.open(_rbcnames, b'ab')
894 f = repo.cachevfs.open(_rbcnames, b'ab')
834 if f.tell() == self._rbcsnameslen:
895 if f.tell() == self._rbcsnameslen:
835 f.write(b'\0')
896 f.write(b'\0')
836 else:
897 else:
837 f.close()
898 f.close()
838 repo.ui.debug(b"%s changed - rewriting it\n" % _rbcnames)
899 repo.ui.debug(b"%s changed - rewriting it\n" % _rbcnames)
839 self._rbcnamescount = 0
900 self._rbcnamescount = 0
840 self._rbcrevslen = 0
901 self._rbcrevslen = 0
841 if self._rbcnamescount == 0:
902 if self._rbcnamescount == 0:
842 # before rewriting names, make sure references are removed
903 # before rewriting names, make sure references are removed
843 repo.cachevfs.unlinkpath(_rbcrevs, ignoremissing=True)
904 repo.cachevfs.unlinkpath(_rbcrevs, ignoremissing=True)
844 f = repo.cachevfs.open(_rbcnames, b'wb')
905 f = repo.cachevfs.open(_rbcnames, b'wb')
845 f.write(
906 f.write(
846 b'\0'.join(
907 b'\0'.join(
847 encoding.fromlocal(b)
908 encoding.fromlocal(b)
848 for b in self._names[self._rbcnamescount :]
909 for b in self._names[self._rbcnamescount :]
849 )
910 )
850 )
911 )
851 self._rbcsnameslen = f.tell()
912 self._rbcsnameslen = f.tell()
852 f.close()
913 f.close()
853 self._rbcnamescount = len(self._names)
914 self._rbcnamescount = len(self._names)
854
915
855 def _writerevs(self, repo, start):
916 def _writerevs(self, repo, start):
856 """write the new revs to revbranchcache"""
917 """write the new revs to revbranchcache"""
857 revs = min(len(repo.changelog), len(self._rbcrevs) // _rbcrecsize)
918 revs = min(len(repo.changelog), len(self._rbcrevs) // _rbcrecsize)
858 with repo.cachevfs.open(_rbcrevs, b'ab') as f:
919 with repo.cachevfs.open(_rbcrevs, b'ab') as f:
859 if f.tell() != start:
920 if f.tell() != start:
860 repo.ui.debug(
921 repo.ui.debug(
861 b"truncating cache/%s to %d\n" % (_rbcrevs, start)
922 b"truncating cache/%s to %d\n" % (_rbcrevs, start)
862 )
923 )
863 f.seek(start)
924 f.seek(start)
864 if f.tell() != start:
925 if f.tell() != start:
865 start = 0
926 start = 0
866 f.seek(start)
927 f.seek(start)
867 f.truncate()
928 f.truncate()
868 end = revs * _rbcrecsize
929 end = revs * _rbcrecsize
869 f.write(self._rbcrevs[start:end])
930 f.write(self._rbcrevs.slice(start, end))
870 self._rbcrevslen = revs
931 self._rbcrevslen = revs
@@ -1,2915 +1,2920 b''
1 # configitems.toml - centralized declaration of configuration options
1 # configitems.toml - centralized declaration of configuration options
2 #
2 #
3 # This file contains declarations of the core Mercurial configuration options.
3 # This file contains declarations of the core Mercurial configuration options.
4 #
4 #
5 # # Structure
5 # # Structure
6 #
6 #
7 # items: array of config items
7 # items: array of config items
8 # templates: mapping of template name to template declaration
8 # templates: mapping of template name to template declaration
9 # template-applications: array of template applications
9 # template-applications: array of template applications
10 #
10 #
11 # # Elements
11 # # Elements
12 #
12 #
13 # ## Item
13 # ## Item
14 #
14 #
15 # Declares a core Mercurial option.
15 # Declares a core Mercurial option.
16 #
16 #
17 # - section: string (required)
17 # - section: string (required)
18 # - name: string (required)
18 # - name: string (required)
19 # - default-type: boolean, changes how `default` is read
19 # - default-type: boolean, changes how `default` is read
20 # - default: any
20 # - default: any
21 # - generic: boolean
21 # - generic: boolean
22 # - priority: integer, only if `generic` is true
22 # - priority: integer, only if `generic` is true
23 # - alias: list of 2-tuples of strings
23 # - alias: list of 2-tuples of strings
24 # - experimental: boolean
24 # - experimental: boolean
25 # - documentation: string
25 # - documentation: string
26 # - in_core_extension: string
26 # - in_core_extension: string
27 #
27 #
28 # ## Template
28 # ## Template
29 #
29 #
30 # Declares a group of options to be re-used for multiple sections.
30 # Declares a group of options to be re-used for multiple sections.
31 #
31 #
32 # - all the same fields as `Item`, except `section` and `name`
32 # - all the same fields as `Item`, except `section` and `name`
33 # - `suffix` (string, required)
33 # - `suffix` (string, required)
34 #
34 #
35 # ## Template applications
35 # ## Template applications
36 #
36 #
37 # Uses a `Template` to instanciate its options in a given section.
37 # Uses a `Template` to instanciate its options in a given section.
38 #
38 #
39 # - template: string (required, must match a `Template` name)
39 # - template: string (required, must match a `Template` name)
40 # - section: string (required)
40 # - section: string (required)
41
41
42 [[items]]
42 [[items]]
43 section = "alias"
43 section = "alias"
44 name = ".*"
44 name = ".*"
45 default-type = "dynamic"
45 default-type = "dynamic"
46 generic = true
46 generic = true
47
47
48 [[items]]
48 [[items]]
49 section = "auth"
49 section = "auth"
50 name = "cookiefile"
50 name = "cookiefile"
51
51
52 # bookmarks.pushing: internal hack for discovery
52 # bookmarks.pushing: internal hack for discovery
53 [[items]]
53 [[items]]
54 section = "bookmarks"
54 section = "bookmarks"
55 name = "pushing"
55 name = "pushing"
56 default-type = "list_type"
56 default-type = "list_type"
57
57
58 # bundle.mainreporoot: internal hack for bundlerepo
58 # bundle.mainreporoot: internal hack for bundlerepo
59 [[items]]
59 [[items]]
60 section = "bundle"
60 section = "bundle"
61 name = "mainreporoot"
61 name = "mainreporoot"
62 default = ""
62 default = ""
63
63
64 [[items]]
64 [[items]]
65 section = "censor"
65 section = "censor"
66 name = "policy"
66 name = "policy"
67 default = "abort"
67 default = "abort"
68 experimental = true
68 experimental = true
69
69
70 [[items]]
70 [[items]]
71 section = "chgserver"
71 section = "chgserver"
72 name = "idletimeout"
72 name = "idletimeout"
73 default = 3600
73 default = 3600
74
74
75 [[items]]
75 [[items]]
76 section = "chgserver"
76 section = "chgserver"
77 name = "skiphash"
77 name = "skiphash"
78 default = false
78 default = false
79
79
80 [[items]]
80 [[items]]
81 section = "cmdserver"
81 section = "cmdserver"
82 name = "log"
82 name = "log"
83
83
84 [[items]]
84 [[items]]
85 section = "cmdserver"
85 section = "cmdserver"
86 name = "max-log-files"
86 name = "max-log-files"
87 default = 7
87 default = 7
88
88
89 [[items]]
89 [[items]]
90 section = "cmdserver"
90 section = "cmdserver"
91 name = "max-log-size"
91 name = "max-log-size"
92 default = "1 MB"
92 default = "1 MB"
93
93
94 [[items]]
94 [[items]]
95 section = "cmdserver"
95 section = "cmdserver"
96 name = "max-repo-cache"
96 name = "max-repo-cache"
97 default = 0
97 default = 0
98 experimental = true
98 experimental = true
99
99
100 [[items]]
100 [[items]]
101 section = "cmdserver"
101 section = "cmdserver"
102 name = "message-encodings"
102 name = "message-encodings"
103 default-type = "list_type"
103 default-type = "list_type"
104
104
105 [[items]]
105 [[items]]
106 section = "cmdserver"
106 section = "cmdserver"
107 name = "shutdown-on-interrupt"
107 name = "shutdown-on-interrupt"
108 default = true
108 default = true
109
109
110 [[items]]
110 [[items]]
111 section = "cmdserver"
111 section = "cmdserver"
112 name = "track-log"
112 name = "track-log"
113 default-type = "lambda"
113 default-type = "lambda"
114 default = [ "chgserver", "cmdserver", "repocache",]
114 default = [ "chgserver", "cmdserver", "repocache",]
115
115
116 [[items]]
116 [[items]]
117 section = "color"
117 section = "color"
118 name = ".*"
118 name = ".*"
119 generic = true
119 generic = true
120
120
121 [[items]]
121 [[items]]
122 section = "color"
122 section = "color"
123 name = "mode"
123 name = "mode"
124 default = "auto"
124 default = "auto"
125
125
126 [[items]]
126 [[items]]
127 section = "color"
127 section = "color"
128 name = "pagermode"
128 name = "pagermode"
129 default-type = "dynamic"
129 default-type = "dynamic"
130
130
131 [[items]]
131 [[items]]
132 section = "command-templates"
132 section = "command-templates"
133 name = "graphnode"
133 name = "graphnode"
134 alias = [["ui", "graphnodetemplate"]]
134 alias = [["ui", "graphnodetemplate"]]
135
135
136 [[items]]
136 [[items]]
137 section = "command-templates"
137 section = "command-templates"
138 name = "log"
138 name = "log"
139 alias = [["ui", "logtemplate"]]
139 alias = [["ui", "logtemplate"]]
140
140
141 [[items]]
141 [[items]]
142 section = "command-templates"
142 section = "command-templates"
143 name = "mergemarker"
143 name = "mergemarker"
144 default = '{node|short} {ifeq(tags, "tip", "", ifeq(tags, "", "", "{tags} "))}{if(bookmarks, "{bookmarks} ")}{ifeq(branch, "default", "", "{branch} ")}- {author|user}: {desc|firstline}'
144 default = '{node|short} {ifeq(tags, "tip", "", ifeq(tags, "", "", "{tags} "))}{if(bookmarks, "{bookmarks} ")}{ifeq(branch, "default", "", "{branch} ")}- {author|user}: {desc|firstline}'
145 alias = [["ui", "mergemarkertemplate"]]
145 alias = [["ui", "mergemarkertemplate"]]
146
146
147 [[items]]
147 [[items]]
148 section = "command-templates"
148 section = "command-templates"
149 name = "oneline-summary"
149 name = "oneline-summary"
150
150
151 [[items]]
151 [[items]]
152 section = "command-templates"
152 section = "command-templates"
153 name = "oneline-summary.*"
153 name = "oneline-summary.*"
154 default-type = "dynamic"
154 default-type = "dynamic"
155 generic = true
155 generic = true
156
156
157 [[items]]
157 [[items]]
158 section = "command-templates"
158 section = "command-templates"
159 name = "pre-merge-tool-output"
159 name = "pre-merge-tool-output"
160 alias = [["ui", "pre-merge-tool-output-template"]]
160 alias = [["ui", "pre-merge-tool-output-template"]]
161
161
162 [[items]]
162 [[items]]
163 section = "commands"
163 section = "commands"
164 name = "commit.post-status"
164 name = "commit.post-status"
165 default = false
165 default = false
166
166
167 [[items]]
167 [[items]]
168 section = "commands"
168 section = "commands"
169 name = "grep.all-files"
169 name = "grep.all-files"
170 default = false
170 default = false
171 experimental = true
171 experimental = true
172
172
173 [[items]]
173 [[items]]
174 section = "commands"
174 section = "commands"
175 name = "merge.require-rev"
175 name = "merge.require-rev"
176 default = false
176 default = false
177
177
178 [[items]]
178 [[items]]
179 section = "commands"
179 section = "commands"
180 name = "push.require-revs"
180 name = "push.require-revs"
181 default = false
181 default = false
182
182
183 # Rebase related configuration moved to core because other extension are doing
183 # Rebase related configuration moved to core because other extension are doing
184 # strange things. For example, shelve import the extensions to reuse some bit
184 # strange things. For example, shelve import the extensions to reuse some bit
185 # without formally loading it.
185 # without formally loading it.
186 [[items]]
186 [[items]]
187 section = "commands"
187 section = "commands"
188 name = "rebase.requiredest"
188 name = "rebase.requiredest"
189 default = false
189 default = false
190
190
191 [[items]]
191 [[items]]
192 section = "commands"
192 section = "commands"
193 name = "resolve.confirm"
193 name = "resolve.confirm"
194 default = false
194 default = false
195
195
196 [[items]]
196 [[items]]
197 section = "commands"
197 section = "commands"
198 name = "resolve.explicit-re-merge"
198 name = "resolve.explicit-re-merge"
199 default = false
199 default = false
200
200
201 [[items]]
201 [[items]]
202 section = "commands"
202 section = "commands"
203 name = "resolve.mark-check"
203 name = "resolve.mark-check"
204 default = "none"
204 default = "none"
205
205
206 [[items]]
206 [[items]]
207 section = "commands"
207 section = "commands"
208 name = "show.aliasprefix"
208 name = "show.aliasprefix"
209 default-type = "list_type"
209 default-type = "list_type"
210
210
211 [[items]]
211 [[items]]
212 section = "commands"
212 section = "commands"
213 name = "status.relative"
213 name = "status.relative"
214 default = false
214 default = false
215
215
216 [[items]]
216 [[items]]
217 section = "commands"
217 section = "commands"
218 name = "status.skipstates"
218 name = "status.skipstates"
219 default = []
219 default = []
220 experimental = true
220 experimental = true
221
221
222 [[items]]
222 [[items]]
223 section = "commands"
223 section = "commands"
224 name = "status.terse"
224 name = "status.terse"
225 default = ""
225 default = ""
226
226
227 [[items]]
227 [[items]]
228 section = "commands"
228 section = "commands"
229 name = "status.verbose"
229 name = "status.verbose"
230 default = false
230 default = false
231
231
232 [[items]]
232 [[items]]
233 section = "commands"
233 section = "commands"
234 name = "update.check"
234 name = "update.check"
235
235
236 [[items]]
236 [[items]]
237 section = "commands"
237 section = "commands"
238 name = "update.requiredest"
238 name = "update.requiredest"
239 default = false
239 default = false
240
240
241 [[items]]
241 [[items]]
242 section = "committemplate"
242 section = "committemplate"
243 name = ".*"
243 name = ".*"
244 generic = true
244 generic = true
245
245
246 [[items]]
246 [[items]]
247 section = "convert"
247 section = "convert"
248 name = "bzr.saverev"
248 name = "bzr.saverev"
249 default = true
249 default = true
250
250
251 [[items]]
251 [[items]]
252 section = "convert"
252 section = "convert"
253 name = "cvsps.cache"
253 name = "cvsps.cache"
254 default = true
254 default = true
255
255
256 [[items]]
256 [[items]]
257 section = "convert"
257 section = "convert"
258 name = "cvsps.fuzz"
258 name = "cvsps.fuzz"
259 default = 60
259 default = 60
260
260
261 [[items]]
261 [[items]]
262 section = "convert"
262 section = "convert"
263 name = "cvsps.logencoding"
263 name = "cvsps.logencoding"
264
264
265 [[items]]
265 [[items]]
266 section = "convert"
266 section = "convert"
267 name = "cvsps.mergefrom"
267 name = "cvsps.mergefrom"
268
268
269 [[items]]
269 [[items]]
270 section = "convert"
270 section = "convert"
271 name = "cvsps.mergeto"
271 name = "cvsps.mergeto"
272
272
273 [[items]]
273 [[items]]
274 section = "convert"
274 section = "convert"
275 name = "git.committeractions"
275 name = "git.committeractions"
276 default-type = "lambda"
276 default-type = "lambda"
277 default = [ "messagedifferent",]
277 default = [ "messagedifferent",]
278
278
279 [[items]]
279 [[items]]
280 section = "convert"
280 section = "convert"
281 name = "git.extrakeys"
281 name = "git.extrakeys"
282 default-type = "list_type"
282 default-type = "list_type"
283
283
284 [[items]]
284 [[items]]
285 section = "convert"
285 section = "convert"
286 name = "git.findcopiesharder"
286 name = "git.findcopiesharder"
287 default = false
287 default = false
288
288
289 [[items]]
289 [[items]]
290 section = "convert"
290 section = "convert"
291 name = "git.remoteprefix"
291 name = "git.remoteprefix"
292 default = "remote"
292 default = "remote"
293
293
294 [[items]]
294 [[items]]
295 section = "convert"
295 section = "convert"
296 name = "git.renamelimit"
296 name = "git.renamelimit"
297 default = 400
297 default = 400
298
298
299 [[items]]
299 [[items]]
300 section = "convert"
300 section = "convert"
301 name = "git.saverev"
301 name = "git.saverev"
302 default = true
302 default = true
303
303
304 [[items]]
304 [[items]]
305 section = "convert"
305 section = "convert"
306 name = "git.similarity"
306 name = "git.similarity"
307 default = 50
307 default = 50
308
308
309 [[items]]
309 [[items]]
310 section = "convert"
310 section = "convert"
311 name = "git.skipsubmodules"
311 name = "git.skipsubmodules"
312 default = false
312 default = false
313
313
314 [[items]]
314 [[items]]
315 section = "convert"
315 section = "convert"
316 name = "hg.clonebranches"
316 name = "hg.clonebranches"
317 default = false
317 default = false
318
318
319 [[items]]
319 [[items]]
320 section = "convert"
320 section = "convert"
321 name = "hg.ignoreerrors"
321 name = "hg.ignoreerrors"
322 default = false
322 default = false
323
323
324 [[items]]
324 [[items]]
325 section = "convert"
325 section = "convert"
326 name = "hg.preserve-hash"
326 name = "hg.preserve-hash"
327 default = false
327 default = false
328
328
329 [[items]]
329 [[items]]
330 section = "convert"
330 section = "convert"
331 name = "hg.revs"
331 name = "hg.revs"
332
332
333 [[items]]
333 [[items]]
334 section = "convert"
334 section = "convert"
335 name = "hg.saverev"
335 name = "hg.saverev"
336 default = false
336 default = false
337
337
338 [[items]]
338 [[items]]
339 section = "convert"
339 section = "convert"
340 name = "hg.sourcename"
340 name = "hg.sourcename"
341
341
342 [[items]]
342 [[items]]
343 section = "convert"
343 section = "convert"
344 name = "hg.startrev"
344 name = "hg.startrev"
345
345
346 [[items]]
346 [[items]]
347 section = "convert"
347 section = "convert"
348 name = "hg.tagsbranch"
348 name = "hg.tagsbranch"
349 default = "default"
349 default = "default"
350
350
351 [[items]]
351 [[items]]
352 section = "convert"
352 section = "convert"
353 name = "hg.usebranchnames"
353 name = "hg.usebranchnames"
354 default = true
354 default = true
355
355
356 [[items]]
356 [[items]]
357 section = "convert"
357 section = "convert"
358 name = "ignoreancestorcheck"
358 name = "ignoreancestorcheck"
359 default = false
359 default = false
360 experimental = true
360 experimental = true
361
361
362 [[items]]
362 [[items]]
363 section = "convert"
363 section = "convert"
364 name = "localtimezone"
364 name = "localtimezone"
365 default = false
365 default = false
366
366
367 [[items]]
367 [[items]]
368 section = "convert"
368 section = "convert"
369 name = "p4.encoding"
369 name = "p4.encoding"
370 default-type = "dynamic"
370 default-type = "dynamic"
371
371
372 [[items]]
372 [[items]]
373 section = "convert"
373 section = "convert"
374 name = "p4.startrev"
374 name = "p4.startrev"
375 default = 0
375 default = 0
376
376
377 [[items]]
377 [[items]]
378 section = "convert"
378 section = "convert"
379 name = "skiptags"
379 name = "skiptags"
380 default = false
380 default = false
381
381
382 [[items]]
382 [[items]]
383 section = "convert"
383 section = "convert"
384 name = "svn.branches"
384 name = "svn.branches"
385
385
386 [[items]]
386 [[items]]
387 section = "convert"
387 section = "convert"
388 name = "svn.dangerous-set-commit-dates"
388 name = "svn.dangerous-set-commit-dates"
389 default = false
389 default = false
390
390
391 [[items]]
391 [[items]]
392 section = "convert"
392 section = "convert"
393 name = "svn.debugsvnlog"
393 name = "svn.debugsvnlog"
394 default = true
394 default = true
395
395
396 [[items]]
396 [[items]]
397 section = "convert"
397 section = "convert"
398 name = "svn.startrev"
398 name = "svn.startrev"
399 default = 0
399 default = 0
400
400
401 [[items]]
401 [[items]]
402 section = "convert"
402 section = "convert"
403 name = "svn.tags"
403 name = "svn.tags"
404
404
405 [[items]]
405 [[items]]
406 section = "convert"
406 section = "convert"
407 name = "svn.trunk"
407 name = "svn.trunk"
408
408
409 [[items]]
409 [[items]]
410 section = "debug"
410 section = "debug"
411 name = "bundling-stats"
411 name = "bundling-stats"
412 default = false
412 default = false
413 documentation = "Display extra information about the bundling process."
413 documentation = "Display extra information about the bundling process."
414
414
415 [[items]]
415 [[items]]
416 section = "debug"
416 section = "debug"
417 name = "dirstate.delaywrite"
417 name = "dirstate.delaywrite"
418 default = 0
418 default = 0
419
419
420 [[items]]
420 [[items]]
421 section = "debug"
421 section = "debug"
422 name = "revlog.debug-delta"
422 name = "revlog.debug-delta"
423 default = false
423 default = false
424
424
425 [[items]]
425 [[items]]
426 section = "debug"
426 section = "debug"
427 name = "revlog.verifyposition.changelog"
427 name = "revlog.verifyposition.changelog"
428 default = ""
428 default = ""
429
429
430 [[items]]
430 [[items]]
431 section = "debug"
431 section = "debug"
432 name = "unbundling-stats"
432 name = "unbundling-stats"
433 default = false
433 default = false
434 documentation = "Display extra information about the unbundling process."
434 documentation = "Display extra information about the unbundling process."
435
435
436 [[items]]
436 [[items]]
437 section = "defaults"
437 section = "defaults"
438 name = ".*"
438 name = ".*"
439 generic = true
439 generic = true
440
440
441 [[items]]
441 [[items]]
442 section = "devel"
442 section = "devel"
443 name = "all-warnings"
443 name = "all-warnings"
444 default = false
444 default = false
445
445
446 [[items]]
446 [[items]]
447 section = "devel"
447 section = "devel"
448 name = "bundle.delta"
448 name = "bundle.delta"
449 default = ""
449 default = ""
450
450
451 [[items]]
451 [[items]]
452 section = "devel"
452 section = "devel"
453 name = "bundle2.debug"
453 name = "bundle2.debug"
454 default = false
454 default = false
455
455
456 [[items]]
456 [[items]]
457 section = "devel"
457 section = "devel"
458 name = "cache-vfs"
458 name = "cache-vfs"
459
459
460 [[items]]
460 [[items]]
461 section = "devel"
461 section = "devel"
462 name = "check-locks"
462 name = "check-locks"
463 default = false
463 default = false
464
464
465 [[items]]
465 [[items]]
466 section = "devel"
466 section = "devel"
467 name = "check-relroot"
467 name = "check-relroot"
468 default = false
468 default = false
469
469
470 [[items]]
470 [[items]]
471 section = "devel"
471 section = "devel"
472 name = "copy-tracing.multi-thread"
472 name = "copy-tracing.multi-thread"
473 default = true
473 default = true
474
474
475 # Track copy information for all files, not just "added" ones (very slow)
475 # Track copy information for all files, not just "added" ones (very slow)
476 [[items]]
476 [[items]]
477 section = "devel"
477 section = "devel"
478 name = "copy-tracing.trace-all-files"
478 name = "copy-tracing.trace-all-files"
479 default = false
479 default = false
480
480
481 [[items]]
481 [[items]]
482 section = "devel"
482 section = "devel"
483 name = "debug.abort-update"
483 name = "debug.abort-update"
484 default = false
484 default = false
485 documentation = """If true, then any merge with the working copy, \
485 documentation = """If true, then any merge with the working copy, \
486 e.g. [hg update], will be aborted after figuring out what needs to be done, \
486 e.g. [hg update], will be aborted after figuring out what needs to be done, \
487 but before spawning the parallel worker."""
487 but before spawning the parallel worker."""
488
488
489 [[items]]
489 [[items]]
490 section = "devel"
490 section = "devel"
491 name = "debug.copies"
491 name = "debug.copies"
492 default = false
492 default = false
493
493
494 [[items]]
494 [[items]]
495 section = "devel"
495 section = "devel"
496 name = "debug.extensions"
496 name = "debug.extensions"
497 default = false
497 default = false
498
498
499 [[items]]
499 [[items]]
500 section = "devel"
500 section = "devel"
501 name = "debug.peer-request"
501 name = "debug.peer-request"
502 default = false
502 default = false
503
503
504 [[items]]
504 [[items]]
505 section = "devel"
505 section = "devel"
506 name = "debug.repo-filters"
506 name = "debug.repo-filters"
507 default = false
507 default = false
508
508
509 [[items]]
509 [[items]]
510 section = "devel"
510 section = "devel"
511 name = "default-date"
511 name = "default-date"
512
512
513 [[items]]
513 [[items]]
514 section = "devel"
514 section = "devel"
515 name = "deprec-warn"
515 name = "deprec-warn"
516 default = false
516 default = false
517
517
518 # possible values:
518 # possible values:
519 # - auto (the default)
519 # - auto (the default)
520 # - force-append
520 # - force-append
521 # - force-new
521 # - force-new
522 [[items]]
522 [[items]]
523 section = "devel"
523 section = "devel"
524 name = "dirstate.v2.data_update_mode"
524 name = "dirstate.v2.data_update_mode"
525 default = "auto"
525 default = "auto"
526
526
527 [[items]]
527 [[items]]
528 section = "devel"
528 section = "devel"
529 name = "disableloaddefaultcerts"
529 name = "disableloaddefaultcerts"
530 default = false
530 default = false
531
531
532 [[items]]
532 [[items]]
533 section = "devel"
533 section = "devel"
534 name = "discovery.exchange-heads"
534 name = "discovery.exchange-heads"
535 default = true
535 default = true
536 documentation = """If false, the discovery will not start with remote \
536 documentation = """If false, the discovery will not start with remote \
537 head fetching and local head querying."""
537 head fetching and local head querying."""
538
538
539 [[items]]
539 [[items]]
540 section = "devel"
540 section = "devel"
541 name = "discovery.grow-sample"
541 name = "discovery.grow-sample"
542 default = true
542 default = true
543 documentation = """If false, the sample size used in set discovery \
543 documentation = """If false, the sample size used in set discovery \
544 will not be increased through the process."""
544 will not be increased through the process."""
545
545
546 [[items]]
546 [[items]]
547 section = "devel"
547 section = "devel"
548 name = "discovery.grow-sample.dynamic"
548 name = "discovery.grow-sample.dynamic"
549 default = true
549 default = true
550 documentation = """If true, the default, the sample size is adapted to the shape \
550 documentation = """If true, the default, the sample size is adapted to the shape \
551 of the undecided set. It is set to the max of:
551 of the undecided set. It is set to the max of:
552 `<target-size>, len(roots(undecided)), len(heads(undecided))`"""
552 `<target-size>, len(roots(undecided)), len(heads(undecided))`"""
553
553
554 [[items]]
554 [[items]]
555 section = "devel"
555 section = "devel"
556 name = "discovery.grow-sample.rate"
556 name = "discovery.grow-sample.rate"
557 default = 1.05
557 default = 1.05
558 documentation = "Controls the rate at which the sample grows."
558 documentation = "Controls the rate at which the sample grows."
559
559
560 [[items]]
560 [[items]]
561 section = "devel"
561 section = "devel"
562 name = "discovery.randomize"
562 name = "discovery.randomize"
563 default = true
563 default = true
564 documentation = """If false, random samplings during discovery are deterministic. \
564 documentation = """If false, random samplings during discovery are deterministic. \
565 It is meant for integration tests."""
565 It is meant for integration tests."""
566
566
567 [[items]]
567 [[items]]
568 section = "devel"
568 section = "devel"
569 name = "discovery.sample-size"
569 name = "discovery.sample-size"
570 default = 200
570 default = 200
571 documentation = "Controls the initial size of the discovery sample."
571 documentation = "Controls the initial size of the discovery sample."
572
572
573 [[items]]
573 [[items]]
574 section = "devel"
574 section = "devel"
575 name = "discovery.sample-size.initial"
575 name = "discovery.sample-size.initial"
576 default = 100
576 default = 100
577 documentation = "Controls the initial size of the discovery for initial change."
577 documentation = "Controls the initial size of the discovery for initial change."
578
578
579 [[items]]
579 [[items]]
580 section = "devel"
580 section = "devel"
581 name = "legacy.exchange"
581 name = "legacy.exchange"
582 default-type = "list_type"
582 default-type = "list_type"
583
583
584 [[items]]
584 [[items]]
585 section = "devel"
585 section = "devel"
586 name = "persistent-nodemap"
586 name = "persistent-nodemap"
587 default = false
587 default = false
588 documentation = """When true, revlogs use a special reference version of the \
588 documentation = """When true, revlogs use a special reference version of the \
589 nodemap, that is not performant but is "known" to behave properly."""
589 nodemap, that is not performant but is "known" to behave properly."""
590
590
591 [[items]]
591 [[items]]
592 section = "devel"
592 section = "devel"
593 name = "server-insecure-exact-protocol"
593 name = "server-insecure-exact-protocol"
594 default = ""
594 default = ""
595
595
596 [[items]]
596 [[items]]
597 section = "devel"
597 section = "devel"
598 name = "servercafile"
598 name = "servercafile"
599 default = ""
599 default = ""
600
600
601 [[items]]
601 [[items]]
602 section = "devel"
602 section = "devel"
603 name = "serverexactprotocol"
603 name = "serverexactprotocol"
604 default = ""
604 default = ""
605
605
606 [[items]]
606 [[items]]
607 section = "devel"
607 section = "devel"
608 name = "serverrequirecert"
608 name = "serverrequirecert"
609 default = false
609 default = false
610
610
611 [[items]]
611 [[items]]
612 section = "devel"
612 section = "devel"
613 name = "strip-obsmarkers"
613 name = "strip-obsmarkers"
614 default = true
614 default = true
615
615
616 [[items]]
616 [[items]]
617 section = 'devel'
617 section = 'devel'
618 name = 'sync.status.pre-dirstate-write-file'
618 name = 'sync.status.pre-dirstate-write-file'
619 documentation = """
619 documentation = """
620 Makes the status algorithm wait for the existence of this file \
620 Makes the status algorithm wait for the existence of this file \
621 (or until a timeout of `devel.sync.status.pre-dirstate-write-file-timeout` \
621 (or until a timeout of `devel.sync.status.pre-dirstate-write-file-timeout` \
622 seconds) before taking the lock and writing the dirstate. \
622 seconds) before taking the lock and writing the dirstate. \
623 Status signals that it's ready to wait by creating a file \
623 Status signals that it's ready to wait by creating a file \
624 with the same name + `.waiting`. \
624 with the same name + `.waiting`. \
625 Useful when testing race conditions."""
625 Useful when testing race conditions."""
626
626
627 [[items]]
627 [[items]]
628 section = 'devel'
628 section = 'devel'
629 name = 'sync.status.pre-dirstate-write-file-timeout'
629 name = 'sync.status.pre-dirstate-write-file-timeout'
630 default=2
630 default=2
631
631
632 [[items]]
632 [[items]]
633 section = 'devel'
633 section = 'devel'
634 name = 'sync.dirstate.post-docket-read-file'
634 name = 'sync.dirstate.post-docket-read-file'
635
635
636 [[items]]
636 [[items]]
637 section = 'devel'
637 section = 'devel'
638 name = 'sync.dirstate.post-docket-read-file-timeout'
638 name = 'sync.dirstate.post-docket-read-file-timeout'
639 default=2
639 default=2
640
640
641 [[items]]
641 [[items]]
642 section = 'devel'
642 section = 'devel'
643 name = 'sync.dirstate.pre-read-file'
643 name = 'sync.dirstate.pre-read-file'
644
644
645 [[items]]
645 [[items]]
646 section = 'devel'
646 section = 'devel'
647 name = 'sync.dirstate.pre-read-file-timeout'
647 name = 'sync.dirstate.pre-read-file-timeout'
648 default=2
648 default=2
649
649
650 [[items]]
650 [[items]]
651 section = "devel"
651 section = "devel"
652 name = "user.obsmarker"
652 name = "user.obsmarker"
653
653
654 [[items]]
654 [[items]]
655 section = "devel"
655 section = "devel"
656 name = "warn-config"
656 name = "warn-config"
657
657
658 [[items]]
658 [[items]]
659 section = "devel"
659 section = "devel"
660 name = "warn-config-default"
660 name = "warn-config-default"
661
661
662 [[items]]
662 [[items]]
663 section = "devel"
663 section = "devel"
664 name = "warn-config-unknown"
664 name = "warn-config-unknown"
665
665
666 [[items]]
666 [[items]]
667 section = "devel"
667 section = "devel"
668 name = "warn-empty-changegroup"
668 name = "warn-empty-changegroup"
669 default = false
669 default = false
670
670
671 [[items]]
671 [[items]]
672 section = "diff"
672 section = "diff"
673 name = "merge"
673 name = "merge"
674 default = false
674 default = false
675 experimental = true
675 experimental = true
676
676
677 [[items]]
677 [[items]]
678 section = "email"
678 section = "email"
679 name = "bcc"
679 name = "bcc"
680
680
681 [[items]]
681 [[items]]
682 section = "email"
682 section = "email"
683 name = "cc"
683 name = "cc"
684
684
685 [[items]]
685 [[items]]
686 section = "email"
686 section = "email"
687 name = "charsets"
687 name = "charsets"
688 default-type = "list_type"
688 default-type = "list_type"
689
689
690 [[items]]
690 [[items]]
691 section = "email"
691 section = "email"
692 name = "from"
692 name = "from"
693
693
694 [[items]]
694 [[items]]
695 section = "email"
695 section = "email"
696 name = "method"
696 name = "method"
697 default = "smtp"
697 default = "smtp"
698
698
699 [[items]]
699 [[items]]
700 section = "email"
700 section = "email"
701 name = "reply-to"
701 name = "reply-to"
702
702
703 [[items]]
703 [[items]]
704 section = "email"
704 section = "email"
705 name = "to"
705 name = "to"
706
706
707 [[items]]
707 [[items]]
708 section = "experimental"
708 section = "experimental"
709 name = "archivemetatemplate"
709 name = "archivemetatemplate"
710 default-type = "dynamic"
710 default-type = "dynamic"
711
711
712 [[items]]
712 [[items]]
713 section = "experimental"
713 section = "experimental"
714 name = "auto-publish"
714 name = "auto-publish"
715 default = "publish"
715 default = "publish"
716
716
717 [[items]]
717 [[items]]
718 section = "experimental"
718 section = "experimental"
719 name = "bundle-phases"
719 name = "bundle-phases"
720 default = false
720 default = false
721
721
722 [[items]]
722 [[items]]
723 section = "experimental"
723 section = "experimental"
724 name = "bundle2-advertise"
724 name = "bundle2-advertise"
725 default = true
725 default = true
726
726
727 [[items]]
727 [[items]]
728 section = "experimental"
728 section = "experimental"
729 name = "bundle2-output-capture"
729 name = "bundle2-output-capture"
730 default = false
730 default = false
731
731
732 [[items]]
732 [[items]]
733 section = "experimental"
733 section = "experimental"
734 name = "bundle2.pushback"
734 name = "bundle2.pushback"
735 default = false
735 default = false
736
736
737 [[items]]
737 [[items]]
738 section = "experimental"
738 section = "experimental"
739 name = "bundle2lazylocking"
739 name = "bundle2lazylocking"
740 default = false
740 default = false
741
741
742 [[items]]
742 [[items]]
743 section = "experimental"
743 section = "experimental"
744 name = "bundlecomplevel"
744 name = "bundlecomplevel"
745
745
746 [[items]]
746 [[items]]
747 section = "experimental"
747 section = "experimental"
748 name = "bundlecomplevel.bzip2"
748 name = "bundlecomplevel.bzip2"
749
749
750 [[items]]
750 [[items]]
751 section = "experimental"
751 section = "experimental"
752 name = "bundlecomplevel.gzip"
752 name = "bundlecomplevel.gzip"
753
753
754 [[items]]
754 [[items]]
755 section = "experimental"
755 section = "experimental"
756 name = "bundlecomplevel.none"
756 name = "bundlecomplevel.none"
757
757
758 [[items]]
758 [[items]]
759 section = "experimental"
759 section = "experimental"
760 name = "bundlecomplevel.zstd"
760 name = "bundlecomplevel.zstd"
761
761
762 [[items]]
762 [[items]]
763 section = "experimental"
763 section = "experimental"
764 name = "bundlecompthreads"
764 name = "bundlecompthreads"
765
765
766 [[items]]
766 [[items]]
767 section = "experimental"
767 section = "experimental"
768 name = "bundlecompthreads.bzip2"
768 name = "bundlecompthreads.bzip2"
769
769
770 [[items]]
770 [[items]]
771 section = "experimental"
771 section = "experimental"
772 name = "bundlecompthreads.gzip"
772 name = "bundlecompthreads.gzip"
773
773
774 [[items]]
774 [[items]]
775 section = "experimental"
775 section = "experimental"
776 name = "bundlecompthreads.none"
776 name = "bundlecompthreads.none"
777
777
778 [[items]]
778 [[items]]
779 section = "experimental"
779 section = "experimental"
780 name = "bundlecompthreads.zstd"
780 name = "bundlecompthreads.zstd"
781
781
782 [[items]]
782 [[items]]
783 section = "experimental"
783 section = "experimental"
784 name = "changegroup3"
784 name = "changegroup3"
785 default = true
785 default = true
786
786
787 [[items]]
787 [[items]]
788 section = "experimental"
788 section = "experimental"
789 name = "changegroup4"
789 name = "changegroup4"
790 default = false
790 default = false
791
791
792 # might remove rank configuration once the computation has no impact
792 # might remove rank configuration once the computation has no impact
793 [[items]]
793 [[items]]
794 section = "experimental"
794 section = "experimental"
795 name = "changelog-v2.compute-rank"
795 name = "changelog-v2.compute-rank"
796 default = true
796 default = true
797
797
798 [[items]]
798 [[items]]
799 section = "experimental"
799 section = "experimental"
800 name = "cleanup-as-archived"
800 name = "cleanup-as-archived"
801 default = false
801 default = false
802
802
803 [[items]]
803 [[items]]
804 section = "experimental"
804 section = "experimental"
805 name = "clientcompressionengines"
805 name = "clientcompressionengines"
806 default-type = "list_type"
806 default-type = "list_type"
807
807
808 [[items]]
808 [[items]]
809 section = "experimental"
809 section = "experimental"
810 name = "copies.read-from"
810 name = "copies.read-from"
811 default = "filelog-only"
811 default = "filelog-only"
812
812
813 [[items]]
813 [[items]]
814 section = "experimental"
814 section = "experimental"
815 name = "copies.write-to"
815 name = "copies.write-to"
816 default = "filelog-only"
816 default = "filelog-only"
817
817
818 [[items]]
818 [[items]]
819 section = "experimental"
819 section = "experimental"
820 name = "copytrace"
820 name = "copytrace"
821 default = "on"
821 default = "on"
822
822
823 [[items]]
823 [[items]]
824 section = "experimental"
824 section = "experimental"
825 name = "copytrace.movecandidateslimit"
825 name = "copytrace.movecandidateslimit"
826 default = 100
826 default = 100
827
827
828 [[items]]
828 [[items]]
829 section = "experimental"
829 section = "experimental"
830 name = "copytrace.sourcecommitlimit"
830 name = "copytrace.sourcecommitlimit"
831 default = 100
831 default = 100
832
832
833 [[items]]
833 [[items]]
834 section = "experimental"
834 section = "experimental"
835 name = "crecordtest"
835 name = "crecordtest"
836
836
837 [[items]]
837 [[items]]
838 section = "experimental"
838 section = "experimental"
839 name = "directaccess"
839 name = "directaccess"
840 default = false
840 default = false
841
841
842 [[items]]
842 [[items]]
843 section = "experimental"
843 section = "experimental"
844 name = "directaccess.revnums"
844 name = "directaccess.revnums"
845 default = false
845 default = false
846
846
847 [[items]]
847 [[items]]
848 section = "experimental"
848 section = "experimental"
849 name = "editortmpinhg"
849 name = "editortmpinhg"
850 default = false
850 default = false
851
851
852 [[items]]
852 [[items]]
853 section = "experimental"
853 section = "experimental"
854 name = "evolution"
854 name = "evolution"
855 default-type = "list_type"
855 default-type = "list_type"
856
856
857 [[items]]
857 [[items]]
858 section = "experimental"
858 section = "experimental"
859 name = "evolution.allowdivergence"
859 name = "evolution.allowdivergence"
860 default = false
860 default = false
861 alias = [["experimental", "allowdivergence"]]
861 alias = [["experimental", "allowdivergence"]]
862
862
863 [[items]]
863 [[items]]
864 section = "experimental"
864 section = "experimental"
865 name = "evolution.allowunstable"
865 name = "evolution.allowunstable"
866
866
867 [[items]]
867 [[items]]
868 section = "experimental"
868 section = "experimental"
869 name = "evolution.bundle-obsmarker"
869 name = "evolution.bundle-obsmarker"
870 default = false
870 default = false
871
871
872 [[items]]
872 [[items]]
873 section = "experimental"
873 section = "experimental"
874 name = "evolution.bundle-obsmarker:mandatory"
874 name = "evolution.bundle-obsmarker:mandatory"
875 default = true
875 default = true
876
876
877 [[items]]
877 [[items]]
878 section = "experimental"
878 section = "experimental"
879 name = "evolution.createmarkers"
879 name = "evolution.createmarkers"
880
880
881 [[items]]
881 [[items]]
882 section = "experimental"
882 section = "experimental"
883 name = "evolution.effect-flags"
883 name = "evolution.effect-flags"
884 default = true
884 default = true
885 alias = [["experimental", "effect-flags"]]
885 alias = [["experimental", "effect-flags"]]
886
886
887 [[items]]
887 [[items]]
888 section = "experimental"
888 section = "experimental"
889 name = "evolution.exchange"
889 name = "evolution.exchange"
890
890
891 [[items]]
891 [[items]]
892 section = "experimental"
892 section = "experimental"
893 name = "evolution.report-instabilities"
893 name = "evolution.report-instabilities"
894 default = true
894 default = true
895
895
896 [[items]]
896 [[items]]
897 section = "experimental"
897 section = "experimental"
898 name = "evolution.track-operation"
898 name = "evolution.track-operation"
899 default = true
899 default = true
900
900
901 [[items]]
901 [[items]]
902 section = "experimental"
902 section = "experimental"
903 name = "exportableenviron"
903 name = "exportableenviron"
904 default-type = "list_type"
904 default-type = "list_type"
905
905
906 [[items]]
906 [[items]]
907 section = "experimental"
907 section = "experimental"
908 name = "extendedheader.index"
908 name = "extendedheader.index"
909
909
910 [[items]]
910 [[items]]
911 section = "experimental"
911 section = "experimental"
912 name = "extendedheader.similarity"
912 name = "extendedheader.similarity"
913 default = false
913 default = false
914
914
915 [[items]]
915 [[items]]
916 section = "experimental"
916 section = "experimental"
917 name = "extra-filter-revs"
917 name = "extra-filter-revs"
918 documentation = """Repo-level config to prevent a revset from being visible.
918 documentation = """Repo-level config to prevent a revset from being visible.
919 The target use case is to use `share` to expose different subsets of the same \
919 The target use case is to use `share` to expose different subsets of the same \
920 repository, especially server side. See also `server.view`."""
920 repository, especially server side. See also `server.view`."""
921
921
922 [[items]]
922 [[items]]
923 section = "experimental"
923 section = "experimental"
924 name = "graphshorten"
924 name = "graphshorten"
925 default = false
925 default = false
926
926
927 [[items]]
927 [[items]]
928 section = "experimental"
928 section = "experimental"
929 name = "graphstyle.grandparent"
929 name = "graphstyle.grandparent"
930 default-type = "dynamic"
930 default-type = "dynamic"
931
931
932 [[items]]
932 [[items]]
933 section = "experimental"
933 section = "experimental"
934 name = "graphstyle.missing"
934 name = "graphstyle.missing"
935 default-type = "dynamic"
935 default-type = "dynamic"
936
936
937 [[items]]
937 [[items]]
938 section = "experimental"
938 section = "experimental"
939 name = "graphstyle.parent"
939 name = "graphstyle.parent"
940 default-type = "dynamic"
940 default-type = "dynamic"
941
941
942 [[items]]
942 [[items]]
943 section = "experimental"
943 section = "experimental"
944 name = "hook-track-tags"
944 name = "hook-track-tags"
945 default = false
945 default = false
946
946
947 [[items]]
947 [[items]]
948 section = "experimental"
948 section = "experimental"
949 name = "httppostargs"
949 name = "httppostargs"
950 default = false
950 default = false
951
951
952 [[items]]
952 [[items]]
953 section = "experimental"
953 section = "experimental"
954 name = "log.topo"
954 name = "log.topo"
955 default = false
955 default = false
956
956
957 [[items]]
957 [[items]]
958 section = "experimental"
958 section = "experimental"
959 name = "maxdeltachainspan"
959 name = "maxdeltachainspan"
960 default = -1
960 default = -1
961
961
962 [[items]]
962 [[items]]
963 section = "experimental"
963 section = "experimental"
964 name = "merge-track-salvaged"
964 name = "merge-track-salvaged"
965 default = false
965 default = false
966 documentation = """Tracks files which were undeleted (merge might delete them \
966 documentation = """Tracks files which were undeleted (merge might delete them \
967 but we explicitly kept/undeleted them) and creates new filenodes for them."""
967 but we explicitly kept/undeleted them) and creates new filenodes for them."""
968
968
969 [[items]]
969 [[items]]
970 section = "experimental"
970 section = "experimental"
971 name = "merge.checkpathconflicts"
971 name = "merge.checkpathconflicts"
972 default = false
972 default = false
973
973
974 [[items]]
974 [[items]]
975 section = "experimental"
975 section = "experimental"
976 name = "mmapindexthreshold"
976 name = "mmapindexthreshold"
977
977
978 [[items]]
978 [[items]]
979 section = "experimental"
979 section = "experimental"
980 name = "narrow"
980 name = "narrow"
981 default = false
981 default = false
982
982
983 [[items]]
983 [[items]]
984 section = "experimental"
984 section = "experimental"
985 name = "nointerrupt"
985 name = "nointerrupt"
986 default = false
986 default = false
987
987
988 [[items]]
988 [[items]]
989 section = "experimental"
989 section = "experimental"
990 name = "nointerrupt-interactiveonly"
990 name = "nointerrupt-interactiveonly"
991 default = true
991 default = true
992
992
993 [[items]]
993 [[items]]
994 section = "experimental"
994 section = "experimental"
995 name = "nonnormalparanoidcheck"
995 name = "nonnormalparanoidcheck"
996 default = false
996 default = false
997
997
998 [[items]]
998 [[items]]
999 section = "experimental"
999 section = "experimental"
1000 name = "obsmarkers-exchange-debug"
1000 name = "obsmarkers-exchange-debug"
1001 default = false
1001 default = false
1002
1002
1003 [[items]]
1003 [[items]]
1004 section = "experimental"
1004 section = "experimental"
1005 name = "rebaseskipobsolete"
1005 name = "rebaseskipobsolete"
1006 default = true
1006 default = true
1007
1007
1008 [[items]]
1008 [[items]]
1009 section = "experimental"
1009 section = "experimental"
1010 name = "remotenames"
1010 name = "remotenames"
1011 default = false
1011 default = false
1012
1012
1013 [[items]]
1013 [[items]]
1014 section = "experimental"
1014 section = "experimental"
1015 name = "removeemptydirs"
1015 name = "removeemptydirs"
1016 default = true
1016 default = true
1017
1017
1018 [[items]]
1018 [[items]]
1019 section = "experimental"
1019 section = "experimental"
1020 name = "revert.interactive.select-to-keep"
1020 name = "revert.interactive.select-to-keep"
1021 default = false
1021 default = false
1022
1022
1023 [[items]]
1023 [[items]]
1024 section = "experimental"
1024 section = "experimental"
1025 name = "revisions.disambiguatewithin"
1025 name = "revisions.disambiguatewithin"
1026
1026
1027 [[items]]
1027 [[items]]
1028 section = "experimental"
1028 section = "experimental"
1029 name = "revisions.prefixhexnode"
1029 name = "revisions.prefixhexnode"
1030 default = false
1030 default = false
1031
1031
1032 # "out of experimental" todo list.
1032 # "out of experimental" todo list.
1033 #
1033 #
1034 # * include management of a persistent nodemap in the main docket
1034 # * include management of a persistent nodemap in the main docket
1035 # * enforce a "no-truncate" policy for mmap safety
1035 # * enforce a "no-truncate" policy for mmap safety
1036 # - for censoring operation
1036 # - for censoring operation
1037 # - for stripping operation
1037 # - for stripping operation
1038 # - for rollback operation
1038 # - for rollback operation
1039 # * proper streaming (race free) of the docket file
1039 # * proper streaming (race free) of the docket file
1040 # * track garbage data to evemtually allow rewriting -existing- sidedata.
1040 # * track garbage data to evemtually allow rewriting -existing- sidedata.
1041 # * Exchange-wise, we will also need to do something more efficient than
1041 # * Exchange-wise, we will also need to do something more efficient than
1042 # keeping references to the affected revlogs, especially memory-wise when
1042 # keeping references to the affected revlogs, especially memory-wise when
1043 # rewriting sidedata.
1043 # rewriting sidedata.
1044 # * introduce a proper solution to reduce the number of filelog related files.
1044 # * introduce a proper solution to reduce the number of filelog related files.
1045 # * use caching for reading sidedata (similar to what we do for data).
1045 # * use caching for reading sidedata (similar to what we do for data).
1046 # * no longer set offset=0 if sidedata_size=0 (simplify cutoff computation).
1046 # * no longer set offset=0 if sidedata_size=0 (simplify cutoff computation).
1047 # * Improvement to consider
1047 # * Improvement to consider
1048 # - avoid compression header in chunk using the default compression?
1048 # - avoid compression header in chunk using the default compression?
1049 # - forbid "inline" compression mode entirely?
1049 # - forbid "inline" compression mode entirely?
1050 # - split the data offset and flag field (the 2 bytes save are mostly trouble)
1050 # - split the data offset and flag field (the 2 bytes save are mostly trouble)
1051 # - keep track of uncompressed -chunk- size (to preallocate memory better)
1051 # - keep track of uncompressed -chunk- size (to preallocate memory better)
1052 # - keep track of chain base or size (probably not that useful anymore)
1052 # - keep track of chain base or size (probably not that useful anymore)
1053 [[items]]
1053 [[items]]
1054 section = "experimental"
1054 section = "experimental"
1055 name = "revlogv2"
1055 name = "revlogv2"
1056
1056
1057 [[items]]
1057 [[items]]
1058 section = "experimental"
1058 section = "experimental"
1059 name = "rust.index"
1059 name = "rust.index"
1060 default = false
1060 default = false
1061
1061
1062 [[items]]
1062 [[items]]
1063 section = "experimental"
1063 section = "experimental"
1064 name = "server.allow-hidden-access"
1064 name = "server.allow-hidden-access"
1065 default-type = "list_type"
1065 default-type = "list_type"
1066
1066
1067 [[items]]
1067 [[items]]
1068 section = "experimental"
1068 section = "experimental"
1069 name = "server.filesdata.recommended-batch-size"
1069 name = "server.filesdata.recommended-batch-size"
1070 default = 50000
1070 default = 50000
1071
1071
1072 [[items]]
1072 [[items]]
1073 section = "experimental"
1073 section = "experimental"
1074 name = "server.manifestdata.recommended-batch-size"
1074 name = "server.manifestdata.recommended-batch-size"
1075 default = 100000
1075 default = 100000
1076
1076
1077 [[items]]
1077 [[items]]
1078 section = "experimental"
1078 section = "experimental"
1079 name = "server.stream-narrow-clones"
1079 name = "server.stream-narrow-clones"
1080 default = false
1080 default = false
1081
1081
1082 [[items]]
1082 [[items]]
1083 section = "experimental"
1083 section = "experimental"
1084 name = "single-head-per-branch"
1084 name = "single-head-per-branch"
1085 default = false
1085 default = false
1086
1086
1087 [[items]]
1087 [[items]]
1088 section = "experimental"
1088 section = "experimental"
1089 name = "single-head-per-branch:account-closed-heads"
1089 name = "single-head-per-branch:account-closed-heads"
1090 default = false
1090 default = false
1091
1091
1092 [[items]]
1092 [[items]]
1093 section = "experimental"
1093 section = "experimental"
1094 name = "single-head-per-branch:public-changes-only"
1094 name = "single-head-per-branch:public-changes-only"
1095 default = false
1095 default = false
1096
1096
1097 [[items]]
1097 [[items]]
1098 section = "experimental"
1098 section = "experimental"
1099 name = "sparse-read"
1099 name = "sparse-read"
1100 default = false
1100 default = false
1101
1101
1102 [[items]]
1102 [[items]]
1103 section = "experimental"
1103 section = "experimental"
1104 name = "sparse-read.density-threshold"
1104 name = "sparse-read.density-threshold"
1105 default = 0.5
1105 default = 0.5
1106
1106
1107 [[items]]
1107 [[items]]
1108 section = "experimental"
1108 section = "experimental"
1109 name = "sparse-read.min-gap-size"
1109 name = "sparse-read.min-gap-size"
1110 default = "65K"
1110 default = "65K"
1111
1111
1112 [[items]]
1112 [[items]]
1113 section = "experimental"
1113 section = "experimental"
1114 name = "stream-v3"
1114 name = "stream-v3"
1115 default = false
1115 default = false
1116
1116
1117 [[items]]
1117 [[items]]
1118 section = "experimental"
1118 section = "experimental"
1119 name = "treemanifest"
1119 name = "treemanifest"
1120 default = false
1120 default = false
1121
1121
1122 [[items]]
1122 [[items]]
1123 section = "experimental"
1123 section = "experimental"
1124 name = "update.atomic-file"
1124 name = "update.atomic-file"
1125 default = false
1125 default = false
1126
1126
1127 [[items]]
1127 [[items]]
1128 section = "experimental"
1128 section = "experimental"
1129 name = "web.full-garbage-collection-rate"
1129 name = "web.full-garbage-collection-rate"
1130 default = 1 # still forcing a full collection on each request
1130 default = 1 # still forcing a full collection on each request
1131
1131
1132 [[items]]
1132 [[items]]
1133 section = "experimental"
1133 section = "experimental"
1134 name = "worker.repository-upgrade"
1134 name = "worker.repository-upgrade"
1135 default = false
1135 default = false
1136
1136
1137 [[items]]
1137 [[items]]
1138 section = "experimental"
1138 section = "experimental"
1139 name = "worker.wdir-get-thread-safe"
1139 name = "worker.wdir-get-thread-safe"
1140 default = false
1140 default = false
1141
1141
1142 [[items]]
1142 [[items]]
1143 section = "experimental"
1143 section = "experimental"
1144 name = "xdiff"
1144 name = "xdiff"
1145 default = false
1145 default = false
1146
1146
1147 [[items]]
1147 [[items]]
1148 section = "extdata"
1148 section = "extdata"
1149 name = ".*"
1149 name = ".*"
1150 generic = true
1150 generic = true
1151
1151
1152 [[items]]
1152 [[items]]
1153 section = "extensions"
1153 section = "extensions"
1154 name = "[^:]*"
1154 name = "[^:]*"
1155 generic = true
1155 generic = true
1156
1156
1157 [[items]]
1157 [[items]]
1158 section = "extensions"
1158 section = "extensions"
1159 name = "[^:]*:required"
1159 name = "[^:]*:required"
1160 default = false
1160 default = false
1161 generic = true
1161 generic = true
1162
1162
1163 [[items]]
1163 [[items]]
1164 section = "format"
1164 section = "format"
1165 name = "bookmarks-in-store"
1165 name = "bookmarks-in-store"
1166 default = false
1166 default = false
1167
1167
1168 [[items]]
1168 [[items]]
1169 section = "format"
1169 section = "format"
1170 name = "chunkcachesize"
1170 name = "chunkcachesize"
1171 experimental = true
1171 experimental = true
1172
1172
1173 [[items]]
1173 [[items]]
1174 section = "format"
1174 section = "format"
1175 name = "dotencode"
1175 name = "dotencode"
1176 default = true
1176 default = true
1177
1177
1178 # The interaction between the archived phase and obsolescence markers needs to
1178 # The interaction between the archived phase and obsolescence markers needs to
1179 # be sorted out before wider usage of this are to be considered.
1179 # be sorted out before wider usage of this are to be considered.
1180 #
1180 #
1181 # At the time this message is written, behavior when archiving obsolete
1181 # At the time this message is written, behavior when archiving obsolete
1182 # changeset differ significantly from stripping. As part of stripping, we also
1182 # changeset differ significantly from stripping. As part of stripping, we also
1183 # remove the obsolescence marker associated to the stripped changesets,
1183 # remove the obsolescence marker associated to the stripped changesets,
1184 # revealing the precedecessors changesets when applicable. When archiving, we
1184 # revealing the precedecessors changesets when applicable. When archiving, we
1185 # don't touch the obsolescence markers, keeping everything hidden. This can
1185 # don't touch the obsolescence markers, keeping everything hidden. This can
1186 # result in quite confusing situation for people combining exchanging draft
1186 # result in quite confusing situation for people combining exchanging draft
1187 # with the archived phases. As some markers needed by others may be skipped
1187 # with the archived phases. As some markers needed by others may be skipped
1188 # during exchange.
1188 # during exchange.
1189 [[items]]
1189 [[items]]
1190 section = "format"
1190 section = "format"
1191 name = "exp-archived-phase"
1191 name = "exp-archived-phase"
1192 default = false
1192 default = false
1193 experimental = true
1193 experimental = true
1194
1194
1195 # Experimental TODOs:
1195 # Experimental TODOs:
1196 #
1196 #
1197 # * Same as for revlogv2 (but for the reduction of the number of files)
1197 # * Same as for revlogv2 (but for the reduction of the number of files)
1198 # * Actually computing the rank of changesets
1198 # * Actually computing the rank of changesets
1199 # * Improvement to investigate
1199 # * Improvement to investigate
1200 # - storing .hgtags fnode
1200 # - storing .hgtags fnode
1201 # - storing branch related identifier
1201 # - storing branch related identifier
1202 [[items]]
1202 [[items]]
1203 section = "format"
1203 section = "format"
1204 name = "exp-use-changelog-v2"
1204 name = "exp-use-changelog-v2"
1205 experimental = true
1205 experimental = true
1206
1206
1207 [[items]]
1207 [[items]]
1208 section = "format"
1208 section = "format"
1209 name = "exp-use-copies-side-data-changeset"
1209 name = "exp-use-copies-side-data-changeset"
1210 default = false
1210 default = false
1211 experimental = true
1211 experimental = true
1212
1212
1213 [[items]]
1213 [[items]]
1214 section = "format"
1214 section = "format"
1215 name = "generaldelta"
1215 name = "generaldelta"
1216 default = false
1216 default = false
1217 experimental = true
1217 experimental = true
1218
1218
1219 [[items]]
1219 [[items]]
1220 section = "format"
1220 section = "format"
1221 name = "manifestcachesize"
1221 name = "manifestcachesize"
1222 experimental = true
1222 experimental = true
1223
1223
1224 [[items]]
1224 [[items]]
1225 section = "format"
1225 section = "format"
1226 name = "maxchainlen"
1226 name = "maxchainlen"
1227 default-type = "dynamic"
1227 default-type = "dynamic"
1228 experimental = true
1228 experimental = true
1229
1229
1230 [[items]]
1230 [[items]]
1231 section = "format"
1231 section = "format"
1232 name = "obsstore-version"
1232 name = "obsstore-version"
1233
1233
1234 [[items]]
1234 [[items]]
1235 section = "format"
1235 section = "format"
1236 name = "revlog-compression"
1236 name = "revlog-compression"
1237 default-type = "lambda"
1237 default-type = "lambda"
1238 alias = [["experimental", "format.compression"]]
1238 alias = [["experimental", "format.compression"]]
1239 default = [ "zstd", "zlib",]
1239 default = [ "zstd", "zlib",]
1240
1240
1241 [[items]]
1241 [[items]]
1242 section = "format"
1242 section = "format"
1243 name = "sparse-revlog"
1243 name = "sparse-revlog"
1244 default = true
1244 default = true
1245
1245
1246 [[items]]
1246 [[items]]
1247 section = "format"
1247 section = "format"
1248 name = "use-dirstate-tracked-hint"
1248 name = "use-dirstate-tracked-hint"
1249 default = false
1249 default = false
1250 experimental = true
1250 experimental = true
1251
1251
1252 [[items]]
1252 [[items]]
1253 section = "format"
1253 section = "format"
1254 name = "use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories"
1254 name = "use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories"
1255 default = false
1255 default = false
1256 experimental = true
1256 experimental = true
1257
1257
1258 [[items]]
1258 [[items]]
1259 section = "format"
1259 section = "format"
1260 name = "use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet"
1260 name = "use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet"
1261 default = false
1261 default = false
1262 experimental = true
1262 experimental = true
1263
1263
1264 [[items]]
1264 [[items]]
1265 section = "format"
1265 section = "format"
1266 name = "use-dirstate-tracked-hint.version"
1266 name = "use-dirstate-tracked-hint.version"
1267 default = 1
1267 default = 1
1268 experimental = true
1268 experimental = true
1269
1269
1270 [[items]]
1270 [[items]]
1271 section = "format"
1271 section = "format"
1272 name = "use-dirstate-v2"
1272 name = "use-dirstate-v2"
1273 default = false
1273 default = false
1274 alias = [["format", "exp-rc-dirstate-v2"]]
1274 alias = [["format", "exp-rc-dirstate-v2"]]
1275 experimental = true
1275 experimental = true
1276 documentation = """Enables dirstate-v2 format *when creating a new repository*.
1276 documentation = """Enables dirstate-v2 format *when creating a new repository*.
1277 Which format to use for existing repos is controlled by `.hg/requires`."""
1277 Which format to use for existing repos is controlled by `.hg/requires`."""
1278
1278
1279 [[items]]
1279 [[items]]
1280 section = "format"
1280 section = "format"
1281 name = "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories"
1281 name = "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories"
1282 default = false
1282 default = false
1283 experimental = true
1283 experimental = true
1284
1284
1285 [[items]]
1285 [[items]]
1286 section = "format"
1286 section = "format"
1287 name = "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet"
1287 name = "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet"
1288 default = false
1288 default = false
1289 experimental = true
1289 experimental = true
1290
1290
1291 # Having this on by default means we are confident about the scaling of phases.
1291 # Having this on by default means we are confident about the scaling of phases.
1292 # This is not garanteed to be the case at the time this message is written.
1292 # This is not garanteed to be the case at the time this message is written.
1293 [[items]]
1293 [[items]]
1294 section = "format"
1294 section = "format"
1295 name = "use-internal-phase"
1295 name = "use-internal-phase"
1296 default = false
1296 default = false
1297 experimental = true
1297 experimental = true
1298
1298
1299 [[items]]
1299 [[items]]
1300 section = "format"
1300 section = "format"
1301 name = "use-persistent-nodemap"
1301 name = "use-persistent-nodemap"
1302 default-type = "dynamic"
1302 default-type = "dynamic"
1303
1303
1304 [[items]]
1304 [[items]]
1305 section = "format"
1305 section = "format"
1306 name = "use-share-safe"
1306 name = "use-share-safe"
1307 default = true
1307 default = true
1308
1308
1309 [[items]]
1309 [[items]]
1310 section = "format"
1310 section = "format"
1311 name = "use-share-safe.automatic-upgrade-of-mismatching-repositories"
1311 name = "use-share-safe.automatic-upgrade-of-mismatching-repositories"
1312 default = false
1312 default = false
1313 experimental = true
1313 experimental = true
1314
1314
1315 [[items]]
1315 [[items]]
1316 section = "format"
1316 section = "format"
1317 name = "use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet"
1317 name = "use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet"
1318 default = false
1318 default = false
1319 experimental = true
1319 experimental = true
1320
1320
1321 [[items]]
1321 [[items]]
1322 section = "format"
1322 section = "format"
1323 name = "usefncache"
1323 name = "usefncache"
1324 default = true
1324 default = true
1325
1325
1326 [[items]]
1326 [[items]]
1327 section = "format"
1327 section = "format"
1328 name = "usegeneraldelta"
1328 name = "usegeneraldelta"
1329 default = true
1329 default = true
1330
1330
1331 [[items]]
1331 [[items]]
1332 section = "format"
1332 section = "format"
1333 name = "usestore"
1333 name = "usestore"
1334 default = true
1334 default = true
1335
1335
1336 [[items]]
1336 [[items]]
1337 section = "fsmonitor"
1337 section = "fsmonitor"
1338 name = "warn_update_file_count"
1338 name = "warn_update_file_count"
1339 default = 50000
1339 default = 50000
1340
1340
1341 [[items]]
1341 [[items]]
1342 section = "fsmonitor"
1342 section = "fsmonitor"
1343 name = "warn_update_file_count_rust"
1343 name = "warn_update_file_count_rust"
1344 default = 400000
1344 default = 400000
1345
1345
1346 [[items]]
1346 [[items]]
1347 section = "fsmonitor"
1347 section = "fsmonitor"
1348 name = "warn_when_unused"
1348 name = "warn_when_unused"
1349 default = true
1349 default = true
1350
1350
1351 [[items]]
1351 [[items]]
1352 section = "help"
1352 section = "help"
1353 name = 'hidden-command\..*'
1353 name = 'hidden-command\..*'
1354 default = false
1354 default = false
1355 generic = true
1355 generic = true
1356
1356
1357 [[items]]
1357 [[items]]
1358 section = "help"
1358 section = "help"
1359 name = 'hidden-topic\..*'
1359 name = 'hidden-topic\..*'
1360 default = false
1360 default = false
1361 generic = true
1361 generic = true
1362
1362
1363 [[items]]
1363 [[items]]
1364 section = "hgweb-paths"
1364 section = "hgweb-paths"
1365 name = ".*"
1365 name = ".*"
1366 default-type = "list_type"
1366 default-type = "list_type"
1367 generic = true
1367 generic = true
1368
1368
1369 [[items]]
1369 [[items]]
1370 section = "hooks"
1370 section = "hooks"
1371 name = ".*:run-with-plain"
1371 name = ".*:run-with-plain"
1372 default = true
1372 default = true
1373 generic = true
1373 generic = true
1374
1374
1375 [[items]]
1375 [[items]]
1376 section = "hooks"
1376 section = "hooks"
1377 name = "[^:]*"
1377 name = "[^:]*"
1378 default-type = "dynamic"
1378 default-type = "dynamic"
1379 generic = true
1379 generic = true
1380
1380
1381 [[items]]
1381 [[items]]
1382 section = "hostfingerprints"
1382 section = "hostfingerprints"
1383 name = ".*"
1383 name = ".*"
1384 default-type = "list_type"
1384 default-type = "list_type"
1385 generic = true
1385 generic = true
1386
1386
1387 [[items]]
1387 [[items]]
1388 section = "hostsecurity"
1388 section = "hostsecurity"
1389 name = ".*:ciphers$"
1389 name = ".*:ciphers$"
1390 default-type = "dynamic"
1390 default-type = "dynamic"
1391 generic = true
1391 generic = true
1392
1392
1393 [[items]]
1393 [[items]]
1394 section = "hostsecurity"
1394 section = "hostsecurity"
1395 name = ".*:fingerprints$"
1395 name = ".*:fingerprints$"
1396 default-type = "list_type"
1396 default-type = "list_type"
1397 generic = true
1397 generic = true
1398
1398
1399 [[items]]
1399 [[items]]
1400 section = "hostsecurity"
1400 section = "hostsecurity"
1401 name = ".*:minimumprotocol$"
1401 name = ".*:minimumprotocol$"
1402 default-type = "dynamic"
1402 default-type = "dynamic"
1403 generic = true
1403 generic = true
1404
1404
1405 [[items]]
1405 [[items]]
1406 section = "hostsecurity"
1406 section = "hostsecurity"
1407 name = ".*:verifycertsfile$"
1407 name = ".*:verifycertsfile$"
1408 generic = true
1408 generic = true
1409
1409
1410 [[items]]
1410 [[items]]
1411 section = "hostsecurity"
1411 section = "hostsecurity"
1412 name = "ciphers"
1412 name = "ciphers"
1413
1413
1414 [[items]]
1414 [[items]]
1415 section = "hostsecurity"
1415 section = "hostsecurity"
1416 name = "minimumprotocol"
1416 name = "minimumprotocol"
1417 default-type = "dynamic"
1417 default-type = "dynamic"
1418
1418
1419 [[items]]
1419 [[items]]
1420 section = "http"
1420 section = "http"
1421 name = "timeout"
1421 name = "timeout"
1422
1422
1423 [[items]]
1423 [[items]]
1424 section = "http_proxy"
1424 section = "http_proxy"
1425 name = "always"
1425 name = "always"
1426 default = false
1426 default = false
1427
1427
1428 [[items]]
1428 [[items]]
1429 section = "http_proxy"
1429 section = "http_proxy"
1430 name = "host"
1430 name = "host"
1431
1431
1432 [[items]]
1432 [[items]]
1433 section = "http_proxy"
1433 section = "http_proxy"
1434 name = "no"
1434 name = "no"
1435 default-type = "list_type"
1435 default-type = "list_type"
1436
1436
1437 [[items]]
1437 [[items]]
1438 section = "http_proxy"
1438 section = "http_proxy"
1439 name = "passwd"
1439 name = "passwd"
1440
1440
1441 [[items]]
1441 [[items]]
1442 section = "http_proxy"
1442 section = "http_proxy"
1443 name = "user"
1443 name = "user"
1444
1444
1445 [[items]]
1445 [[items]]
1446 section = "logtoprocess"
1446 section = "logtoprocess"
1447 name = "command"
1447 name = "command"
1448
1448
1449 [[items]]
1449 [[items]]
1450 section = "logtoprocess"
1450 section = "logtoprocess"
1451 name = "commandexception"
1451 name = "commandexception"
1452
1452
1453 [[items]]
1453 [[items]]
1454 section = "logtoprocess"
1454 section = "logtoprocess"
1455 name = "commandfinish"
1455 name = "commandfinish"
1456
1456
1457 [[items]]
1457 [[items]]
1458 section = "logtoprocess"
1458 section = "logtoprocess"
1459 name = "develwarn"
1459 name = "develwarn"
1460
1460
1461 [[items]]
1461 [[items]]
1462 section = "logtoprocess"
1462 section = "logtoprocess"
1463 name = "uiblocked"
1463 name = "uiblocked"
1464
1464
1465 [[items]]
1465 [[items]]
1466 section = "merge"
1466 section = "merge"
1467 name = "checkignored"
1467 name = "checkignored"
1468 default = "abort"
1468 default = "abort"
1469
1469
1470 [[items]]
1470 [[items]]
1471 section = "merge"
1471 section = "merge"
1472 name = "checkunknown"
1472 name = "checkunknown"
1473 default = "abort"
1473 default = "abort"
1474
1474
1475 [[items]]
1475 [[items]]
1476 section = "merge"
1476 section = "merge"
1477 name = "disable-partial-tools"
1477 name = "disable-partial-tools"
1478 default = false
1478 default = false
1479 experimental = true
1479 experimental = true
1480
1480
1481 [[items]]
1481 [[items]]
1482 section = "merge"
1482 section = "merge"
1483 name = "followcopies"
1483 name = "followcopies"
1484 default = true
1484 default = true
1485
1485
1486 [[items]]
1486 [[items]]
1487 section = "merge"
1487 section = "merge"
1488 name = "on-failure"
1488 name = "on-failure"
1489 default = "continue"
1489 default = "continue"
1490
1490
1491 [[items]]
1491 [[items]]
1492 section = "merge"
1492 section = "merge"
1493 name = "preferancestor"
1493 name = "preferancestor"
1494 default-type = "lambda"
1494 default-type = "lambda"
1495 default = ["*"]
1495 default = ["*"]
1496 experimental = true
1496 experimental = true
1497
1497
1498 [[items]]
1498 [[items]]
1499 section = "merge"
1499 section = "merge"
1500 name = "strict-capability-check"
1500 name = "strict-capability-check"
1501 default = false
1501 default = false
1502
1502
1503 [[items]]
1503 [[items]]
1504 section = "merge-tools"
1504 section = "merge-tools"
1505 name = ".*"
1505 name = ".*"
1506 generic = true
1506 generic = true
1507
1507
1508 [[items]]
1508 [[items]]
1509 section = "merge-tools"
1509 section = "merge-tools"
1510 name = '.*\.args$'
1510 name = '.*\.args$'
1511 default = "$local $base $other"
1511 default = "$local $base $other"
1512 generic = true
1512 generic = true
1513 priority = -1
1513 priority = -1
1514
1514
1515 [[items]]
1515 [[items]]
1516 section = "merge-tools"
1516 section = "merge-tools"
1517 name = '.*\.binary$'
1517 name = '.*\.binary$'
1518 default = false
1518 default = false
1519 generic = true
1519 generic = true
1520 priority = -1
1520 priority = -1
1521
1521
1522 [[items]]
1522 [[items]]
1523 section = "merge-tools"
1523 section = "merge-tools"
1524 name = '.*\.check$'
1524 name = '.*\.check$'
1525 default-type = "list_type"
1525 default-type = "list_type"
1526 generic = true
1526 generic = true
1527 priority = -1
1527 priority = -1
1528
1528
1529 [[items]]
1529 [[items]]
1530 section = "merge-tools"
1530 section = "merge-tools"
1531 name = '.*\.checkchanged$'
1531 name = '.*\.checkchanged$'
1532 default = false
1532 default = false
1533 generic = true
1533 generic = true
1534 priority = -1
1534 priority = -1
1535
1535
1536 [[items]]
1536 [[items]]
1537 section = "merge-tools"
1537 section = "merge-tools"
1538 name = '.*\.executable$'
1538 name = '.*\.executable$'
1539 default-type = "dynamic"
1539 default-type = "dynamic"
1540 generic = true
1540 generic = true
1541 priority = -1
1541 priority = -1
1542
1542
1543 [[items]]
1543 [[items]]
1544 section = "merge-tools"
1544 section = "merge-tools"
1545 name = '.*\.fixeol$'
1545 name = '.*\.fixeol$'
1546 default = false
1546 default = false
1547 generic = true
1547 generic = true
1548 priority = -1
1548 priority = -1
1549
1549
1550 [[items]]
1550 [[items]]
1551 section = "merge-tools"
1551 section = "merge-tools"
1552 name = '.*\.gui$'
1552 name = '.*\.gui$'
1553 default = false
1553 default = false
1554 generic = true
1554 generic = true
1555 priority = -1
1555 priority = -1
1556
1556
1557 [[items]]
1557 [[items]]
1558 section = "merge-tools"
1558 section = "merge-tools"
1559 name = '.*\.mergemarkers$'
1559 name = '.*\.mergemarkers$'
1560 default = "basic"
1560 default = "basic"
1561 generic = true
1561 generic = true
1562 priority = -1
1562 priority = -1
1563
1563
1564 [[items]]
1564 [[items]]
1565 section = "merge-tools"
1565 section = "merge-tools"
1566 name = '.*\.mergemarkertemplate$' # take from command-templates.mergemarker
1566 name = '.*\.mergemarkertemplate$' # take from command-templates.mergemarker
1567 default-type = "dynamic"
1567 default-type = "dynamic"
1568 generic = true
1568 generic = true
1569 priority = -1
1569 priority = -1
1570
1570
1571 [[items]]
1571 [[items]]
1572 section = "merge-tools"
1572 section = "merge-tools"
1573 name = '.*\.premerge$'
1573 name = '.*\.premerge$'
1574 default-type = "dynamic"
1574 default-type = "dynamic"
1575 generic = true
1575 generic = true
1576 priority = -1
1576 priority = -1
1577
1577
1578 [[items]]
1578 [[items]]
1579 section = "merge-tools"
1579 section = "merge-tools"
1580 name = '.*\.priority$'
1580 name = '.*\.priority$'
1581 default = 0
1581 default = 0
1582 generic = true
1582 generic = true
1583 priority = -1
1583 priority = -1
1584
1584
1585 [[items]]
1585 [[items]]
1586 section = "merge-tools"
1586 section = "merge-tools"
1587 name = '.*\.regappend$'
1587 name = '.*\.regappend$'
1588 default = ""
1588 default = ""
1589 generic = true
1589 generic = true
1590 priority = -1
1590 priority = -1
1591
1591
1592 [[items]]
1592 [[items]]
1593 section = "merge-tools"
1593 section = "merge-tools"
1594 name = '.*\.symlink$'
1594 name = '.*\.symlink$'
1595 default = false
1595 default = false
1596 generic = true
1596 generic = true
1597 priority = -1
1597 priority = -1
1598
1598
1599 [[items]]
1599 [[items]]
1600 section = "pager"
1600 section = "pager"
1601 name = "attend-.*"
1601 name = "attend-.*"
1602 default-type = "dynamic"
1602 default-type = "dynamic"
1603 generic = true
1603 generic = true
1604
1604
1605 [[items]]
1605 [[items]]
1606 section = "pager"
1606 section = "pager"
1607 name = "ignore"
1607 name = "ignore"
1608 default-type = "list_type"
1608 default-type = "list_type"
1609
1609
1610 [[items]]
1610 [[items]]
1611 section = "pager"
1611 section = "pager"
1612 name = "pager"
1612 name = "pager"
1613 default-type = "dynamic"
1613 default-type = "dynamic"
1614
1614
1615 [[items]]
1615 [[items]]
1616 section = "partial-merge-tools"
1616 section = "partial-merge-tools"
1617 name = ".*"
1617 name = ".*"
1618 generic = true
1618 generic = true
1619 experimental = true
1619 experimental = true
1620
1620
1621 [[items]]
1621 [[items]]
1622 section = "partial-merge-tools"
1622 section = "partial-merge-tools"
1623 name = '.*\.args'
1623 name = '.*\.args'
1624 default = "$local $base $other"
1624 default = "$local $base $other"
1625 generic = true
1625 generic = true
1626 priority = -1
1626 priority = -1
1627 experimental = true
1627 experimental = true
1628
1628
1629 [[items]]
1629 [[items]]
1630 section = "partial-merge-tools"
1630 section = "partial-merge-tools"
1631 name = '.*\.disable'
1631 name = '.*\.disable'
1632 default = false
1632 default = false
1633 generic = true
1633 generic = true
1634 priority = -1
1634 priority = -1
1635 experimental = true
1635 experimental = true
1636
1636
1637 [[items]]
1637 [[items]]
1638 section = "partial-merge-tools"
1638 section = "partial-merge-tools"
1639 name = '.*\.executable$'
1639 name = '.*\.executable$'
1640 default-type = "dynamic"
1640 default-type = "dynamic"
1641 generic = true
1641 generic = true
1642 priority = -1
1642 priority = -1
1643 experimental = true
1643 experimental = true
1644
1644
1645 [[items]]
1645 [[items]]
1646 section = "partial-merge-tools"
1646 section = "partial-merge-tools"
1647 name = '.*\.order'
1647 name = '.*\.order'
1648 default = 0
1648 default = 0
1649 generic = true
1649 generic = true
1650 priority = -1
1650 priority = -1
1651 experimental = true
1651 experimental = true
1652
1652
1653 [[items]]
1653 [[items]]
1654 section = "partial-merge-tools"
1654 section = "partial-merge-tools"
1655 name = '.*\.patterns'
1655 name = '.*\.patterns'
1656 default-type = "dynamic"
1656 default-type = "dynamic"
1657 generic = true
1657 generic = true
1658 priority = -1
1658 priority = -1
1659 experimental = true
1659 experimental = true
1660
1660
1661 [[items]]
1661 [[items]]
1662 section = "patch"
1662 section = "patch"
1663 name = "eol"
1663 name = "eol"
1664 default = "strict"
1664 default = "strict"
1665
1665
1666 [[items]]
1666 [[items]]
1667 section = "patch"
1667 section = "patch"
1668 name = "fuzz"
1668 name = "fuzz"
1669 default = 2
1669 default = 2
1670
1670
1671 [[items]]
1671 [[items]]
1672 section = "paths"
1672 section = "paths"
1673 name = "[^:]*"
1673 name = "[^:]*"
1674 generic = true
1674 generic = true
1675
1675
1676 [[items]]
1676 [[items]]
1677 section = "paths"
1677 section = "paths"
1678 name = ".*:bookmarks.mode"
1678 name = ".*:bookmarks.mode"
1679 default = "default"
1679 default = "default"
1680 generic = true
1680 generic = true
1681
1681
1682 [[items]]
1682 [[items]]
1683 section = "paths"
1683 section = "paths"
1684 name = ".*:multi-urls"
1684 name = ".*:multi-urls"
1685 default = false
1685 default = false
1686 generic = true
1686 generic = true
1687
1687
1688 [[items]]
1688 [[items]]
1689 section = "paths"
1689 section = "paths"
1690 name = ".*:pulled-delta-reuse-policy"
1690 name = ".*:pulled-delta-reuse-policy"
1691 generic = true
1691 generic = true
1692
1692
1693 [[items]]
1693 [[items]]
1694 section = "paths"
1694 section = "paths"
1695 name = ".*:pushrev"
1695 name = ".*:pushrev"
1696 generic = true
1696 generic = true
1697
1697
1698 [[items]]
1698 [[items]]
1699 section = "paths"
1699 section = "paths"
1700 name = ".*:pushurl"
1700 name = ".*:pushurl"
1701 generic = true
1701 generic = true
1702
1702
1703 [[items]]
1703 [[items]]
1704 section = "paths"
1704 section = "paths"
1705 name = "default"
1705 name = "default"
1706
1706
1707 [[items]]
1707 [[items]]
1708 section = "paths"
1708 section = "paths"
1709 name = "default-push"
1709 name = "default-push"
1710
1710
1711 [[items]]
1711 [[items]]
1712 section = "phases"
1712 section = "phases"
1713 name = "checksubrepos"
1713 name = "checksubrepos"
1714 default = "follow"
1714 default = "follow"
1715
1715
1716 [[items]]
1716 [[items]]
1717 section = "phases"
1717 section = "phases"
1718 name = "new-commit"
1718 name = "new-commit"
1719 default = "draft"
1719 default = "draft"
1720
1720
1721 [[items]]
1721 [[items]]
1722 section = "phases"
1722 section = "phases"
1723 name = "publish"
1723 name = "publish"
1724 default = true
1724 default = true
1725
1725
1726 [[items]]
1726 [[items]]
1727 section = "profiling"
1727 section = "profiling"
1728 name = "enabled"
1728 name = "enabled"
1729 default = false
1729 default = false
1730
1730
1731 [[items]]
1731 [[items]]
1732 section = "profiling"
1732 section = "profiling"
1733 name = "format"
1733 name = "format"
1734 default = "text"
1734 default = "text"
1735
1735
1736 [[items]]
1736 [[items]]
1737 section = "profiling"
1737 section = "profiling"
1738 name = "freq"
1738 name = "freq"
1739 default = 1000
1739 default = 1000
1740
1740
1741 [[items]]
1741 [[items]]
1742 section = "profiling"
1742 section = "profiling"
1743 name = "limit"
1743 name = "limit"
1744 default = 30
1744 default = 30
1745
1745
1746 [[items]]
1746 [[items]]
1747 section = "profiling"
1747 section = "profiling"
1748 name = "nested"
1748 name = "nested"
1749 default = 0
1749 default = 0
1750
1750
1751 [[items]]
1751 [[items]]
1752 section = "profiling"
1752 section = "profiling"
1753 name = "output"
1753 name = "output"
1754
1754
1755 [[items]]
1755 [[items]]
1756 section = "profiling"
1756 section = "profiling"
1757 name = "showmax"
1757 name = "showmax"
1758 default = 0.999
1758 default = 0.999
1759
1759
1760 [[items]]
1760 [[items]]
1761 section = "profiling"
1761 section = "profiling"
1762 name = "showmin"
1762 name = "showmin"
1763 default-type = "dynamic"
1763 default-type = "dynamic"
1764
1764
1765 [[items]]
1765 [[items]]
1766 section = "profiling"
1766 section = "profiling"
1767 name = "showtime"
1767 name = "showtime"
1768 default = true
1768 default = true
1769
1769
1770 [[items]]
1770 [[items]]
1771 section = "profiling"
1771 section = "profiling"
1772 name = "sort"
1772 name = "sort"
1773 default = "inlinetime"
1773 default = "inlinetime"
1774
1774
1775 [[items]]
1775 [[items]]
1776 section = "profiling"
1776 section = "profiling"
1777 name = "statformat"
1777 name = "statformat"
1778 default = "hotpath"
1778 default = "hotpath"
1779
1779
1780 [[items]]
1780 [[items]]
1781 section = "profiling"
1781 section = "profiling"
1782 name = "time-track"
1782 name = "time-track"
1783 default-type = "dynamic"
1783 default-type = "dynamic"
1784
1784
1785 [[items]]
1785 [[items]]
1786 section = "profiling"
1786 section = "profiling"
1787 name = "type"
1787 name = "type"
1788 default = "stat"
1788 default = "stat"
1789
1789
1790 [[items]]
1790 [[items]]
1791 section = "progress"
1791 section = "progress"
1792 name = "assume-tty"
1792 name = "assume-tty"
1793 default = false
1793 default = false
1794
1794
1795 [[items]]
1795 [[items]]
1796 section = "progress"
1796 section = "progress"
1797 name = "changedelay"
1797 name = "changedelay"
1798 default = 1
1798 default = 1
1799
1799
1800 [[items]]
1800 [[items]]
1801 section = "progress"
1801 section = "progress"
1802 name = "clear-complete"
1802 name = "clear-complete"
1803 default = true
1803 default = true
1804
1804
1805 [[items]]
1805 [[items]]
1806 section = "progress"
1806 section = "progress"
1807 name = "debug"
1807 name = "debug"
1808 default = false
1808 default = false
1809
1809
1810 [[items]]
1810 [[items]]
1811 section = "progress"
1811 section = "progress"
1812 name = "delay"
1812 name = "delay"
1813 default = 3
1813 default = 3
1814
1814
1815 [[items]]
1815 [[items]]
1816 section = "progress"
1816 section = "progress"
1817 name = "disable"
1817 name = "disable"
1818 default = false
1818 default = false
1819
1819
1820 [[items]]
1820 [[items]]
1821 section = "progress"
1821 section = "progress"
1822 name = "estimateinterval"
1822 name = "estimateinterval"
1823 default = 60.0
1823 default = 60.0
1824
1824
1825 [[items]]
1825 [[items]]
1826 section = "progress"
1826 section = "progress"
1827 name = "format"
1827 name = "format"
1828 default-type = "lambda"
1828 default-type = "lambda"
1829 default = [ "topic", "bar", "number", "estimate",]
1829 default = [ "topic", "bar", "number", "estimate",]
1830
1830
1831 [[items]]
1831 [[items]]
1832 section = "progress"
1832 section = "progress"
1833 name = "refresh"
1833 name = "refresh"
1834 default = 0.1
1834 default = 0.1
1835
1835
1836 [[items]]
1836 [[items]]
1837 section = "progress"
1837 section = "progress"
1838 name = "width"
1838 name = "width"
1839 default-type = "dynamic"
1839 default-type = "dynamic"
1840
1840
1841 [[items]]
1841 [[items]]
1842 section = "pull"
1842 section = "pull"
1843 name = "confirm"
1843 name = "confirm"
1844 default = false
1844 default = false
1845
1845
1846 [[items]]
1846 [[items]]
1847 section = "push"
1847 section = "push"
1848 name = "pushvars.server"
1848 name = "pushvars.server"
1849 default = false
1849 default = false
1850
1850
1851 [[items]]
1851 [[items]]
1852 section = "rebase"
1852 section = "rebase"
1853 name = "experimental.inmemory"
1853 name = "experimental.inmemory"
1854 default = false
1854 default = false
1855
1855
1856 [[items]]
1856 [[items]]
1857 section = "rebase"
1857 section = "rebase"
1858 name = "singletransaction"
1858 name = "singletransaction"
1859 default = false
1859 default = false
1860
1860
1861 [[items]]
1861 [[items]]
1862 section = "rebase"
1862 section = "rebase"
1863 name = "store-source"
1863 name = "store-source"
1864 default = true
1864 default = true
1865 experimental = true
1865 experimental = true
1866 documentation = """Controls creation of a `rebase_source` extra field during rebase.
1866 documentation = """Controls creation of a `rebase_source` extra field during rebase.
1867 When false, no such field is created. This is useful e.g. for incrementally \
1867 When false, no such field is created. This is useful e.g. for incrementally \
1868 converting changesets and then rebasing them onto an existing repo.
1868 converting changesets and then rebasing them onto an existing repo.
1869 WARNING: this is an advanced setting reserved for people who know \
1869 WARNING: this is an advanced setting reserved for people who know \
1870 exactly what they are doing. Misuse of this setting can easily \
1870 exactly what they are doing. Misuse of this setting can easily \
1871 result in obsmarker cycles and a vivid headache."""
1871 result in obsmarker cycles and a vivid headache."""
1872
1872
1873 [[items]]
1873 [[items]]
1874 section = "rewrite"
1874 section = "rewrite"
1875 name = "backup-bundle"
1875 name = "backup-bundle"
1876 default = true
1876 default = true
1877 alias = [["ui", "history-editing-backup"]]
1877 alias = [["ui", "history-editing-backup"]]
1878
1878
1879 [[items]]
1879 [[items]]
1880 section = "rewrite"
1880 section = "rewrite"
1881 name = "empty-successor"
1881 name = "empty-successor"
1882 default = "skip"
1882 default = "skip"
1883 experimental = true
1883 experimental = true
1884
1884
1885 [[items]]
1885 [[items]]
1886 section = "rewrite"
1886 section = "rewrite"
1887 name = "update-timestamp"
1887 name = "update-timestamp"
1888 default = false
1888 default = false
1889
1889
1890 [[items]]
1890 [[items]]
1891 section = "rhg"
1891 section = "rhg"
1892 name = "cat"
1892 name = "cat"
1893 default = true
1893 default = true
1894 experimental = true
1894 experimental = true
1895 documentation = """rhg cat has some quirks that need to be ironed out. \
1895 documentation = """rhg cat has some quirks that need to be ironed out. \
1896 In particular, the `-r` argument accepts a partial hash, but does not \
1896 In particular, the `-r` argument accepts a partial hash, but does not \
1897 correctly resolve `abcdef` as a potential bookmark, tag or branch name."""
1897 correctly resolve `abcdef` as a potential bookmark, tag or branch name."""
1898
1898
1899 [[items]]
1899 [[items]]
1900 section = "rhg"
1900 section = "rhg"
1901 name = "fallback-exectutable"
1901 name = "fallback-exectutable"
1902 experimental = true
1902 experimental = true
1903
1903
1904 [[items]]
1904 [[items]]
1905 section = "rhg"
1905 section = "rhg"
1906 name = "fallback-immediately"
1906 name = "fallback-immediately"
1907 default = false
1907 default = false
1908 experimental = true
1908 experimental = true
1909
1909
1910 [[items]]
1910 [[items]]
1911 section = "rhg"
1911 section = "rhg"
1912 name = "ignored-extensions"
1912 name = "ignored-extensions"
1913 default-type = "list_type"
1913 default-type = "list_type"
1914 experimental = true
1914 experimental = true
1915
1915
1916 [[items]]
1916 [[items]]
1917 section = "rhg"
1917 section = "rhg"
1918 name = "on-unsupported"
1918 name = "on-unsupported"
1919 default = "abort"
1919 default = "abort"
1920 experimental = true
1920 experimental = true
1921
1921
1922 [[items]]
1922 [[items]]
1923 section = "server"
1923 section = "server"
1924 name = "bookmarks-pushkey-compat"
1924 name = "bookmarks-pushkey-compat"
1925 default = true
1925 default = true
1926
1926
1927 [[items]]
1927 [[items]]
1928 section = "server"
1928 section = "server"
1929 name = "bundle1"
1929 name = "bundle1"
1930 default = true
1930 default = true
1931
1931
1932 [[items]]
1932 [[items]]
1933 section = "server"
1933 section = "server"
1934 name = "bundle1.pull"
1934 name = "bundle1.pull"
1935
1935
1936 [[items]]
1936 [[items]]
1937 section = "server"
1937 section = "server"
1938 name = "bundle1.push"
1938 name = "bundle1.push"
1939
1939
1940 [[items]]
1940 [[items]]
1941 section = "server"
1941 section = "server"
1942 name = "bundle1gd"
1942 name = "bundle1gd"
1943
1943
1944 [[items]]
1944 [[items]]
1945 section = "server"
1945 section = "server"
1946 name = "bundle1gd.pull"
1946 name = "bundle1gd.pull"
1947
1947
1948 [[items]]
1948 [[items]]
1949 section = "server"
1949 section = "server"
1950 name = "bundle1gd.push"
1950 name = "bundle1gd.push"
1951
1951
1952 [[items]]
1952 [[items]]
1953 section = "server"
1953 section = "server"
1954 name = "bundle2.stream"
1954 name = "bundle2.stream"
1955 default = true
1955 default = true
1956 alias = [["experimental", "bundle2.stream"]]
1956 alias = [["experimental", "bundle2.stream"]]
1957
1957
1958 [[items]]
1958 [[items]]
1959 section = "server"
1959 section = "server"
1960 name = "compressionengines"
1960 name = "compressionengines"
1961 default-type = "list_type"
1961 default-type = "list_type"
1962
1962
1963 [[items]]
1963 [[items]]
1964 section = "server"
1964 section = "server"
1965 name = "concurrent-push-mode"
1965 name = "concurrent-push-mode"
1966 default = "check-related"
1966 default = "check-related"
1967
1967
1968 [[items]]
1968 [[items]]
1969 section = "server"
1969 section = "server"
1970 name = "disablefullbundle"
1970 name = "disablefullbundle"
1971 default = false
1971 default = false
1972
1972
1973 [[items]]
1973 [[items]]
1974 section = "server"
1974 section = "server"
1975 name = "maxhttpheaderlen"
1975 name = "maxhttpheaderlen"
1976 default = 1024
1976 default = 1024
1977
1977
1978 [[items]]
1978 [[items]]
1979 section = "server"
1979 section = "server"
1980 name = "preferuncompressed"
1980 name = "preferuncompressed"
1981 default = false
1981 default = false
1982
1982
1983 [[items]]
1983 [[items]]
1984 section = "server"
1984 section = "server"
1985 name = "pullbundle"
1985 name = "pullbundle"
1986 default = true
1986 default = true
1987
1987
1988 [[items]]
1988 [[items]]
1989 section = "server"
1989 section = "server"
1990 name = "streamunbundle"
1990 name = "streamunbundle"
1991 default = false
1991 default = false
1992
1992
1993 [[items]]
1993 [[items]]
1994 section = "server"
1994 section = "server"
1995 name = "uncompressed"
1995 name = "uncompressed"
1996 default = true
1996 default = true
1997
1997
1998 [[items]]
1998 [[items]]
1999 section = "server"
1999 section = "server"
2000 name = "uncompressedallowsecret"
2000 name = "uncompressedallowsecret"
2001 default = false
2001 default = false
2002
2002
2003 [[items]]
2003 [[items]]
2004 section = "server"
2004 section = "server"
2005 name = "validate"
2005 name = "validate"
2006 default = false
2006 default = false
2007
2007
2008 [[items]]
2008 [[items]]
2009 section = "server"
2009 section = "server"
2010 name = "view"
2010 name = "view"
2011 default = "served"
2011 default = "served"
2012
2012
2013 [[items]]
2013 [[items]]
2014 section = "server"
2014 section = "server"
2015 name = "zliblevel"
2015 name = "zliblevel"
2016 default = -1
2016 default = -1
2017
2017
2018 [[items]]
2018 [[items]]
2019 section = "server"
2019 section = "server"
2020 name = "zstdlevel"
2020 name = "zstdlevel"
2021 default = 3
2021 default = 3
2022
2022
2023 [[items]]
2023 [[items]]
2024 section = "share"
2024 section = "share"
2025 name = "pool"
2025 name = "pool"
2026
2026
2027 [[items]]
2027 [[items]]
2028 section = "share"
2028 section = "share"
2029 name = "poolnaming"
2029 name = "poolnaming"
2030 default = "identity"
2030 default = "identity"
2031
2031
2032 [[items]]
2032 [[items]]
2033 section = "share"
2033 section = "share"
2034 name = "safe-mismatch.source-not-safe"
2034 name = "safe-mismatch.source-not-safe"
2035 default = "abort"
2035 default = "abort"
2036
2036
2037 [[items]]
2037 [[items]]
2038 section = "share"
2038 section = "share"
2039 name = "safe-mismatch.source-not-safe.warn"
2039 name = "safe-mismatch.source-not-safe.warn"
2040 default = true
2040 default = true
2041
2041
2042 [[items]]
2042 [[items]]
2043 section = "share"
2043 section = "share"
2044 name = "safe-mismatch.source-not-safe:verbose-upgrade"
2044 name = "safe-mismatch.source-not-safe:verbose-upgrade"
2045 default = true
2045 default = true
2046
2046
2047 [[items]]
2047 [[items]]
2048 section = "share"
2048 section = "share"
2049 name = "safe-mismatch.source-safe"
2049 name = "safe-mismatch.source-safe"
2050 default = "abort"
2050 default = "abort"
2051
2051
2052 [[items]]
2052 [[items]]
2053 section = "share"
2053 section = "share"
2054 name = "safe-mismatch.source-safe.warn"
2054 name = "safe-mismatch.source-safe.warn"
2055 default = true
2055 default = true
2056
2056
2057 [[items]]
2057 [[items]]
2058 section = "share"
2058 section = "share"
2059 name = "safe-mismatch.source-safe:verbose-upgrade"
2059 name = "safe-mismatch.source-safe:verbose-upgrade"
2060 default = true
2060 default = true
2061
2061
2062 [[items]]
2062 [[items]]
2063 section = "shelve"
2063 section = "shelve"
2064 name = "maxbackups"
2064 name = "maxbackups"
2065 default = 10
2065 default = 10
2066
2066
2067 [[items]]
2067 [[items]]
2068 section = "shelve"
2068 section = "shelve"
2069 name = "store"
2069 name = "store"
2070 default = "internal"
2070 default = "internal"
2071 experimental = true
2071 experimental = true
2072
2072
2073 [[items]]
2073 [[items]]
2074 section = "smtp"
2074 section = "smtp"
2075 name = "host"
2075 name = "host"
2076
2076
2077 [[items]]
2077 [[items]]
2078 section = "smtp"
2078 section = "smtp"
2079 name = "local_hostname"
2079 name = "local_hostname"
2080
2080
2081 [[items]]
2081 [[items]]
2082 section = "smtp"
2082 section = "smtp"
2083 name = "password"
2083 name = "password"
2084
2084
2085 [[items]]
2085 [[items]]
2086 section = "smtp"
2086 section = "smtp"
2087 name = "port"
2087 name = "port"
2088 default-type = "dynamic"
2088 default-type = "dynamic"
2089
2089
2090 [[items]]
2090 [[items]]
2091 section = "smtp"
2091 section = "smtp"
2092 name = "tls"
2092 name = "tls"
2093 default = "none"
2093 default = "none"
2094
2094
2095 [[items]]
2095 [[items]]
2096 section = "smtp"
2096 section = "smtp"
2097 name = "username"
2097 name = "username"
2098
2098
2099 [[items]]
2099 [[items]]
2100 section = "sparse"
2100 section = "sparse"
2101 name = "missingwarning"
2101 name = "missingwarning"
2102 default = true
2102 default = true
2103 experimental = true
2103 experimental = true
2104
2104
2105 [[items]]
2105 [[items]]
2106 section = "storage"
2106 section = "storage"
2107 name = "dirstate-v2.slow-path"
2107 name = "dirstate-v2.slow-path"
2108 default = "abort"
2108 default = "abort"
2109 experimental = true # experimental as long as format.use-dirstate-v2 is.
2109 experimental = true # experimental as long as format.use-dirstate-v2 is.
2110
2110
2111 [[items]]
2111 [[items]]
2112 section = "storage"
2112 section = "storage"
2113 name = "new-repo-backend"
2113 name = "new-repo-backend"
2114 default = "revlogv1"
2114 default = "revlogv1"
2115 experimental = true
2115 experimental = true
2116
2116
2117 [[items]]
2117 [[items]]
2118 section = "storage"
2118 section = "storage"
2119 name = "revlog.delta-parent-search.candidate-group-chunk-size"
2119 name = "revlog.delta-parent-search.candidate-group-chunk-size"
2120 default = 20
2120 default = 20
2121
2121
2122 [[items]]
2122 [[items]]
2123 section = "storage"
2123 section = "storage"
2124 name = "revlog.issue6528.fix-incoming"
2124 name = "revlog.issue6528.fix-incoming"
2125 default = true
2125 default = true
2126
2126
2127 [[items]]
2127 [[items]]
2128 section = "storage"
2128 section = "storage"
2129 name = "revlog.optimize-delta-parent-choice"
2129 name = "revlog.optimize-delta-parent-choice"
2130 default = true
2130 default = true
2131 alias = [["format", "aggressivemergedeltas"]]
2131 alias = [["format", "aggressivemergedeltas"]]
2132
2132
2133 [[items]]
2133 [[items]]
2134 section = "storage"
2134 section = "storage"
2135 name = "revlog.persistent-nodemap.mmap"
2135 name = "revlog.persistent-nodemap.mmap"
2136 default = true
2136 default = true
2137
2137
2138 [[items]]
2138 [[items]]
2139 section = "storage"
2139 section = "storage"
2140 name = "revlog.persistent-nodemap.slow-path"
2140 name = "revlog.persistent-nodemap.slow-path"
2141 default = "abort"
2141 default = "abort"
2142
2142
2143 [[items]]
2143 [[items]]
2144 section = "storage"
2144 section = "storage"
2145 name = "revlog.reuse-external-delta"
2145 name = "revlog.reuse-external-delta"
2146 default = true
2146 default = true
2147
2147
2148 [[items]]
2148 [[items]]
2149 section = "storage"
2149 section = "storage"
2150 name = "revlog.reuse-external-delta-parent"
2150 name = "revlog.reuse-external-delta-parent"
2151 documentation = """This option is true unless `format.generaldelta` is set."""
2151 documentation = """This option is true unless `format.generaldelta` is set."""
2152
2152
2153 [[items]]
2153 [[items]]
2154 section = "storage"
2154 section = "storage"
2155 name = "revlog.zlib.level"
2155 name = "revlog.zlib.level"
2156
2156
2157 [[items]]
2157 [[items]]
2158 section = "storage"
2158 section = "storage"
2159 name = "revlog.zstd.level"
2159 name = "revlog.zstd.level"
2160
2160
2161 [[items]]
2161 [[items]]
2162 section = "subrepos"
2162 section = "subrepos"
2163 name = "allowed"
2163 name = "allowed"
2164 default-type = "dynamic" # to make backporting simpler
2164 default-type = "dynamic" # to make backporting simpler
2165
2165
2166 [[items]]
2166 [[items]]
2167 section = "subrepos"
2167 section = "subrepos"
2168 name = "git:allowed"
2168 name = "git:allowed"
2169 default-type = "dynamic"
2169 default-type = "dynamic"
2170
2170
2171 [[items]]
2171 [[items]]
2172 section = "subrepos"
2172 section = "subrepos"
2173 name = "hg:allowed"
2173 name = "hg:allowed"
2174 default-type = "dynamic"
2174 default-type = "dynamic"
2175
2175
2176 [[items]]
2176 [[items]]
2177 section = "subrepos"
2177 section = "subrepos"
2178 name = "svn:allowed"
2178 name = "svn:allowed"
2179 default-type = "dynamic"
2179 default-type = "dynamic"
2180
2180
2181 [[items]]
2181 [[items]]
2182 section = "templateconfig"
2182 section = "templateconfig"
2183 name = ".*"
2183 name = ".*"
2184 default-type = "dynamic"
2184 default-type = "dynamic"
2185 generic = true
2185 generic = true
2186
2186
2187 [[items]]
2187 [[items]]
2188 section = "templates"
2188 section = "templates"
2189 name = ".*"
2189 name = ".*"
2190 generic = true
2190 generic = true
2191
2191
2192 [[items]]
2192 [[items]]
2193 section = "trusted"
2193 section = "trusted"
2194 name = "groups"
2194 name = "groups"
2195 default-type = "list_type"
2195 default-type = "list_type"
2196
2196
2197 [[items]]
2197 [[items]]
2198 section = "trusted"
2198 section = "trusted"
2199 name = "users"
2199 name = "users"
2200 default-type = "list_type"
2200 default-type = "list_type"
2201
2201
2202 [[items]]
2202 [[items]]
2203 section = "ui"
2203 section = "ui"
2204 name = "_usedassubrepo"
2204 name = "_usedassubrepo"
2205 default = false
2205 default = false
2206
2206
2207 [[items]]
2207 [[items]]
2208 section = "ui"
2208 section = "ui"
2209 name = "allowemptycommit"
2209 name = "allowemptycommit"
2210 default = false
2210 default = false
2211
2211
2212 [[items]]
2212 [[items]]
2213 section = "ui"
2213 section = "ui"
2214 name = "archivemeta"
2214 name = "archivemeta"
2215 default = true
2215 default = true
2216
2216
2217 [[items]]
2217 [[items]]
2218 section = "ui"
2218 section = "ui"
2219 name = "askusername"
2219 name = "askusername"
2220 default = false
2220 default = false
2221
2221
2222 [[items]]
2222 [[items]]
2223 section = "ui"
2223 section = "ui"
2224 name = "available-memory"
2224 name = "available-memory"
2225
2225
2226 [[items]]
2226 [[items]]
2227 section = "ui"
2227 section = "ui"
2228 name = "clonebundlefallback"
2228 name = "clonebundlefallback"
2229 default = false
2229 default = false
2230
2230
2231 [[items]]
2231 [[items]]
2232 section = "ui"
2232 section = "ui"
2233 name = "clonebundleprefers"
2233 name = "clonebundleprefers"
2234 default-type = "list_type"
2234 default-type = "list_type"
2235
2235
2236 [[items]]
2236 [[items]]
2237 section = "ui"
2237 section = "ui"
2238 name = "clonebundles"
2238 name = "clonebundles"
2239 default = true
2239 default = true
2240
2240
2241 [[items]]
2241 [[items]]
2242 section = "ui"
2242 section = "ui"
2243 name = "color"
2243 name = "color"
2244 default = "auto"
2244 default = "auto"
2245
2245
2246 [[items]]
2246 [[items]]
2247 section = "ui"
2247 section = "ui"
2248 name = "commitsubrepos"
2248 name = "commitsubrepos"
2249 default = false
2249 default = false
2250
2250
2251 [[items]]
2251 [[items]]
2252 section = "ui"
2252 section = "ui"
2253 name = "debug"
2253 name = "debug"
2254 default = false
2254 default = false
2255
2255
2256 [[items]]
2256 [[items]]
2257 section = "ui"
2257 section = "ui"
2258 name = "debugger"
2258 name = "debugger"
2259
2259
2260 [[items]]
2260 [[items]]
2261 section = "ui"
2261 section = "ui"
2262 name = "detailed-exit-code"
2262 name = "detailed-exit-code"
2263 default = false
2263 default = false
2264 experimental = true
2264 experimental = true
2265
2265
2266 [[items]]
2266 [[items]]
2267 section = "ui"
2267 section = "ui"
2268 name = "editor"
2268 name = "editor"
2269 default-type = "dynamic"
2269 default-type = "dynamic"
2270
2270
2271 [[items]]
2271 [[items]]
2272 section = "ui"
2272 section = "ui"
2273 name = "fallbackencoding"
2273 name = "fallbackencoding"
2274
2274
2275 [[items]]
2275 [[items]]
2276 section = "ui"
2276 section = "ui"
2277 name = "forcecwd"
2277 name = "forcecwd"
2278
2278
2279 [[items]]
2279 [[items]]
2280 section = "ui"
2280 section = "ui"
2281 name = "forcemerge"
2281 name = "forcemerge"
2282
2282
2283 [[items]]
2283 [[items]]
2284 section = "ui"
2284 section = "ui"
2285 name = "formatdebug"
2285 name = "formatdebug"
2286 default = false
2286 default = false
2287
2287
2288 [[items]]
2288 [[items]]
2289 section = "ui"
2289 section = "ui"
2290 name = "formatjson"
2290 name = "formatjson"
2291 default = false
2291 default = false
2292
2292
2293 [[items]]
2293 [[items]]
2294 section = "ui"
2294 section = "ui"
2295 name = "formatted"
2295 name = "formatted"
2296
2296
2297 [[items]]
2297 [[items]]
2298 section = "ui"
2298 section = "ui"
2299 name = "interactive"
2299 name = "interactive"
2300
2300
2301 [[items]]
2301 [[items]]
2302 section = "ui"
2302 section = "ui"
2303 name = "interface"
2303 name = "interface"
2304
2304
2305 [[items]]
2305 [[items]]
2306 section = "ui"
2306 section = "ui"
2307 name = "interface.chunkselector"
2307 name = "interface.chunkselector"
2308
2308
2309 [[items]]
2309 [[items]]
2310 section = "ui"
2310 section = "ui"
2311 name = "large-file-limit"
2311 name = "large-file-limit"
2312 default = 10485760
2312 default = 10485760
2313
2313
2314 [[items]]
2314 [[items]]
2315 section = "ui"
2315 section = "ui"
2316 name = "logblockedtimes"
2316 name = "logblockedtimes"
2317 default = false
2317 default = false
2318
2318
2319 [[items]]
2319 [[items]]
2320 section = "ui"
2320 section = "ui"
2321 name = "merge"
2321 name = "merge"
2322
2322
2323 [[items]]
2323 [[items]]
2324 section = "ui"
2324 section = "ui"
2325 name = "mergemarkers"
2325 name = "mergemarkers"
2326 default = "basic"
2326 default = "basic"
2327
2327
2328 [[items]]
2328 [[items]]
2329 section = "ui"
2329 section = "ui"
2330 name = "message-output"
2330 name = "message-output"
2331 default = "stdio"
2331 default = "stdio"
2332
2332
2333 [[items]]
2333 [[items]]
2334 section = "ui"
2334 section = "ui"
2335 name = "nontty"
2335 name = "nontty"
2336 default = false
2336 default = false
2337
2337
2338 [[items]]
2338 [[items]]
2339 section = "ui"
2339 section = "ui"
2340 name = "origbackuppath"
2340 name = "origbackuppath"
2341
2341
2342 [[items]]
2342 [[items]]
2343 section = "ui"
2343 section = "ui"
2344 name = "paginate"
2344 name = "paginate"
2345 default = true
2345 default = true
2346
2346
2347 [[items]]
2347 [[items]]
2348 section = "ui"
2348 section = "ui"
2349 name = "patch"
2349 name = "patch"
2350
2350
2351 [[items]]
2351 [[items]]
2352 section = "ui"
2352 section = "ui"
2353 name = "portablefilenames"
2353 name = "portablefilenames"
2354 default = "warn"
2354 default = "warn"
2355
2355
2356 [[items]]
2356 [[items]]
2357 section = "ui"
2357 section = "ui"
2358 name = "promptecho"
2358 name = "promptecho"
2359 default = false
2359 default = false
2360
2360
2361 [[items]]
2361 [[items]]
2362 section = "ui"
2362 section = "ui"
2363 name = "quiet"
2363 name = "quiet"
2364 default = false
2364 default = false
2365
2365
2366 [[items]]
2366 [[items]]
2367 section = "ui"
2367 section = "ui"
2368 name = "quietbookmarkmove"
2368 name = "quietbookmarkmove"
2369 default = false
2369 default = false
2370
2370
2371 [[items]]
2371 [[items]]
2372 section = "ui"
2372 section = "ui"
2373 name = "relative-paths"
2373 name = "relative-paths"
2374 default = "legacy"
2374 default = "legacy"
2375
2375
2376 [[items]]
2376 [[items]]
2377 section = "ui"
2377 section = "ui"
2378 name = "remotecmd"
2378 name = "remotecmd"
2379 default = "hg"
2379 default = "hg"
2380
2380
2381 [[items]]
2381 [[items]]
2382 section = "ui"
2382 section = "ui"
2383 name = "report_untrusted"
2383 name = "report_untrusted"
2384 default = true
2384 default = true
2385
2385
2386 [[items]]
2386 [[items]]
2387 section = "ui"
2387 section = "ui"
2388 name = "rollback"
2388 name = "rollback"
2389 default = true
2389 default = true
2390
2390
2391 [[items]]
2391 [[items]]
2392 section = "ui"
2392 section = "ui"
2393 name = "signal-safe-lock"
2393 name = "signal-safe-lock"
2394 default = true
2394 default = true
2395
2395
2396 [[items]]
2396 [[items]]
2397 section = "ui"
2397 section = "ui"
2398 name = "slash"
2398 name = "slash"
2399 default = false
2399 default = false
2400
2400
2401 [[items]]
2401 [[items]]
2402 section = "ui"
2402 section = "ui"
2403 name = "ssh"
2403 name = "ssh"
2404 default = "ssh"
2404 default = "ssh"
2405
2405
2406 [[items]]
2406 [[items]]
2407 section = "ui"
2407 section = "ui"
2408 name = "ssherrorhint"
2408 name = "ssherrorhint"
2409
2409
2410 [[items]]
2410 [[items]]
2411 section = "ui"
2411 section = "ui"
2412 name = "statuscopies"
2412 name = "statuscopies"
2413 default = false
2413 default = false
2414
2414
2415 [[items]]
2415 [[items]]
2416 section = "ui"
2416 section = "ui"
2417 name = "strict"
2417 name = "strict"
2418 default = false
2418 default = false
2419
2419
2420 [[items]]
2420 [[items]]
2421 section = "ui"
2421 section = "ui"
2422 name = "style"
2422 name = "style"
2423 default = ""
2423 default = ""
2424
2424
2425 [[items]]
2425 [[items]]
2426 section = "ui"
2426 section = "ui"
2427 name = "supportcontact"
2427 name = "supportcontact"
2428
2428
2429 [[items]]
2429 [[items]]
2430 section = "ui"
2430 section = "ui"
2431 name = "textwidth"
2431 name = "textwidth"
2432 default = 78
2432 default = 78
2433
2433
2434 [[items]]
2434 [[items]]
2435 section = "ui"
2435 section = "ui"
2436 name = "timeout"
2436 name = "timeout"
2437 default = "600"
2437 default = "600"
2438
2438
2439 [[items]]
2439 [[items]]
2440 section = "ui"
2440 section = "ui"
2441 name = "timeout.warn"
2441 name = "timeout.warn"
2442 default = 0
2442 default = 0
2443
2443
2444 [[items]]
2444 [[items]]
2445 section = "ui"
2445 section = "ui"
2446 name = "timestamp-output"
2446 name = "timestamp-output"
2447 default = false
2447 default = false
2448
2448
2449 [[items]]
2449 [[items]]
2450 section = "ui"
2450 section = "ui"
2451 name = "traceback"
2451 name = "traceback"
2452 default = false
2452 default = false
2453
2453
2454 [[items]]
2454 [[items]]
2455 section = "ui"
2455 section = "ui"
2456 name = "tweakdefaults"
2456 name = "tweakdefaults"
2457 default = false
2457 default = false
2458
2458
2459 [[items]]
2459 [[items]]
2460 section = "ui"
2460 section = "ui"
2461 name = "username"
2461 name = "username"
2462 alias = [["ui", "user"]]
2462 alias = [["ui", "user"]]
2463
2463
2464 [[items]]
2464 [[items]]
2465 section = "ui"
2465 section = "ui"
2466 name = "verbose"
2466 name = "verbose"
2467 default = false
2467 default = false
2468
2468
2469 [[items]]
2469 [[items]]
2470 section = "usage"
2470 section = "usage"
2471 name = "repository-role"
2471 name = "repository-role"
2472 default = "default"
2472 default = "default"
2473 documentation = """What this repository is used for.
2473 documentation = """What this repository is used for.
2474
2474
2475 This is used to adjust behavior and performance to best fit the repository purpose.
2475 This is used to adjust behavior and performance to best fit the repository purpose.
2476
2476
2477 Currently recognised values are:
2477 Currently recognised values are:
2478 - default: an all purpose repository
2478 - default: an all purpose repository
2479 """
2479 """
2480
2480
2481 [[items]]
2481 [[items]]
2482 section = "usage"
2482 section = "usage"
2483 name = "resources"
2483 name = "resources"
2484 default = "default"
2484 default = "default"
2485 documentation = """How aggressive Mercurial can be with resource usage:
2485 documentation = """How aggressive Mercurial can be with resource usage:
2486
2486
2487 Currently recognised values are:
2487 Currently recognised values are:
2488 - default: the default value currently is equivalent to medium,
2488 - default: the default value currently is equivalent to medium,
2489 - high: allows for higher cpu, memory and disk-space usage to improve the performance of some operations.
2489 - high: allows for higher cpu, memory and disk-space usage to improve the performance of some operations.
2490 - medium: aims at a moderate resource usage,
2490 - medium: aims at a moderate resource usage,
2491 - low: reduces resources usage when possible, decreasing overall performance.
2491 - low: reduces resources usage when possible, decreasing overall performance.
2492
2492
2493 For finer configuration, see also `usage.resources.cpu`,
2493 For finer configuration, see also `usage.resources.cpu`,
2494 `usage.resources.disk` and `usage.resources.memory`.
2494 `usage.resources.disk` and `usage.resources.memory`.
2495 """
2495 """
2496
2496
2497 [[items]]
2497 [[items]]
2498 section = "usage"
2498 section = "usage"
2499 name = "resources.cpu"
2499 name = "resources.cpu"
2500 default = "default"
2500 default = "default"
2501 documentation = """How aggressive Mercurial can be in terms of cpu usage:
2501 documentation = """How aggressive Mercurial can be in terms of cpu usage:
2502
2502
2503 Currently recognised values are:
2503 Currently recognised values are:
2504 - default: the default value, inherits the value from `usage.resources`,
2504 - default: the default value, inherits the value from `usage.resources`,
2505 - high: allows for more aggressive cpu usage, improving storage quality and
2505 - high: allows for more aggressive cpu usage, improving storage quality and
2506 the performance of some operations at the expense of machine load
2506 the performance of some operations at the expense of machine load
2507 - medium: aims at a moderate cpu usage,
2507 - medium: aims at a moderate cpu usage,
2508 - low: reduces cpu usage when possible, potentially at the expense of
2508 - low: reduces cpu usage when possible, potentially at the expense of
2509 slower operations, increased storage and exchange payload.
2509 slower operations, increased storage and exchange payload.
2510
2510
2511 """
2511 """
2512
2512
2513 [[items]]
2513 [[items]]
2514 section = "usage"
2514 section = "usage"
2515 name = "resources.disk"
2515 name = "resources.disk"
2516 default = "default"
2516 default = "default"
2517 documentation = """How aggressive Mercurial can be in terms of disk usage:
2517 documentation = """How aggressive Mercurial can be in terms of disk usage:
2518
2518
2519 Currently recognised values are:
2519 Currently recognised values are:
2520 - default: the default value, inherits the value from `usage.resources`,
2520 - default: the default value, inherits the value from `usage.resources`,
2521 - high: allows for more disk space usage where it can improve the performance,
2521 - high: allows for more disk space usage where it can improve the performance,
2522 - medium: aims at a moderate disk usage,
2522 - medium: aims at a moderate disk usage,
2523 - low: reduces disk usage when possible, decreasing performance in some occasion.
2523 - low: reduces disk usage when possible, decreasing performance in some occasion.
2524 """
2524 """
2525
2525
2526 [[items]]
2526 [[items]]
2527 section = "usage"
2527 section = "usage"
2528 name = "resources.memory"
2528 name = "resources.memory"
2529 default = "default"
2529 default = "default"
2530 documentation = """How aggressive Mercurial can be in terms of memory usage:
2530 documentation = """How aggressive Mercurial can be in terms of memory usage:
2531
2531
2532 Currently recognised values are:
2532 Currently recognised values are:
2533 - default: the default value, inherits the value from `usage.resources`,
2533 - default: the default value, inherits the value from `usage.resources`,
2534 - high: allows for more aggressive memory usage to improve overall performance,
2534 - high: allows for more aggressive memory usage to improve overall performance,
2535 - medium: aims at a moderate memory usage,
2535 - medium: aims at a moderate memory usage,
2536 - low: reduces memory usage when possible at the cost of overall performance.
2536 - low: reduces memory usage when possible at the cost of overall performance.
2537 """
2537 """
2538
2538
2539 [[items]]
2539 [[items]]
2540 section = "verify"
2540 section = "verify"
2541 name = "skipflags"
2541 name = "skipflags"
2542 default = 0
2542 default = 0
2543
2543
2544 [[items]]
2544 [[items]]
2545 section = "web"
2545 section = "web"
2546 name = "accesslog"
2546 name = "accesslog"
2547 default = "-"
2547 default = "-"
2548
2548
2549 [[items]]
2549 [[items]]
2550 section = "web"
2550 section = "web"
2551 name = "address"
2551 name = "address"
2552 default = ""
2552 default = ""
2553
2553
2554 [[items]]
2554 [[items]]
2555 section = "web"
2555 section = "web"
2556 name = "allow-archive"
2556 name = "allow-archive"
2557 default-type = "list_type"
2557 default-type = "list_type"
2558 alias = [["web", "allow_archive"]]
2558 alias = [["web", "allow_archive"]]
2559
2559
2560 [[items]]
2560 [[items]]
2561 section = "web"
2561 section = "web"
2562 name = "allow-pull"
2562 name = "allow-pull"
2563 default = true
2563 default = true
2564 alias = [["web", "allowpull"]]
2564 alias = [["web", "allowpull"]]
2565
2565
2566 [[items]]
2566 [[items]]
2567 section = "web"
2567 section = "web"
2568 name = "allow-push"
2568 name = "allow-push"
2569 default-type = "list_type"
2569 default-type = "list_type"
2570 alias = [["web", "allow_push"]]
2570 alias = [["web", "allow_push"]]
2571
2571
2572 [[items]]
2572 [[items]]
2573 section = "web"
2573 section = "web"
2574 name = "allow_read"
2574 name = "allow_read"
2575 default-type = "list_type"
2575 default-type = "list_type"
2576
2576
2577 [[items]]
2577 [[items]]
2578 section = "web"
2578 section = "web"
2579 name = "allowbz2"
2579 name = "allowbz2"
2580 default = false
2580 default = false
2581
2581
2582 [[items]]
2582 [[items]]
2583 section = "web"
2583 section = "web"
2584 name = "allowgz"
2584 name = "allowgz"
2585 default = false
2585 default = false
2586
2586
2587 [[items]]
2587 [[items]]
2588 section = "web"
2588 section = "web"
2589 name = "allowzip"
2589 name = "allowzip"
2590 default = false
2590 default = false
2591
2591
2592 [[items]]
2592 [[items]]
2593 section = "web"
2593 section = "web"
2594 name = "archivesubrepos"
2594 name = "archivesubrepos"
2595 default = false
2595 default = false
2596
2596
2597 [[items]]
2597 [[items]]
2598 section = "web"
2598 section = "web"
2599 name = "baseurl"
2599 name = "baseurl"
2600
2600
2601 [[items]]
2601 [[items]]
2602 section = "web"
2602 section = "web"
2603 name = "cacerts"
2603 name = "cacerts"
2604
2604
2605 [[items]]
2605 [[items]]
2606 section = "web"
2606 section = "web"
2607 name = "cache"
2607 name = "cache"
2608 default = true
2608 default = true
2609
2609
2610 [[items]]
2610 [[items]]
2611 section = "web"
2611 section = "web"
2612 name = "certificate"
2612 name = "certificate"
2613
2613
2614 [[items]]
2614 [[items]]
2615 section = "web"
2615 section = "web"
2616 name = "collapse"
2616 name = "collapse"
2617 default = false
2617 default = false
2618
2618
2619 [[items]]
2619 [[items]]
2620 section = "web"
2620 section = "web"
2621 name = "comparisoncontext"
2621 name = "comparisoncontext"
2622 default = 5
2622 default = 5
2623
2623
2624 [[items]]
2624 [[items]]
2625 section = "web"
2625 section = "web"
2626 name = "contact"
2626 name = "contact"
2627
2627
2628 [[items]]
2628 [[items]]
2629 section = "web"
2629 section = "web"
2630 name = "csp"
2630 name = "csp"
2631
2631
2632 [[items]]
2632 [[items]]
2633 section = "web"
2633 section = "web"
2634 name = "deny_push"
2634 name = "deny_push"
2635 default-type = "list_type"
2635 default-type = "list_type"
2636
2636
2637 [[items]]
2637 [[items]]
2638 section = "web"
2638 section = "web"
2639 name = "deny_read"
2639 name = "deny_read"
2640 default-type = "list_type"
2640 default-type = "list_type"
2641
2641
2642 [[items]]
2642 [[items]]
2643 section = "web"
2643 section = "web"
2644 name = "descend"
2644 name = "descend"
2645 default = true
2645 default = true
2646
2646
2647 [[items]]
2647 [[items]]
2648 section = "web"
2648 section = "web"
2649 name = "description"
2649 name = "description"
2650 default = ""
2650 default = ""
2651
2651
2652 [[items]]
2652 [[items]]
2653 section = "web"
2653 section = "web"
2654 name = "encoding"
2654 name = "encoding"
2655 default-type = "lazy_module"
2655 default-type = "lazy_module"
2656 default = "encoding.encoding"
2656 default = "encoding.encoding"
2657
2657
2658 [[items]]
2658 [[items]]
2659 section = "web"
2659 section = "web"
2660 name = "errorlog"
2660 name = "errorlog"
2661 default = "-"
2661 default = "-"
2662
2662
2663 [[items]]
2663 [[items]]
2664 section = "web"
2664 section = "web"
2665 name = "guessmime"
2665 name = "guessmime"
2666 default = false
2666 default = false
2667
2667
2668 [[items]]
2668 [[items]]
2669 section = "web"
2669 section = "web"
2670 name = "hidden"
2670 name = "hidden"
2671 default = false
2671 default = false
2672
2672
2673 [[items]]
2673 [[items]]
2674 section = "web"
2674 section = "web"
2675 name = "ipv6"
2675 name = "ipv6"
2676 default = false
2676 default = false
2677
2677
2678 [[items]]
2678 [[items]]
2679 section = "web"
2679 section = "web"
2680 name = "labels"
2680 name = "labels"
2681 default-type = "list_type"
2681 default-type = "list_type"
2682
2682
2683 [[items]]
2683 [[items]]
2684 section = "web"
2684 section = "web"
2685 name = "logoimg"
2685 name = "logoimg"
2686 default = "hglogo.png"
2686 default = "hglogo.png"
2687
2687
2688 [[items]]
2688 [[items]]
2689 section = "web"
2689 section = "web"
2690 name = "logourl"
2690 name = "logourl"
2691 default = "https://mercurial-scm.org/"
2691 default = "https://mercurial-scm.org/"
2692
2692
2693 [[items]]
2693 [[items]]
2694 section = "web"
2694 section = "web"
2695 name = "maxchanges"
2695 name = "maxchanges"
2696 default = 10
2696 default = 10
2697
2697
2698 [[items]]
2698 [[items]]
2699 section = "web"
2699 section = "web"
2700 name = "maxfiles"
2700 name = "maxfiles"
2701 default = 10
2701 default = 10
2702
2702
2703 [[items]]
2703 [[items]]
2704 section = "web"
2704 section = "web"
2705 name = "maxshortchanges"
2705 name = "maxshortchanges"
2706 default = 60
2706 default = 60
2707
2707
2708 [[items]]
2708 [[items]]
2709 section = "web"
2709 section = "web"
2710 name = "motd"
2710 name = "motd"
2711 default = ""
2711 default = ""
2712
2712
2713 [[items]]
2713 [[items]]
2714 section = "web"
2714 section = "web"
2715 name = "name"
2715 name = "name"
2716 default-type = "dynamic"
2716 default-type = "dynamic"
2717
2717
2718 [[items]]
2718 [[items]]
2719 section = "web"
2719 section = "web"
2720 name = "port"
2720 name = "port"
2721 default = 8000
2721 default = 8000
2722
2722
2723 [[items]]
2723 [[items]]
2724 section = "web"
2724 section = "web"
2725 name = "prefix"
2725 name = "prefix"
2726 default = ""
2726 default = ""
2727
2727
2728 [[items]]
2728 [[items]]
2729 section = "web"
2729 section = "web"
2730 name = "push_ssl"
2730 name = "push_ssl"
2731 default = true
2731 default = true
2732
2732
2733 [[items]]
2733 [[items]]
2734 section = "web"
2734 section = "web"
2735 name = "refreshinterval"
2735 name = "refreshinterval"
2736 default = 20
2736 default = 20
2737
2737
2738 [[items]]
2738 [[items]]
2739 section = "web"
2739 section = "web"
2740 name = "server-header"
2740 name = "server-header"
2741
2741
2742 [[items]]
2742 [[items]]
2743 section = "web"
2743 section = "web"
2744 name = "static"
2744 name = "static"
2745
2745
2746 [[items]]
2746 [[items]]
2747 section = "web"
2747 section = "web"
2748 name = "staticurl"
2748 name = "staticurl"
2749
2749
2750 [[items]]
2750 [[items]]
2751 section = "web"
2751 section = "web"
2752 name = "stripes"
2752 name = "stripes"
2753 default = 1
2753 default = 1
2754
2754
2755 [[items]]
2755 [[items]]
2756 section = "web"
2756 section = "web"
2757 name = "style"
2757 name = "style"
2758 default = "paper"
2758 default = "paper"
2759
2759
2760 [[items]]
2760 [[items]]
2761 section = "web"
2761 section = "web"
2762 name = "templates"
2762 name = "templates"
2763
2763
2764 [[items]]
2764 [[items]]
2765 section = "web"
2765 section = "web"
2766 name = "view"
2766 name = "view"
2767 default = "served"
2767 default = "served"
2768 experimental = true
2768 experimental = true
2769
2769
2770 [[items]]
2770 [[items]]
2771 section = "worker"
2771 section = "worker"
2772 name = "backgroundclose"
2772 name = "backgroundclose"
2773 default-type = "dynamic"
2773 default-type = "dynamic"
2774
2774
2775 [[items]]
2775 [[items]]
2776 section = "worker"
2776 section = "worker"
2777 name = "backgroundclosemaxqueue"
2777 name = "backgroundclosemaxqueue"
2778 # Windows defaults to a limit of 512 open files. A buffer of 128
2778 # Windows defaults to a limit of 512 open files. A buffer of 128
2779 # should give us enough headway.
2779 # should give us enough headway.
2780 default = 384
2780 default = 384
2781
2781
2782 [[items]]
2782 [[items]]
2783 section = "worker"
2783 section = "worker"
2784 name = "backgroundcloseminfilecount"
2784 name = "backgroundcloseminfilecount"
2785 default = 2048
2785 default = 2048
2786
2786
2787 [[items]]
2787 [[items]]
2788 section = "worker"
2788 section = "worker"
2789 name = "backgroundclosethreadcount"
2789 name = "backgroundclosethreadcount"
2790 default = 4
2790 default = 4
2791
2791
2792 [[items]]
2792 [[items]]
2793 section = "worker"
2793 section = "worker"
2794 name = "enabled"
2794 name = "enabled"
2795 default = true
2795 default = true
2796
2796
2797 [[items]]
2797 [[items]]
2798 section = "worker"
2798 section = "worker"
2799 name = "numcpus"
2799 name = "numcpus"
2800
2800
2801 # Templates and template applications
2801 # Templates and template applications
2802
2802
2803 [[template-applications]]
2803 [[template-applications]]
2804 template = "diff-options"
2804 template = "diff-options"
2805 section = "annotate"
2805 section = "annotate"
2806
2806
2807 [[template-applications]]
2807 [[template-applications]]
2808 template = "diff-options"
2808 template = "diff-options"
2809 section = "commands"
2809 section = "commands"
2810 prefix = "commit.interactive"
2810 prefix = "commit.interactive"
2811
2811
2812 [[template-applications]]
2812 [[template-applications]]
2813 template = "diff-options"
2813 template = "diff-options"
2814 section = "commands"
2814 section = "commands"
2815 prefix = "revert.interactive"
2815 prefix = "revert.interactive"
2816
2816
2817 [[template-applications]]
2817 [[template-applications]]
2818 template = "diff-options"
2818 template = "diff-options"
2819 section = "diff"
2819 section = "diff"
2820
2820
2821 [templates]
2821 [templates]
2822 [[templates.diff-options]]
2822 [[templates.diff-options]]
2823 suffix = "nodates"
2823 suffix = "nodates"
2824 default = false
2824 default = false
2825
2825
2826 [[templates.diff-options]]
2826 [[templates.diff-options]]
2827 suffix = "showfunc"
2827 suffix = "showfunc"
2828 default = false
2828 default = false
2829
2829
2830 [[templates.diff-options]]
2830 [[templates.diff-options]]
2831 suffix = "unified"
2831 suffix = "unified"
2832
2832
2833 [[templates.diff-options]]
2833 [[templates.diff-options]]
2834 suffix = "git"
2834 suffix = "git"
2835 default = false
2835 default = false
2836
2836
2837 [[templates.diff-options]]
2837 [[templates.diff-options]]
2838 suffix = "ignorews"
2838 suffix = "ignorews"
2839 default = false
2839 default = false
2840
2840
2841 [[templates.diff-options]]
2841 [[templates.diff-options]]
2842 suffix = "ignorewsamount"
2842 suffix = "ignorewsamount"
2843 default = false
2843 default = false
2844
2844
2845 [[templates.diff-options]]
2845 [[templates.diff-options]]
2846 suffix = "ignoreblanklines"
2846 suffix = "ignoreblanklines"
2847 default = false
2847 default = false
2848
2848
2849 [[templates.diff-options]]
2849 [[templates.diff-options]]
2850 suffix = "ignorewseol"
2850 suffix = "ignorewseol"
2851 default = false
2851 default = false
2852
2852
2853 [[templates.diff-options]]
2853 [[templates.diff-options]]
2854 suffix = "nobinary"
2854 suffix = "nobinary"
2855 default = false
2855 default = false
2856
2856
2857 [[templates.diff-options]]
2857 [[templates.diff-options]]
2858 suffix = "noprefix"
2858 suffix = "noprefix"
2859 default = false
2859 default = false
2860
2860
2861 [[templates.diff-options]]
2861 [[templates.diff-options]]
2862 suffix = "word-diff"
2862 suffix = "word-diff"
2863 default = false
2863 default = false
2864
2864
2865 # In-core extensions
2865 # In-core extensions
2866
2866
2867 [[items]]
2867 [[items]]
2868 section = "blackbox"
2868 section = "blackbox"
2869 name = "debug.to-stderr"
2869 name = "debug.to-stderr"
2870 default = false
2870 default = false
2871 in_core_extension = "blackbox"
2871 in_core_extension = "blackbox"
2872
2872
2873 [[items]]
2873 [[items]]
2874 section = "blackbox"
2874 section = "blackbox"
2875 name = "dirty"
2875 name = "dirty"
2876 default = false
2876 default = false
2877 in_core_extension = "blackbox"
2877 in_core_extension = "blackbox"
2878
2878
2879 [[items]]
2879 [[items]]
2880 section = "blackbox"
2880 section = "blackbox"
2881 name = "maxsize"
2881 name = "maxsize"
2882 default = "1 MB"
2882 default = "1 MB"
2883 in_core_extension = "blackbox"
2883 in_core_extension = "blackbox"
2884
2884
2885 [[items]]
2885 [[items]]
2886 section = "blackbox"
2886 section = "blackbox"
2887 name = "logsource"
2887 name = "logsource"
2888 default = false
2888 default = false
2889 in_core_extension = "blackbox"
2889 in_core_extension = "blackbox"
2890
2890
2891 [[items]]
2891 [[items]]
2892 section = "blackbox"
2892 section = "blackbox"
2893 name = "maxfiles"
2893 name = "maxfiles"
2894 default = 7
2894 default = 7
2895 in_core_extension = "blackbox"
2895 in_core_extension = "blackbox"
2896
2896
2897 [[items]]
2897 [[items]]
2898 section = "blackbox"
2898 section = "blackbox"
2899 name = "track"
2899 name = "track"
2900 default-type = "lambda"
2900 default-type = "lambda"
2901 default = ["*"]
2901 default = ["*"]
2902 in_core_extension = "blackbox"
2902 in_core_extension = "blackbox"
2903
2903
2904 [[items]]
2904 [[items]]
2905 section = "blackbox"
2905 section = "blackbox"
2906 name = "ignore"
2906 name = "ignore"
2907 default-type = "lambda"
2907 default-type = "lambda"
2908 default = ["chgserver", "cmdserver", "extension"]
2908 default = ["chgserver", "cmdserver", "extension"]
2909 in_core_extension = "blackbox"
2909 in_core_extension = "blackbox"
2910
2910
2911 [[items]]
2911 [[items]]
2912 section = "blackbox"
2912 section = "blackbox"
2913 name = "date-format"
2913 name = "date-format"
2914 default = ""
2914 default = ""
2915 in_core_extension = "blackbox"
2915 in_core_extension = "blackbox"
2916
2917 [[items]]
2918 section = "format"
2919 name = "mmap-revbranchcache"
2920 default = false
@@ -1,1364 +1,1366 b''
1 #testcases mmap nommap
2
3 #if mmap
4 $ cat <<EOF >> $HGRCPATH
5 > [format]
6 > mmap-revbranchcache=true
7 > EOF
8 #endif
9
1 $ hg init a
10 $ hg init a
2 $ cd a
11 $ cd a
3
12
4 Verify checking branch of nullrev before the cache is created doesnt crash
13 Verify checking branch of nullrev before the cache is created doesnt crash
5 $ hg log -r 'branch(.)' -T '{branch}\n'
14 $ hg log -r 'branch(.)' -T '{branch}\n'
6
15
7 Basic test
16 Basic test
8 $ echo 'root' >root
17 $ echo 'root' >root
9 $ hg add root
18 $ hg add root
10 $ hg commit -d '0 0' -m "Adding root node"
19 $ hg commit -d '0 0' -m "Adding root node"
11
20
12 $ echo 'a' >a
21 $ echo 'a' >a
13 $ hg add a
22 $ hg add a
14 $ hg branch a
23 $ hg branch a
15 marked working directory as branch a
24 marked working directory as branch a
16 (branches are permanent and global, did you want a bookmark?)
25 (branches are permanent and global, did you want a bookmark?)
17 $ hg commit -d '1 0' -m "Adding a branch"
26 $ hg commit -d '1 0' -m "Adding a branch"
18
27
19 $ hg branch q
28 $ hg branch q
20 marked working directory as branch q
29 marked working directory as branch q
21 $ echo 'aa' >a
30 $ echo 'aa' >a
22 $ hg branch -C
31 $ hg branch -C
23 reset working directory to branch a
32 reset working directory to branch a
24 $ hg commit -d '2 0' -m "Adding to a branch"
33 $ hg commit -d '2 0' -m "Adding to a branch"
25
34
26 $ hg update -C 0
35 $ hg update -C 0
27 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
36 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
28 $ echo 'b' >b
37 $ echo 'b' >b
29 $ hg add b
38 $ hg add b
30 $ hg branch b
39 $ hg branch b
31 marked working directory as branch b
40 marked working directory as branch b
32 $ hg commit -d '2 0' -m "Adding b branch"
41 $ hg commit -d '2 0' -m "Adding b branch"
33
42
34 $ echo 'bh1' >bh1
43 $ echo 'bh1' >bh1
35 $ hg add bh1
44 $ hg add bh1
36 $ hg commit -d '3 0' -m "Adding b branch head 1"
45 $ hg commit -d '3 0' -m "Adding b branch head 1"
37
46
38 $ hg update -C 2
47 $ hg update -C 2
39 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
48 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
40 $ echo 'bh2' >bh2
49 $ echo 'bh2' >bh2
41 $ hg add bh2
50 $ hg add bh2
42 $ hg commit -d '4 0' -m "Adding b branch head 2"
51 $ hg commit -d '4 0' -m "Adding b branch head 2"
43
52
44 $ echo 'c' >c
53 $ echo 'c' >c
45 $ hg add c
54 $ hg add c
46 $ hg branch c
55 $ hg branch c
47 marked working directory as branch c
56 marked working directory as branch c
48 $ hg commit -d '5 0' -m "Adding c branch"
57 $ hg commit -d '5 0' -m "Adding c branch"
49
58
50 reserved names
59 reserved names
51
60
52 $ hg branch tip
61 $ hg branch tip
53 abort: the name 'tip' is reserved
62 abort: the name 'tip' is reserved
54 [10]
63 [10]
55 $ hg branch null
64 $ hg branch null
56 abort: the name 'null' is reserved
65 abort: the name 'null' is reserved
57 [10]
66 [10]
58 $ hg branch .
67 $ hg branch .
59 abort: the name '.' is reserved
68 abort: the name '.' is reserved
60 [10]
69 [10]
61
70
62 invalid characters
71 invalid characters
63
72
64 $ hg branch 'foo:bar'
73 $ hg branch 'foo:bar'
65 abort: ':' cannot be used in a name
74 abort: ':' cannot be used in a name
66 [10]
75 [10]
67
76
68 $ hg branch 'foo
77 $ hg branch 'foo
69 > bar'
78 > bar'
70 abort: '\n' cannot be used in a name
79 abort: '\n' cannot be used in a name
71 [10]
80 [10]
72
81
73 trailing or leading spaces should be stripped before testing duplicates
82 trailing or leading spaces should be stripped before testing duplicates
74
83
75 $ hg branch 'b '
84 $ hg branch 'b '
76 abort: a branch of the same name already exists
85 abort: a branch of the same name already exists
77 (use 'hg update' to switch to it)
86 (use 'hg update' to switch to it)
78 [10]
87 [10]
79
88
80 $ hg branch ' b'
89 $ hg branch ' b'
81 abort: a branch of the same name already exists
90 abort: a branch of the same name already exists
82 (use 'hg update' to switch to it)
91 (use 'hg update' to switch to it)
83 [10]
92 [10]
84
93
85 underscores in numeric branch names (issue6737)
94 underscores in numeric branch names (issue6737)
86
95
87 $ hg branch 2700_210
96 $ hg branch 2700_210
88 marked working directory as branch 2700_210
97 marked working directory as branch 2700_210
89
98
90 verify update will accept invalid legacy branch names
99 verify update will accept invalid legacy branch names
91
100
92 $ hg init test-invalid-branch-name
101 $ hg init test-invalid-branch-name
93 $ cd test-invalid-branch-name
102 $ cd test-invalid-branch-name
94 $ hg unbundle -u "$TESTDIR"/bundles/test-invalid-branch-name.hg
103 $ hg unbundle -u "$TESTDIR"/bundles/test-invalid-branch-name.hg
95 adding changesets
104 adding changesets
96 adding manifests
105 adding manifests
97 adding file changes
106 adding file changes
98 added 3 changesets with 3 changes to 2 files
107 added 3 changesets with 3 changes to 2 files
99 new changesets f0e4c7f04036:33c2ceb9310b (3 drafts)
108 new changesets f0e4c7f04036:33c2ceb9310b (3 drafts)
100 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
101
110
102 $ hg update '"colon:test"'
111 $ hg update '"colon:test"'
103 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
112 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 $ cd ..
113 $ cd ..
105
114
106 $ echo 'd' >d
115 $ echo 'd' >d
107 $ hg add d
116 $ hg add d
108 $ hg branch 'a branch name much longer than the default justification used by branches'
117 $ hg branch 'a branch name much longer than the default justification used by branches'
109 marked working directory as branch a branch name much longer than the default justification used by branches
118 marked working directory as branch a branch name much longer than the default justification used by branches
110 $ hg commit -d '6 0' -m "Adding d branch"
119 $ hg commit -d '6 0' -m "Adding d branch"
111
120
112 $ hg branches
121 $ hg branches
113 a branch name much longer than the default justification used by branches 7:10ff5895aa57
122 a branch name much longer than the default justification used by branches 7:10ff5895aa57
114 b 4:aee39cd168d0
123 b 4:aee39cd168d0
115 c 6:589736a22561 (inactive)
124 c 6:589736a22561 (inactive)
116 a 5:d8cbc61dbaa6 (inactive)
125 a 5:d8cbc61dbaa6 (inactive)
117 default 0:19709c5a4e75 (inactive)
126 default 0:19709c5a4e75 (inactive)
118
127
119 -------
128 -------
120
129
121 $ hg branches -a
130 $ hg branches -a
122 a branch name much longer than the default justification used by branches 7:10ff5895aa57
131 a branch name much longer than the default justification used by branches 7:10ff5895aa57
123 b 4:aee39cd168d0
132 b 4:aee39cd168d0
124
133
125 --- Branch a
134 --- Branch a
126
135
127 $ hg log -b a
136 $ hg log -b a
128 changeset: 5:d8cbc61dbaa6
137 changeset: 5:d8cbc61dbaa6
129 branch: a
138 branch: a
130 parent: 2:881fe2b92ad0
139 parent: 2:881fe2b92ad0
131 user: test
140 user: test
132 date: Thu Jan 01 00:00:04 1970 +0000
141 date: Thu Jan 01 00:00:04 1970 +0000
133 summary: Adding b branch head 2
142 summary: Adding b branch head 2
134
143
135 changeset: 2:881fe2b92ad0
144 changeset: 2:881fe2b92ad0
136 branch: a
145 branch: a
137 user: test
146 user: test
138 date: Thu Jan 01 00:00:02 1970 +0000
147 date: Thu Jan 01 00:00:02 1970 +0000
139 summary: Adding to a branch
148 summary: Adding to a branch
140
149
141 changeset: 1:dd6b440dd85a
150 changeset: 1:dd6b440dd85a
142 branch: a
151 branch: a
143 user: test
152 user: test
144 date: Thu Jan 01 00:00:01 1970 +0000
153 date: Thu Jan 01 00:00:01 1970 +0000
145 summary: Adding a branch
154 summary: Adding a branch
146
155
147
156
148 ---- Branch b
157 ---- Branch b
149
158
150 $ hg log -b b
159 $ hg log -b b
151 changeset: 4:aee39cd168d0
160 changeset: 4:aee39cd168d0
152 branch: b
161 branch: b
153 user: test
162 user: test
154 date: Thu Jan 01 00:00:03 1970 +0000
163 date: Thu Jan 01 00:00:03 1970 +0000
155 summary: Adding b branch head 1
164 summary: Adding b branch head 1
156
165
157 changeset: 3:ac22033332d1
166 changeset: 3:ac22033332d1
158 branch: b
167 branch: b
159 parent: 0:19709c5a4e75
168 parent: 0:19709c5a4e75
160 user: test
169 user: test
161 date: Thu Jan 01 00:00:02 1970 +0000
170 date: Thu Jan 01 00:00:02 1970 +0000
162 summary: Adding b branch
171 summary: Adding b branch
163
172
164
173
165 ---- going to test branch listing by rev
174 ---- going to test branch listing by rev
166 $ hg branches -r0
175 $ hg branches -r0
167 default 0:19709c5a4e75 (inactive)
176 default 0:19709c5a4e75 (inactive)
168 $ hg branches -qr0
177 $ hg branches -qr0
169 default
178 default
170 --- now more than one rev
179 --- now more than one rev
171 $ hg branches -r2:5
180 $ hg branches -r2:5
172 b 4:aee39cd168d0
181 b 4:aee39cd168d0
173 a 5:d8cbc61dbaa6 (inactive)
182 a 5:d8cbc61dbaa6 (inactive)
174 $ hg branches -qr2:5
183 $ hg branches -qr2:5
175 b
184 b
176 a
185 a
177 ---- going to test branch closing
186 ---- going to test branch closing
178
187
179 $ hg branches
188 $ hg branches
180 a branch name much longer than the default justification used by branches 7:10ff5895aa57
189 a branch name much longer than the default justification used by branches 7:10ff5895aa57
181 b 4:aee39cd168d0
190 b 4:aee39cd168d0
182 c 6:589736a22561 (inactive)
191 c 6:589736a22561 (inactive)
183 a 5:d8cbc61dbaa6 (inactive)
192 a 5:d8cbc61dbaa6 (inactive)
184 default 0:19709c5a4e75 (inactive)
193 default 0:19709c5a4e75 (inactive)
185 $ hg up -C b
194 $ hg up -C b
186 2 files updated, 0 files merged, 4 files removed, 0 files unresolved
195 2 files updated, 0 files merged, 4 files removed, 0 files unresolved
187 $ echo 'xxx1' >> b
196 $ echo 'xxx1' >> b
188 $ hg commit -d '7 0' -m 'adding cset to branch b'
197 $ hg commit -d '7 0' -m 'adding cset to branch b'
189 $ hg up -C aee39cd168d0
198 $ hg up -C aee39cd168d0
190 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
199 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
191 $ echo 'xxx2' >> b
200 $ echo 'xxx2' >> b
192 $ hg commit -d '8 0' -m 'adding head to branch b'
201 $ hg commit -d '8 0' -m 'adding head to branch b'
193 created new head
202 created new head
194 $ echo 'xxx3' >> b
203 $ echo 'xxx3' >> b
195 $ hg commit -d '9 0' -m 'adding another cset to branch b'
204 $ hg commit -d '9 0' -m 'adding another cset to branch b'
196 $ hg branches
205 $ hg branches
197 b 10:bfbe841b666e
206 b 10:bfbe841b666e
198 a branch name much longer than the default justification used by branches 7:10ff5895aa57
207 a branch name much longer than the default justification used by branches 7:10ff5895aa57
199 c 6:589736a22561 (inactive)
208 c 6:589736a22561 (inactive)
200 a 5:d8cbc61dbaa6 (inactive)
209 a 5:d8cbc61dbaa6 (inactive)
201 default 0:19709c5a4e75 (inactive)
210 default 0:19709c5a4e75 (inactive)
202 $ hg heads --closed
211 $ hg heads --closed
203 changeset: 10:bfbe841b666e
212 changeset: 10:bfbe841b666e
204 branch: b
213 branch: b
205 tag: tip
214 tag: tip
206 user: test
215 user: test
207 date: Thu Jan 01 00:00:09 1970 +0000
216 date: Thu Jan 01 00:00:09 1970 +0000
208 summary: adding another cset to branch b
217 summary: adding another cset to branch b
209
218
210 changeset: 8:eebb944467c9
219 changeset: 8:eebb944467c9
211 branch: b
220 branch: b
212 parent: 4:aee39cd168d0
221 parent: 4:aee39cd168d0
213 user: test
222 user: test
214 date: Thu Jan 01 00:00:07 1970 +0000
223 date: Thu Jan 01 00:00:07 1970 +0000
215 summary: adding cset to branch b
224 summary: adding cset to branch b
216
225
217 changeset: 7:10ff5895aa57
226 changeset: 7:10ff5895aa57
218 branch: a branch name much longer than the default justification used by branches
227 branch: a branch name much longer than the default justification used by branches
219 user: test
228 user: test
220 date: Thu Jan 01 00:00:06 1970 +0000
229 date: Thu Jan 01 00:00:06 1970 +0000
221 summary: Adding d branch
230 summary: Adding d branch
222
231
223 changeset: 6:589736a22561
232 changeset: 6:589736a22561
224 branch: c
233 branch: c
225 user: test
234 user: test
226 date: Thu Jan 01 00:00:05 1970 +0000
235 date: Thu Jan 01 00:00:05 1970 +0000
227 summary: Adding c branch
236 summary: Adding c branch
228
237
229 changeset: 5:d8cbc61dbaa6
238 changeset: 5:d8cbc61dbaa6
230 branch: a
239 branch: a
231 parent: 2:881fe2b92ad0
240 parent: 2:881fe2b92ad0
232 user: test
241 user: test
233 date: Thu Jan 01 00:00:04 1970 +0000
242 date: Thu Jan 01 00:00:04 1970 +0000
234 summary: Adding b branch head 2
243 summary: Adding b branch head 2
235
244
236 changeset: 0:19709c5a4e75
245 changeset: 0:19709c5a4e75
237 user: test
246 user: test
238 date: Thu Jan 01 00:00:00 1970 +0000
247 date: Thu Jan 01 00:00:00 1970 +0000
239 summary: Adding root node
248 summary: Adding root node
240
249
241 $ hg heads
250 $ hg heads
242 changeset: 10:bfbe841b666e
251 changeset: 10:bfbe841b666e
243 branch: b
252 branch: b
244 tag: tip
253 tag: tip
245 user: test
254 user: test
246 date: Thu Jan 01 00:00:09 1970 +0000
255 date: Thu Jan 01 00:00:09 1970 +0000
247 summary: adding another cset to branch b
256 summary: adding another cset to branch b
248
257
249 changeset: 8:eebb944467c9
258 changeset: 8:eebb944467c9
250 branch: b
259 branch: b
251 parent: 4:aee39cd168d0
260 parent: 4:aee39cd168d0
252 user: test
261 user: test
253 date: Thu Jan 01 00:00:07 1970 +0000
262 date: Thu Jan 01 00:00:07 1970 +0000
254 summary: adding cset to branch b
263 summary: adding cset to branch b
255
264
256 changeset: 7:10ff5895aa57
265 changeset: 7:10ff5895aa57
257 branch: a branch name much longer than the default justification used by branches
266 branch: a branch name much longer than the default justification used by branches
258 user: test
267 user: test
259 date: Thu Jan 01 00:00:06 1970 +0000
268 date: Thu Jan 01 00:00:06 1970 +0000
260 summary: Adding d branch
269 summary: Adding d branch
261
270
262 changeset: 6:589736a22561
271 changeset: 6:589736a22561
263 branch: c
272 branch: c
264 user: test
273 user: test
265 date: Thu Jan 01 00:00:05 1970 +0000
274 date: Thu Jan 01 00:00:05 1970 +0000
266 summary: Adding c branch
275 summary: Adding c branch
267
276
268 changeset: 5:d8cbc61dbaa6
277 changeset: 5:d8cbc61dbaa6
269 branch: a
278 branch: a
270 parent: 2:881fe2b92ad0
279 parent: 2:881fe2b92ad0
271 user: test
280 user: test
272 date: Thu Jan 01 00:00:04 1970 +0000
281 date: Thu Jan 01 00:00:04 1970 +0000
273 summary: Adding b branch head 2
282 summary: Adding b branch head 2
274
283
275 changeset: 0:19709c5a4e75
284 changeset: 0:19709c5a4e75
276 user: test
285 user: test
277 date: Thu Jan 01 00:00:00 1970 +0000
286 date: Thu Jan 01 00:00:00 1970 +0000
278 summary: Adding root node
287 summary: Adding root node
279
288
280 $ hg commit -d '9 0' --close-branch -m 'prune bad branch'
289 $ hg commit -d '9 0' --close-branch -m 'prune bad branch'
281 $ hg branches -a
290 $ hg branches -a
282 b 8:eebb944467c9
291 b 8:eebb944467c9
283 a branch name much longer than the default justification used by branches 7:10ff5895aa57
292 a branch name much longer than the default justification used by branches 7:10ff5895aa57
284 $ hg up -C b
293 $ hg up -C b
285 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
294 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
286 $ hg commit -d '9 0' --close-branch -m 'close this part branch too'
295 $ hg commit -d '9 0' --close-branch -m 'close this part branch too'
287 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
296 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
288 abort: current revision is already a branch closing head
297 abort: current revision is already a branch closing head
289 [10]
298 [10]
290
299
291 $ echo foo > b
300 $ echo foo > b
292 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
301 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
293
302
294 $ echo bar > b
303 $ echo bar > b
295 $ hg commit -d '9 0' --close-branch -m 're-closing this branch' bh1
304 $ hg commit -d '9 0' --close-branch -m 're-closing this branch' bh1
296 abort: current revision is already a branch closing head
305 abort: current revision is already a branch closing head
297 [10]
306 [10]
298 $ hg commit -d '9 0' --close-branch -m 're-closing this branch' b
307 $ hg commit -d '9 0' --close-branch -m 're-closing this branch' b
299
308
300 $ echo baz > b
309 $ echo baz > b
301 $ hg commit -d '9 0' --close-branch -m 'empty re-closing this branch' -X b
310 $ hg commit -d '9 0' --close-branch -m 'empty re-closing this branch' -X b
302 abort: current revision is already a branch closing head
311 abort: current revision is already a branch closing head
303 [10]
312 [10]
304 $ hg revert b
313 $ hg revert b
305
314
306 $ hg debugstrip --rev 13: --no-backup
315 $ hg debugstrip --rev 13: --no-backup
307 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
316 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
308 $ hg revert --all --no-backup
317 $ hg revert --all --no-backup
309
318
310 $ hg log -r tip --debug
319 $ hg log -r tip --debug
311 changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f
320 changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f
312 branch: b
321 branch: b
313 tag: tip
322 tag: tip
314 phase: draft
323 phase: draft
315 parent: 8:eebb944467c9fb9651ed232aeaf31b3c0a7fc6c1
324 parent: 8:eebb944467c9fb9651ed232aeaf31b3c0a7fc6c1
316 parent: -1:0000000000000000000000000000000000000000
325 parent: -1:0000000000000000000000000000000000000000
317 manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee
326 manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee
318 user: test
327 user: test
319 date: Thu Jan 01 00:00:09 1970 +0000
328 date: Thu Jan 01 00:00:09 1970 +0000
320 extra: branch=b
329 extra: branch=b
321 extra: close=1
330 extra: close=1
322 description:
331 description:
323 close this part branch too
332 close this part branch too
324
333
325
334
326 --- b branch should be inactive
335 --- b branch should be inactive
327
336
328 $ hg branches
337 $ hg branches
329 a branch name much longer than the default justification used by branches 7:10ff5895aa57
338 a branch name much longer than the default justification used by branches 7:10ff5895aa57
330 c 6:589736a22561 (inactive)
339 c 6:589736a22561 (inactive)
331 a 5:d8cbc61dbaa6 (inactive)
340 a 5:d8cbc61dbaa6 (inactive)
332 default 0:19709c5a4e75 (inactive)
341 default 0:19709c5a4e75 (inactive)
333 $ hg branches -c
342 $ hg branches -c
334 a branch name much longer than the default justification used by branches 7:10ff5895aa57
343 a branch name much longer than the default justification used by branches 7:10ff5895aa57
335 b 12:e3d49c0575d8 (closed)
344 b 12:e3d49c0575d8 (closed)
336 c 6:589736a22561 (inactive)
345 c 6:589736a22561 (inactive)
337 a 5:d8cbc61dbaa6 (inactive)
346 a 5:d8cbc61dbaa6 (inactive)
338 default 0:19709c5a4e75 (inactive)
347 default 0:19709c5a4e75 (inactive)
339 $ hg branches -a
348 $ hg branches -a
340 a branch name much longer than the default justification used by branches 7:10ff5895aa57
349 a branch name much longer than the default justification used by branches 7:10ff5895aa57
341 $ hg branches -q
350 $ hg branches -q
342 a branch name much longer than the default justification used by branches
351 a branch name much longer than the default justification used by branches
343 c
352 c
344 a
353 a
345 default
354 default
346 $ hg heads b
355 $ hg heads b
347 no open branch heads found on branches b
356 no open branch heads found on branches b
348 [1]
357 [1]
349 $ hg heads --closed b
358 $ hg heads --closed b
350 changeset: 12:e3d49c0575d8
359 changeset: 12:e3d49c0575d8
351 branch: b
360 branch: b
352 tag: tip
361 tag: tip
353 parent: 8:eebb944467c9
362 parent: 8:eebb944467c9
354 user: test
363 user: test
355 date: Thu Jan 01 00:00:09 1970 +0000
364 date: Thu Jan 01 00:00:09 1970 +0000
356 summary: close this part branch too
365 summary: close this part branch too
357
366
358 changeset: 11:d3f163457ebf
367 changeset: 11:d3f163457ebf
359 branch: b
368 branch: b
360 user: test
369 user: test
361 date: Thu Jan 01 00:00:09 1970 +0000
370 date: Thu Jan 01 00:00:09 1970 +0000
362 summary: prune bad branch
371 summary: prune bad branch
363
372
364 $ echo 'xxx4' >> b
373 $ echo 'xxx4' >> b
365 $ hg commit -d '9 0' -m 'reopen branch with a change'
374 $ hg commit -d '9 0' -m 'reopen branch with a change'
366 reopening closed branch head 12
375 reopening closed branch head 12
367
376
368 --- branch b is back in action
377 --- branch b is back in action
369
378
370 $ hg branches -a
379 $ hg branches -a
371 b 13:e23b5505d1ad
380 b 13:e23b5505d1ad
372 a branch name much longer than the default justification used by branches 7:10ff5895aa57
381 a branch name much longer than the default justification used by branches 7:10ff5895aa57
373
382
374 ---- test heads listings
383 ---- test heads listings
375
384
376 $ hg heads
385 $ hg heads
377 changeset: 13:e23b5505d1ad
386 changeset: 13:e23b5505d1ad
378 branch: b
387 branch: b
379 tag: tip
388 tag: tip
380 user: test
389 user: test
381 date: Thu Jan 01 00:00:09 1970 +0000
390 date: Thu Jan 01 00:00:09 1970 +0000
382 summary: reopen branch with a change
391 summary: reopen branch with a change
383
392
384 changeset: 7:10ff5895aa57
393 changeset: 7:10ff5895aa57
385 branch: a branch name much longer than the default justification used by branches
394 branch: a branch name much longer than the default justification used by branches
386 user: test
395 user: test
387 date: Thu Jan 01 00:00:06 1970 +0000
396 date: Thu Jan 01 00:00:06 1970 +0000
388 summary: Adding d branch
397 summary: Adding d branch
389
398
390 changeset: 6:589736a22561
399 changeset: 6:589736a22561
391 branch: c
400 branch: c
392 user: test
401 user: test
393 date: Thu Jan 01 00:00:05 1970 +0000
402 date: Thu Jan 01 00:00:05 1970 +0000
394 summary: Adding c branch
403 summary: Adding c branch
395
404
396 changeset: 5:d8cbc61dbaa6
405 changeset: 5:d8cbc61dbaa6
397 branch: a
406 branch: a
398 parent: 2:881fe2b92ad0
407 parent: 2:881fe2b92ad0
399 user: test
408 user: test
400 date: Thu Jan 01 00:00:04 1970 +0000
409 date: Thu Jan 01 00:00:04 1970 +0000
401 summary: Adding b branch head 2
410 summary: Adding b branch head 2
402
411
403 changeset: 0:19709c5a4e75
412 changeset: 0:19709c5a4e75
404 user: test
413 user: test
405 date: Thu Jan 01 00:00:00 1970 +0000
414 date: Thu Jan 01 00:00:00 1970 +0000
406 summary: Adding root node
415 summary: Adding root node
407
416
408
417
409 branch default
418 branch default
410
419
411 $ hg heads default
420 $ hg heads default
412 changeset: 0:19709c5a4e75
421 changeset: 0:19709c5a4e75
413 user: test
422 user: test
414 date: Thu Jan 01 00:00:00 1970 +0000
423 date: Thu Jan 01 00:00:00 1970 +0000
415 summary: Adding root node
424 summary: Adding root node
416
425
417
426
418 branch a
427 branch a
419
428
420 $ hg heads a
429 $ hg heads a
421 changeset: 5:d8cbc61dbaa6
430 changeset: 5:d8cbc61dbaa6
422 branch: a
431 branch: a
423 parent: 2:881fe2b92ad0
432 parent: 2:881fe2b92ad0
424 user: test
433 user: test
425 date: Thu Jan 01 00:00:04 1970 +0000
434 date: Thu Jan 01 00:00:04 1970 +0000
426 summary: Adding b branch head 2
435 summary: Adding b branch head 2
427
436
428 $ hg heads --active a
437 $ hg heads --active a
429 no open branch heads found on branches a
438 no open branch heads found on branches a
430 [1]
439 [1]
431
440
432 branch b
441 branch b
433
442
434 $ hg heads b
443 $ hg heads b
435 changeset: 13:e23b5505d1ad
444 changeset: 13:e23b5505d1ad
436 branch: b
445 branch: b
437 tag: tip
446 tag: tip
438 user: test
447 user: test
439 date: Thu Jan 01 00:00:09 1970 +0000
448 date: Thu Jan 01 00:00:09 1970 +0000
440 summary: reopen branch with a change
449 summary: reopen branch with a change
441
450
442 $ hg heads --closed b
451 $ hg heads --closed b
443 changeset: 13:e23b5505d1ad
452 changeset: 13:e23b5505d1ad
444 branch: b
453 branch: b
445 tag: tip
454 tag: tip
446 user: test
455 user: test
447 date: Thu Jan 01 00:00:09 1970 +0000
456 date: Thu Jan 01 00:00:09 1970 +0000
448 summary: reopen branch with a change
457 summary: reopen branch with a change
449
458
450 changeset: 11:d3f163457ebf
459 changeset: 11:d3f163457ebf
451 branch: b
460 branch: b
452 user: test
461 user: test
453 date: Thu Jan 01 00:00:09 1970 +0000
462 date: Thu Jan 01 00:00:09 1970 +0000
454 summary: prune bad branch
463 summary: prune bad branch
455
464
456
465
457 reclose branch
466 reclose branch
458
467
459 $ hg up -C c
468 $ hg up -C c
460 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
469 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
461 $ hg commit -d '9 0' --close-branch -m 'reclosing this branch'
470 $ hg commit -d '9 0' --close-branch -m 'reclosing this branch'
462 $ hg branches
471 $ hg branches
463 b 13:e23b5505d1ad
472 b 13:e23b5505d1ad
464 a branch name much longer than the default justification used by branches 7:10ff5895aa57
473 a branch name much longer than the default justification used by branches 7:10ff5895aa57
465 a 5:d8cbc61dbaa6 (inactive)
474 a 5:d8cbc61dbaa6 (inactive)
466 default 0:19709c5a4e75 (inactive)
475 default 0:19709c5a4e75 (inactive)
467 $ hg branches --closed
476 $ hg branches --closed
468 b 13:e23b5505d1ad
477 b 13:e23b5505d1ad
469 a branch name much longer than the default justification used by branches 7:10ff5895aa57
478 a branch name much longer than the default justification used by branches 7:10ff5895aa57
470 c 14:f894c25619d3 (closed)
479 c 14:f894c25619d3 (closed)
471 a 5:d8cbc61dbaa6 (inactive)
480 a 5:d8cbc61dbaa6 (inactive)
472 default 0:19709c5a4e75 (inactive)
481 default 0:19709c5a4e75 (inactive)
473
482
474 multihead branch
483 multihead branch
475
484
476 $ hg up -C default
485 $ hg up -C default
477 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
486 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
478 $ hg branch m
487 $ hg branch m
479 marked working directory as branch m
488 marked working directory as branch m
480 $ touch m
489 $ touch m
481 $ hg add m
490 $ hg add m
482 $ hg commit -d '10 0' -m 'multihead base'
491 $ hg commit -d '10 0' -m 'multihead base'
483 $ echo "m1" >m
492 $ echo "m1" >m
484 $ hg commit -d '10 0' -m 'head 1'
493 $ hg commit -d '10 0' -m 'head 1'
485 $ hg up -C '.^'
494 $ hg up -C '.^'
486 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
495 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
487 $ echo "m2" >m
496 $ echo "m2" >m
488 $ hg commit -d '10 0' -m 'head 2'
497 $ hg commit -d '10 0' -m 'head 2'
489 created new head
498 created new head
490 $ hg log -b m
499 $ hg log -b m
491 changeset: 17:df343b0df04f
500 changeset: 17:df343b0df04f
492 branch: m
501 branch: m
493 tag: tip
502 tag: tip
494 parent: 15:f3447637f53e
503 parent: 15:f3447637f53e
495 user: test
504 user: test
496 date: Thu Jan 01 00:00:10 1970 +0000
505 date: Thu Jan 01 00:00:10 1970 +0000
497 summary: head 2
506 summary: head 2
498
507
499 changeset: 16:a58ca5d3bdf3
508 changeset: 16:a58ca5d3bdf3
500 branch: m
509 branch: m
501 user: test
510 user: test
502 date: Thu Jan 01 00:00:10 1970 +0000
511 date: Thu Jan 01 00:00:10 1970 +0000
503 summary: head 1
512 summary: head 1
504
513
505 changeset: 15:f3447637f53e
514 changeset: 15:f3447637f53e
506 branch: m
515 branch: m
507 parent: 0:19709c5a4e75
516 parent: 0:19709c5a4e75
508 user: test
517 user: test
509 date: Thu Jan 01 00:00:10 1970 +0000
518 date: Thu Jan 01 00:00:10 1970 +0000
510 summary: multihead base
519 summary: multihead base
511
520
512 $ hg heads --topo m
521 $ hg heads --topo m
513 changeset: 17:df343b0df04f
522 changeset: 17:df343b0df04f
514 branch: m
523 branch: m
515 tag: tip
524 tag: tip
516 parent: 15:f3447637f53e
525 parent: 15:f3447637f53e
517 user: test
526 user: test
518 date: Thu Jan 01 00:00:10 1970 +0000
527 date: Thu Jan 01 00:00:10 1970 +0000
519 summary: head 2
528 summary: head 2
520
529
521 changeset: 16:a58ca5d3bdf3
530 changeset: 16:a58ca5d3bdf3
522 branch: m
531 branch: m
523 user: test
532 user: test
524 date: Thu Jan 01 00:00:10 1970 +0000
533 date: Thu Jan 01 00:00:10 1970 +0000
525 summary: head 1
534 summary: head 1
526
535
527 $ hg branches
536 $ hg branches
528 m 17:df343b0df04f
537 m 17:df343b0df04f
529 b 13:e23b5505d1ad
538 b 13:e23b5505d1ad
530 a branch name much longer than the default justification used by branches 7:10ff5895aa57
539 a branch name much longer than the default justification used by branches 7:10ff5895aa57
531 a 5:d8cbc61dbaa6 (inactive)
540 a 5:d8cbc61dbaa6 (inactive)
532 default 0:19709c5a4e75 (inactive)
541 default 0:19709c5a4e75 (inactive)
533
542
534 partially merge multihead branch
543 partially merge multihead branch
535
544
536 $ hg up -C default
545 $ hg up -C default
537 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
546 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
538 $ hg branch md
547 $ hg branch md
539 marked working directory as branch md
548 marked working directory as branch md
540 $ hg merge m
549 $ hg merge m
541 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
550 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
542 (branch merge, don't forget to commit)
551 (branch merge, don't forget to commit)
543 $ hg commit -d '11 0' -m 'merge head 2'
552 $ hg commit -d '11 0' -m 'merge head 2'
544 $ hg heads --topo m
553 $ hg heads --topo m
545 changeset: 16:a58ca5d3bdf3
554 changeset: 16:a58ca5d3bdf3
546 branch: m
555 branch: m
547 user: test
556 user: test
548 date: Thu Jan 01 00:00:10 1970 +0000
557 date: Thu Jan 01 00:00:10 1970 +0000
549 summary: head 1
558 summary: head 1
550
559
551 $ hg branches
560 $ hg branches
552 md 18:c914c99f1fbb
561 md 18:c914c99f1fbb
553 m 17:df343b0df04f
562 m 17:df343b0df04f
554 b 13:e23b5505d1ad
563 b 13:e23b5505d1ad
555 a branch name much longer than the default justification used by branches 7:10ff5895aa57
564 a branch name much longer than the default justification used by branches 7:10ff5895aa57
556 a 5:d8cbc61dbaa6 (inactive)
565 a 5:d8cbc61dbaa6 (inactive)
557 default 0:19709c5a4e75 (inactive)
566 default 0:19709c5a4e75 (inactive)
558
567
559 partially close multihead branch
568 partially close multihead branch
560
569
561 $ hg up -C a58ca5d3bdf3
570 $ hg up -C a58ca5d3bdf3
562 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
571 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
563 $ hg commit -d '12 0' -m 'close head 1' --close-branch
572 $ hg commit -d '12 0' -m 'close head 1' --close-branch
564 $ hg heads --topo m
573 $ hg heads --topo m
565 changeset: 19:cd21a80baa3d
574 changeset: 19:cd21a80baa3d
566 branch: m
575 branch: m
567 tag: tip
576 tag: tip
568 parent: 16:a58ca5d3bdf3
577 parent: 16:a58ca5d3bdf3
569 user: test
578 user: test
570 date: Thu Jan 01 00:00:12 1970 +0000
579 date: Thu Jan 01 00:00:12 1970 +0000
571 summary: close head 1
580 summary: close head 1
572
581
573 $ hg branches
582 $ hg branches
574 md 18:c914c99f1fbb
583 md 18:c914c99f1fbb
575 b 13:e23b5505d1ad
584 b 13:e23b5505d1ad
576 a branch name much longer than the default justification used by branches 7:10ff5895aa57
585 a branch name much longer than the default justification used by branches 7:10ff5895aa57
577 m 17:df343b0df04f (inactive)
586 m 17:df343b0df04f (inactive)
578 a 5:d8cbc61dbaa6 (inactive)
587 a 5:d8cbc61dbaa6 (inactive)
579 default 0:19709c5a4e75 (inactive)
588 default 0:19709c5a4e75 (inactive)
580
589
581 default branch colors:
590 default branch colors:
582
591
583 $ cat <<EOF >> $HGRCPATH
592 $ cat <<EOF >> $HGRCPATH
584 > [extensions]
593 > [extensions]
585 > color =
594 > color =
586 > [color]
595 > [color]
587 > mode = ansi
596 > mode = ansi
588 > EOF
597 > EOF
589
598
590 $ hg up -C b
599 $ hg up -C b
591 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
600 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
592 $ hg branches --color=always
601 $ hg branches --color=always
593 \x1b[0;0mmd\x1b[0m\x1b[0;33m 18:c914c99f1fbb\x1b[0m (esc)
602 \x1b[0;0mmd\x1b[0m\x1b[0;33m 18:c914c99f1fbb\x1b[0m (esc)
594 \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc)
603 \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc)
595 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc)
604 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc)
596 \x1b[0;0mm\x1b[0m\x1b[0;33m 17:df343b0df04f\x1b[0m (inactive) (esc)
605 \x1b[0;0mm\x1b[0m\x1b[0;33m 17:df343b0df04f\x1b[0m (inactive) (esc)
597 \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
606 \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
598 \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
607 \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
599
608
600 default closed branch color:
609 default closed branch color:
601
610
602 $ hg branches --color=always --closed
611 $ hg branches --color=always --closed
603 \x1b[0;0mmd\x1b[0m\x1b[0;33m 18:c914c99f1fbb\x1b[0m (esc)
612 \x1b[0;0mmd\x1b[0m\x1b[0;33m 18:c914c99f1fbb\x1b[0m (esc)
604 \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc)
613 \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc)
605 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc)
614 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc)
606 \x1b[0;0mm\x1b[0m\x1b[0;33m 17:df343b0df04f\x1b[0m (inactive) (esc)
615 \x1b[0;0mm\x1b[0m\x1b[0;33m 17:df343b0df04f\x1b[0m (inactive) (esc)
607 \x1b[0;30;1mc\x1b[0m\x1b[0;33m 14:f894c25619d3\x1b[0m (closed) (esc)
616 \x1b[0;30;1mc\x1b[0m\x1b[0;33m 14:f894c25619d3\x1b[0m (closed) (esc)
608 \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
617 \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
609 \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
618 \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
610
619
611 $ cat <<EOF >> $HGRCPATH
620 $ cat <<EOF >> $HGRCPATH
612 > [extensions]
621 > [extensions]
613 > color =
622 > color =
614 > [color]
623 > [color]
615 > branches.active = green
624 > branches.active = green
616 > branches.closed = blue
625 > branches.closed = blue
617 > branches.current = red
626 > branches.current = red
618 > branches.inactive = magenta
627 > branches.inactive = magenta
619 > log.changeset = cyan
628 > log.changeset = cyan
620 > EOF
629 > EOF
621
630
622 custom branch colors:
631 custom branch colors:
623
632
624 $ hg branches --color=always
633 $ hg branches --color=always
625 \x1b[0;32mmd\x1b[0m\x1b[0;36m 18:c914c99f1fbb\x1b[0m (esc)
634 \x1b[0;32mmd\x1b[0m\x1b[0;36m 18:c914c99f1fbb\x1b[0m (esc)
626 \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc)
635 \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc)
627 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc)
636 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc)
628 \x1b[0;35mm\x1b[0m\x1b[0;36m 17:df343b0df04f\x1b[0m (inactive) (esc)
637 \x1b[0;35mm\x1b[0m\x1b[0;36m 17:df343b0df04f\x1b[0m (inactive) (esc)
629 \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
638 \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
630 \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
639 \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
631
640
632 custom closed branch color:
641 custom closed branch color:
633
642
634 $ hg branches --color=always --closed
643 $ hg branches --color=always --closed
635 \x1b[0;32mmd\x1b[0m\x1b[0;36m 18:c914c99f1fbb\x1b[0m (esc)
644 \x1b[0;32mmd\x1b[0m\x1b[0;36m 18:c914c99f1fbb\x1b[0m (esc)
636 \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc)
645 \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc)
637 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc)
646 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc)
638 \x1b[0;35mm\x1b[0m\x1b[0;36m 17:df343b0df04f\x1b[0m (inactive) (esc)
647 \x1b[0;35mm\x1b[0m\x1b[0;36m 17:df343b0df04f\x1b[0m (inactive) (esc)
639 \x1b[0;34mc\x1b[0m\x1b[0;36m 14:f894c25619d3\x1b[0m (closed) (esc)
648 \x1b[0;34mc\x1b[0m\x1b[0;36m 14:f894c25619d3\x1b[0m (closed) (esc)
640 \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
649 \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
641 \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
650 \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
642
651
643 template output:
652 template output:
644
653
645 $ hg branches -Tjson --closed
654 $ hg branches -Tjson --closed
646 [
655 [
647 {
656 {
648 "active": true,
657 "active": true,
649 "branch": "md",
658 "branch": "md",
650 "closed": false,
659 "closed": false,
651 "current": false,
660 "current": false,
652 "node": "c914c99f1fbb2b1d785a0a939ed3f67275df18e9",
661 "node": "c914c99f1fbb2b1d785a0a939ed3f67275df18e9",
653 "rev": 18
662 "rev": 18
654 },
663 },
655 {
664 {
656 "active": true,
665 "active": true,
657 "branch": "b",
666 "branch": "b",
658 "closed": false,
667 "closed": false,
659 "current": true,
668 "current": true,
660 "node": "e23b5505d1ad24aab6f84fd8c7cb8cd8e5e93be0",
669 "node": "e23b5505d1ad24aab6f84fd8c7cb8cd8e5e93be0",
661 "rev": 13
670 "rev": 13
662 },
671 },
663 {
672 {
664 "active": true,
673 "active": true,
665 "branch": "a branch name much longer than the default justification used by branches",
674 "branch": "a branch name much longer than the default justification used by branches",
666 "closed": false,
675 "closed": false,
667 "current": false,
676 "current": false,
668 "node": "10ff5895aa5793bd378da574af8cec8ea408d831",
677 "node": "10ff5895aa5793bd378da574af8cec8ea408d831",
669 "rev": 7
678 "rev": 7
670 },
679 },
671 {
680 {
672 "active": false,
681 "active": false,
673 "branch": "m",
682 "branch": "m",
674 "closed": false,
683 "closed": false,
675 "current": false,
684 "current": false,
676 "node": "df343b0df04feb2a946cd4b6e9520e552fef14ee",
685 "node": "df343b0df04feb2a946cd4b6e9520e552fef14ee",
677 "rev": 17
686 "rev": 17
678 },
687 },
679 {
688 {
680 "active": false,
689 "active": false,
681 "branch": "c",
690 "branch": "c",
682 "closed": true,
691 "closed": true,
683 "current": false,
692 "current": false,
684 "node": "f894c25619d3f1484639d81be950e0a07bc6f1f6",
693 "node": "f894c25619d3f1484639d81be950e0a07bc6f1f6",
685 "rev": 14
694 "rev": 14
686 },
695 },
687 {
696 {
688 "active": false,
697 "active": false,
689 "branch": "a",
698 "branch": "a",
690 "closed": false,
699 "closed": false,
691 "current": false,
700 "current": false,
692 "node": "d8cbc61dbaa6dc817175d1e301eecb863f280832",
701 "node": "d8cbc61dbaa6dc817175d1e301eecb863f280832",
693 "rev": 5
702 "rev": 5
694 },
703 },
695 {
704 {
696 "active": false,
705 "active": false,
697 "branch": "default",
706 "branch": "default",
698 "closed": false,
707 "closed": false,
699 "current": false,
708 "current": false,
700 "node": "19709c5a4e75bf938f8e349aff97438539bb729e",
709 "node": "19709c5a4e75bf938f8e349aff97438539bb729e",
701 "rev": 0
710 "rev": 0
702 }
711 }
703 ]
712 ]
704
713
705 $ hg branches --closed -T '{if(closed, "{branch}\n")}'
714 $ hg branches --closed -T '{if(closed, "{branch}\n")}'
706 c
715 c
707
716
708 $ hg branches -T '{word(0, branch)}: {desc|firstline}\n'
717 $ hg branches -T '{word(0, branch)}: {desc|firstline}\n'
709 md: merge head 2
718 md: merge head 2
710 b: reopen branch with a change
719 b: reopen branch with a change
711 a: Adding d branch
720 a: Adding d branch
712 m: head 2
721 m: head 2
713 a: Adding b branch head 2
722 a: Adding b branch head 2
714 default: Adding root node
723 default: Adding root node
715
724
716 $ cat <<'EOF' > "$TESTTMP/map-myjson"
725 $ cat <<'EOF' > "$TESTTMP/map-myjson"
717 > docheader = '\{\n'
726 > docheader = '\{\n'
718 > docfooter = '\n}\n'
727 > docfooter = '\n}\n'
719 > separator = ',\n'
728 > separator = ',\n'
720 > branches = ' {dict(branch, node|short)|json}'
729 > branches = ' {dict(branch, node|short)|json}'
721 > EOF
730 > EOF
722 $ hg branches -T "$TESTTMP/map-myjson"
731 $ hg branches -T "$TESTTMP/map-myjson"
723 {
732 {
724 {"branch": "md", "node": "c914c99f1fbb"},
733 {"branch": "md", "node": "c914c99f1fbb"},
725 {"branch": "b", "node": "e23b5505d1ad"},
734 {"branch": "b", "node": "e23b5505d1ad"},
726 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob)
735 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob)
727 {"branch": "m", "node": "df343b0df04f"},
736 {"branch": "m", "node": "df343b0df04f"},
728 {"branch": "a", "node": "d8cbc61dbaa6"},
737 {"branch": "a", "node": "d8cbc61dbaa6"},
729 {"branch": "default", "node": "19709c5a4e75"}
738 {"branch": "default", "node": "19709c5a4e75"}
730 }
739 }
731
740
732 $ cat <<'EOF' >> .hg/hgrc
741 $ cat <<'EOF' >> .hg/hgrc
733 > [templates]
742 > [templates]
734 > myjson = ' {dict(branch, node|short)|json}'
743 > myjson = ' {dict(branch, node|short)|json}'
735 > myjson:docheader = '\{\n'
744 > myjson:docheader = '\{\n'
736 > myjson:docfooter = '\n}\n'
745 > myjson:docfooter = '\n}\n'
737 > myjson:separator = ',\n'
746 > myjson:separator = ',\n'
738 > EOF
747 > EOF
739 $ hg branches -T myjson
748 $ hg branches -T myjson
740 {
749 {
741 {"branch": "md", "node": "c914c99f1fbb"},
750 {"branch": "md", "node": "c914c99f1fbb"},
742 {"branch": "b", "node": "e23b5505d1ad"},
751 {"branch": "b", "node": "e23b5505d1ad"},
743 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob)
752 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob)
744 {"branch": "m", "node": "df343b0df04f"},
753 {"branch": "m", "node": "df343b0df04f"},
745 {"branch": "a", "node": "d8cbc61dbaa6"},
754 {"branch": "a", "node": "d8cbc61dbaa6"},
746 {"branch": "default", "node": "19709c5a4e75"}
755 {"branch": "default", "node": "19709c5a4e75"}
747 }
756 }
748
757
749 $ cat <<'EOF' >> .hg/hgrc
758 $ cat <<'EOF' >> .hg/hgrc
750 > [templates]
759 > [templates]
751 > :docheader = 'should not be selected as a docheader for literal templates\n'
760 > :docheader = 'should not be selected as a docheader for literal templates\n'
752 > EOF
761 > EOF
753 $ hg branches -T '{branch}\n'
762 $ hg branches -T '{branch}\n'
754 md
763 md
755 b
764 b
756 a branch name much longer than the default justification used by branches
765 a branch name much longer than the default justification used by branches
757 m
766 m
758 a
767 a
759 default
768 default
760
769
761 Tests of revision branch name caching
770 Tests of revision branch name caching
762
771
763 We rev branch cache is updated automatically. In these tests we use a trick to
772 We rev branch cache is updated automatically. In these tests we use a trick to
764 trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a
773 trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a
765 rebuild that also will populate the rev branch cache.
774 rebuild that also will populate the rev branch cache.
766
775
767 revision branch cache is created when building the branch head cache
776 revision branch cache is created when building the branch head cache
768 $ rm -rf .hg/cache; hg head a -T '{rev}\n'
777 $ rm -rf .hg/cache; hg head a -T '{rev}\n'
769 5
778 5
770 $ f --hexdump --size .hg/cache/rbc-*
779 $ f --hexdump --size .hg/cache/rbc-*
771 .hg/cache/rbc-names-v1: size=92
780 .hg/cache/rbc-names-v1: size=92
772 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a |
781 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a |
773 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much|
782 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much|
774 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the|
783 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the|
775 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi|
784 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi|
776 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b|
785 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b|
777 0050: 72 61 6e 63 68 65 73 00 6d 00 6d 64 |ranches.m.md|
786 0050: 72 61 6e 63 68 65 73 00 6d 00 6d 64 |ranches.m.md|
778 .hg/cache/rbc-revs-v1: size=160
787 .hg/cache/rbc-revs-v1: size=160
779 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
788 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
780 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....|
789 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....|
781 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................|
790 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................|
782 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....|
791 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....|
783 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....|
792 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....|
784 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....|
793 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....|
785 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
794 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
786 0070: f8 94 c2 56 80 00 00 03 f3 44 76 37 00 00 00 05 |...V.....Dv7....|
795 0070: f8 94 c2 56 80 00 00 03 f3 44 76 37 00 00 00 05 |...V.....Dv7....|
787 0080: a5 8c a5 d3 00 00 00 05 df 34 3b 0d 00 00 00 05 |.........4;.....|
796 0080: a5 8c a5 d3 00 00 00 05 df 34 3b 0d 00 00 00 05 |.........4;.....|
788 0090: c9 14 c9 9f 00 00 00 06 cd 21 a8 0b 80 00 00 05 |.........!......|
797 0090: c9 14 c9 9f 00 00 00 06 cd 21 a8 0b 80 00 00 05 |.........!......|
789
798
790 no errors when revbranchcache is not writable
799 no errors when revbranchcache is not writable
791
800
792 $ echo >> .hg/cache/rbc-revs-v1
801 $ echo >> .hg/cache/rbc-revs-v1
793 $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_
802 $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_
794 $ mkdir .hg/cache/rbc-revs-v1
803 $ mkdir .hg/cache/rbc-revs-v1
795 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n'
804 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n'
796 5
805 5
797 $ rmdir .hg/cache/rbc-revs-v1
806 $ rmdir .hg/cache/rbc-revs-v1
798 $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1
807 $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1
799
808
800 no errors when wlock cannot be acquired
809 no errors when wlock cannot be acquired
801
810
802 #if unix-permissions
811 #if unix-permissions
803 $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_
812 $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_
804 $ rm -f .hg/cache/branch*
813 $ rm -f .hg/cache/branch*
805 $ chmod 555 .hg
814 $ chmod 555 .hg
806 $ hg head a -T '{rev}\n'
815 $ hg head a -T '{rev}\n'
807 5
816 5
808 $ chmod 755 .hg
817 $ chmod 755 .hg
809 $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1
818 $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1
810 #endif
819 #endif
811
820
812 recovery from invalid cache revs file with trailing data
821 recovery from invalid cache revs file with trailing data
813 $ echo >> .hg/cache/rbc-revs-v1
822 $ echo >> .hg/cache/rbc-revs-v1
814 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
823 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
815 5
824 5
816 truncating cache/rbc-revs-v1 to 160
825 truncating cache/rbc-revs-v1 to 160
817 $ f --size .hg/cache/rbc-revs*
826 $ f --size .hg/cache/rbc-revs*
818 .hg/cache/rbc-revs-v1: size=160
827 .hg/cache/rbc-revs-v1: size=160
819 recovery from invalid cache file with partial last record
828 recovery from invalid cache file with partial last record
820 $ mv .hg/cache/rbc-revs-v1 .
829 $ mv .hg/cache/rbc-revs-v1 .
821 $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1
830 $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1
822 $ f --size .hg/cache/rbc-revs*
831 $ f --size .hg/cache/rbc-revs*
823 .hg/cache/rbc-revs-v1: size=119
832 .hg/cache/rbc-revs-v1: size=119
824 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
833 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
825 5
834 5
826 truncating cache/rbc-revs-v1 to 112
835 truncating cache/rbc-revs-v1 to 112
827 $ f --size .hg/cache/rbc-revs*
836 $ f --size .hg/cache/rbc-revs*
828 .hg/cache/rbc-revs-v1: size=160
837 .hg/cache/rbc-revs-v1: size=160
829 recovery from invalid cache file with missing record - no truncation
838 recovery from invalid cache file with missing record - no truncation
830 $ mv .hg/cache/rbc-revs-v1 .
839 $ mv .hg/cache/rbc-revs-v1 .
831 $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1
840 $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1
832 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
841 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
833 5
842 5
834 $ f --size .hg/cache/rbc-revs*
843 $ f --size .hg/cache/rbc-revs*
835 .hg/cache/rbc-revs-v1: size=160
844 .hg/cache/rbc-revs-v1: size=160
836 recovery from invalid cache file with some bad records
845 recovery from invalid cache file with some bad records
837 $ mv .hg/cache/rbc-revs-v1 .
846 $ mv .hg/cache/rbc-revs-v1 .
838 $ f -qDB 8 rbc-revs-v1 > .hg/cache/rbc-revs-v1
847 $ f -qDB 8 rbc-revs-v1 > .hg/cache/rbc-revs-v1
839 $ f --size .hg/cache/rbc-revs*
848 $ f --size .hg/cache/rbc-revs*
840 .hg/cache/rbc-revs-v1: size=8
849 .hg/cache/rbc-revs-v1: size=8
841 $ f -qDB 112 rbc-revs-v1 >> .hg/cache/rbc-revs-v1
850 $ f -qDB 112 rbc-revs-v1 >> .hg/cache/rbc-revs-v1
842 $ f --size .hg/cache/rbc-revs*
851 $ f --size .hg/cache/rbc-revs*
843 .hg/cache/rbc-revs-v1: size=120
852 .hg/cache/rbc-revs-v1: size=120
844 $ hg log -r 'branch(.)' -T '{rev} ' --debug
853 $ hg log -r 'branch(.)' -T '{rev} ' --debug
845 history modification detected - truncating revision branch cache to revision 13
854 history modification detected - truncating revision branch cache to revision 13
846 history modification detected - truncating revision branch cache to revision 1
855 history modification detected - truncating revision branch cache to revision 1
847 3 4 8 9 10 11 12 13 truncating cache/rbc-revs-v1 to 8
856 3 4 8 9 10 11 12 13 truncating cache/rbc-revs-v1 to 8
848 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
857 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
849 5
858 5
850 truncating cache/rbc-revs-v1 to 104
859 truncating cache/rbc-revs-v1 to 104
851 $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs*
860 $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs*
852 .hg/cache/rbc-revs-v1: size=160
861 .hg/cache/rbc-revs-v1: size=160
853 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
862 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
854 cache is updated when committing
863 cache is updated when committing
855 $ hg branch i-will-regret-this
864 $ hg branch i-will-regret-this
856 marked working directory as branch i-will-regret-this
865 marked working directory as branch i-will-regret-this
857 $ hg ci -m regrets
866 $ hg ci -m regrets
858 $ f --size .hg/cache/rbc-*
867 $ f --size .hg/cache/rbc-*
859 .hg/cache/rbc-names-v1: size=111
868 .hg/cache/rbc-names-v1: size=111
860 .hg/cache/rbc-revs-v1: size=168
869 .hg/cache/rbc-revs-v1: size=168
861 update after rollback - the cache will be correct but rbc-names will will still
870 update after rollback - the cache will be correct but rbc-names will will still
862 contain the branch name even though it no longer is used
871 contain the branch name even though it no longer is used
863 $ hg up -qr '.^'
872 $ hg up -qr '.^'
864 $ hg rollback -qf
873 $ hg rollback -qf
865 $ f --size --hexdump .hg/cache/rbc-*
874 $ f --size --hexdump .hg/cache/rbc-*
866 .hg/cache/rbc-names-v1: size=111
875 .hg/cache/rbc-names-v1: size=111
867 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a |
876 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a |
868 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much|
877 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much|
869 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the|
878 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the|
870 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi|
879 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi|
871 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b|
880 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b|
872 0050: 72 61 6e 63 68 65 73 00 6d 00 6d 64 00 69 2d 77 |ranches.m.md.i-w|
881 0050: 72 61 6e 63 68 65 73 00 6d 00 6d 64 00 69 2d 77 |ranches.m.md.i-w|
873 0060: 69 6c 6c 2d 72 65 67 72 65 74 2d 74 68 69 73 |ill-regret-this|
882 0060: 69 6c 6c 2d 72 65 67 72 65 74 2d 74 68 69 73 |ill-regret-this|
874 .hg/cache/rbc-revs-v1: size=160
883 .hg/cache/rbc-revs-v1: size=160
875 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
884 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
876 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....|
885 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....|
877 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................|
886 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................|
878 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....|
887 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....|
879 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....|
888 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....|
880 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....|
889 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....|
881 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
890 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
882 0070: f8 94 c2 56 80 00 00 03 f3 44 76 37 00 00 00 05 |...V.....Dv7....|
891 0070: f8 94 c2 56 80 00 00 03 f3 44 76 37 00 00 00 05 |...V.....Dv7....|
883 0080: a5 8c a5 d3 00 00 00 05 df 34 3b 0d 00 00 00 05 |.........4;.....|
892 0080: a5 8c a5 d3 00 00 00 05 df 34 3b 0d 00 00 00 05 |.........4;.....|
884 0090: c9 14 c9 9f 00 00 00 06 cd 21 a8 0b 80 00 00 05 |.........!......|
893 0090: c9 14 c9 9f 00 00 00 06 cd 21 a8 0b 80 00 00 05 |.........!......|
885 cache is updated/truncated when stripping - it is thus very hard to get in a
894 cache is updated/truncated when stripping - it is thus very hard to get in a
886 situation where the cache is out of sync and the hash check detects it
895 situation where the cache is out of sync and the hash check detects it
887 $ hg --config extensions.strip= strip -r tip --nob
896 $ hg --config extensions.strip= strip -r tip --nob
888 $ f --size .hg/cache/rbc-revs*
897 $ f --size .hg/cache/rbc-revs*
889 .hg/cache/rbc-revs-v1: size=152
898 .hg/cache/rbc-revs-v1: size=152
890
899
891 cache is rebuilt when corruption is detected
900 cache is rebuilt when corruption is detected
892 $ echo > .hg/cache/rbc-names-v1
901 $ echo > .hg/cache/rbc-names-v1
893 $ hg log -r '5:&branch(.)' -T '{rev} ' --debug
902 $ hg log -r '5:&branch(.)' -T '{rev} ' --debug
894 referenced branch names not found - rebuilding revision branch cache from scratch
903 referenced branch names not found - rebuilding revision branch cache from scratch
895 8 9 10 11 12 13 truncating cache/rbc-revs-v1 to 40
904 8 9 10 11 12 13 truncating cache/rbc-revs-v1 to 40
896 $ f --size --hexdump .hg/cache/rbc-*
905 $ f --size --hexdump .hg/cache/rbc-*
897 .hg/cache/rbc-names-v1: size=84
906 .hg/cache/rbc-names-v1: size=84
898 0000: 62 00 61 00 63 00 61 20 62 72 61 6e 63 68 20 6e |b.a.c.a branch n|
907 0000: 62 00 61 00 63 00 61 20 62 72 61 6e 63 68 20 6e |b.a.c.a branch n|
899 0010: 61 6d 65 20 6d 75 63 68 20 6c 6f 6e 67 65 72 20 |ame much longer |
908 0010: 61 6d 65 20 6d 75 63 68 20 6c 6f 6e 67 65 72 20 |ame much longer |
900 0020: 74 68 61 6e 20 74 68 65 20 64 65 66 61 75 6c 74 |than the default|
909 0020: 74 68 61 6e 20 74 68 65 20 64 65 66 61 75 6c 74 |than the default|
901 0030: 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 75 | justification u|
910 0030: 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 75 | justification u|
902 0040: 73 65 64 20 62 79 20 62 72 61 6e 63 68 65 73 00 |sed by branches.|
911 0040: 73 65 64 20 62 79 20 62 72 61 6e 63 68 65 73 00 |sed by branches.|
903 0050: 6d 00 6d 64 |m.md|
912 0050: 6d 00 6d 64 |m.md|
904 .hg/cache/rbc-revs-v1: size=152
913 .hg/cache/rbc-revs-v1: size=152
905 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
914 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
906 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
915 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
907 0020: 00 00 00 00 00 00 00 00 d8 cb c6 1d 00 00 00 01 |................|
916 0020: 00 00 00 00 00 00 00 00 d8 cb c6 1d 00 00 00 01 |................|
908 0030: 58 97 36 a2 00 00 00 02 10 ff 58 95 00 00 00 03 |X.6.......X.....|
917 0030: 58 97 36 a2 00 00 00 02 10 ff 58 95 00 00 00 03 |X.6.......X.....|
909 0040: ee bb 94 44 00 00 00 00 5f 40 61 bb 00 00 00 00 |...D...._@a.....|
918 0040: ee bb 94 44 00 00 00 00 5f 40 61 bb 00 00 00 00 |...D...._@a.....|
910 0050: bf be 84 1b 00 00 00 00 d3 f1 63 45 80 00 00 00 |..........cE....|
919 0050: bf be 84 1b 00 00 00 00 d3 f1 63 45 80 00 00 00 |..........cE....|
911 0060: e3 d4 9c 05 80 00 00 00 e2 3b 55 05 00 00 00 00 |.........;U.....|
920 0060: e3 d4 9c 05 80 00 00 00 e2 3b 55 05 00 00 00 00 |.........;U.....|
912 0070: f8 94 c2 56 80 00 00 02 f3 44 76 37 00 00 00 04 |...V.....Dv7....|
921 0070: f8 94 c2 56 80 00 00 02 f3 44 76 37 00 00 00 04 |...V.....Dv7....|
913 0080: a5 8c a5 d3 00 00 00 04 df 34 3b 0d 00 00 00 04 |.........4;.....|
922 0080: a5 8c a5 d3 00 00 00 04 df 34 3b 0d 00 00 00 04 |.........4;.....|
914 0090: c9 14 c9 9f 00 00 00 05 |........|
923 0090: c9 14 c9 9f 00 00 00 05 |........|
915
924
916 Test that cache files are created and grows correctly:
925 Test that cache files are created and grows correctly:
917
926
918 $ rm .hg/cache/rbc*
927 $ rm .hg/cache/rbc*
919 $ hg log -r "5 & branch(5)" -T "{rev}\n"
928 $ hg log -r "5 & branch(5)" -T "{rev}\n"
920 5
929 5
921 $ f --size --hexdump .hg/cache/rbc-*
930 $ f --size --hexdump .hg/cache/rbc-*
922 .hg/cache/rbc-names-v1: size=1
931 .hg/cache/rbc-names-v1: size=1
923 0000: 61 |a|
932 0000: 61 |a|
924 .hg/cache/rbc-revs-v1: size=152
933 .hg/cache/rbc-revs-v1: size=48
925 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
934 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
926 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
935 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
927 0020: 00 00 00 00 00 00 00 00 d8 cb c6 1d 00 00 00 00 |................|
936 0020: 00 00 00 00 00 00 00 00 d8 cb c6 1d 00 00 00 00 |................|
928 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
929 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
930 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
931 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
932 0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
933 0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
934 0090: 00 00 00 00 00 00 00 00 |........|
935
937
936 $ cd ..
938 $ cd ..
937
939
938 Test for multiple incorrect branch cache entries:
940 Test for multiple incorrect branch cache entries:
939
941
940 $ hg init b
942 $ hg init b
941 $ cd b
943 $ cd b
942 $ touch f
944 $ touch f
943 $ hg ci -Aqmf
945 $ hg ci -Aqmf
944 $ echo >> f
946 $ echo >> f
945 $ hg ci -Amf
947 $ hg ci -Amf
946 $ hg branch -q branch
948 $ hg branch -q branch
947 $ hg ci -Amf
949 $ hg ci -Amf
948
950
949 $ f --size --hexdump .hg/cache/rbc-*
951 $ f --size --hexdump .hg/cache/rbc-*
950 .hg/cache/rbc-names-v1: size=14
952 .hg/cache/rbc-names-v1: size=14
951 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch|
953 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch|
952 .hg/cache/rbc-revs-v1: size=24
954 .hg/cache/rbc-revs-v1: size=24
953 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......|
955 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......|
954 0010: 56 46 78 69 00 00 00 01 |VFxi....|
956 0010: 56 46 78 69 00 00 00 01 |VFxi....|
955 $ : > .hg/cache/rbc-revs-v1
957 $ : > .hg/cache/rbc-revs-v1
956
958
957 No superfluous rebuilding of cache:
959 No superfluous rebuilding of cache:
958 $ hg log -r "branch(null)&branch(branch)" --debug
960 $ hg log -r "branch(null)&branch(branch)" --debug
959 $ f --size --hexdump .hg/cache/rbc-*
961 $ f --size --hexdump .hg/cache/rbc-*
960 .hg/cache/rbc-names-v1: size=14
962 .hg/cache/rbc-names-v1: size=14
961 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch|
963 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch|
962 .hg/cache/rbc-revs-v1: size=24
964 .hg/cache/rbc-revs-v1: size=24
963 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......|
965 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......|
964 0010: 56 46 78 69 00 00 00 01 |VFxi....|
966 0010: 56 46 78 69 00 00 00 01 |VFxi....|
965
967
966 $ cd ..
968 $ cd ..
967
969
968 Test to make sure that `--close-branch` only works on a branch head:
970 Test to make sure that `--close-branch` only works on a branch head:
969 --------------------------------------------------------------------
971 --------------------------------------------------------------------
970 $ hg init closebranch
972 $ hg init closebranch
971 $ cd closebranch
973 $ cd closebranch
972 $ for ch in a b c; do
974 $ for ch in a b c; do
973 > echo $ch > $ch
975 > echo $ch > $ch
974 > hg add $ch
976 > hg add $ch
975 > hg ci -m "added "$ch
977 > hg ci -m "added "$ch
976 > done;
978 > done;
977
979
978 $ hg up -r "desc('added b')"
980 $ hg up -r "desc('added b')"
979 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
981 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
980
982
981 trying to close branch from a cset which is not a branch head
983 trying to close branch from a cset which is not a branch head
982 it should abort:
984 it should abort:
983 $ hg ci -m "closing branch" --close-branch
985 $ hg ci -m "closing branch" --close-branch
984 abort: can only close branch heads
986 abort: can only close branch heads
985 (use --force-close-branch to close branch from a non-head changeset)
987 (use --force-close-branch to close branch from a non-head changeset)
986 [10]
988 [10]
987
989
988 $ hg up 0
990 $ hg up 0
989 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
991 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
990 $ hg log -GT "{rev}: {node|short} {desc|firstline}\n\t{branch}\n\n"
992 $ hg log -GT "{rev}: {node|short} {desc|firstline}\n\t{branch}\n\n"
991 o 2: 155349b645be added c
993 o 2: 155349b645be added c
992 | default
994 | default
993 |
995 |
994 o 1: 5f6d8a4bf34a added b
996 o 1: 5f6d8a4bf34a added b
995 | default
997 | default
996 |
998 |
997 @ 0: 9092f1db7931 added a
999 @ 0: 9092f1db7931 added a
998 default
1000 default
999
1001
1000 Test --force-close-branch to close a branch from a non-head changeset:
1002 Test --force-close-branch to close a branch from a non-head changeset:
1001 ---------------------------------------------------------------------
1003 ---------------------------------------------------------------------
1002
1004
1003 $ hg show stack --config extensions.show=
1005 $ hg show stack --config extensions.show=
1004 o 1553 added c
1006 o 1553 added c
1005 o 5f6d added b
1007 o 5f6d added b
1006 @ 9092 added a
1008 @ 9092 added a
1007
1009
1008 $ hg ci -m "branch closed" --close-branch
1010 $ hg ci -m "branch closed" --close-branch
1009 abort: can only close branch heads
1011 abort: can only close branch heads
1010 (use --force-close-branch to close branch from a non-head changeset)
1012 (use --force-close-branch to close branch from a non-head changeset)
1011 [10]
1013 [10]
1012
1014
1013 $ hg ci -m "branch closed" --force-close-branch
1015 $ hg ci -m "branch closed" --force-close-branch
1014 created new head
1016 created new head
1015 $ cd ..
1017 $ cd ..
1016
1018
1017 Test various special cases for the branchmap
1019 Test various special cases for the branchmap
1018 --------------------------------------------
1020 --------------------------------------------
1019
1021
1020 Basic fork of the same branch
1022 Basic fork of the same branch
1021
1023
1022 $ hg init branchmap-testing1
1024 $ hg init branchmap-testing1
1023 $ cd branchmap-testing1
1025 $ cd branchmap-testing1
1024 $ hg debugbuild '@A . :base . :p1 *base /p1'
1026 $ hg debugbuild '@A . :base . :p1 *base /p1'
1025 $ hg log -G
1027 $ hg log -G
1026 o changeset: 3:71ca9a6d524e
1028 o changeset: 3:71ca9a6d524e
1027 |\ branch: A
1029 |\ branch: A
1028 | | tag: tip
1030 | | tag: tip
1029 | | parent: 2:a3b807b3ff0b
1031 | | parent: 2:a3b807b3ff0b
1030 | | parent: 1:99ba08759bc7
1032 | | parent: 1:99ba08759bc7
1031 | | user: debugbuilddag
1033 | | user: debugbuilddag
1032 | | date: Thu Jan 01 00:00:03 1970 +0000
1034 | | date: Thu Jan 01 00:00:03 1970 +0000
1033 | | summary: r3
1035 | | summary: r3
1034 | |
1036 | |
1035 | o changeset: 2:a3b807b3ff0b
1037 | o changeset: 2:a3b807b3ff0b
1036 | | branch: A
1038 | | branch: A
1037 | | parent: 0:2ab8003a1750
1039 | | parent: 0:2ab8003a1750
1038 | | user: debugbuilddag
1040 | | user: debugbuilddag
1039 | | date: Thu Jan 01 00:00:02 1970 +0000
1041 | | date: Thu Jan 01 00:00:02 1970 +0000
1040 | | summary: r2
1042 | | summary: r2
1041 | |
1043 | |
1042 o | changeset: 1:99ba08759bc7
1044 o | changeset: 1:99ba08759bc7
1043 |/ branch: A
1045 |/ branch: A
1044 | tag: p1
1046 | tag: p1
1045 | user: debugbuilddag
1047 | user: debugbuilddag
1046 | date: Thu Jan 01 00:00:01 1970 +0000
1048 | date: Thu Jan 01 00:00:01 1970 +0000
1047 | summary: r1
1049 | summary: r1
1048 |
1050 |
1049 o changeset: 0:2ab8003a1750
1051 o changeset: 0:2ab8003a1750
1050 branch: A
1052 branch: A
1051 tag: base
1053 tag: base
1052 user: debugbuilddag
1054 user: debugbuilddag
1053 date: Thu Jan 01 00:00:00 1970 +0000
1055 date: Thu Jan 01 00:00:00 1970 +0000
1054 summary: r0
1056 summary: r0
1055
1057
1056 $ hg branches
1058 $ hg branches
1057 A 3:71ca9a6d524e
1059 A 3:71ca9a6d524e
1058 $ hg clone -r 1 -r 2 . ../branchmap-testing1-clone
1060 $ hg clone -r 1 -r 2 . ../branchmap-testing1-clone
1059 adding changesets
1061 adding changesets
1060 adding manifests
1062 adding manifests
1061 adding file changes
1063 adding file changes
1062 added 3 changesets with 0 changes to 0 files (+1 heads)
1064 added 3 changesets with 0 changes to 0 files (+1 heads)
1063 new changesets 2ab8003a1750:a3b807b3ff0b
1065 new changesets 2ab8003a1750:a3b807b3ff0b
1064 updating to branch A
1066 updating to branch A
1065 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1067 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1066 $ cd ../branchmap-testing1-clone
1068 $ cd ../branchmap-testing1-clone
1067 $ hg pull ../branchmap-testing1
1069 $ hg pull ../branchmap-testing1
1068 pulling from ../branchmap-testing1
1070 pulling from ../branchmap-testing1
1069 searching for changes
1071 searching for changes
1070 adding changesets
1072 adding changesets
1071 adding manifests
1073 adding manifests
1072 adding file changes
1074 adding file changes
1073 added 1 changesets with 0 changes to 0 files (-1 heads)
1075 added 1 changesets with 0 changes to 0 files (-1 heads)
1074 new changesets 71ca9a6d524e
1076 new changesets 71ca9a6d524e
1075 (run 'hg update' to get a working copy)
1077 (run 'hg update' to get a working copy)
1076 $ hg branches
1078 $ hg branches
1077 A 3:71ca9a6d524e
1079 A 3:71ca9a6d524e
1078 $ cd ..
1080 $ cd ..
1079
1081
1080 Switching to a different branch and back
1082 Switching to a different branch and back
1081
1083
1082 $ hg init branchmap-testing2
1084 $ hg init branchmap-testing2
1083 $ cd branchmap-testing2
1085 $ cd branchmap-testing2
1084 $ hg debugbuild '@A . @B . @A .'
1086 $ hg debugbuild '@A . @B . @A .'
1085 $ hg log -G
1087 $ hg log -G
1086 o changeset: 2:9699e9f260b5
1088 o changeset: 2:9699e9f260b5
1087 | branch: A
1089 | branch: A
1088 | tag: tip
1090 | tag: tip
1089 | user: debugbuilddag
1091 | user: debugbuilddag
1090 | date: Thu Jan 01 00:00:02 1970 +0000
1092 | date: Thu Jan 01 00:00:02 1970 +0000
1091 | summary: r2
1093 | summary: r2
1092 |
1094 |
1093 o changeset: 1:0bc7d348d965
1095 o changeset: 1:0bc7d348d965
1094 | branch: B
1096 | branch: B
1095 | user: debugbuilddag
1097 | user: debugbuilddag
1096 | date: Thu Jan 01 00:00:01 1970 +0000
1098 | date: Thu Jan 01 00:00:01 1970 +0000
1097 | summary: r1
1099 | summary: r1
1098 |
1100 |
1099 o changeset: 0:2ab8003a1750
1101 o changeset: 0:2ab8003a1750
1100 branch: A
1102 branch: A
1101 user: debugbuilddag
1103 user: debugbuilddag
1102 date: Thu Jan 01 00:00:00 1970 +0000
1104 date: Thu Jan 01 00:00:00 1970 +0000
1103 summary: r0
1105 summary: r0
1104
1106
1105 $ hg branches
1107 $ hg branches
1106 A 2:9699e9f260b5
1108 A 2:9699e9f260b5
1107 B 1:0bc7d348d965 (inactive)
1109 B 1:0bc7d348d965 (inactive)
1108 $ hg clone -r 1 . ../branchmap-testing2-clone
1110 $ hg clone -r 1 . ../branchmap-testing2-clone
1109 adding changesets
1111 adding changesets
1110 adding manifests
1112 adding manifests
1111 adding file changes
1113 adding file changes
1112 added 2 changesets with 0 changes to 0 files
1114 added 2 changesets with 0 changes to 0 files
1113 new changesets 2ab8003a1750:0bc7d348d965
1115 new changesets 2ab8003a1750:0bc7d348d965
1114 updating to branch B
1116 updating to branch B
1115 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1117 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1116 $ cd ../branchmap-testing2-clone
1118 $ cd ../branchmap-testing2-clone
1117 $ hg pull ../branchmap-testing2
1119 $ hg pull ../branchmap-testing2
1118 pulling from ../branchmap-testing2
1120 pulling from ../branchmap-testing2
1119 searching for changes
1121 searching for changes
1120 adding changesets
1122 adding changesets
1121 adding manifests
1123 adding manifests
1122 adding file changes
1124 adding file changes
1123 added 1 changesets with 0 changes to 0 files
1125 added 1 changesets with 0 changes to 0 files
1124 new changesets 9699e9f260b5
1126 new changesets 9699e9f260b5
1125 (run 'hg update' to get a working copy)
1127 (run 'hg update' to get a working copy)
1126 $ hg branches
1128 $ hg branches
1127 A 2:9699e9f260b5
1129 A 2:9699e9f260b5
1128 B 1:0bc7d348d965 (inactive)
1130 B 1:0bc7d348d965 (inactive)
1129 $ cd ..
1131 $ cd ..
1130
1132
1131 A fork on a branch switching to a different branch and back
1133 A fork on a branch switching to a different branch and back
1132 is still collecting the fork.
1134 is still collecting the fork.
1133
1135
1134 $ hg init branchmap-testing3
1136 $ hg init branchmap-testing3
1135 $ cd branchmap-testing3
1137 $ cd branchmap-testing3
1136 $ hg debugbuild '@A . :base . :p1 *base @B . @A /p1'
1138 $ hg debugbuild '@A . :base . :p1 *base @B . @A /p1'
1137 $ hg log -G
1139 $ hg log -G
1138 o changeset: 4:3614a1711d23
1140 o changeset: 4:3614a1711d23
1139 |\ branch: A
1141 |\ branch: A
1140 | | tag: tip
1142 | | tag: tip
1141 | | parent: 3:e9c8abcf65aa
1143 | | parent: 3:e9c8abcf65aa
1142 | | parent: 1:99ba08759bc7
1144 | | parent: 1:99ba08759bc7
1143 | | user: debugbuilddag
1145 | | user: debugbuilddag
1144 | | date: Thu Jan 01 00:00:04 1970 +0000
1146 | | date: Thu Jan 01 00:00:04 1970 +0000
1145 | | summary: r4
1147 | | summary: r4
1146 | |
1148 | |
1147 | o changeset: 3:e9c8abcf65aa
1149 | o changeset: 3:e9c8abcf65aa
1148 | | branch: B
1150 | | branch: B
1149 | | user: debugbuilddag
1151 | | user: debugbuilddag
1150 | | date: Thu Jan 01 00:00:03 1970 +0000
1152 | | date: Thu Jan 01 00:00:03 1970 +0000
1151 | | summary: r3
1153 | | summary: r3
1152 | |
1154 | |
1153 | o changeset: 2:a3b807b3ff0b
1155 | o changeset: 2:a3b807b3ff0b
1154 | | branch: A
1156 | | branch: A
1155 | | parent: 0:2ab8003a1750
1157 | | parent: 0:2ab8003a1750
1156 | | user: debugbuilddag
1158 | | user: debugbuilddag
1157 | | date: Thu Jan 01 00:00:02 1970 +0000
1159 | | date: Thu Jan 01 00:00:02 1970 +0000
1158 | | summary: r2
1160 | | summary: r2
1159 | |
1161 | |
1160 o | changeset: 1:99ba08759bc7
1162 o | changeset: 1:99ba08759bc7
1161 |/ branch: A
1163 |/ branch: A
1162 | tag: p1
1164 | tag: p1
1163 | user: debugbuilddag
1165 | user: debugbuilddag
1164 | date: Thu Jan 01 00:00:01 1970 +0000
1166 | date: Thu Jan 01 00:00:01 1970 +0000
1165 | summary: r1
1167 | summary: r1
1166 |
1168 |
1167 o changeset: 0:2ab8003a1750
1169 o changeset: 0:2ab8003a1750
1168 branch: A
1170 branch: A
1169 tag: base
1171 tag: base
1170 user: debugbuilddag
1172 user: debugbuilddag
1171 date: Thu Jan 01 00:00:00 1970 +0000
1173 date: Thu Jan 01 00:00:00 1970 +0000
1172 summary: r0
1174 summary: r0
1173
1175
1174 $ hg branches
1176 $ hg branches
1175 A 4:3614a1711d23
1177 A 4:3614a1711d23
1176 B 3:e9c8abcf65aa (inactive)
1178 B 3:e9c8abcf65aa (inactive)
1177 $ hg clone -r 1 -r 3 . ../branchmap-testing3-clone
1179 $ hg clone -r 1 -r 3 . ../branchmap-testing3-clone
1178 adding changesets
1180 adding changesets
1179 adding manifests
1181 adding manifests
1180 adding file changes
1182 adding file changes
1181 added 4 changesets with 0 changes to 0 files (+1 heads)
1183 added 4 changesets with 0 changes to 0 files (+1 heads)
1182 new changesets 2ab8003a1750:e9c8abcf65aa
1184 new changesets 2ab8003a1750:e9c8abcf65aa
1183 updating to branch A
1185 updating to branch A
1184 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1186 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1185 $ cd ../branchmap-testing3-clone
1187 $ cd ../branchmap-testing3-clone
1186 $ hg pull ../branchmap-testing3
1188 $ hg pull ../branchmap-testing3
1187 pulling from ../branchmap-testing3
1189 pulling from ../branchmap-testing3
1188 searching for changes
1190 searching for changes
1189 adding changesets
1191 adding changesets
1190 adding manifests
1192 adding manifests
1191 adding file changes
1193 adding file changes
1192 added 1 changesets with 0 changes to 0 files (-1 heads)
1194 added 1 changesets with 0 changes to 0 files (-1 heads)
1193 new changesets 3614a1711d23
1195 new changesets 3614a1711d23
1194 (run 'hg update' to get a working copy)
1196 (run 'hg update' to get a working copy)
1195 $ hg branches
1197 $ hg branches
1196 A 4:3614a1711d23
1198 A 4:3614a1711d23
1197 B 3:e9c8abcf65aa (inactive)
1199 B 3:e9c8abcf65aa (inactive)
1198 $ cd ..
1200 $ cd ..
1199
1201
1200 Intermediary parents are on different branches.
1202 Intermediary parents are on different branches.
1201
1203
1202 $ hg init branchmap-testing4
1204 $ hg init branchmap-testing4
1203 $ cd branchmap-testing4
1205 $ cd branchmap-testing4
1204 $ hg debugbuild '@A . @B :base . @A :p1 *base @C . @A /p1'
1206 $ hg debugbuild '@A . @B :base . @A :p1 *base @C . @A /p1'
1205 $ hg log -G
1207 $ hg log -G
1206 o changeset: 4:4bf67499b70a
1208 o changeset: 4:4bf67499b70a
1207 |\ branch: A
1209 |\ branch: A
1208 | | tag: tip
1210 | | tag: tip
1209 | | parent: 3:4a546028fa8f
1211 | | parent: 3:4a546028fa8f
1210 | | parent: 1:0bc7d348d965
1212 | | parent: 1:0bc7d348d965
1211 | | user: debugbuilddag
1213 | | user: debugbuilddag
1212 | | date: Thu Jan 01 00:00:04 1970 +0000
1214 | | date: Thu Jan 01 00:00:04 1970 +0000
1213 | | summary: r4
1215 | | summary: r4
1214 | |
1216 | |
1215 | o changeset: 3:4a546028fa8f
1217 | o changeset: 3:4a546028fa8f
1216 | | branch: C
1218 | | branch: C
1217 | | user: debugbuilddag
1219 | | user: debugbuilddag
1218 | | date: Thu Jan 01 00:00:03 1970 +0000
1220 | | date: Thu Jan 01 00:00:03 1970 +0000
1219 | | summary: r3
1221 | | summary: r3
1220 | |
1222 | |
1221 | o changeset: 2:a3b807b3ff0b
1223 | o changeset: 2:a3b807b3ff0b
1222 | | branch: A
1224 | | branch: A
1223 | | parent: 0:2ab8003a1750
1225 | | parent: 0:2ab8003a1750
1224 | | user: debugbuilddag
1226 | | user: debugbuilddag
1225 | | date: Thu Jan 01 00:00:02 1970 +0000
1227 | | date: Thu Jan 01 00:00:02 1970 +0000
1226 | | summary: r2
1228 | | summary: r2
1227 | |
1229 | |
1228 o | changeset: 1:0bc7d348d965
1230 o | changeset: 1:0bc7d348d965
1229 |/ branch: B
1231 |/ branch: B
1230 | tag: p1
1232 | tag: p1
1231 | user: debugbuilddag
1233 | user: debugbuilddag
1232 | date: Thu Jan 01 00:00:01 1970 +0000
1234 | date: Thu Jan 01 00:00:01 1970 +0000
1233 | summary: r1
1235 | summary: r1
1234 |
1236 |
1235 o changeset: 0:2ab8003a1750
1237 o changeset: 0:2ab8003a1750
1236 branch: A
1238 branch: A
1237 tag: base
1239 tag: base
1238 user: debugbuilddag
1240 user: debugbuilddag
1239 date: Thu Jan 01 00:00:00 1970 +0000
1241 date: Thu Jan 01 00:00:00 1970 +0000
1240 summary: r0
1242 summary: r0
1241
1243
1242 $ hg branches
1244 $ hg branches
1243 A 4:4bf67499b70a
1245 A 4:4bf67499b70a
1244 C 3:4a546028fa8f (inactive)
1246 C 3:4a546028fa8f (inactive)
1245 B 1:0bc7d348d965 (inactive)
1247 B 1:0bc7d348d965 (inactive)
1246 $ hg clone -r 1 -r 3 . ../branchmap-testing4-clone
1248 $ hg clone -r 1 -r 3 . ../branchmap-testing4-clone
1247 adding changesets
1249 adding changesets
1248 adding manifests
1250 adding manifests
1249 adding file changes
1251 adding file changes
1250 added 4 changesets with 0 changes to 0 files (+1 heads)
1252 added 4 changesets with 0 changes to 0 files (+1 heads)
1251 new changesets 2ab8003a1750:4a546028fa8f
1253 new changesets 2ab8003a1750:4a546028fa8f
1252 updating to branch B
1254 updating to branch B
1253 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1255 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1254 $ cd ../branchmap-testing4-clone
1256 $ cd ../branchmap-testing4-clone
1255 $ hg pull ../branchmap-testing4
1257 $ hg pull ../branchmap-testing4
1256 pulling from ../branchmap-testing4
1258 pulling from ../branchmap-testing4
1257 searching for changes
1259 searching for changes
1258 adding changesets
1260 adding changesets
1259 adding manifests
1261 adding manifests
1260 adding file changes
1262 adding file changes
1261 added 1 changesets with 0 changes to 0 files (-1 heads)
1263 added 1 changesets with 0 changes to 0 files (-1 heads)
1262 new changesets 4bf67499b70a
1264 new changesets 4bf67499b70a
1263 (run 'hg update' to get a working copy)
1265 (run 'hg update' to get a working copy)
1264 $ hg branches
1266 $ hg branches
1265 A 4:4bf67499b70a
1267 A 4:4bf67499b70a
1266 C 3:4a546028fa8f (inactive)
1268 C 3:4a546028fa8f (inactive)
1267 B 1:0bc7d348d965 (inactive)
1269 B 1:0bc7d348d965 (inactive)
1268 $ cd ..
1270 $ cd ..
1269
1271
1270 Check that the cache are not written too early
1272 Check that the cache are not written too early
1271 ----------------------------------------------
1273 ----------------------------------------------
1272
1274
1273 $ hg log -R branchmap-testing1 -G
1275 $ hg log -R branchmap-testing1 -G
1274 o changeset: 3:71ca9a6d524e
1276 o changeset: 3:71ca9a6d524e
1275 |\ branch: A
1277 |\ branch: A
1276 | | tag: tip
1278 | | tag: tip
1277 | | parent: 2:a3b807b3ff0b
1279 | | parent: 2:a3b807b3ff0b
1278 | | parent: 1:99ba08759bc7
1280 | | parent: 1:99ba08759bc7
1279 | | user: debugbuilddag
1281 | | user: debugbuilddag
1280 | | date: Thu Jan 01 00:00:03 1970 +0000
1282 | | date: Thu Jan 01 00:00:03 1970 +0000
1281 | | summary: r3
1283 | | summary: r3
1282 | |
1284 | |
1283 | o changeset: 2:a3b807b3ff0b
1285 | o changeset: 2:a3b807b3ff0b
1284 | | branch: A
1286 | | branch: A
1285 | | parent: 0:2ab8003a1750
1287 | | parent: 0:2ab8003a1750
1286 | | user: debugbuilddag
1288 | | user: debugbuilddag
1287 | | date: Thu Jan 01 00:00:02 1970 +0000
1289 | | date: Thu Jan 01 00:00:02 1970 +0000
1288 | | summary: r2
1290 | | summary: r2
1289 | |
1291 | |
1290 o | changeset: 1:99ba08759bc7
1292 o | changeset: 1:99ba08759bc7
1291 |/ branch: A
1293 |/ branch: A
1292 | tag: p1
1294 | tag: p1
1293 | user: debugbuilddag
1295 | user: debugbuilddag
1294 | date: Thu Jan 01 00:00:01 1970 +0000
1296 | date: Thu Jan 01 00:00:01 1970 +0000
1295 | summary: r1
1297 | summary: r1
1296 |
1298 |
1297 o changeset: 0:2ab8003a1750
1299 o changeset: 0:2ab8003a1750
1298 branch: A
1300 branch: A
1299 tag: base
1301 tag: base
1300 user: debugbuilddag
1302 user: debugbuilddag
1301 date: Thu Jan 01 00:00:00 1970 +0000
1303 date: Thu Jan 01 00:00:00 1970 +0000
1302 summary: r0
1304 summary: r0
1303
1305
1304 $ hg bundle -R branchmap-testing1 --base 1 bundle.hg --rev 'head()'
1306 $ hg bundle -R branchmap-testing1 --base 1 bundle.hg --rev 'head()'
1305 2 changesets found
1307 2 changesets found
1306
1308
1307 Unbundling revision should warm the served cache
1309 Unbundling revision should warm the served cache
1308
1310
1309 $ hg clone branchmap-testing1 --rev 1 branchmap-update-01
1311 $ hg clone branchmap-testing1 --rev 1 branchmap-update-01
1310 adding changesets
1312 adding changesets
1311 adding manifests
1313 adding manifests
1312 adding file changes
1314 adding file changes
1313 added 2 changesets with 0 changes to 0 files
1315 added 2 changesets with 0 changes to 0 files
1314 new changesets 2ab8003a1750:99ba08759bc7
1316 new changesets 2ab8003a1750:99ba08759bc7
1315 updating to branch A
1317 updating to branch A
1316 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1318 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1317 $ cat branchmap-update-01/.hg/cache/branch2-served
1319 $ cat branchmap-update-01/.hg/cache/branch2-served
1318 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
1320 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
1319 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
1321 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
1320 $ hg -R branchmap-update-01 unbundle bundle.hg
1322 $ hg -R branchmap-update-01 unbundle bundle.hg
1321 adding changesets
1323 adding changesets
1322 adding manifests
1324 adding manifests
1323 adding file changes
1325 adding file changes
1324 added 2 changesets with 0 changes to 0 files
1326 added 2 changesets with 0 changes to 0 files
1325 new changesets a3b807b3ff0b:71ca9a6d524e (2 drafts)
1327 new changesets a3b807b3ff0b:71ca9a6d524e (2 drafts)
1326 (run 'hg update' to get a working copy)
1328 (run 'hg update' to get a working copy)
1327 $ cat branchmap-update-01/.hg/cache/branch2-served
1329 $ cat branchmap-update-01/.hg/cache/branch2-served
1328 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 3
1330 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 3
1329 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 o A
1331 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 o A
1330
1332
1331 aborted Unbundle should not update the on disk cache
1333 aborted Unbundle should not update the on disk cache
1332
1334
1333 $ cat >> simplehook.py << EOF
1335 $ cat >> simplehook.py << EOF
1334 > import sys
1336 > import sys
1335 > from mercurial import node
1337 > from mercurial import node
1336 > from mercurial import branchmap
1338 > from mercurial import branchmap
1337 > def hook(ui, repo, *args, **kwargs):
1339 > def hook(ui, repo, *args, **kwargs):
1338 > s = repo.filtered(b"served")
1340 > s = repo.filtered(b"served")
1339 > s.branchmap()
1341 > s.branchmap()
1340 > return 1
1342 > return 1
1341 > EOF
1343 > EOF
1342 $ hg clone branchmap-testing1 --rev 1 branchmap-update-02
1344 $ hg clone branchmap-testing1 --rev 1 branchmap-update-02
1343 adding changesets
1345 adding changesets
1344 adding manifests
1346 adding manifests
1345 adding file changes
1347 adding file changes
1346 added 2 changesets with 0 changes to 0 files
1348 added 2 changesets with 0 changes to 0 files
1347 new changesets 2ab8003a1750:99ba08759bc7
1349 new changesets 2ab8003a1750:99ba08759bc7
1348 updating to branch A
1350 updating to branch A
1349 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1351 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1350
1352
1351 $ cat branchmap-update-02/.hg/cache/branch2-served
1353 $ cat branchmap-update-02/.hg/cache/branch2-served
1352 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
1354 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
1353 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
1355 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
1354 $ hg -R branchmap-update-02 unbundle bundle.hg --config "hooks.pretxnclose=python:$TESTTMP/simplehook.py:hook"
1356 $ hg -R branchmap-update-02 unbundle bundle.hg --config "hooks.pretxnclose=python:$TESTTMP/simplehook.py:hook"
1355 adding changesets
1357 adding changesets
1356 adding manifests
1358 adding manifests
1357 adding file changes
1359 adding file changes
1358 transaction abort!
1360 transaction abort!
1359 rollback completed
1361 rollback completed
1360 abort: pretxnclose hook failed
1362 abort: pretxnclose hook failed
1361 [40]
1363 [40]
1362 $ cat branchmap-update-02/.hg/cache/branch2-served
1364 $ cat branchmap-update-02/.hg/cache/branch2-served
1363 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
1365 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
1364 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
1366 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
General Comments 0
You need to be logged in to leave comments. Login now