David Demelier <markand@malikania.fr> [Thu, 21 Oct 2021 11:21:21 +0200] rev 48274
hg: remove reserved identifiers
Per 7.1.3 paragraph, from C draft:
All identifiers that begin with an underscore and either an uppercase letter or
another underscore are always reserved for any use.
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 16:05:20 +0200] rev 48273
python: compatibility for python 3.11 (
issue6604)
The `unittest._TextTestResult` alias has been removed.
The "new" name has been available since 3.2, and we only support 3.5.3+.
Differential Revision: https://phab.mercurial-scm.org/D11690
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 16:54:43 +0200] rev 48272
pyoxidizer: force pip to not use pep517 in order to be able to install hg
Mercurial is not (yet) a pep517 package, but the presence of a pyproject.toml
file tells newer-ish versions of pip that it should be one.
This is related to
58fe6d127a01, and fixes pyoxidizer builds for the Heptapod
CI.
Differential Revision: https://phab.mercurial-scm.org/D11710
Kyle Lippincott <spectral@google.com> [Tue, 19 Oct 2021 16:14:53 -0700] rev 48271
merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Differential Revision: https://phab.mercurial-scm.org/D11706
Kyle Lippincott <spectral@google.com> [Tue, 19 Oct 2021 16:14:46 -0700] rev 48270
merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Differential Revision: https://phab.mercurial-scm.org/D11705
Georges Racinet <georges.racinet@octobus.net> [Tue, 19 Oct 2021 19:05:41 +0200] rev 48269
rust-nodemap: backed out mitigation for issue 6554
This is a backout of changeset
3fffb48539ee.
Issue 6554 is now considered solved, hence its mitigation
has to be removed, if only for its performance cost.
Differential Revision: https://phab.mercurial-scm.org/D11703
Kyle Lippincott <spectral@google.com> [Mon, 18 Oct 2021 16:24:00 -0700] rev 48268
pyoxidizer: update README.md with several small fixes
Currently, pyoxidizer.bzl does not mention the git commit that should be checked
out, so these instructions are a bit difficult to follow right now (impossible,
technically), so I removed the instruction to `git checkout <Git commit>` and
the admonition to use a specific version of PyOxidizer. I don't even know if the
project currently builds with the "0.7.0-pre" version that was previously
recommended.
As fallout from that change to not "pin" to a specific PyOxidizer, I had to
update the Python version to use when running the tests.
While here, I added a recommendation to use `--release`, as the primary reason
for this project is performance, and it may have been leaving some on the table
to not have that there.
Differential Revision: https://phab.mercurial-scm.org/D11698
Kyle Lippincott <spectral@google.com> [Mon, 18 Oct 2021 16:18:41 -0700] rev 48267
pyoxidizer: disable using in-memory resources
It's possible that the errors are due to using an incompatible version of
PyOxidizer; unfortunately the README.md file in this directory says to fetch a
copy of PyOxidizer matching the commit in this pyoxidizer.bzl file, and yet the
pyoxidizer.bzl file does not actually have a commit mentioned in it.
By disabling in-memory modules, this appears to work on all platforms using the
current head version of PyOxidizer, so let's disable them for now.
Sample error (during `pyoxidizer build`):
```
error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExtensionModule<name=hgext.fsmonitor.pywatchman.bser>
Caused by:
extension module hgext.fsmonitor.pywatchman.bser cannot be loaded from memory but memory loading required
--> ./pyoxidizer.bzl:140:5
|
140 | exe.add_python_resources(exe.pip_install(["--verbose", ROOT]))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ add_python_resources()
error: adding PythonExtensionModule<name=hgext.fsmonitor.pywatchman.bser>
Caused by:
extension module hgext.fsmonitor.pywatchman.bser cannot be loaded from memory but memory loading required
```
Differential Revision: https://phab.mercurial-scm.org/D11697
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Oct 2021 00:21:41 +0200] rev 48266
dirstate-v2: reorder flag to group related one together
Since the format is not frozen yet, it seems like the right moment to do it.
Differential Revision: https://phab.mercurial-scm.org/D11704
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 20:14:17 +0200] rev 48265
dirstate-v2: read the fallback value in Rust
This was overlooked in a previous commit.
Differential Revision: https://phab.mercurial-scm.org/D11695
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 18:18:05 +0200] rev 48264
dirstate-v2: adjust the meaning of directory flags
Tracking directory "explicitly" give use the opportunity to distinct between
entry that are untracked because they are part of the directory structure and
entry that are ignored/unknown files on the files system.
The help is adjusted to the new semantic and the code now comply to it for both
read and write.
Differential Revision: https://phab.mercurial-scm.org/D11694
Simon Sapin <simon.sapin@octobus.net> [Wed, 13 Oct 2021 15:58:14 +0200] rev 48263
dirstate-v2: actually use sub-second mtime precision
Instead of zero, set the nanoseconds field to its correct value whenever
possible and preserve it across serialization+parsing.
Differential Revision: https://phab.mercurial-scm.org/D11702
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 13:54:39 +0200] rev 48262
dirstate: ignore sub-second component when either is zero in mtime
When comparing mtimes for equality.
Some APIs simply return zero when more precision is not available.
When comparing values from different sources, if only one is truncated in
that way, doing a simple comparison would cause many false negatives.
Differential Revision: https://phab.mercurial-scm.org/D11701
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 22:04:14 +0200] rev 48261
dirstate-v2: add a new MTIME_SECOND_AMBIGUOUS flags
This flag will let us use more `mtime` value in the future. For now we have a
minimal handling of the flag at read time, but we will never put ourself in a
situation where we will needs to writes it.
See the flag documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11700
Simon Sapin <simon.sapin@octobus.net> [Mon, 18 Oct 2021 11:23:07 +0200] rev 48260
dirstate: store mtimes with nanosecond precision in memory
Keep integer seconds since the Unix epoch,
together with integer nanoseconds in the `0 <= n < 1e9` range.
For now, nanoseconds are still always zero.
This commit is about data structure changes.
Differential Revision: https://phab.mercurial-scm.org/D11684
Simon Sapin <simon.sapin@octobus.net> [Tue, 19 Oct 2021 21:03:13 +0200] rev 48259
rust: remove now-unused DirstateEntry::clear_ambiguous_mtime method
Differential Revision: https://phab.mercurial-scm.org/D11696
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 22:14:48 +0200] rev 48258
dirstate: align Rust function name to `need_delay`
The rest of the code use this name. It is not a great name, but it is better to
stay consistent.
Differential Revision: https://phab.mercurial-scm.org/D11699
Simon Sapin <simon.sapin@octobus.net> [Mon, 18 Oct 2021 19:02:40 +0200] rev 48257
dirstate: rename a `very_likely_equal` method to `likely_equal`
No need to oversell it.
Differential Revision: https://phab.mercurial-scm.org/D11691
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 19:03:39 +0200] rev 48256
backout: backed out changeset
2f2107c01dee
After discussion on the original phab patch, we've decided to wait until
Python 2 support is dropped to do this since the behavior differs for
relatively obscure reasons.
Differential Revision: https://phab.mercurial-scm.org/D11692
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 19:04:11 +0200] rev 48255
backout: backed out changeset
6edc8800dbc3
Same as the previous changeset.
Differential Revision: https://phab.mercurial-scm.org/D11693
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 10:56:54 +0200] rev 48254
dirstate-v2: preserve the fallback values on disk
When the fallback values are set, they are now read and written to disk.
See format documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11688
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 20:02:05 +0200] rev 48253
dirstate: make DirstateItem constructor accept fallback value
This could arguably goes in the previous changeset, but I wanted to keep that
previous changeset small to focus more on the user code and the documentation.
Differential Revision: https://phab.mercurial-scm.org/D11687
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 20:02:15 +0200] rev 48252
dirstate: add a concept of "fallback" flags to dirstate item
The concept is defined and "used" by the flag code, but it is neither persisted
nor set anywhere yet. We currently focus on defining the semantic of the
attribute. More to come in the next changesets
Check the inline documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11686
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 16:33:19 +0200] rev 48251
dirstate-v2: adds two flag to track the presence of some unrecorded files
Right now, we don't record ignored or unknown files in the dirstate. However
the structure would allow it. So we introduce two flags that can be used to
clarify whether all unknown/ignored children are recorded or not. This will
allow for more information to be stored in the future if this end up being
relevant.
Differential Revision: https://phab.mercurial-scm.org/D11682
Simon Sapin <simon.sapin@octobus.net> [Fri, 15 Oct 2021 16:12:00 +0200] rev 48250
dirstate-v2: adds a flag to mark a file as modified
Right now, a files with a file system state that requires a lookup (same size,
different mtime) will requires a lookup. If the result of that lookup is a
modified files, it will remains ambiguous, requiring a lookup on the next status
run too.
To fix this, we introduce a dedicated flag in the new format. Such flag will
allow to record such file as "known modified" avoiding an extra lookup later.
As None of the associate code currently exist in the status code, we do the
minimal implementation: if we read a dirstate entry with this flag set, we make
it as "ambiguous" so that the next status code has to look it up. The same as it
would have to without this flag existing anyway.
Differential Revision: https://phab.mercurial-scm.org/D11681
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 19 Oct 2021 10:52:13 +0100] rev 48249
rhg: simplify split_metadata
It turns out that it's possible to implement `FilelogEntry.into_data`
on top of `split`, as proposed by @spectral.
Differential Revision: https://phab.mercurial-scm.org/D11689
Raphaël Gomès <rgomes@octobus.net> [Fri, 27 Aug 2021 14:40:09 +0200] rev 48248
pyoxidizer: default to a meaningless release instead of hardcoding 5.8
This way we don't advertise the wrong version, or if we do it's really obvious.
To be honest, I'm not even sure that `VERSION` should be optional, but I also
have never used the packaging tools so far, this is simply something I saw.
Differential Revision: https://phab.mercurial-scm.org/D11360
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Oct 2021 10:58:39 -0700] rev 48247
copy: recommend `--at-rev .` if target was added in parent commit
If the target file was added in the working copy parent, it's much
more likely that the user meant to use `--at-rev .` (to record the
copy/rename in the that commit) than `--force` (to replace the
just-added file by another file).
Differential Revision: https://phab.mercurial-scm.org/D11667
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Oct 2021 10:14:44 +0200] rev 48246
fix: appease pyflakes and make unused variables more obvious
pyflakes is complaining that `baserevs` is redefined by the list comprehension,
and while this lint can be valuable, it's not actually a problem here.
Differential Revision: https://phab.mercurial-scm.org/D11683
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Oct 2021 17:11:48 +0200] rev 48245
rewrite: fix
issue6599
Explanation inside.
Differential Revision: https://phab.mercurial-scm.org/D11685