- Jun 18, 2021
-
-
Martin von Zweigbergk authored
Same reasoning as the previous change. This affects a few tests because of the hack from d7304434390f (changegroup: move message about added changes to transaction summary, 2019-09-08). Differential Revision: https://phab.mercurial-scm.org/D10886
-
Martin von Zweigbergk authored
A difference between setting `ui.quiet` and using `ui.silent()` is that the latter also silences `ui.write()` calls. That's practically always what one wants, including here, I think. Differential Revision: https://phab.mercurial-scm.org/D10885
-
Martin von Zweigbergk authored
We often silence the ui by calling `ui.pushbuffer()` followed (a later in the code) by `ui.popbuffer()`. These places can be identified by the fact that they ignore the output returned from `ui.popbuffer()`. Let's create a context manager for these cases, to avoid repetition, and to avoid accidentally leaving the ui silent on exceptions. I deliberately called the new function `silent()` instead of `buffered()`, because it's just an implementation detail that it uses `pushbuffer()` and `popbuffer()`. We could later optimize it to not buffer the output. Differential Revision: https://phab.mercurial-scm.org/D10884
-
Martin von Zweigbergk authored
Same reasoning as the parent commit. The code in question here comes from fb8065de47b0 (unshelve: silence internal revert, 2014-08-15), which says that it was to prepare for some upcoming revert changes. I suppose those changes have happened by now but we fixed something about it, because I don't see any unwanted changes in tests (no changes at all in tests, in fact). Differential Revision: https://phab.mercurial-scm.org/D10883
-
Martin von Zweigbergk authored
Commit 34165875fa5d (histedit: limit updated and merging output to important updates, 2016-02-03) added a call to `ui.pushbuffer(labeled=True, errors=True)`. I don't know if there was a reason for the `errors=True` (nor the `labeled=True` bit, which I removed in the previous commit). It seems bad to just discard the errors, so let's not do that. By not doing that, we can also remove a workaround for the lack of errors from `test-removeemptydirs.t`. Differential Revision: https://phab.mercurial-scm.org/D10882
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D10881
-
- Jun 10, 2021
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D10864
-
Martin von Zweigbergk authored
As with `checknotesize()`, I also changed to snake_case while at it, to help extensions a little. Differential Revision: https://phab.mercurial-scm.org/D10863
-
Martin von Zweigbergk authored
I couldn't think of a reasonable change to the signature here, so unfortunately it keeps the existing one. Differential Revision: https://phab.mercurial-scm.org/D10862
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D10861
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D10860
-
Martin von Zweigbergk authored
Since this patch changes the behavior of the function, I consider it a bonus if the signature also changes so that extensions can detect which version they're dealing with (for the record, I don't have any such extensions). Therefore, I also dropped an unused `ui` argument and renamed the function to use snake_case. Differential Revision: https://phab.mercurial-scm.org/D10859
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D10880
-
- Jun 15, 2021
-
-
Simon Sapin authored
The previous changeset extracted this caching logic from the revlog class into a new class. Adding a new instance of that class allows using the same logic for side data. Differential Revision: https://phab.mercurial-scm.org/D10879
-
- Jun 08, 2021
-
-
Simon Sapin authored
The `revlog` class does many things, among which fulfilling requests for arbitrary byte slices from the revlog "data file" by reading a larger chunk and caching it in memory, in order to reduce the number of system calls. This extracts that logic into a new class, so that it may later also be used for the side-data file (with another instance of that class). The copyright notice of the new file does not include a date or author name since such information tend not to be kept up-to-date: https://www.linuxfoundation.org/en/blog/copyright-notices-in-open-source-software-projects/ Differential Revision: https://phab.mercurial-scm.org/D10878
-
- Jun 12, 2021
-
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D10870
-
Matt Harbison authored
`ord()` wants bytes or str on py3, so I'm guessing it got confused by passing a single byte instead of a one byte string. But this seems to work on 2.7.18 anyway. Differential Revision: https://phab.mercurial-scm.org/D10876
-
- Jun 08, 2021
-
-
Pierre-Yves David authored
This make the code shorter and clearer. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10846
-
Pierre-Yves David authored
Having inconsistent "undo" files can be quite serious so we narrow the error filtering to the intent that the comment explain. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10845
-
Pierre-Yves David authored
Let us move the short branch early. Differential Revision: https://phab.mercurial-scm.org/D10844
-
Pierre-Yves David authored
This make the code a bit simpler and clearer. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10843
-
Pierre-Yves David authored
Right now we issue a message about failing to recover some file, but not why. It seems useful to add some information about that. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10842
-
- Jun 07, 2021
-
-
Pierre-Yves David authored
If the hardlinking fails, we fallback to `shutil.copy`, but do not consider future hardlinking doomed. This is a slight improvement from the current situation, we still avoid hardliking in a case we might be able to do it. However this does not have an impact of the rest of the operation. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10841
-
- Jun 08, 2021
-
-
Pierre-Yves David authored
With the previous code, there was a small windows were we could delete too much data. This should no longer be the case. (This is an opportunity improvement while looking at something next to that.) Differential Revision: https://phab.mercurial-scm.org/D10840
-
- Apr 09, 2021
-
-
Pierre-Yves David authored
That option is not ready for prime-time, hence the `exp-` prefix. However, this is a good base to start going toward completion. This is also quite useful for developer on its own for now. Differential Revision: https://phab.mercurial-scm.org/D10356
-
- Jun 12, 2021
-
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D10875
-
Matt Harbison authored
Caught by pytype as possibly being None, but the file is closed in the previous conditional. Differential Revision: https://phab.mercurial-scm.org/D10874
-
Matt Harbison authored
The other callers were already correct. Differential Revision: https://phab.mercurial-scm.org/D10873
-
Matt Harbison authored
Flagged by pytype. Differential Revision: https://phab.mercurial-scm.org/D10872
-
Matt Harbison authored
PyCharm flagged this as not existing, and I suspect a copy/paste error. Differential Revision: https://phab.mercurial-scm.org/D10871
-
- Jun 02, 2021
-
-
Simon Sapin authored
Later, this help extend `read_dir` caching to directories that contain ignored files (but no unknown files). Such cache must be invalidated when ignore patterns change since a formerly-ignored file might become unknown. This helps the default configuration of `hg status` where unknown files must be listed, but ignored files are not. Differential Revision: https://phab.mercurial-scm.org/D10836
-
- Jun 07, 2021
-
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D10839
-
Pulkit Goyal authored
My previous attempts to have rhg end with correct exit code was more of bug hunting. I found cases which were failing and fixed them. But as one might expect, more tests started failing. Let's add exit code `HgError::Abort()` and make it users explicitly tell what exit code they want. Differential Revision: https://phab.mercurial-scm.org/D10838
-
Pulkit Goyal authored
This will help us in better handling of error caused when trying to load `--config` values. Differential Revision: https://phab.mercurial-scm.org/D10837
-
- May 24, 2021
-
-
Pulkit Goyal authored
Last patch introduced config reading at startup to parse value of `--repository` flag. However, that patch only tried to check for current repository at current working directory and not it's ancestors. This patch fixes that. Differential Revision: https://phab.mercurial-scm.org/D10767
-
- Apr 10, 2021
-
-
Pulkit Goyal authored
hg parses `-R` and `--repository` CLI arguments "early" in order to know which local repository to load config from. (Config can then affect whether or how to fall back.) The value of of those arguments can be not only a filesystem path, but also an alias configured in the `[paths]` section. This part was missing in rhg and this patch implements that. The current patch still lacks functionality to read config of current repository if we are not at root of repo. That will be fixed in upcoming patches. A new crate `home` is added to get path of home directory. Differential Revision: https://phab.mercurial-scm.org/D10296
-
- Jun 07, 2021
-
-
Augie Fackler authored
-
- May 30, 2021
-
-
Pierre-Yves David authored
This will be when switching undelying files, for examples during censors and strip operation with rvlog-v2. Differential Revision: https://phab.mercurial-scm.org/D10800
-
Pierre-Yves David authored
This will be useful to recompute appropriate deltas one the fly during censor/strip operation with revlog-v2. Differential Revision: https://phab.mercurial-scm.org/D10799
-
Pierre-Yves David authored
When set, this allow to copy only the first `nb_bytes` of a file. This will be useful for censor/strip operation with revlogv2. Differential Revision: https://phab.mercurial-scm.org/D10798
-