- Mar 04, 2021
-
-
Jörg Sonnenberger authored
Since Mercurial 5.7, the corresponding bundle part is ignored as redundant. Stop advertising it so that peers don't have to spend time creating or transfering it. Differential Revision: https://phab.mercurial-scm.org/D10114
-
- Jan 30, 2021
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9914
-
- Mar 01, 2021
-
-
Jörg Sonnenberger authored
`read` and `readfiles` can be used with a revision just as well, so follow the naming convention in revlog to reflect this. Differential Revision: https://phab.mercurial-scm.org/D10081
-
- Feb 25, 2021
-
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D10077
-
- Feb 05, 2021
-
-
Kyle Lippincott authored
This mechanism builds chg such that it looks for `hg` to be available at /usr/lib/mercurial/hg instead of in the $PATH as `hg`, and makes the `hg` in /usr/bin be a symlink to `chg`. It's important to note that the hg binary must continue to be named `hg`. If we wanted to instead place it at /usr/bin/pyhg or something similar, we would need to modify Mercurial to allow that basename. Failure to do so would break Mercurial's shell aliases that use `hg`, `chg`, or `$HG`. I don't know if we should ever have a setup like this be the default setup, but I'm willing to get more information on our experience with it for making such a determination. Actually making it the default might be rather involved, as we don't maintain the official debian packaging rules. Differential Revision: https://phab.mercurial-scm.org/D10020
-
- Mar 03, 2021
-
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D10103
-
Raphaël Gomès authored
Continue the cleanup to the remaining requirements Differential Revision: https://phab.mercurial-scm.org/D10106
-
Raphaël Gomès authored
Since this series is adding a new requirement, we might as well clean up while we're here. Differential Revision: https://phab.mercurial-scm.org/D10105
-
- Feb 18, 2021
-
-
Raphaël Gomès authored
This prevents an exception within an exception because `hint` does not exist. Differential Revision: https://phab.mercurial-scm.org/D10024
-
- Feb 19, 2021
-
-
Raphaël Gomès authored
Gratuitous cleanup while I was here. Differential Revision: https://phab.mercurial-scm.org/D10023
-
- Jan 29, 2021
-
-
Pierre-Yves David authored
A higher priority alias will now take precedence over lower priority ones. This was a requirements step before using alias more widely, especially to rename existing and established config option. Differential Revision: https://phab.mercurial-scm.org/D9927
-
Pierre-Yves David authored
Config value now remember the "level" of the config that loaded it. This will be used to ensure good priority management for alias. Differential Revision: https://phab.mercurial-scm.org/D9926
-
Pierre-Yves David authored
Currently the source is stored in a entirely different way than the data. This is impractical. Especially if we are about to add more of such metadata. So lets put them back together. Differential Revision: https://phab.mercurial-scm.org/D9925
-
Pierre-Yves David authored
The `set` function is doing various work related to metadata (eg: the source, later the level). However the `fixconfig` call only updating some values according to standard processing, not changing any of the related metadata. So we introduce a new method and use it there. Differential Revision: https://phab.mercurial-scm.org/D9924
-
- Mar 01, 2021
-
-
Martin von Zweigbergk authored
The `assert!()` macro supports formatting. Rust 2021 no longer supports an unnecessary `format!()` inside it. I noticed because I recently update my Rust toolchain and `test-check-cargo-lock.t` started failing. Differential Revision: https://phab.mercurial-scm.org/D10085
-
Pierre-Yves David authored
The code was mixing variable name and misbehaving in some case. This changeset fix it and also add a tests to validate it does not regress. Without the fix, the parallel-upgrade misbehavior in random ways. Differential Revision: https://phab.mercurial-scm.org/D10084
-
- Jan 29, 2021
-
-
Pierre-Yves David authored
Differential Revision: https://phab.mercurial-scm.org/D9920
-
Pierre-Yves David authored
Differential Revision: https://phab.mercurial-scm.org/D9919
-
Pierre-Yves David authored
Differential Revision: https://phab.mercurial-scm.org/D9918
-
- Feb 25, 2021
-
-
Simon Sapin authored
Some old repository layouts are not supported. Differential Revision: https://phab.mercurial-scm.org/D10076
-
Simon Sapin authored
That is, the `store/requires` file, regardless of whether the repository is a shared. Differential Revision: https://phab.mercurial-scm.org/D10078
-
- Jan 11, 2021
-
-
Simon Sapin authored
… to some functions that only use one method. This will makes it easier to unit-test them. Differential Revision: https://phab.mercurial-scm.org/D10070
-
- Jan 08, 2021
-
-
Simon Sapin authored
It’s just a `usize`. Differential Revision: https://phab.mercurial-scm.org/D10069
-
- Feb 24, 2021
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D10065
-
Augie Fackler authored
This should fix the broken fuzzing build, because we've been explicitly using clang++ but are now being given a CXX=afl++, which does extra stuff. Differential Revision: https://phab.mercurial-scm.org/D10066
-
- Feb 26, 2021
-
-
Simon Sapin authored
By default, clap only accepts app-level arguments (as opposed to sub-command level) to be specified before a sub-command: `rhg -R ./foo log`. Specifying them after would be rejected: `rhg log -R ./foo`. Previously we worked around that by registering global arguments both at the app level and on each sub-command, but that required looking for their value in two places. It turns out that Clap has built-in support for what we want to do, so let’s use it. Also, Clap "settings" turn out to be either global or not too. Let’s make `AllowInvalidUtf8` apply to sub-commands too. Differential Revision: https://phab.mercurial-scm.org/D10080
-
- Feb 04, 2021
-
-
Kyle Lippincott authored
If someone uses `hg debuglocks`, or some non-hg process writes to the .hg directory without respecting the locks, or if the repo's on a networked filesystem, it's possible for the revlog code to write out corrupted data. The form of this corruption can vary depending on what data was written and how that happened. We are in the "networked filesystem" case (though I've had users also do this to themselves with the "`hg debuglocks`" scenario), and most often see this with the changelog. What ends up happening is we produce two items (let's call them rev1 and rev2) in the .i file that have the same linkrev, baserev, and offset into the .d file, while the data in the .d file is appended properly. rev2's compressed_size is accurate for rev2, but when we go to decompress the data in the .d file, we use the offset that's recorded in the index file, which is the same as rev1, and attempt to decompress rev2.compressed_size bytes of rev1's data. This usually does not succeed. :) When using inline data, this also fails, though I haven't investigated why too closely. This shows up as a "patch decode" error. I believe what's happening there is that we're basically ignoring the offset field, getting the data properly, but since baserev != rev, it thinks this is a delta based on rev (instead of a full text) and can't actually apply it as such. For now, I'm going to make this an optional component and default it to entirely off. I may increase the default severity of this in the future, once I've enabled it for my users and we gain more experience with it. Luckily, most of my users have a versioned filesystem and can roll back to before the corruption has been written, it's just a hassle to do so and not everyone knows how (so it's a support burden). Users on other filesystems will not have that luxury, and this can cause them to have a corrupted repository that they are unlikely to know how to resolve, and they'll see this as a data-loss event. Refusing to create the corruption is a much better user experience. This mechanism is not perfect. There may be false-negatives (racy writes that are not detected). There should not be any false-positives (non-racy writes that are detected as such). This is not a mechanism that makes putting a repo on a networked filesystem "safe" or "supported", just *less* likely to cause corruption. Differential Revision: https://phab.mercurial-scm.org/D9952
-
- Feb 24, 2021
-
-
Martin von Zweigbergk authored
The user can always modify the working copy, including while they're running `hg tracked --remove-include <path>`. Nothing really bad happens when they do that, and we already have code for printing a nice warning, so we can safely remove the assertion we had. Differential Revision: https://phab.mercurial-scm.org/D10063
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D10062
-
- Feb 04, 2021
-
-
Jörg Sonnenberger authored
In the past, the pip smoke test inhibited actual dependency installation, but that fails in different environments for setuptools itself. Since it isn't what we actually want to test (which is pip install), allow this to call home, if HGTESTS_ALLOW_NETIO=1 is set in the environment. Differential Revision: https://phab.mercurial-scm.org/D9950
-
- Feb 17, 2021
-
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D10022
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D10021
-
- Feb 16, 2021
-
-
Simon Sapin authored
Only `command` and `commandfinish` events are logged. The `dirty`, `logsource`, `track` and `ignore` configuration items are not supported yet. To indicate commands executed without Python, a `(rust) ` prefix is added in corresponding log messages. Differential Revision: https://phab.mercurial-scm.org/D10012
-
- Feb 17, 2021
-
-
Simon Sapin authored
This example previously looked like quotes were part of configuration file syntax, and the parsed `date-format` value was the part inside of them. This is not the case: config syntax only parses quotes in list values. Instead using that config would result in literal quotes being written to `.hg/blackbox.log` as part of the date format. This changes the example to what was probably intended. Differential Revision: https://phab.mercurial-scm.org/D10011
-
- Feb 11, 2021
-
-
Simon Sapin authored
This is ported to Rust from `mercurial/loggingutil.py`. The "builder" pattern is used to make it visible at call sites what the two numeric parameters mean. In Python they might simply by keyword arguments. Differential Revision: https://phab.mercurial-scm.org/D10010
-
- Feb 16, 2021
-
-
Simon Sapin authored
Configuration files are parsed into sections of key/value pairs when they are read, but at that point values are still arbitrary bytes. Only when a value is accessed by various parts of the code do we know its expected type and syntax, so values are parsed at that point. Let’s make a new error type for this latter kind of parsing error, and add a variant to the common `HgError` so that most code can propagate it without much boilerplate. Differential Revision: https://phab.mercurial-scm.org/D10009
-
Simon Sapin authored
* Rust `str` (ASCII or UTF-8) * Integer * Byte quantities Differential Revision: https://phab.mercurial-scm.org/D10008
-
- Feb 17, 2021
-
-
Simon Sapin authored
It does the same as get_bytes_from_path but takes an `OsStr` instead of a `Path`. The implementation is the same so using either ends up correct but the function name suggests it’s not. Differential Revision: https://phab.mercurial-scm.org/D10007
-
Simon Sapin authored
Instead of plain byte arrays. Differential Revision: https://phab.mercurial-scm.org/D10006
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D10005
-