##// END OF EJS Templates
branching: merge stable into default
Raphaël Gomès -
r51712:3ccef790 merge default
parent child Browse files
Show More
@@ -248,3 +248,4 b' da372c745e0f053bb7a64e74cccd15810d96341d'
248 271a4ab29605ffa0bae5d3208eaa21a95427ff92 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmSUEeMZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVlJnC/98qGmpi0gHbsoCPfoxgV2uSE4XAXZXPvbHqKAVUVJbkQoS0L2jighUArPZsduRjD+nSf/jO951/DmnxIwXfF5qA2dP1eBnjSmXS3xslmqD7nUw+pP8mKUQvXky+AbiL5onWw4gRtsqTZg4DYnPMeaE/eIUy/j60kXsf6gaDkQSAF/+9vB5UcVI1z7gKY/nE5pGW6cS9kPd/BEg2icficaOHXcetQFi53Gcy5kLEaYc9f8RUrvc0Z9jDkZSlmTHfTLOY+1hlFZ2FRAvL1Ikh7Ks+85LWuqs1ZYIdB6ucudhLW1dGd/ZyD0iU82e0XrU/tm6oDBdeSFOy1AAXN5pern18VcPeaT/zGgN7DG1LW9jISbYFzLwvHwzTMKSVgq4HSfeTHiSKoWp0qAbcFHUYfC4L1Heqd/UfzVN/1/9eSj69Hbjff8+E6OOF15Ky2gtr8PSyP7WIu9rTueUUoWIMG99btq5OYvEbmWgHuHIcJBUEJOalvhrZePbTW3v22Eh45M=
248 271a4ab29605ffa0bae5d3208eaa21a95427ff92 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmSUEeMZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVlJnC/98qGmpi0gHbsoCPfoxgV2uSE4XAXZXPvbHqKAVUVJbkQoS0L2jighUArPZsduRjD+nSf/jO951/DmnxIwXfF5qA2dP1eBnjSmXS3xslmqD7nUw+pP8mKUQvXky+AbiL5onWw4gRtsqTZg4DYnPMeaE/eIUy/j60kXsf6gaDkQSAF/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A0o6c/y7vxglCwUZmSCAgZLxPC8CPv1PMQ1wRjHPygaZR2dDtxktFrfrZmU7uY61rY3VBG7Z5GhT9JF0biS7/K5nN687yybj76Gn7Kw/TMDK4GKCboVydRBp0poxSp8I+fty2N0Trpsw47CQp6HcBHq1FPrIv587+7X9VgajkC/+ECWBwdlo1pA5GlhJP6/4j8jvcAteFp0HS24z++NT0AYUB4UBgCCmg5hdDeF8j6A7SLcpf+YfbIwiGPkSRfIBeT+bhBJVDV4gbhoE02BMymU42OmaMqC1W8YI32WhugAfZJNPmJzdeNO7PNjTPNnjSjFzAHuQVS5Z9SvfctvJG532hygJkR+bCeaHzwAebyXkopRLm4PUpWcazoEes=
@@ -264,3 +264,4 b' da372c745e0f053bb7a64e74cccd15810d96341d'
264 271a4ab29605ffa0bae5d3208eaa21a95427ff92 6.4.5
264 271a4ab29605ffa0bae5d3208eaa21a95427ff92 6.4.5
265 bb42988c7e156931b0ff1e93732b98173ebbcb7f 6.5rc0
265 bb42988c7e156931b0ff1e93732b98173ebbcb7f 6.5rc0
266 3ffc7209bbae5804a53084c9dc2d41139e88c867 6.5
266 3ffc7209bbae5804a53084c9dc2d41139e88c867 6.5
267 787af4e0e8b787e1b77a8059926b123730a4cd01 6.5.1
@@ -902,7 +902,7 b' def perftags(ui, repo, **opts):'
902 repocleartagscache()
902 repocleartagscache()
903
903
904 def t():
904 def t():
905 return len(repo.tags())
905 len(repo.tags())
906
906
907 timer(t, setup=s)
907 timer(t, setup=s)
908 fm.end()
908 fm.end()
@@ -567,8 +567,10 b' class mapfile(dict):'
567
567
568 def makedatetimestamp(t):
568 def makedatetimestamp(t):
569 """Like dateutil.makedate() but for time t instead of current time"""
569 """Like dateutil.makedate() but for time t instead of current time"""
570 delta = datetime.datetime.utcfromtimestamp(
570 tz = round(
571 t
571 t
572 ) - datetime.datetime.fromtimestamp(t)
572 - datetime.datetime.fromtimestamp(t)
573 tz = delta.days * 86400 + delta.seconds
573 .replace(tzinfo=datetime.timezone.utc)
574 .timestamp()
575 )
574 return t, tz
576 return t, tz
@@ -9,9 +9,10 b''
9 import ast
9 import ast
10 import collections
10 import collections
11 import functools
11 import functools
12 import imp
12 import importlib
13 import inspect
13 import inspect
14 import os
14 import os
15 import sys
15
16
16 from .i18n import (
17 from .i18n import (
17 _,
18 _,
@@ -89,20 +90,18 b' def loadpath(path, module_name):'
89 path = pycompat.fsdecode(path)
90 path = pycompat.fsdecode(path)
90 if os.path.isdir(path):
91 if os.path.isdir(path):
91 # module/__init__.py style
92 # module/__init__.py style
92 d, f = os.path.split(path)
93 init_py_path = os.path.join(path, '__init__.py')
93 fd, fpath, desc = imp.find_module(f, [d])
94 if not os.path.exists(init_py_path):
94 # When https://github.com/python/typeshed/issues/3466 is fixed
95 raise ImportError("No module named '%s'" % os.path.basename(path))
95 # and in a pytype release we can drop this disable.
96 path = init_py_path
96 return imp.load_module(
97
97 module_name, fd, fpath, desc # pytype: disable=wrong-arg-types
98 loader = importlib.machinery.SourceFileLoader(module_name, path)
98 )
99 spec = importlib.util.spec_from_file_location(module_name, loader=loader)
99 else:
100 assert spec is not None # help Pytype
100 try:
101 module = importlib.util.module_from_spec(spec)
101 return imp.load_source(module_name, path)
102 sys.modules[module_name] = module
102 except IOError as exc:
103 spec.loader.exec_module(module)
103 if not exc.filename:
104 return module
104 exc.filename = path # python does not fill this
105 raise
106
105
107
106
108 def _importh(name):
107 def _importh(name):
@@ -894,16 +893,31 b' def _disabledcmdtable(path):'
894 with open(path, b'rb') as src:
893 with open(path, b'rb') as src:
895 root = ast.parse(src.read(), path)
894 root = ast.parse(src.read(), path)
896 cmdtable = {}
895 cmdtable = {}
896
897 # Python 3.12 started removing Bytes and Str and deprecate harder
898 use_constant = 'Bytes' not in vars(ast)
899
897 for node in _walkcommand(root):
900 for node in _walkcommand(root):
898 if not node.args:
901 if not node.args:
899 continue
902 continue
900 a = node.args[0]
903 a = node.args[0]
901 if isinstance(a, ast.Str):
904 if use_constant: # Valid since Python 3.8
902 name = pycompat.sysbytes(a.s)
905 if isinstance(a, ast.Constant):
903 elif isinstance(a, ast.Bytes):
906 if isinstance(a.value, str):
904 name = a.s
907 name = pycompat.sysbytes(a.value)
905 else:
908 elif isinstance(a.value, bytes):
906 continue
909 name = a.value
910 else:
911 continue
912 else:
913 continue
914 else: # Valid until 3.11
915 if isinstance(a, ast.Str):
916 name = pycompat.sysbytes(a.s)
917 elif isinstance(a, ast.Bytes):
918 name = a.s
919 else:
920 continue
907 cmdtable[name] = (None, [], b'')
921 cmdtable[name] = (None, [], b'')
908 return cmdtable
922 return cmdtable
909
923
@@ -209,16 +209,18 b' def extrafilter(ui):'
209 subsettable = repoviewutil.subsettable
209 subsettable = repoviewutil.subsettable
210
210
211 if combine(b'base') not in filtertable:
211 if combine(b'base') not in filtertable:
212 for name in _basefiltername:
212 for base_name in _basefiltername:
213
213
214 def extrafilteredrevs(repo, *args, **kwargs):
214 def extrafilteredrevs(repo, *args, name=base_name, **kwargs):
215 baserevs = filtertable[name](repo, *args, **kwargs)
215 baserevs = filtertable[name](repo, *args, **kwargs)
216 extrarevs = frozenset(repo.revs(frevs))
216 extrarevs = frozenset(repo.revs(frevs))
217 return baserevs | extrarevs
217 return baserevs | extrarevs
218
218
219 filtertable[combine(name)] = extrafilteredrevs
219 filtertable[combine(base_name)] = extrafilteredrevs
220 if name in subsettable:
220 if base_name in subsettable:
221 subsettable[combine(name)] = combine(subsettable[name])
221 subsettable[combine(base_name)] = combine(
222 subsettable[base_name]
223 )
222 return fid
224 return fid
223
225
224
226
@@ -2131,11 +2131,14 b' class revlog:'
2131
2131
2132 The file will only exist if a splitting operation is in progress, but
2132 The file will only exist if a splitting operation is in progress, but
2133 it is always expected at the same location."""
2133 it is always expected at the same location."""
2134 parts = os.path.split(self.radix)
2134 parts = self.radix.split(b'/')
2135 if len(parts) > 1:
2135 if len(parts) > 1:
2136 # adds a '-s' prefix to the ``data/` or `meta/` base
2136 # adds a '-s' prefix to the ``data/` or `meta/` base
2137 head = parts[0] + b'-s'
2137 head = parts[0] + b'-s'
2138 return os.path.join(head, *parts[1:])
2138 mids = parts[1:-1]
2139 tail = parts[-1] + b'.i'
2140 pieces = [head] + mids + [tail]
2141 return b'/'.join(pieces)
2139 else:
2142 else:
2140 # the revlog is stored at the root of the store (changelog or
2143 # the revlog is stored at the root of the store (changelog or
2141 # manifest), no risk of collision.
2144 # manifest), no risk of collision.
@@ -1093,12 +1093,13 b' class _fncachevfs(vfsmod.proxyvfs):'
1093 ):
1093 ):
1094 # do not trigger a fncache load when adding a file that already is
1094 # do not trigger a fncache load when adding a file that already is
1095 # known to exist.
1095 # known to exist.
1096 notload = self.fncache.entries is None and self.vfs.exists(encoded)
1096 notload = self.fncache.entries is None and (
1097 if notload and b'r+' in mode and not self.vfs.stat(encoded).st_size:
1097 # if the file has size zero, it should be considered as missing.
1098 # when appending to an existing file, if the file has size zero,
1098 # Such zero-size files are the result of truncation when a
1099 # it should be considered as missing. Such zero-size files are
1099 # transaction is aborted.
1100 # the result of truncation when a transaction is aborted.
1100 self.vfs.exists(encoded)
1101 notload = False
1101 and self.vfs.stat(encoded).st_size
1102 )
1102 if not notload:
1103 if not notload:
1103 self.fncache.add(path)
1104 self.fncache.add(path)
1104 return self.vfs(encoded, mode, *args, **kw)
1105 return self.vfs(encoded, mode, *args, **kw)
@@ -1277,14 +1277,14 b' class sortdict(collections.OrderedDict):'
1277
1277
1278 >>> d1 = sortdict([(b'a', 0), (b'b', 1)])
1278 >>> d1 = sortdict([(b'a', 0), (b'b', 1)])
1279 >>> d2 = d1.copy()
1279 >>> d2 = d1.copy()
1280 >>> d2
1280 >>> list(d2.items())
1281 sortdict([('a', 0), ('b', 1)])
1281 [('a', 0), ('b', 1)]
1282 >>> d2.update([(b'a', 2)])
1282 >>> d2.update([(b'a', 2)])
1283 >>> list(d2.keys()) # should still be in last-set order
1283 >>> list(d2.keys()) # should still be in last-set order
1284 ['b', 'a']
1284 ['b', 'a']
1285 >>> d1.insert(1, b'a.5', 0.5)
1285 >>> d1.insert(1, b'a.5', 0.5)
1286 >>> d1
1286 >>> list(d1.items())
1287 sortdict([('a', 0), ('a.5', 0.5), ('b', 1)])
1287 [('a', 0), ('a.5', 0.5), ('b', 1)]
1288 """
1288 """
1289
1289
1290 def __setitem__(self, key, value):
1290 def __setitem__(self, key, value):
@@ -83,10 +83,14 b' def makedate(timestamp=None):'
83 raise error.InputError(
83 raise error.InputError(
84 _(b"negative timestamp: %d") % timestamp, hint=hint
84 _(b"negative timestamp: %d") % timestamp, hint=hint
85 )
85 )
86 delta = datetime.datetime.utcfromtimestamp(
86 tz = round(
87 timestamp
87 timestamp
88 ) - datetime.datetime.fromtimestamp(timestamp)
88 - datetime.datetime.fromtimestamp(
89 tz = delta.days * 86400 + delta.seconds
89 timestamp,
90 )
91 .replace(tzinfo=datetime.timezone.utc)
92 .timestamp()
93 )
90 return timestamp, tz
94 return timestamp, tz
91
95
92
96
@@ -8,7 +8,7 b''
8 # GNU General Public License version 2 or any later version.
8 # GNU General Public License version 2 or any later version.
9
9
10
10
11 import imp
11 import _imp
12 import os
12 import os
13 import sys
13 import sys
14
14
@@ -24,7 +24,7 b' def mainfrozen():'
24 return (
24 return (
25 pycompat.safehasattr(sys, "frozen") # new py2exe
25 pycompat.safehasattr(sys, "frozen") # new py2exe
26 or pycompat.safehasattr(sys, "importers") # old py2exe
26 or pycompat.safehasattr(sys, "importers") # old py2exe
27 or imp.is_frozen("__main__") # tools/freeze
27 or _imp.is_frozen("__main__") # tools/freeze
28 )
28 )
29
29
30
30
@@ -274,7 +274,7 b' class abstractvfs:'
274 """
274 """
275 if forcibly:
275 if forcibly:
276
276
277 def onerror(function, path, excinfo):
277 def onexc(function, path, excinfo):
278 if function is not os.remove:
278 if function is not os.remove:
279 raise
279 raise
280 # read-only files cannot be unlinked under Windows
280 # read-only files cannot be unlinked under Windows
@@ -285,10 +285,17 b' class abstractvfs:'
285 os.remove(path)
285 os.remove(path)
286
286
287 else:
287 else:
288 onerror = None
288 onexc = None
289 return shutil.rmtree(
289 try:
290 self.join(path), ignore_errors=ignore_errors, onerror=onerror
290 # pytype: disable=wrong-keyword-args
291 )
291 return shutil.rmtree(
292 self.join(path), ignore_errors=ignore_errors, onexc=onexc
293 )
294 # pytype: enable=wrong-keyword-args
295 except TypeError: # onexc was introduced in Python 3.12
296 return shutil.rmtree(
297 self.join(path), ignore_errors=ignore_errors, onerror=onexc
298 )
292
299
293 def setflags(self, path: bytes, l: bool, x: bool):
300 def setflags(self, path: bytes, l: bool, x: bool):
294 return util.setflags(self.join(path), l, x)
301 return util.setflags(self.join(path), l, x)
@@ -1,3 +1,12 b''
1 = Mercurial 6.5.1 =
2
3 * A bunch of improvements to Python 3.12 compatibility
4 * repoview: fix the filter created by `extrafilter`
5 * Improve portability of the test suite
6 * fncache: fix a bug that corrupts the fncache after transaction rollback
7 * revlog: fix the naming scheme use by split temporary file
8 * perf: fix perf::tags
9
1 = Mercurial 6.5 =
10 = Mercurial 6.5 =
2
11
3 As usual, a lot of patches don't make it to this list since they're more internal.
12 As usual, a lot of patches don't make it to this list since they're more internal.
@@ -99,7 +99,7 b' backup bundle from strip'
99 strip an ancestors of the internal changeset
99 strip an ancestors of the internal changeset
100 --------------------------------------------
100 --------------------------------------------
101
101
102 $ cp -ar reference-repo strip-ancestor
102 $ cp -aR reference-repo strip-ancestor
103 $ cd strip-ancestor
103 $ cd strip-ancestor
104
104
105 The internal change is stripped, yet it should be skipped from the backup bundle.
105 The internal change is stripped, yet it should be skipped from the backup bundle.
@@ -154,7 +154,7 b' Shelve should still work'
154 strip an unrelated changeset with a lower revnum
154 strip an unrelated changeset with a lower revnum
155 ------------------------------------------------
155 ------------------------------------------------
156
156
157 $ cp -ar reference-repo strip-unrelated
157 $ cp -aR reference-repo strip-unrelated
158 $ cd strip-unrelated
158 $ cd strip-unrelated
159
159
160 The internal change is not directly stripped, but it is affected by the strip
160 The internal change is not directly stripped, but it is affected by the strip
@@ -200,7 +200,7 b' Shelve should still work'
200 explicitly strip the internal changeset
200 explicitly strip the internal changeset
201 ---------------------------------------
201 ---------------------------------------
202
202
203 $ cp -ar reference-repo strip-explicit
203 $ cp -aR reference-repo strip-explicit
204 $ cd strip-explicit
204 $ cd strip-explicit
205
205
206 The internal change is directly selected for stripping.
206 The internal change is directly selected for stripping.
@@ -198,7 +198,7 b' Check the path.*:pulled-delta-reuse-poli'
198
198
199 Get a repository with the bad parent picked and a clone ready to pull the merge
199 Get a repository with the bad parent picked and a clone ready to pull the merge
200
200
201 $ cp -ar bundle-reuse-enabled peer-bad-delta
201 $ cp -aR bundle-reuse-enabled peer-bad-delta
202 $ hg clone peer-bad-delta local-pre-pull --rev `cat large.node` --rev `cat small.node` --quiet
202 $ hg clone peer-bad-delta local-pre-pull --rev `cat large.node` --rev `cat small.node` --quiet
203 DBG-DELTAS: CHANGELOG: * (glob)
203 DBG-DELTAS: CHANGELOG: * (glob)
204 DBG-DELTAS: CHANGELOG: * (glob)
204 DBG-DELTAS: CHANGELOG: * (glob)
@@ -222,7 +222,7 b' Pull with no value (so the default)'
222
222
223 default is to reuse the (bad) delta
223 default is to reuse the (bad) delta
224
224
225 $ cp -ar local-pre-pull local-no-value
225 $ cp -aR local-pre-pull local-no-value
226 $ hg -R local-no-value pull --quiet
226 $ hg -R local-no-value pull --quiet
227 DBG-DELTAS: CHANGELOG: * (glob)
227 DBG-DELTAS: CHANGELOG: * (glob)
228 DBG-DELTAS: MANIFESTLOG: * (glob)
228 DBG-DELTAS: MANIFESTLOG: * (glob)
@@ -233,7 +233,7 b' Pull with explicitly the default'
233
233
234 default is to reuse the (bad) delta
234 default is to reuse the (bad) delta
235
235
236 $ cp -ar local-pre-pull local-default
236 $ cp -aR local-pre-pull local-default
237 $ hg -R local-default pull --quiet --config 'paths.default:pulled-delta-reuse-policy=default'
237 $ hg -R local-default pull --quiet --config 'paths.default:pulled-delta-reuse-policy=default'
238 DBG-DELTAS: CHANGELOG: * (glob)
238 DBG-DELTAS: CHANGELOG: * (glob)
239 DBG-DELTAS: MANIFESTLOG: * (glob)
239 DBG-DELTAS: MANIFESTLOG: * (glob)
@@ -244,7 +244,7 b' Pull with no-reuse'
244
244
245 We don't reuse the base, so we get a better delta
245 We don't reuse the base, so we get a better delta
246
246
247 $ cp -ar local-pre-pull local-no-reuse
247 $ cp -aR local-pre-pull local-no-reuse
248 $ hg -R local-no-reuse pull --quiet --config 'paths.default:pulled-delta-reuse-policy=no-reuse'
248 $ hg -R local-no-reuse pull --quiet --config 'paths.default:pulled-delta-reuse-policy=no-reuse'
249 DBG-DELTAS: CHANGELOG: * (glob)
249 DBG-DELTAS: CHANGELOG: * (glob)
250 DBG-DELTAS: MANIFESTLOG: * (glob)
250 DBG-DELTAS: MANIFESTLOG: * (glob)
@@ -255,7 +255,7 b' Pull with try-base'
255
255
256 We requested to use the (bad) delta
256 We requested to use the (bad) delta
257
257
258 $ cp -ar local-pre-pull local-try-base
258 $ cp -aR local-pre-pull local-try-base
259 $ hg -R local-try-base pull --quiet --config 'paths.default:pulled-delta-reuse-policy=try-base'
259 $ hg -R local-try-base pull --quiet --config 'paths.default:pulled-delta-reuse-policy=try-base'
260 DBG-DELTAS: CHANGELOG: * (glob)
260 DBG-DELTAS: CHANGELOG: * (glob)
261 DBG-DELTAS: MANIFESTLOG: * (glob)
261 DBG-DELTAS: MANIFESTLOG: * (glob)
@@ -266,8 +266,8 b' Case where we force a "bad" delta to be '
266
266
267 We build a very different file content to force a full snapshot
267 We build a very different file content to force a full snapshot
268
268
269 $ cp -ar peer-bad-delta peer-bad-delta-with-full
269 $ cp -aR peer-bad-delta peer-bad-delta-with-full
270 $ cp -ar local-pre-pull local-pre-pull-full
270 $ cp -aR local-pre-pull local-pre-pull-full
271 $ echo '[paths]' >> local-pre-pull-full/.hg/hgrc
271 $ echo '[paths]' >> local-pre-pull-full/.hg/hgrc
272 $ echo 'default=../peer-bad-delta-with-full' >> local-pre-pull-full/.hg/hgrc
272 $ echo 'default=../peer-bad-delta-with-full' >> local-pre-pull-full/.hg/hgrc
273
273
@@ -286,7 +286,7 b' The bundling process creates a delta aga'
286 is an invalid chain for the client, so it is not considered and we do a full
286 is an invalid chain for the client, so it is not considered and we do a full
287 snapshot again.
287 snapshot again.
288
288
289 $ cp -ar local-pre-pull-full local-try-base-full
289 $ cp -aR local-pre-pull-full local-try-base-full
290 $ hg -R local-try-base-full pull --quiet \
290 $ hg -R local-try-base-full pull --quiet \
291 > --config 'paths.default:pulled-delta-reuse-policy=try-base'
291 > --config 'paths.default:pulled-delta-reuse-policy=try-base'
292 DBG-DELTAS: CHANGELOG: * (glob)
292 DBG-DELTAS: CHANGELOG: * (glob)
@@ -301,7 +301,7 b' Check that "forced" behavior do not chal'
301
301
302 A full bundle should be accepted as full bundle without recomputation
302 A full bundle should be accepted as full bundle without recomputation
303
303
304 $ cp -ar local-pre-pull-full local-forced-full
304 $ cp -aR local-pre-pull-full local-forced-full
305 $ hg -R local-forced-full pull --quiet \
305 $ hg -R local-forced-full pull --quiet \
306 > --config 'paths.default:pulled-delta-reuse-policy=forced'
306 > --config 'paths.default:pulled-delta-reuse-policy=forced'
307 DBG-DELTAS: CHANGELOG: * (glob)
307 DBG-DELTAS: CHANGELOG: * (glob)
@@ -322,7 +322,7 b' more subtle to test this behavior.'
322
322
323 $ hg bundle -R peer-bad-delta-with-full --all --config devel.bundle.delta=p1 all-p1.hg
323 $ hg bundle -R peer-bad-delta-with-full --all --config devel.bundle.delta=p1 all-p1.hg
324 5 changesets found
324 5 changesets found
325 $ cp -ar local-pre-pull-full local-forced-full-p1
325 $ cp -aR local-pre-pull-full local-forced-full-p1
326 $ hg -R local-forced-full-p1 pull --quiet \
326 $ hg -R local-forced-full-p1 pull --quiet \
327 > --config 'paths.*:pulled-delta-reuse-policy=forced' all-p1.hg
327 > --config 'paths.*:pulled-delta-reuse-policy=forced' all-p1.hg
328 DBG-DELTAS: CHANGELOG: * (glob)
328 DBG-DELTAS: CHANGELOG: * (glob)
@@ -8,32 +8,18 b''
8 $ cd ..
8 $ cd ..
9 $ hg init test2
9 $ hg init test2
10 $ cd test2
10 $ cd test2
11 $ hg incoming http://foo:xyzzy@localhost:$HGPORT/
11 $ hg incoming http://foo:xyzzy@localhost:$HGPORT/ -T '{desc}\n'
12 comparing with http://foo:***@localhost:$HGPORT/
12 comparing with http://foo:***@localhost:$HGPORT/
13 changeset: 0:1ea73414a91b
13 r0
14 user: debugbuilddag
14 r1
15 date: Thu Jan 01 00:00:00 1970 +0000
16 summary: r0
17
18 changeset: 1:66f7d451a68b
19 tag: tip
20 user: debugbuilddag
21 date: Thu Jan 01 00:00:01 1970 +0000
22 summary: r1
23
24 $ killdaemons.py
15 $ killdaemons.py
25
16
26 $ cd ..
17 $ cd ..
27 $ hg -R test --config server.view=immutable serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
18 $ hg -R test --config server.view=immutable serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
28 $ cat hg.pid >> $DAEMON_PIDS
19 $ cat hg.pid >> $DAEMON_PIDS
29 $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT/
20 $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT/ -T '{desc}\n'
30 comparing with http://foo:***@localhost:$HGPORT/
21 comparing with http://foo:***@localhost:$HGPORT/
31 changeset: 0:1ea73414a91b
22 r0
32 tag: tip
33 user: debugbuilddag
34 date: Thu Jan 01 00:00:00 1970 +0000
35 summary: r0
36
37
23
38 Check same result using `experimental.extra-filter-revs`
24 Check same result using `experimental.extra-filter-revs`
39
25
@@ -66,3 +52,69 b' cleanup'
66
52
67 $ cat errors.log
53 $ cat errors.log
68 $ killdaemons.py
54 $ killdaemons.py
55
56 Check the behavior is other filtered revision exists
57 ----------------------------------------------------
58
59 add more content and complexity to the repository too
60
61 $ hg -R test debugbuilddag '+6:branchpoint.:left+4*branchpoint.:right+5' --from-existing
62 $ hg -R test phase --public 'desc("re:^r11$")'
63 $ hg -R test phase --secret --force 'desc("re:^r9$")'
64 $ hg -R test log -G -T '{desc} {phase}\n'
65 o r17 draft
66 |
67 o r16 draft
68 |
69 o r15 draft
70 |
71 o r14 draft
72 |
73 o r13 draft
74 |
75 o r12 draft
76 |
77 o r11 public
78 |
79 | o r10 secret
80 | |
81 | o r9 secret
82 | |
83 | o r8 draft
84 | |
85 | o r7 draft
86 | |
87 | o r6 draft
88 |/
89 o r5 public
90 |
91 o r4 public
92 |
93 o r3 public
94 |
95 o r2 public
96 |
97 o r1 public
98 |
99 o r0 public
100
101 $ hg -R test --config experimental.extra-filter-revs='(desc("re:^r13$") + desc("re:^r10$"))::' serve -p $HGPORT1 -d --pid-file=hg2.pid -E errors.log
102 $ cat hg2.pid >> $DAEMON_PIDS
103 $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT1/ -T '{desc}\n'
104 comparing with http://foo:***@localhost:$HGPORT1/
105 r0
106 r1
107 r2
108 r3
109 r4
110 r5
111 r6
112 r7
113 r8
114 r11
115 r12
116
117 cleanups
118
119 $ cat errors.log
120 $ killdaemons.py
@@ -202,9 +202,13 b' The inline revlog still exist, but a spl'
202 data/some_dir/sub_dir/foo_bar.i.s/tutu.i 1174
202 data/some_dir/sub_dir/foo_bar.i.s/tutu.i 1174
203 data/some_dir/sub_dir/foo_bar.i.s/tutu.d 0
203 data/some_dir/sub_dir/foo_bar.i.s/tutu.d 0
204 $ f -s .hg/store/data*/file*
204 $ f -s .hg/store/data*/file*
205 .hg/store/data-s/file: size=320
205 .hg/store/data-s/file.i: size=320
206 .hg/store/data/file.d: size=267307
206 .hg/store/data/file.d: size=267307
207 .hg/store/data/file.i: size=132395
207 .hg/store/data/file.i: size=132395
208 $ f -s .hg/store/data*/foo*/bar*/babar__celeste*/foo*
209 .hg/store/data-s/foo/bar/babar__celeste/foo.i: size=320
210 .hg/store/data/foo/bar/babar__celeste/foo.d: size=267307
211 .hg/store/data/foo/bar/babar__celeste/foo.i: size=132395
208
212
209
213
210 The first file.i entry should match the "Reference size" above.
214 The first file.i entry should match the "Reference size" above.
@@ -217,7 +221,7 b' A "temporary file" entry exist for the s'
217 data/file.d 0
221 data/file.d 0
218 $ cat .hg/store/journal.backupfiles | tr -s '\000' ' ' | tr -s '\00' ' '| grep 'data.*/file'
222 $ cat .hg/store/journal.backupfiles | tr -s '\000' ' ' | tr -s '\00' ' '| grep 'data.*/file'
219 data/file.i data/journal.backup.file.i.bck 0
223 data/file.i data/journal.backup.file.i.bck 0
220 data-s/file 0
224 data-s/file.i 0
221
225
222 recover is rolling the split back, the fncache is still valid
226 recover is rolling the split back, the fncache is still valid
223
227
@@ -281,7 +285,7 b' Reference size:'
281 The inline revlog still exist, but a split version exist next to it
285 The inline revlog still exist, but a split version exist next to it
282
286
283 $ f -s .hg/store/data*/file*
287 $ f -s .hg/store/data*/file*
284 .hg/store/data-s/file: size=320
288 .hg/store/data-s/file.i: size=320
285 .hg/store/data/file.d: size=267307
289 .hg/store/data/file.d: size=267307
286 .hg/store/data/file.i: size=132395
290 .hg/store/data/file.i: size=132395
287
291
@@ -398,7 +402,6 b' The split was rollback'
398 $ f -s .hg/store/data*/file*
402 $ f -s .hg/store/data*/file*
399 .hg/store/data/file.i: size=1174
403 .hg/store/data/file.i: size=1174
400
404
401
402 $ hg tip
405 $ hg tip
403 changeset: 1:64b04c8dc267
406 changeset: 1:64b04c8dc267
404 tag: tip
407 tag: tip
@@ -407,6 +410,25 b' The split was rollback'
407 summary: b
410 summary: b
408
411
409 $ hg verify -q
412 $ hg verify -q
413
414 $ cat > .hg/hgrc <<EOF
415 > [hooks]
416 > EOF
417 $ hg pull ../troffset-computation
418 pulling from ../troffset-computation
419 searching for changes
420 adding changesets
421 adding manifests
422 adding file changes
423 added 3 changesets with 18 changes to 6 files
424 new changesets c99a94cae9b1:64874a3b0160
425 (run 'hg update' to get a working copy)
426
427 $ f -s .hg/store/data*/file*
428 .hg/store/data/file.d: size=267307
429 .hg/store/data/file.i: size=320
430 $ hg verify -q
431
410 $ cd ..
432 $ cd ..
411
433
412 Read race
434 Read race
General Comments 0
You need to be logged in to leave comments. Login now