Mercurial > hg
changeset 50819:3ccef7902070
branching: merge stable into default
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 07 Aug 2023 11:08:00 +0200 |
parents | 5c3d07950bac (current diff) 04d5cde28a7f (diff) |
children | b922c767b214 |
files | contrib/perf.py mercurial/extensions.py tests/test-transaction-rollback-on-revlog-split.t |
diffstat | 17 files changed, 206 insertions(+), 88 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsigs Mon Jul 24 05:13:52 2023 +0200 +++ b/.hgsigs Mon Aug 07 11:08:00 2023 +0200 @@ -248,3 +248,4 @@ 271a4ab29605ffa0bae5d3208eaa21a95427ff92 0 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
--- a/.hgtags Mon Jul 24 05:13:52 2023 +0200 +++ b/.hgtags Mon Aug 07 11:08:00 2023 +0200 @@ -264,3 +264,4 @@ 271a4ab29605ffa0bae5d3208eaa21a95427ff92 6.4.5 bb42988c7e156931b0ff1e93732b98173ebbcb7f 6.5rc0 3ffc7209bbae5804a53084c9dc2d41139e88c867 6.5 +787af4e0e8b787e1b77a8059926b123730a4cd01 6.5.1
--- a/contrib/perf.py Mon Jul 24 05:13:52 2023 +0200 +++ b/contrib/perf.py Mon Aug 07 11:08:00 2023 +0200 @@ -902,7 +902,7 @@ repocleartagscache() def t(): - return len(repo.tags()) + len(repo.tags()) timer(t, setup=s) fm.end()
--- a/hgext/convert/common.py Mon Jul 24 05:13:52 2023 +0200 +++ b/hgext/convert/common.py Mon Aug 07 11:08:00 2023 +0200 @@ -567,8 +567,10 @@ def makedatetimestamp(t): """Like dateutil.makedate() but for time t instead of current time""" - delta = datetime.datetime.utcfromtimestamp( + tz = round( t - ) - datetime.datetime.fromtimestamp(t) - tz = delta.days * 86400 + delta.seconds + - datetime.datetime.fromtimestamp(t) + .replace(tzinfo=datetime.timezone.utc) + .timestamp() + ) return t, tz
--- a/mercurial/extensions.py Mon Jul 24 05:13:52 2023 +0200 +++ b/mercurial/extensions.py Mon Aug 07 11:08:00 2023 +0200 @@ -9,9 +9,10 @@ import ast import collections import functools -import imp +import importlib import inspect import os +import sys from .i18n import ( _, @@ -89,20 +90,18 @@ path = pycompat.fsdecode(path) if os.path.isdir(path): # module/__init__.py style - d, f = os.path.split(path) - fd, fpath, desc = imp.find_module(f, [d]) - # When https://github.com/python/typeshed/issues/3466 is fixed - # and in a pytype release we can drop this disable. - return imp.load_module( - module_name, fd, fpath, desc # pytype: disable=wrong-arg-types - ) - else: - try: - return imp.load_source(module_name, path) - except IOError as exc: - if not exc.filename: - exc.filename = path # python does not fill this - raise + init_py_path = os.path.join(path, '__init__.py') + if not os.path.exists(init_py_path): + raise ImportError("No module named '%s'" % os.path.basename(path)) + path = init_py_path + + loader = importlib.machinery.SourceFileLoader(module_name, path) + spec = importlib.util.spec_from_file_location(module_name, loader=loader) + assert spec is not None # help Pytype + module = importlib.util.module_from_spec(spec) + sys.modules[module_name] = module + spec.loader.exec_module(module) + return module def _importh(name): @@ -894,16 +893,31 @@ with open(path, b'rb') as src: root = ast.parse(src.read(), path) cmdtable = {} + + # Python 3.12 started removing Bytes and Str and deprecate harder + use_constant = 'Bytes' not in vars(ast) + for node in _walkcommand(root): if not node.args: continue a = node.args[0] - if isinstance(a, ast.Str): - name = pycompat.sysbytes(a.s) - elif isinstance(a, ast.Bytes): - name = a.s - else: - continue + if use_constant: # Valid since Python 3.8 + if isinstance(a, ast.Constant): + if isinstance(a.value, str): + name = pycompat.sysbytes(a.value) + elif isinstance(a.value, bytes): + name = a.value + else: + continue + else: + continue + else: # Valid until 3.11 + if isinstance(a, ast.Str): + name = pycompat.sysbytes(a.s) + elif isinstance(a, ast.Bytes): + name = a.s + else: + continue cmdtable[name] = (None, [], b'') return cmdtable
--- a/mercurial/repoview.py Mon Jul 24 05:13:52 2023 +0200 +++ b/mercurial/repoview.py Mon Aug 07 11:08:00 2023 +0200 @@ -209,16 +209,18 @@ subsettable = repoviewutil.subsettable if combine(b'base') not in filtertable: - for name in _basefiltername: + for base_name in _basefiltername: - def extrafilteredrevs(repo, *args, **kwargs): + def extrafilteredrevs(repo, *args, name=base_name, **kwargs): baserevs = filtertable[name](repo, *args, **kwargs) extrarevs = frozenset(repo.revs(frevs)) return baserevs | extrarevs - filtertable[combine(name)] = extrafilteredrevs - if name in subsettable: - subsettable[combine(name)] = combine(subsettable[name]) + filtertable[combine(base_name)] = extrafilteredrevs + if base_name in subsettable: + subsettable[combine(base_name)] = combine( + subsettable[base_name] + ) return fid
--- a/mercurial/revlog.py Mon Jul 24 05:13:52 2023 +0200 +++ b/mercurial/revlog.py Mon Aug 07 11:08:00 2023 +0200 @@ -2131,11 +2131,14 @@ The file will only exist if a splitting operation is in progress, but it is always expected at the same location.""" - parts = os.path.split(self.radix) + parts = self.radix.split(b'/') if len(parts) > 1: # adds a '-s' prefix to the ``data/` or `meta/` base head = parts[0] + b'-s' - return os.path.join(head, *parts[1:]) + mids = parts[1:-1] + tail = parts[-1] + b'.i' + pieces = [head] + mids + [tail] + return b'/'.join(pieces) else: # the revlog is stored at the root of the store (changelog or # manifest), no risk of collision.
--- a/mercurial/store.py Mon Jul 24 05:13:52 2023 +0200 +++ b/mercurial/store.py Mon Aug 07 11:08:00 2023 +0200 @@ -1093,12 +1093,13 @@ ): # do not trigger a fncache load when adding a file that already is # known to exist. - notload = self.fncache.entries is None and self.vfs.exists(encoded) - if notload and b'r+' in mode and not self.vfs.stat(encoded).st_size: - # when appending to an existing file, if the file has size zero, - # it should be considered as missing. Such zero-size files are - # the result of truncation when a transaction is aborted. - notload = False + notload = self.fncache.entries is None and ( + # if the file has size zero, it should be considered as missing. + # Such zero-size files are the result of truncation when a + # transaction is aborted. + self.vfs.exists(encoded) + and self.vfs.stat(encoded).st_size + ) if not notload: self.fncache.add(path) return self.vfs(encoded, mode, *args, **kw)
--- a/mercurial/util.py Mon Jul 24 05:13:52 2023 +0200 +++ b/mercurial/util.py Mon Aug 07 11:08:00 2023 +0200 @@ -1277,14 +1277,14 @@ >>> d1 = sortdict([(b'a', 0), (b'b', 1)]) >>> d2 = d1.copy() - >>> d2 - sortdict([('a', 0), ('b', 1)]) + >>> list(d2.items()) + [('a', 0), ('b', 1)] >>> d2.update([(b'a', 2)]) >>> list(d2.keys()) # should still be in last-set order ['b', 'a'] >>> d1.insert(1, b'a.5', 0.5) - >>> d1 - sortdict([('a', 0), ('a.5', 0.5), ('b', 1)]) + >>> list(d1.items()) + [('a', 0), ('a.5', 0.5), ('b', 1)] """ def __setitem__(self, key, value):
--- a/mercurial/utils/dateutil.py Mon Jul 24 05:13:52 2023 +0200 +++ b/mercurial/utils/dateutil.py Mon Aug 07 11:08:00 2023 +0200 @@ -83,10 +83,14 @@ raise error.InputError( _(b"negative timestamp: %d") % timestamp, hint=hint ) - delta = datetime.datetime.utcfromtimestamp( + tz = round( timestamp - ) - datetime.datetime.fromtimestamp(timestamp) - tz = delta.days * 86400 + delta.seconds + - datetime.datetime.fromtimestamp( + timestamp, + ) + .replace(tzinfo=datetime.timezone.utc) + .timestamp() + ) return timestamp, tz
--- a/mercurial/utils/resourceutil.py Mon Jul 24 05:13:52 2023 +0200 +++ b/mercurial/utils/resourceutil.py Mon Aug 07 11:08:00 2023 +0200 @@ -8,7 +8,7 @@ # GNU General Public License version 2 or any later version. -import imp +import _imp import os import sys @@ -24,7 +24,7 @@ return ( pycompat.safehasattr(sys, "frozen") # new py2exe or pycompat.safehasattr(sys, "importers") # old py2exe - or imp.is_frozen("__main__") # tools/freeze + or _imp.is_frozen("__main__") # tools/freeze )
--- a/mercurial/vfs.py Mon Jul 24 05:13:52 2023 +0200 +++ b/mercurial/vfs.py Mon Aug 07 11:08:00 2023 +0200 @@ -274,7 +274,7 @@ """ if forcibly: - def onerror(function, path, excinfo): + def onexc(function, path, excinfo): if function is not os.remove: raise # read-only files cannot be unlinked under Windows @@ -285,10 +285,17 @@ os.remove(path) else: - onerror = None - return shutil.rmtree( - self.join(path), ignore_errors=ignore_errors, onerror=onerror - ) + onexc = None + try: + # pytype: disable=wrong-keyword-args + return shutil.rmtree( + self.join(path), ignore_errors=ignore_errors, onexc=onexc + ) + # pytype: enable=wrong-keyword-args + except TypeError: # onexc was introduced in Python 3.12 + return shutil.rmtree( + self.join(path), ignore_errors=ignore_errors, onerror=onexc + ) def setflags(self, path: bytes, l: bool, x: bool): return util.setflags(self.join(path), l, x)
--- a/relnotes/6.5 Mon Jul 24 05:13:52 2023 +0200 +++ b/relnotes/6.5 Mon Aug 07 11:08:00 2023 +0200 @@ -1,3 +1,12 @@ += Mercurial 6.5.1 = + + * A bunch of improvements to Python 3.12 compatibility + * repoview: fix the filter created by `extrafilter` + * Improve portability of the test suite + * fncache: fix a bug that corrupts the fncache after transaction rollback + * revlog: fix the naming scheme use by split temporary file + * perf: fix perf::tags + = Mercurial 6.5 = As usual, a lot of patches don't make it to this list since they're more internal.
--- a/tests/test-bundle-phase-internal.t Mon Jul 24 05:13:52 2023 +0200 +++ b/tests/test-bundle-phase-internal.t Mon Aug 07 11:08:00 2023 +0200 @@ -99,7 +99,7 @@ strip an ancestors of the internal changeset -------------------------------------------- - $ cp -ar reference-repo strip-ancestor + $ cp -aR reference-repo strip-ancestor $ cd strip-ancestor The internal change is stripped, yet it should be skipped from the backup bundle. @@ -154,7 +154,7 @@ strip an unrelated changeset with a lower revnum ------------------------------------------------ - $ cp -ar reference-repo strip-unrelated + $ cp -aR reference-repo strip-unrelated $ cd strip-unrelated The internal change is not directly stripped, but it is affected by the strip @@ -200,7 +200,7 @@ explicitly strip the internal changeset --------------------------------------- - $ cp -ar reference-repo strip-explicit + $ cp -aR reference-repo strip-explicit $ cd strip-explicit The internal change is directly selected for stripping.
--- a/tests/test-revlog-delta-find.t Mon Jul 24 05:13:52 2023 +0200 +++ b/tests/test-revlog-delta-find.t Mon Aug 07 11:08:00 2023 +0200 @@ -198,7 +198,7 @@ Get a repository with the bad parent picked and a clone ready to pull the merge - $ cp -ar bundle-reuse-enabled peer-bad-delta + $ cp -aR bundle-reuse-enabled peer-bad-delta $ hg clone peer-bad-delta local-pre-pull --rev `cat large.node` --rev `cat small.node` --quiet DBG-DELTAS: CHANGELOG: * (glob) DBG-DELTAS: CHANGELOG: * (glob) @@ -222,7 +222,7 @@ default is to reuse the (bad) delta - $ cp -ar local-pre-pull local-no-value + $ cp -aR local-pre-pull local-no-value $ hg -R local-no-value pull --quiet DBG-DELTAS: CHANGELOG: * (glob) DBG-DELTAS: MANIFESTLOG: * (glob) @@ -233,7 +233,7 @@ default is to reuse the (bad) delta - $ cp -ar local-pre-pull local-default + $ cp -aR local-pre-pull local-default $ hg -R local-default pull --quiet --config 'paths.default:pulled-delta-reuse-policy=default' DBG-DELTAS: CHANGELOG: * (glob) DBG-DELTAS: MANIFESTLOG: * (glob) @@ -244,7 +244,7 @@ We don't reuse the base, so we get a better delta - $ cp -ar local-pre-pull local-no-reuse + $ cp -aR local-pre-pull local-no-reuse $ hg -R local-no-reuse pull --quiet --config 'paths.default:pulled-delta-reuse-policy=no-reuse' DBG-DELTAS: CHANGELOG: * (glob) DBG-DELTAS: MANIFESTLOG: * (glob) @@ -255,7 +255,7 @@ We requested to use the (bad) delta - $ cp -ar local-pre-pull local-try-base + $ cp -aR local-pre-pull local-try-base $ hg -R local-try-base pull --quiet --config 'paths.default:pulled-delta-reuse-policy=try-base' DBG-DELTAS: CHANGELOG: * (glob) DBG-DELTAS: MANIFESTLOG: * (glob) @@ -266,8 +266,8 @@ We build a very different file content to force a full snapshot - $ cp -ar peer-bad-delta peer-bad-delta-with-full - $ cp -ar local-pre-pull local-pre-pull-full + $ cp -aR peer-bad-delta peer-bad-delta-with-full + $ cp -aR local-pre-pull local-pre-pull-full $ echo '[paths]' >> local-pre-pull-full/.hg/hgrc $ echo 'default=../peer-bad-delta-with-full' >> local-pre-pull-full/.hg/hgrc @@ -286,7 +286,7 @@ is an invalid chain for the client, so it is not considered and we do a full snapshot again. - $ cp -ar local-pre-pull-full local-try-base-full + $ cp -aR local-pre-pull-full local-try-base-full $ hg -R local-try-base-full pull --quiet \ > --config 'paths.default:pulled-delta-reuse-policy=try-base' DBG-DELTAS: CHANGELOG: * (glob) @@ -301,7 +301,7 @@ A full bundle should be accepted as full bundle without recomputation - $ cp -ar local-pre-pull-full local-forced-full + $ cp -aR local-pre-pull-full local-forced-full $ hg -R local-forced-full pull --quiet \ > --config 'paths.default:pulled-delta-reuse-policy=forced' DBG-DELTAS: CHANGELOG: * (glob) @@ -322,7 +322,7 @@ $ hg bundle -R peer-bad-delta-with-full --all --config devel.bundle.delta=p1 all-p1.hg 5 changesets found - $ cp -ar local-pre-pull-full local-forced-full-p1 + $ cp -aR local-pre-pull-full local-forced-full-p1 $ hg -R local-forced-full-p1 pull --quiet \ > --config 'paths.*:pulled-delta-reuse-policy=forced' all-p1.hg DBG-DELTAS: CHANGELOG: * (glob)
--- a/tests/test-server-view.t Mon Jul 24 05:13:52 2023 +0200 +++ b/tests/test-server-view.t Mon Aug 07 11:08:00 2023 +0200 @@ -8,32 +8,18 @@ $ cd .. $ hg init test2 $ cd test2 - $ hg incoming http://foo:xyzzy@localhost:$HGPORT/ + $ hg incoming http://foo:xyzzy@localhost:$HGPORT/ -T '{desc}\n' comparing with http://foo:***@localhost:$HGPORT/ - changeset: 0:1ea73414a91b - user: debugbuilddag - date: Thu Jan 01 00:00:00 1970 +0000 - summary: r0 - - changeset: 1:66f7d451a68b - tag: tip - user: debugbuilddag - date: Thu Jan 01 00:00:01 1970 +0000 - summary: r1 - + r0 + r1 $ killdaemons.py $ cd .. $ hg -R test --config server.view=immutable serve -p $HGPORT -d --pid-file=hg.pid -E errors.log $ cat hg.pid >> $DAEMON_PIDS - $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT/ + $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT/ -T '{desc}\n' comparing with http://foo:***@localhost:$HGPORT/ - changeset: 0:1ea73414a91b - tag: tip - user: debugbuilddag - date: Thu Jan 01 00:00:00 1970 +0000 - summary: r0 - + r0 Check same result using `experimental.extra-filter-revs` @@ -66,3 +52,69 @@ $ cat errors.log $ killdaemons.py + +Check the behavior is other filtered revision exists +---------------------------------------------------- + +add more content and complexity to the repository too + + $ hg -R test debugbuilddag '+6:branchpoint.:left+4*branchpoint.:right+5' --from-existing + $ hg -R test phase --public 'desc("re:^r11$")' + $ hg -R test phase --secret --force 'desc("re:^r9$")' + $ hg -R test log -G -T '{desc} {phase}\n' + o r17 draft + | + o r16 draft + | + o r15 draft + | + o r14 draft + | + o r13 draft + | + o r12 draft + | + o r11 public + | + | o r10 secret + | | + | o r9 secret + | | + | o r8 draft + | | + | o r7 draft + | | + | o r6 draft + |/ + o r5 public + | + o r4 public + | + o r3 public + | + o r2 public + | + o r1 public + | + o r0 public + + $ 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 + $ cat hg2.pid >> $DAEMON_PIDS + $ hg -R test2 incoming http://foo:xyzzy@localhost:$HGPORT1/ -T '{desc}\n' + comparing with http://foo:***@localhost:$HGPORT1/ + r0 + r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r11 + r12 + +cleanups + + $ cat errors.log + $ killdaemons.py
--- a/tests/test-transaction-rollback-on-revlog-split.t Mon Jul 24 05:13:52 2023 +0200 +++ b/tests/test-transaction-rollback-on-revlog-split.t Mon Aug 07 11:08:00 2023 +0200 @@ -202,9 +202,13 @@ data/some_dir/sub_dir/foo_bar.i.s/tutu.i 1174 data/some_dir/sub_dir/foo_bar.i.s/tutu.d 0 $ f -s .hg/store/data*/file* - .hg/store/data-s/file: size=320 + .hg/store/data-s/file.i: size=320 .hg/store/data/file.d: size=267307 .hg/store/data/file.i: size=132395 + $ f -s .hg/store/data*/foo*/bar*/babar__celeste*/foo* + .hg/store/data-s/foo/bar/babar__celeste/foo.i: size=320 + .hg/store/data/foo/bar/babar__celeste/foo.d: size=267307 + .hg/store/data/foo/bar/babar__celeste/foo.i: size=132395 The first file.i entry should match the "Reference size" above. @@ -217,7 +221,7 @@ data/file.d 0 $ cat .hg/store/journal.backupfiles | tr -s '\000' ' ' | tr -s '\00' ' '| grep 'data.*/file' data/file.i data/journal.backup.file.i.bck 0 - data-s/file 0 + data-s/file.i 0 recover is rolling the split back, the fncache is still valid @@ -281,7 +285,7 @@ The inline revlog still exist, but a split version exist next to it $ f -s .hg/store/data*/file* - .hg/store/data-s/file: size=320 + .hg/store/data-s/file.i: size=320 .hg/store/data/file.d: size=267307 .hg/store/data/file.i: size=132395 @@ -398,7 +402,6 @@ $ f -s .hg/store/data*/file* .hg/store/data/file.i: size=1174 - $ hg tip changeset: 1:64b04c8dc267 tag: tip @@ -407,6 +410,25 @@ summary: b $ hg verify -q + + $ cat > .hg/hgrc <<EOF + > [hooks] + > EOF + $ hg pull ../troffset-computation + pulling from ../troffset-computation + searching for changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 18 changes to 6 files + new changesets c99a94cae9b1:64874a3b0160 + (run 'hg update' to get a working copy) + + $ f -s .hg/store/data*/file* + .hg/store/data/file.d: size=267307 + .hg/store/data/file.i: size=320 + $ hg verify -q + $ cd .. Read race