- Dec 18, 2019
-
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D7694
-
Matt Harbison authored
Since there's no version or path info here to distinguish between installations, it is effectively systemwide (unless splitting hairs about the WoW64 registry redirection). Differential Revision: https://phab.mercurial-scm.org/D7693
-
Matt Harbison authored
This follows the Unix model of processing this directory immediately after <internal>/*.rc, and prior to the installation relative files. Since the Unix processing supports both a directory and a file (the former overriding the latter), and since %HOME% supports both `*.ini` and `.hgrc` (again, the former overriding the latter), this does too. The Unix file doesn't have a `.` prefix, so it's not used here either. Note that this is the opposite order of processing the exe relative paths. But since it's in agreement with Unix, %HOME% and %USERPROFILE%, it seems reasonable to ignore that. Maybe we can change that and take a BC, because that's something the installer should be controlling, and I can't imagine people having both paths *and* conflicting settings. Differential Revision: https://phab.mercurial-scm.org/D7692
-
- Dec 13, 2019
-
-
Martin von Zweigbergk authored
By having cwd in absolute form, we won't have to adjust it when passing it to subrepo matchers. This will matter for a coming patch. Differential Revision: https://phab.mercurial-scm.org/D7650
-
Martin von Zweigbergk authored
The `root` argument should already be an absolute path, but we had tests that passed a relative path. This patch fixes up the tests and adds an assertion. This assumes that `os.path.isabs('/repo')` will be `True` on all platforms we care to run tests on. Augie tested for me that it does work on Windows, so that's good enough for me. Differential Revision: https://phab.mercurial-scm.org/D7649
-
- Dec 07, 2019
-
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D7569
-
- Dec 20, 2019
-
-
Georges Racinet authored
This is a followup to D7603 (49fa0b31ee1d) which broke the tests for pure Python implementation. There are two divergences between pure and C implementations: - the pure implementation would accept only -1 as slice end, whereas C accepts both -1 and len(index) - in pure Python, `headrevs` is provided by revlog.py, not by the index. Differential Revision: https://phab.mercurial-scm.org/D7707
-
- Dec 13, 2019
-
-
Pierre-Yves David authored
Function in hg-core need something implementing the `Graph` trait. Right now, the `hg-cpython` entry points directly turn the PyObject passed as argument into a `cindex::Index`. However, if we start having the option to use an Index in Rust, we need to dispatch between the different possible PyObject we could receive. So move the "duplicate" call into a unified function. When time come. It will be easy to update the logic of all interface when the time come. Differential Revision: https://phab.mercurial-scm.org/D7653
-
- Dec 11, 2019
-
-
Pierre-Yves David authored
We will reuse this for more tests related to revlog index. In pratice this series of changesets add an index implementation provided from Rust and we want to be able to test it. Differential Revision: https://phab.mercurial-scm.org/D7652
-
- Dec 18, 2019
-
-
Matt Harbison authored
Spotted by Denis Laxalde. Differential Revision: https://phab.mercurial-scm.org/D7695
-
Martin von Zweigbergk authored
We seem to always convert **opts args to use bytes as keys early on in Mercurial core, but I'm not sure we have good reason to do that, and not all extensions do that. It's therefore helpful to be able to pass in a native string to check_at_most_one_arg(). Differential Revision: https://phab.mercurial-scm.org/D7699
-
Martin von Zweigbergk authored
As noticed by Yuya, when I changed the function (during review) to work with underscore-separated names as input, I forgot to make sure the returned name was also underscore-separated. We don't have any cases where it matters yet, but it should still clearly be fixed. Instead of converting the hyphen-separated value we already have in `previous`, I'm changing it so we convert to the underscore-separated values to be hyphen-separated only when we need to display them. This will also help a coming change where we allow the inputs to native strings instead only bytes. Differential Revision: https://phab.mercurial-scm.org/D7698
-
Martin von Zweigbergk authored
As noticed by Yuya, I lost the _() call in 71fee4564410 (rebase: use rewriteutil.precheck() instead of reimplementing it, 2019-12-18). Differential Revision: https://phab.mercurial-scm.org/D7697
-
- Dec 19, 2019
-
-
Rodrigo Damazio Bovendorp authored
We don't know the status of those files, only that they're unresolved, so we don't output the status for those - any code parsing this will have to be tolerant to that. Differential Revision: https://phab.mercurial-scm.org/D7668
-
Rodrigo Damazio Bovendorp authored
Differential Revision: https://phab.mercurial-scm.org/D7704
-
Rodrigo Damazio Bovendorp authored
Differential Revision: https://phab.mercurial-scm.org/D7667
-
- Dec 17, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7687
-
Martin von Zweigbergk authored
As you can see from the patch, I disagree with most of the comment saying that `rewriteutil.precheck()` is not worthwhile. Differential Revision: https://phab.mercurial-scm.org/D7686
-
- Dec 18, 2019
-
-
Martin von Zweigbergk authored
After this patch, there's still another place in `rebase.py`, in the `--stop` code path, that reimplements `rewriteutil.precheck()`. I couldn't fix that place because it `rewriteutil.precheck()` checks that there is only one dirstate parent, which fails because we have two parents at that point. I think it's incorrect that rebase leaves the user with two parents during conflicts, but changing that is way out of scope for this series. Differential Revision: https://phab.mercurial-scm.org/D7685
-
- Dec 17, 2019
-
-
Martin von Zweigbergk authored
We have had this nice utility since 490df753894d (rewriteutil: add a precheck function to check if revs can be rewritten, 2017-11-24). We got two callers soon thereafter, in 98f97eb20597 (rewriteutil: use precheck() in uncommit and amend commands, 2017-11-28). It's about time we use it in other places. rewriteutil.precheck() looks unfortunate for i18n (it seems to rely on an English verb for the action making sense in other languages), but hopefully not bad enough that we should avoid using it. Differential Revision: https://phab.mercurial-scm.org/D7684
-
- Dec 13, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7646
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7645
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7644
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7643
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7642
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7661
-
Martin von Zweigbergk authored
I've also updated the helper to work with the hyphenated --dry-run option. Differential Revision: https://phab.mercurial-scm.org/D7641
-
- Dec 18, 2019
-
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D7691
-
Matt Harbison authored
This will minimize the changes needed to add other sources. Differential Revision: https://phab.mercurial-scm.org/D7690
-
Matt Harbison authored
The exe relative hgrc.d and the registry paths are not mutually exclusive. Differential Revision: https://phab.mercurial-scm.org/D7689
-
Matt Harbison authored
Support was removed in python 2.6. Differential Revision: https://phab.mercurial-scm.org/D7688
-
- Dec 17, 2019
-
-
Augie Fackler authored
Tested by timeless. Differential Revision: https://phab.mercurial-scm.org/D7683
-
- Dec 16, 2019
-
-
Matt Harbison authored
Fixes the following pytype warnings: line 791, in _writedata: No attribute 'logdata' on baseproxyobserver [attribute-error] line 792, in _writedata: No attribute 'logdataapis' on baseproxyobserver [attribute-error] line 793, in _writedata: No attribute 'fh' on baseproxyobserver [attribute-error] line 794, in _writedata: No attribute 'fh' on baseproxyobserver [attribute-error] line 799, in _writedata: No attribute 'logdataapis' on baseproxyobserver [attribute-error] line 800, in _writedata: No attribute 'fh' on baseproxyobserver [attribute-error] line 802, in _writedata: No attribute 'fh' on baseproxyobserver [attribute-error] line 803, in _writedata: No attribute 'name' on baseproxyobserver [attribute-error] line 805, in _writedata: No attribute 'fh' on baseproxyobserver [attribute-error] line 809, in _writedata: No attribute 'logdataapis' on baseproxyobserver [attribute-error] line 810, in _writedata: No attribute 'fh' on baseproxyobserver [attribute-error] line 814, in _writedata: No attribute 'fh' on baseproxyobserver [attribute-error] line 815, in _writedata: No attribute 'name' on baseproxyobserver [attribute-error] line 817, in _writedata: No attribute 'fh' on baseproxyobserver [attribute-error] Differential Revision: https://phab.mercurial-scm.org/D7675
-
- Dec 12, 2019
-
-
Martin von Zweigbergk authored
`hg config --debug` includes lines like this: set config by: $EDITOR but also lines like this: $EDITOR: ui.editor=emacs -nw The `set config by` messages don't seem to provide much additional information over what we get from the `$EDITOR:`-type message. I could imagine wanting to see which values got overriden by a later entry, but that information is already not present. So let's just remove the first type of output. My next patch would otherwise amplify the redundant output (there would be one `set config by` for each line in `mergetools.rc`). Differential Revision: https://phab.mercurial-scm.org/D7627
-
- Dec 11, 2019
-
-
Martin von Zweigbergk authored
`mercurial/defaultrc/` is a directory both in the Mercurial repo and once installed on a target platform. The directory was created in c4ce077588d0 (config: introduce "built-in" default configuration settings in default.d, 2014-09-04). That commit has some more information, but it still doesn't seem to say that `defaultrc/` (then called `default.d/`) could be a file. Perhaps the check was there to allow you to run the same code on an older install/repo? Differential Revision: https://phab.mercurial-scm.org/D7624
-
- Nov 29, 2019
-
-
Raphaël Gomès authored
`exactmatcher` is the name in the Python implementation and corresponds to `FileMatcher` in Rust. Differential Revision: https://phab.mercurial-scm.org/D7531
-
Raphaël Gomès authored
Differential Revision: https://phab.mercurial-scm.org/D7530
-
Raphaël Gomès authored
This is the first time we actually use the `Matcher` trait, still for a small subset of all matchers defined in Python. While I haven't yet actually measured the performance of this, I have tried to avoid any unnecessary allocations. This forces the use of heavy lifetimes annotations which I am not sure we can simplify, although I would be happy to be proven wrong. Differential Revision: https://phab.mercurial-scm.org/D7529
-
Raphaël Gomès authored
Mercurial defines an `exactmatcher`, I find `FileMatcher` to be clearer, but am not opposed to using the old name. This change also switched the order of `assert_eq` arguments as it is clearer that way for most people. Differential Revision: https://phab.mercurial-scm.org/D7528
-
- Dec 12, 2019
-
-
Matt Harbison authored
We've run into occasional problems with people committing a repo, and then amending or rebasing in the subrepo. That makes it so that the revision in the parent can't be checked out, and the problem gets propagated on push. Mercurial already tries to defend against this sort of dangling reference by pushing *all* subrepo revisions first. This reuses the checks that trigger warnings in `hg verify` to bail on the push unless using `--force`. I thought about putting this on the server side, but at that point, all of the data has been transferred, only to bail out. Additionally, SCM Manager hosts subrepos in a location that isn't nested in the parent, so normal subrepo code would complain that the subrepo is missing when run on the server. Because the push command pushes subrepos before calling this exchange code, a subrepo will be pushed before the parent is verified. Not great, but no dangling references are exchanged, so it solves the problem. This code isn't in the loop that pushes the subrepos because: 1) the list of outgoing revisions is needed to limit the scope of the check 2) the loop only accesses the current revision, and therefore can miss subrepos that were dropped in previous commits 3) this code is called when pushing a subrepo, so the protection is recursive I'm not sure if there's a cheap check for the list of files in the outgoing bundle. If there is, that would provide a fast path to bypass this check for people not using subrepos (or if no subrepo changes were made). There's probably also room for verifying other references like tags. But since that doesn't break checkouts, it's much less of a problem. Differential Revision: https://phab.mercurial-scm.org/D7616
-