- Jul 11, 2022
-
-
Raphaël Gomès authored
-
- Jul 10, 2022
-
-
Manuel Jacob authored
In make_line_buffered(), we don’t want to wrap the stream if we know that lines get flushed to the underlying raw stream already. Previously, the heuristic was too optimistic. It assumed that any stream which is not an instance of io.BufferedIOBase doesn’t need wrapping. However, there are buffered streams that aren’t instances of io.BufferedIOBase, like Mercurial’s own winstdout. The new logic is different in two ways: First, only for the check, if unwraps any combination of WriteAllWrapper and winstdout. Second, it skips wrapping the stream only if it is an instance of io.RawIOBase (or already wrapped). If it is an instance of io.BufferedIOBase, it gets wrapped. In any other case, the function raises an exception. This ensures that, if an unknown stream is passed or we add another wrapper in the future, we don’t wrap the stream if it’s already line buffered or not wrap the stream if it’s not line buffered. In fact, this was already helpful during development of this change. Without it, I possibly would have forgot that WriteAllWrapper needs to be ignored for the check, leading to unnecessary wrapping if stdout is unbuffered. The alternative would have been to always wrap unknown streams. However, I don’t think that anyone would benefit from being less strict. We can expect streams from the standard library to be subclassing either io.RawIOBase or io.BufferedIOBase, so running Mercurial in the standard way should not regress by this change. Py2exe might replace sys.stdout and sys.stderr, but that currently breaks Mercurial anyway and also these streams don’t claim to be interactive, so this function is not called for them.
-
- Jul 05, 2022
-
-
Pierre-Yves David authored
In Python 3, the type are no longer comparable and this expose the error.
-
- May 25, 2022
-
-
Raphaël Gomès authored
This makes trace output *really* noisy and is only useful in case you want to take a look at a single revlog. This is easy to add back on a case-by-case basis and does not need to stay with the more permanent timers.
-
Raphaël Gomès authored
This mirrors the Python implementation. The relative path handling should probably be refactored into a util, but it it out of scope for this change.
-
- May 18, 2022
-
-
Raphaël Gomès authored
This helps when diagnosing corruption, and is in general good practice. The information is here, valuable and can be used easily.
-
Raphaël Gomès authored
This is useful when debugging.
-
- Jun 12, 2022
-
-
Ian Moody authored
This has been deprecated since py3.2, and removed entirely in py3.9
-
Ian Moody authored
- don't check for a binary symbol in globals(), which meant it always thought the module wasn't available - don't pass bytes to stdlib methods - return bytes in getchanges where Mercurial expects to see them
-
- Jun 15, 2022
-
-
Ian Moody authored
All the `import elementtree` attempts seem to pre-date py2.5, when it was brought into the standard library, and the manual `cElementTree` fast implementation import has been unnecessary and deprecated since py3.3.
-
- Jun 16, 2022
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
- Jun 10, 2022
-
-
Pierre-Yves David authored
With rust supporting more matcher types, we can now take this route in the sparse case too.
-
Pierre-Yves David authored
core is already aware of sparse, so lets move the handful of line of code that deal with this for the sake of simplicity and explicitness.
-
Pierre-Yves David authored
This new output clarify the important part out this merging : we want to be able to record the copy source even it is outside of the sparse profile.
-
Pierre-Yves David authored
The code of the wrapper only act in the case where the file is not tracked, so this has not effect for `untracked`. In addition the message explicitly mention `add` of a file and no test are breaking if we drop this. So we drop this for simplicity and cleanup
-
Pierre-Yves David authored
Core is already aware of sparse, so lets move the handful of line of code that deal with it in `dirstate.rebuild` for the sake of simplicity.
-
Pierre-Yves David authored
core is already aware of sparse, so lets move the handful of line of code that deal with it in `dirstate.walk` for the sake of simplicity.
-
Pierre-Yves David authored
This create a clear signal for when the feature is unused. We could also create an `alwaysmatcher`, but using None is more explicit, so I went for it.
-
- Jun 08, 2022
-
-
Pierre-Yves David authored
Code is now checking if the repository using the sparse feature and that's it. Some code in `debugsparse` still rely on "global" state, as it apply sparse logic before updating the requirement. Cleaning that up is more work that we signed up for, but we could narrow the hack to that specific command.
-
- Jun 10, 2022
-
-
Pierre-Yves David authored
We need to get this test covered by the CI, in the meantime, here is a quick fix.
-
- Jun 14, 2022
-
-
Pierre-Yves David authored
if --files is passed, there was no directory to checks and `msg` was undefined. This is now fixed and tested.
-
- Jun 08, 2022
-
-
Raphaël Gomès authored
This is in case this ever comes up, it's very easy to support, so might as well do it.
-
Raphaël Gomès authored
`IntersectionMatcher` is now implemented in Rust.
-
Raphaël Gomès authored
This will be used in the upcoming support for sparse checkouts in Rust-augmented status and later in rhg support for sparse checkouts.
-
Raphaël Gomès authored
`UnionMatcher` is now implemented in Rust.
-
Raphaël Gomès authored
This will be used in the upcoming support for sparse checkouts in Rust-augmented status and later in rhg support for sparse checkouts.
-
Raphaël Gomès authored
This reduces duplication and will allow for recursive transformation in UnionMatcher.
-
Raphaël Gomès authored
This simplifies the code a lot, allows for some refactoring to come. The original code tried to prevent allocations that were already happening anyway beforehand.
-
- Jun 09, 2022
-
-
Raphaël Gomès authored
At this point in the process, nothing user-visible has happened, it is still safe to fallback. This can happen now that we're going to be using "container matchers" like unionmatcher and intersectionmatcher. This is easier and less error-prone than recursive checking beforehand since only the presence of a transformation case will allow the process to continue.
-
- Jun 14, 2022
-
-
Pierre-Yves David authored
For well tested case, the message can get in the way, so we add a way to disable it.
-
Pierre-Yves David authored
For well tested case, the message can get in the way, so we add a way to disable it.
-
Pierre-Yves David authored
For well tested case, the message can get in the way, so we add a way to disable it.
-
Pierre-Yves David authored
This was the result of a copy paste.
-
Pierre-Yves David authored
For well tested case, the message can get in the way, so we add a way to disable it.
-