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
Wed, 11 Dec 2019 15:33:07 -0800 config: catch intended exception when failing to parse config
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Dec 2019 15:33:07 -0800] rev 43909
config: catch intended exception when failing to parse config When a new config parser was introduced in fca54469480e (ui: introduce new config parser, 2009-04-23), the reading side would raise a ConfigError which was then caught in the ui code. Then, in 2123aad24d56 (error: add new ParseError for various parsing errors, 2010-06-04), a ParseError was raised instead, but the call site was not updated. Let's start catching that ParseError. We still don't print it in a friendly way, but that's not worse than before. Differential Revision: https://phab.mercurial-scm.org/D7625
Wed, 11 Dec 2019 09:39:14 -0800 rust-hg-path: implement more readable custom Debug for HgPath{,Buf}
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Dec 2019 09:39:14 -0800] rev 43908
rust-hg-path: implement more readable custom Debug for HgPath{,Buf} The default prints the vector of bytes as a list of integers. I considered instead getting rid of the Debug trait, but we use the Debug format in lots of derived Debug instances, so we probably do want to implement it. Differential Revision: https://phab.mercurial-scm.org/D7604
Mon, 16 Dec 2019 15:58:47 -0800 util: implement sortdict.insert()
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Dec 2019 15:58:47 -0800] rev 43907
util: implement sortdict.insert() As flagged by pytype (reported via Matt Harbison, thanks). This was broken by bd0fd3ff9916 (util: rewrite sortdict using Python 2.7's OrderedDict, 2017-05-16). We actually call insert() on namespaces.py:100, but we clearly don't have test coverage of that an no users have reported it AFAIK. Differential Revision: https://phab.mercurial-scm.org/D7680
Mon, 16 Dec 2019 23:27:17 -0500 patch: make __repr__() return str
Matt Harbison <matt_harbison@yahoo.com> [Mon, 16 Dec 2019 23:27:17 -0500] rev 43906
patch: make __repr__() return str Caught by pytype: line 969, in __repr__: Function bytes.join was called with the wrong arguments [wrong-arg-types] Expected: (self, iterable: Iterable[bytes]) Actually passed: (self, iterable: Iterator[str]) Differential Revision: https://phab.mercurial-scm.org/D7682
Sun, 15 Dec 2019 23:46:10 -0500 pytype: suppress warnings about no 'open_binary' on importlib.resources
Matt Harbison <matt_harbison@yahoo.com> [Sun, 15 Dec 2019 23:46:10 -0500] rev 43905
pytype: suppress warnings about no 'open_binary' on importlib.resources Fixes these pytype warnings: line 43, in <module>: No attribute 'open_binary' on module 'importlib.resources' [module-attr] line 47, in open_resource: No attribute 'open_binary' on module 'importlib.resources' [module-attr] For some reason, I can't upgrade from 3.6.8 in my WSL environment. Differential Revision: https://phab.mercurial-scm.org/D7681
Mon, 16 Dec 2019 17:10:51 -0500 windows: if username(uid=None) is loaded, just use getpass
Augie Fackler <augie@google.com> [Mon, 16 Dec 2019 17:10:51 -0500] rev 43904
windows: if username(uid=None) is loaded, just use getpass This is at least consistent with what we do on other platforms in the base case. I don't know enough about Windows to fill in other cases that might exist here, but this at least should be a start. Differential Revision: https://phab.mercurial-scm.org/D7679
Fri, 13 Dec 2019 14:12:14 -0800 transplant: use check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Dec 2019 14:12:14 -0800] rev 43903
transplant: use check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D7663
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip