Wed, 11 Dec 2019 22:23:42 -0800 config: drop debug messages saying where config was read from
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Dec 2019 22:23:42 -0800] rev 43919
config: drop debug messages saying where config was read from `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
Wed, 11 Dec 2019 11:22:37 -0800 rcutil: don't check if defaultrc/ is a directory -- we know it is
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Dec 2019 11:22:37 -0800] rev 43918
rcutil: don't check if defaultrc/ is a directory -- we know it is `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
Fri, 29 Nov 2019 17:30:57 +0100 rust-matchers: add support for `exactmatcher` in `dirstate.status`
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 Nov 2019 17:30:57 +0100] rev 43917
rust-matchers: add support for `exactmatcher` in `dirstate.status` `exactmatcher` is the name in the Python implementation and corresponds to `FileMatcher` in Rust. Differential Revision: https://phab.mercurial-scm.org/D7531
Fri, 29 Nov 2019 17:30:10 +0100 rust-dirstate-status: update bridge for new rust version of `dirstate.status`
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 Nov 2019 17:30:10 +0100] rev 43916
rust-dirstate-status: update bridge for new rust version of `dirstate.status` Differential Revision: https://phab.mercurial-scm.org/D7530
Fri, 29 Nov 2019 17:29:06 +0100 rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 Nov 2019 17:29:06 +0100] rev 43915
rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait 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
Fri, 29 Nov 2019 18:54:06 +0100 rust-matchers: add `FileMatcher` implementation
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 Nov 2019 18:54:06 +0100] rev 43914
rust-matchers: add `FileMatcher` implementation 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
Thu, 12 Dec 2019 12:30:15 -0500 exchange: ensure all outgoing subrepo references are present before pushing
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Dec 2019 12:30:15 -0500] rev 43913
exchange: ensure all outgoing subrepo references are present before pushing 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
Thu, 05 Dec 2019 16:19:16 -0500 procutil: try and avoid angering CoreFoundation on macOS
Augie Fackler <augie@google.com> [Thu, 05 Dec 2019 16:19:16 -0500] rev 43912
procutil: try and avoid angering CoreFoundation on macOS We've seen failures like this: objc[57662]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. objc[57662]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. I think this is due to forking off some background processes during `hg update` or similar. I don't have any conclusive proof this is the fork() call that's to blame, but it's the most likely one since the regular `hg update` codepath uses the other fork() invocation (via workers) and we don't get this report from non-Google macOS users. Ugh. Differential Revision: https://phab.mercurial-scm.org/D7615
Wed, 11 Dec 2019 17:35:29 +0100 nodetree: simplify a conditionnal in shortesthexnodeidprefix
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Dec 2019 17:35:29 +0100] rev 43911
nodetree: simplify a conditionnal in shortesthexnodeidprefix instead of try to catch some attribute error, we could just nicely look if the attribute will be available. This make the code simpler to follow and less error prone since we no longer rely on a wider attribute catching. Differential Revision: https://phab.mercurial-scm.org/D7651
Wed, 11 Dec 2019 15:06:09 -0800 config: close file even if we fail to read it
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Dec 2019 15:06:09 -0800] rev 43910
config: close file even if we fail to read it If we get an exception from cfg.read(), we would not close the file before this patch. This patch uses a context manager to make sure we close it. Differential Revision: https://phab.mercurial-scm.org/D7626
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip