mercurial@50286: new changeset (1 on stable)
New changeset (1 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/5069a89a936e changeset: 50286:5069a89a936e branch: stable tag: tip parent: 50272:8a65b43457ab user:Pierre-Yves David date:Wed Mar 08 00:46:53 2023 +0100 summary: tests: fix timeout adjustement in delaypush.py -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 4 of 4 stable] hg-core: upgrade `zstd` dependency to 0.12
# HG changeset patch # User Mads Kiilerich # Date 1678212582 -3600 # Tue Mar 07 19:09:42 2023 +0100 # Branch stable # Node ID 98085f80f5b0c786dad342ad1eb9335dda653496 # Parent 6ab12a75c936e0f1bf4305b9fdf9960219d1a39c hg-core: upgrade `zstd` dependency to 0.12 zstd was recently upgraded from 0.5 to 0.11 . Now, take it one step further to 0.12 . There is no need to stay in the past. And 0.12 is available in Fedora - 0.11 isn't. diff --git a/rust/Cargo.lock b/rust/Cargo.lock --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1425,18 +1425,18 @@ checksum = "09041cd90cf85f7f8b2df60c646f [[package]] name = "zstd" -version = "0.11.2+zstd.1.5.2" +version = "0.12.3+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index; -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +version = "6.0.4+zstd.1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index; -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "7afb4b54b8910cf5447638cb54bf4e8a65cbedd783af98b98c62ffe91f185543" dependencies = [ "libc", "zstd-sys", @@ -1444,10 +1444,11 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.1+zstd.1.5.2" +version = "2.0.7+zstd.1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index; -checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" dependencies = [ "cc", "libc", + "pkg-config", ] diff --git a/rust/hg-core/Cargo.toml b/rust/hg-core/Cargo.toml --- a/rust/hg-core/Cargo.toml +++ b/rust/hg-core/Cargo.toml @@ -34,7 +34,7 @@ thread_local = "1.1.4" crossbeam-channel = "0.5.6" log = "0.4.17" memmap2 = { version = "0.5.8", features = ["stable_deref_trait"] } -zstd = "0.11.2" +zstd = "0.12" format-bytes = "0.3.0" # once_cell 1.15 uses edition 2021, while the heptapod CI # uses an old version of Cargo that doesn't support it. ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 3 of 4 stable] statprof: with Python 3.12, lineno is (more) often None
# HG changeset patch # User Mads Kiilerich # Date 1678205618 -3600 # Tue Mar 07 17:13:38 2023 +0100 # Branch stable # Node ID 6ab12a75c936e0f1bf4305b9fdf9960219d1a39c # Parent 72ba5a6dbb52570fbdfa07ce15ac6ad88e35f63c statprof: with Python 3.12, lineno is (more) often None test-profile.t failed with errors like: TypeError: %d format: a real number is required, not NoneType statprof.py already handled None values as -1 in some cases. Do the same in more cases. diff --git a/mercurial/statprof.py b/mercurial/statprof.py --- a/mercurial/statprof.py +++ b/mercurial/statprof.py @@ -540,7 +540,7 @@ def display_by_line(data, fp): for stat in stats: site = stat.site -sitelabel = b'%s:%d:%s' % (site.filename(), site.lineno, site.function) +sitelabel = b'%s:%d:%s' % (site.filename(), site.lineno or -1, site.function) fp.write( b'%6.2f %9.2f %9.2f %s\n' % ( @@ -613,7 +613,7 @@ def display_by_method(data, fp): stattuple = ( stat.selfpercent(), stat.selfseconds(), -stat.site.lineno, +stat.site.lineno or -1, source, ) ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 2 of 4 stable] py3: fix for Python 3.12 emitting SyntaxWarning on invalid escape sequences
# HG changeset patch # User Mads Kiilerich # Date 1678203954 -3600 # Tue Mar 07 16:45:54 2023 +0100 # Branch stable # Node ID 72ba5a6dbb52570fbdfa07ce15ac6ad88e35f63c # Parent 1efa4e96f6461bf071b28d66b13bdb67fdc91fc6 py3: fix for Python 3.12 emitting SyntaxWarning on invalid escape sequences Mercurial became very noisy after https://github.com/python/cpython/commit/a60ddd31be7ff96a8189e7483bf1eb2071d2bddf , for example: $ python3.12 mercurial/store.py mercurial/store.py:406: SyntaxWarning: invalid escape sequence '\.' EXCLUDED = re.compile(b'.*undo\.[^/]+\.(nd?|i)$') This verbosity made some tests fail. The problems were mostly insufficiently escaped regexps, relying on the Python parser/scanner preserving invalid escape sequences. diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -196,14 +196,14 @@ def match( ... return match(util.localpath(root), *args, **kwargs) Usually a patternmatcher is returned: ->>> _match(b'/foo', b'.', [b're:.*\.c$', b'path:foo/a', b'*.py']) +>>> _match(b'/foo', b'.', [br're:.*\.c$', b'path:foo/a', b'*.py']) Combining 'patterns' with 'include' (resp. 'exclude') gives an intersectionmatcher (resp. a differencematcher): ->>> type(_match(b'/foo', b'.', [b're:.*\.c$'], include=[b'path:lib'])) +>>> type(_match(b'/foo', b'.', [br're:.*\.c$'], include=[b'path:lib'])) ->>> type(_match(b'/foo', b'.', [b're:.*\.c$'], exclude=[b'path:build'])) +>>> type(_match(b'/foo', b'.', [br're:.*\.c$'], exclude=[b'path:build'])) Notice that, if 'patterns' is empty, an alwaysmatcher is returned: @@ -212,7 +212,7 @@ def match( The 'default' argument determines which kind of pattern is assumed if a pattern has no prefix: ->>> _match(b'/foo', b'.', [b'.*\.c$'], default=b're') +>>> _match(b'/foo', b'.', [br'.*\.c$'], default=b're') >>> _match(b'/foo', b'.', [b'main.py'], default=b'relpath') @@ -223,7 +223,7 @@ def match( name) matches againset one of the patterns given at initialization. There are two ways of doing this check. ->>> m = _match(b'/foo', b'', [b're:.*\.c$', b'relpath:a']) +>>> m = _match(b'/foo', b'', [br're:.*\.c$', b'relpath:a']) 1. Calling the matcher with a file name returns True if any pattern matches that file name: diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -1988,7 +1988,7 @@ such str.lower(). $ "$PYTHON" < def escape(s): - > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932')) + > return b''.join(br'\\u%x' % ord(uc) for uc in s.decode('cp932')) > # translation of "record" in ja_JP.cp932 > upper = b"\x8bL\x98^" > # str.lower()-ed section name should be treated as different one diff --git a/tests/test-minirst.py b/tests/test-minirst.py --- a/tests/test-minirst.py +++ b/tests/test-minirst.py @@ -154,7 +154,7 @@ marker after the option. It is treated a debugformats('options', options) -fields = b""" +fields = br""" :a: First item. :ab: Second item. Indentation and wrapping is handled automatically. diff --git a/tests/testlib/persistent-nodemap-race-ext.py b/tests/testlib/persistent-nodemap-race-ext.py --- a/tests/testlib/persistent-nodemap-race-ext.py +++ b/tests/testlib/persistent-nodemap-race-ext.py @@ -1,4 +1,4 @@ -"""Create the race condition for issue6554 +r"""Create the race condition for issue6554 The persistent nodemap issues had an issue where a second writer could overwrite the data that a previous write just wrote. The would break the append ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 1 of 4 stable] cext: fix for PyLong refactoring in CPython 3.12
# HG changeset patch # User Mads Kiilerich # Date 1678202751 -3600 # Tue Mar 07 16:25:51 2023 +0100 # Branch stable # Node ID 1efa4e96f6461bf071b28d66b13bdb67fdc91fc6 # Parent 8a65b43457aba02741bedabe100823d3041af0b5 cext: fix for PyLong refactoring in CPython 3.12 Compiling Mercurial with Python 3.12 a5 would fail with: mercurial/cext/dirs.c: In function '_addpath': mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0] |^~ mercurial/cext/dirs.c:97:25: note: in expansion of macro 'PYLONG_VALUE' 97 | PYLONG_VALUE(val) += 1; | ^~~~ mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0] |^~ mercurial/cext/dirs.c:108:17: note: in expansion of macro 'PYLONG_VALUE' 108 | PYLONG_VALUE(val) = 1; | ^~~~ mercurial/cext/dirs.c: In function '_delpath': mercurial/cext/dirs.c:19:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit' 19 | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0] |^~ mercurial/cext/dirs.c:145:23: note: in expansion of macro 'PYLONG_VALUE' 145 | if (--PYLONG_VALUE(val) <= 0) { | ^~~~ This was caused by https://github.com/python/cpython/commit/c1b1f51cd1632f0b77dacd43092fb44ed5e053a9 . diff --git a/mercurial/cext/dirs.c b/mercurial/cext/dirs.c --- a/mercurial/cext/dirs.c +++ b/mercurial/cext/dirs.c @@ -13,7 +13,11 @@ #include "util.h" +#if PY_VERSION_HEX >= 0x030C00A5 +#define PYLONG_VALUE(o) ((PyLongObject *)o)->long_value.ob_digit[0] +#else #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[0] +#endif /* * This is a multiset of directory names, built from the files that ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH] fastexport: fix data handling
Just so it doesn't look like we've ignored this, this series has also been sent to Heptapod, which is the preferred method of contribution. Raphaël On 3/2/23 21:13, Felipe Contreras wrote: Commit messages are supposed to end on a newline, and blobs should not be modified at all. All data should be written as-is. --- hgext/fastexport.py | 8 ++--- tests/test-fastexport.t | 73 + 2 files changed, 19 insertions(+), 62 deletions(-) diff --git a/hgext/fastexport.py b/hgext/fastexport.py index 738d75259a..a730b2ca7b 100644 --- a/hgext/fastexport.py +++ b/hgext/fastexport.py @@ -69,11 +69,9 @@ def convert_to_git_ref(branch): return b"refs/heads/" + branch -def write_data(buf, data, skip_newline): +def write_data(buf, data): buf.append(b"data %d\n" % len(data)) buf.append(data) -if not skip_newline or data[-1:] != b"\n": -buf.append(b"\n") def export_commit(ui, repo, rev, marks, authormap): @@ -103,7 +101,7 @@ def export_commit(ui, repo, rev, marks, authormap): marks[filerev] = mark data = filectx.data() buf = [b"blob\n", b"mark :%d\n" % mark] -write_data(buf, data, False) +write_data(buf, data) ui.write(*buf, keepprogressbar=True) del buf @@ -122,7 +120,7 @@ def export_commit(ui, repo, rev, marks, authormap): convert_to_git_date(ctx.date()), ), ] -write_data(buf, ctx.description(), True) +write_data(buf, ctx.description() + b"\n") if parents: buf.append(b"from :%d\n" % marks[parents[0].hex()]) if len(parents) == 2: diff --git a/tests/test-fastexport.t b/tests/test-fastexport.t index 10af6465ed..b6218e651f 100644 --- a/tests/test-fastexport.t +++ b/tests/test-fastexport.t @@ -142,16 +142,14 @@ 21 22 23 - blob mark :2 data 3 r0 - commit refs/heads/default mark :3 committer "debugbuilddag" 0 + - data 2 + data 3 r0 M 644 :1 mf M 644 :2 nf0 @@ -184,21 +182,18 @@ 21 22 23 - blob mark :5 data 3 r1 - blob mark :6 data 3 r1 - commit refs/heads/default mark :7 committer "debugbuilddag" 1 + - data 2 + data 3 r1 from :3 M 644 :4 mf @@ -232,21 +227,18 @@ 21 22 23 - blob mark :9 data 3 r2 - blob mark :10 data 3 r2 - commit refs/heads/name1 mark :11 committer "debugbuilddag" 2 + - data 2 + data 3 r2 from :7 M 644 :8 mf @@ -280,21 +272,18 @@ 21 22 23 - blob mark :13 data 3 r3 - blob mark :14 data 3 r3 - commit refs/heads/name1 mark :15 committer "debugbuilddag" 3 + - data 2 + data 3 r3 from :11 M 644 :12 mf @@ -328,21 +317,18 @@ 21 22 23 - blob mark :17 data 3 r4 - blob mark :18 data 3 r4 - commit refs/heads/name1 mark :19 committer "debugbuilddag" 4 + - data 2 + data 3 r4 from :15 M 644 :16 mf @@ -376,21 +362,18 @@ 21 22 23 - blob mark :21 data 3 r5 - blob mark :22 data 3 r5 - commit refs/heads/name2 mark :23 committer "debugbuilddag" 5 + - data 2 + data 3 r5 from :7 M 644 :20 mf @@ -424,21 +407,18 @@ 21 22 23 - blob mark :25 data 3 r6 - blob mark :26 data 3 r6 - commit refs/heads/name2 mark :27 committer "debugbuilddag" 6 + - data 2 + data 3 r6 from :23 M 644 :24 mf @@ -472,21 +452,18 @@ 21 22 23 - blob mark :29 data 3 r7 - blob mark :30 data 3 r7 - commit refs/heads/name2 mark :31 committer "debugbuilddag" 7 + - data 2 + data 3 r7 from :27 M 644 :28 mf @@ -520,21 +497,18 @@ 21 22 23 - blob mark :33 data 3 r8 - blob mark :34 data 3 r8 - commit refs/heads/name2 mark :35 committer "debugbuilddag" 8 + - data 2 + data 3 r8 from :31 M 644 :32 mf @@ -568,21 +542,18 @@ 21 22 23 - blob mark :37 data 3 r9 - blob mark :38 data 3 r9 - commit refs/heads/both mark :39 committer "debugbuilddag" 9 + - data 2 + data 3 r9 from :35 merge :19 @@ -620,21 +591,18 @@ 21 22 23 - blob mark :41 data 4 r10 - blob mark :42 data 4 r10 - commit refs/heads/both mark :43 committer "debugbuilddag" 10 + - data 3 + data 4 r10 from :39 M 644 :40 mf @@ -668,21 +636,18 @@ 21 22 r11 23 - blob mark :45 data 4 r11 - blob mark :46 data 4 r11 - commit refs/heads/both mark :47 committer "debugbuilddag" 11 + - data 3 + data 4 r11 from :43 M 644