Tue, 14 Jan 2020 18:59:49 -0800 sha1dc: use buffer protocol when parsing arguments
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 14 Jan 2020 18:59:49 -0800] rev 44087
sha1dc: use buffer protocol when parsing arguments Without this, functions won't accept bytearray, memoryview, or other types that can be exposed as bytes to the C API. The most resilient way to obtain a bytes-like object from the C API is using the Py_buffer interface. This commit converts use of s#/y# to s*/y* and uses Py_buffer for accessing the underlying bytes array. I checked how hashlib is implemented in CPython and the the implementation agrees with its use of the Py_buffer interface as well as using BufferError in cases of bad buffer types. Sadly, there's no good way to test for ndim > 1 without writing our own C-backed Python type. Differential Revision: https://phab.mercurial-scm.org/D7879
Tue, 14 Jan 2020 20:05:37 -0500 lfs: avoid quadratic performance in processing server responses
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Jan 2020 20:05:37 -0500] rev 44086
lfs: avoid quadratic performance in processing server responses This is also adapted from the Facebook repo[1]. Unlike there, we were already reading the download stream in chunks and immediately writing it to disk, so we basically avoided the problem on download. There shouldn't be a lot of data to read on upload, but it's better to get rid of this pattern. [1] https://github.com/facebookexperimental/eden/commit/82df66ffe97e21f3ee73dfec093c87500fc1f6a7 Differential Revision: https://phab.mercurial-scm.org/D7882
Tue, 14 Jan 2020 19:42:24 -0500 lfs: check content length after downloading content
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Jan 2020 19:42:24 -0500] rev 44085
lfs: check content length after downloading content Adapted from the Facebook repo[1]. The intent is to distinguish between the connection dying and getting served a corrupt blob. The original message: HTTP makes no provision to tell your client that you failed halfway through producing your response and won't have the answer they're looking for. So, if a LFS server fails while producing a response, then we'll report an OID mismatch. We can do a little better and disambiguate between "the server sent us the wrong blob" (very scary) and "the server crashed" (merely annoying) by looking at the content length of the response we got back. If it's not what was advertised, we can reasonably safely assume the server crashed. [1] https://github.com/facebookexperimental/eden/commit/2a4a6fab4e882ed89b948bfc1e7d56d7c3c99dd2 Differential Revision: https://phab.mercurial-scm.org/D7881
Tue, 14 Jan 2020 18:02:20 -0500 lfs: rename a variable to clarify its use
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Jan 2020 18:02:20 -0500] rev 44084
lfs: rename a variable to clarify its use This is the response object, not a request. Differential Revision: https://phab.mercurial-scm.org/D7880
Tue, 14 Jan 2020 17:53:43 -0800 sha1dc: use proper string functions on Python 2/3
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 14 Jan 2020 17:53:43 -0800] rev 44083
sha1dc: use proper string functions on Python 2/3 PyString_FromStringAndSize doesn't exist on Python 3: we need to use PyUnicode_FromStringAndSize. The extension now compiles without warnings on Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D7878
Tue, 14 Jan 2020 17:39:12 -0800 sha1dc: declare all variables at begininng of block
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 14 Jan 2020 17:39:12 -0800] rev 44082
sha1dc: declare all variables at begininng of block This is required to appease ancient C language standards, which msvc 2008 still requires for Python 2.7 on Windows. Differential Revision: https://phab.mercurial-scm.org/D7877
Tue, 14 Jan 2020 17:37:04 -0800 sha1dc: manually define integer types on msvc 2008
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 14 Jan 2020 17:37:04 -0800] rev 44081
sha1dc: manually define integer types on msvc 2008 Python 2.7 on Windows builds with MSVC 2008, which doesn't include stdint.h. So we need to check for the compiler version and manually define missing types when it is ancient. Differential Revision: https://phab.mercurial-scm.org/D7876
Tue, 14 Jan 2020 14:18:11 -0800 packaging: leverage os.path.relpath() in setup.py
Martin von Zweigbergk <martinvonz@google.com> [Tue, 14 Jan 2020 14:18:11 -0800] rev 44080
packaging: leverage os.path.relpath() in setup.py `os.path.relpath()` has existed since Python 2.6, so we can safely use it. This fixes a bug in the current code when the common prefix is "/" (in which case `uplevel` would be one less than it should). Differential Revision: https://phab.mercurial-scm.org/D7875
Tue, 14 Jan 2020 18:00:05 +0100 rust-utils: add util to find a slice in another slice
Raphaël Gomès <rgomes@octobus.net> [Tue, 14 Jan 2020 18:00:05 +0100] rev 44079
rust-utils: add util to find a slice in another slice Differential Revision: https://phab.mercurial-scm.org/D7863
Tue, 14 Jan 2020 16:00:57 +0100 dirstate: move rust fast-path calling code to its own method
Raphaël Gomès <rgomes@octobus.net> [Tue, 14 Jan 2020 16:00:57 +0100] rev 44078
dirstate: move rust fast-path calling code to its own method This logic is about to get bigger, this will make it easier to read and not pollute the main Python logic. Differential Revision: https://phab.mercurial-scm.org/D7862
Tue, 14 Jan 2020 00:52:53 -0500 lfs: add "bytes" as the unit to the upload/download progress bar
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Jan 2020 00:52:53 -0500] rev 44077
lfs: add "bytes" as the unit to the upload/download progress bar Facebook also passes `util.bytecount()` as a pretty formatter here, but our progress bar doesn't support that. Differential Revision: https://phab.mercurial-scm.org/D7872
Tue, 14 Jan 2020 16:37:45 -0500 phabricator: post revisions in ascending topological order (issue6241)
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Jan 2020 16:37:45 -0500] rev 44076
phabricator: post revisions in ascending topological order (issue6241) The parent in phabricator ends up being the last revision posted, so sorting the user input into ascending order should be enough to preserve the proper relationships. Differential Revision: https://phab.mercurial-scm.org/D7874
Tue, 14 Jan 2020 16:29:03 -0500 doc: fix references to `revset.abstractsmartset`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Jan 2020 16:29:03 -0500] rev 44075
doc: fix references to `revset.abstractsmartset` Differential Revision: https://phab.mercurial-scm.org/D7873
Mon, 13 Jan 2020 20:09:32 -0800 fsmonitor: properly handle str ex.msg
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Jan 2020 20:09:32 -0800] rev 44074
fsmonitor: properly handle str ex.msg ex.msg is always a str, since pywatchman uses str for exception messages. This commit removes a b'' from a string compare to avoid types mismatch and adds a coercion to bytes before stuffing the exception message on our local exception type, which uses bytes for the message elsewhere in this file. Differential Revision: https://phab.mercurial-scm.org/D7855
Mon, 23 Dec 2019 01:12:20 -0500 verify: allow the storage to signal when renames can be tested on `skipread`
Matt Harbison <matt_harbison@yahoo.com> [Mon, 23 Dec 2019 01:12:20 -0500] rev 44073
verify: allow the storage to signal when renames can be tested on `skipread` This applies the new marker in the lfs handler to show it in action, and adds the test mentioned at the beginning of the series to show that fulltext isn't necessary in the LFS case. The existing `skipread` isn't enough, because it is also set if an error occurs reading the revlog data, or the data is censored. It could probably be cleared, but then it technically violates the interface contract. That wouldn't matter for the existing verify algorithm, but it isn't clear how that will change as alternate storage support is added. The flag is probably pretty revlog specific, given the comments in verify.py. But there's already filelog specific stuff in there and I'm not sure what future storage will bring, so I don't want to over-engineer this. Likewise, I'm not sure that we want the verify method for each storage type to completely drive the bus when it comes to detecting renames, so I don't want to go down the rabbithole of having verifyintegrity() return metadata hints at this point. Differential Revision: https://phab.mercurial-scm.org/D7713
Sun, 22 Dec 2019 23:50:19 -0500 lfs: don't skip locally available blobs when verifying
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Dec 2019 23:50:19 -0500] rev 44072
lfs: don't skip locally available blobs when verifying The `skipflags` config was introduced in a2ab9ebcd85b, which specifically calls out downloading and storing all blobs as potentially too expensive. But I don't see any reason to skip blobs that are already available locally. Hashing the blob is the only way to indirectly verify the rawdata content stored in the revlog. (The note in that commit about skipping renamed is still correct, but the reason given about needing fulltext isn't.) Differential Revision: https://phab.mercurial-scm.org/D7712
Fri, 20 Dec 2019 01:11:35 -0500 lfs: add a switch to `hg verify` to ignore the content of blobs
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Dec 2019 01:11:35 -0500] rev 44071
lfs: add a switch to `hg verify` to ignore the content of blobs Trying to validate the fulltext of an external revision causes missing blobs to be downloaded and cached. Since the downloads aren't batch prefetched[1] and aren't compressed, this can be expensive both in terms of time and space. I made this a tri-state instead of a simple bool because there's an existing (undocumented) config to handle this, and it would be weird if `hg verify` were to suddenly start ignoring that config but an `hg recover` initiated verify honors it. Since this uses the same config setting, it too will skip rename verification (which requires fulltext, but not for LFS). [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-April/116118.html Differential Revision: https://phab.mercurial-scm.org/D7708
Wed, 08 Jan 2020 14:37:54 -0500 revlog: run rustfmt nightly
Augie Fackler <augie@google.com> [Wed, 08 Jan 2020 14:37:54 -0500] rev 44070
revlog: run rustfmt nightly I'm a little nervous about folding this back (might be nightly rustfmt mismatches?) so I want someone to review this. Differential Revision: https://phab.mercurial-scm.org/D7813
Wed, 08 Jan 2020 14:37:01 -0500 examples: specify rustfmt nightly using a $() construct
Augie Fackler <augie@google.com> [Wed, 08 Jan 2020 14:37:01 -0500] rev 44069
examples: specify rustfmt nightly using a $() construct This is ugly, but it's how we have to configure rustfmt for now as we require nightly rustfmt. Differential Revision: https://phab.mercurial-scm.org/D7812
Sat, 07 Dec 2019 13:13:48 -0800 hg-core: rustfmt path.rs
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 07 Dec 2019 13:13:48 -0800] rev 44068
hg-core: rustfmt path.rs The file as vendored does not conform to our source formatting conventions. Let's reformat it so it does. # skip-blame automated code reformatting Differential Revision: https://phab.mercurial-scm.org/D7580
Sat, 07 Dec 2019 10:26:28 -0800 hg-core: vendor Facebook's path utils module
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 07 Dec 2019 10:26:28 -0800] rev 44067
hg-core: vendor Facebook's path utils module The added file was imported from https://github.com/facebookexperimental/eden/blob/d1d8fb939a39aa331ae7f162c39cbcaa511d474b/eden/scm/lib/util/src/path.rs without modifications. The file is not yet integrated into our project. This will be done in subsequent commits. Differential Revision: https://phab.mercurial-scm.org/D7573
Tue, 14 Jan 2020 12:04:12 +0100 revlog-native: introduced ABI version in capsule
Georges Racinet <georges.racinet@octobus.net> [Tue, 14 Jan 2020 12:04:12 +0100] rev 44066
revlog-native: introduced ABI version in capsule Concerns that an inconsistency could arise between the actual contents of the capsule in revlog.c and the Rust consumer have been raised after the switch to the array of data and function pointers in f384d68d8ea8. It has been suggested that the `version` from parsers.c could be use for this. In this change, we introduce instead a separate ABI version number, which should have the following advantages: - no need to change the consuming Rust code for changes that have nothing to do with the contents of the capsule - the version number in parsers.c is not explicitely flagged as ABI. It's not obvious to me whether an ABI change that would be invisible to Python would warrant an increment The drawback is that developers now have to consider two version numbers. We expect the added cost of the check to be negligible because it occurs at instantiation of `CIndex` only, which in turn is tied to instantiation of Python objects such as `LazyAncestors` and `MixedIndex`. Frequent calls to `Cindex::new` should also probably hit the CPU branch predictor. Differential Revision: https://phab.mercurial-scm.org/D7856
Mon, 13 Jan 2020 19:11:44 -0800 phases: make phasecache._phasesets immutable
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Mon, 13 Jan 2020 19:11:44 -0800] rev 44065
phases: make phasecache._phasesets immutable Previously, some code paths would mutate the cache itself, which could give weird results if multiple revsets got evaluated through that path. Differential Revision: https://phab.mercurial-scm.org/D7854
Mon, 13 Jan 2020 19:06:36 -0800 phases: reduce code duplication in phasecache.getrevset
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Mon, 13 Jan 2020 19:06:36 -0800] rev 44064
phases: reduce code duplication in phasecache.getrevset This is a functional NOP other than reducing some of the duplication in that method. Differential Revision: https://phab.mercurial-scm.org/D7853
Mon, 13 Jan 2020 17:18:03 -0500 scmutil: fix an unbound variable with progressbar debug enabled
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Jan 2020 17:18:03 -0500] rev 44063
scmutil: fix an unbound variable with progressbar debug enabled Differential Revision: https://phab.mercurial-scm.org/D7852
Mon, 13 Jan 2020 14:12:31 -0500 hgext: replace references to hashlib.sha1 with hashutil.sha1
Augie Fackler <augie@google.com> [Mon, 13 Jan 2020 14:12:31 -0500] rev 44062
hgext: replace references to hashlib.sha1 with hashutil.sha1 When in a non-pure build of Mercurial, this will provide protections against SHA1 collision attacks. Differential Revision: https://phab.mercurial-scm.org/D7851
Mon, 13 Jan 2020 17:16:54 -0500 sslutil: migrate to hashutil.sha1 instead of hashlib.sha1
Augie Fackler <augie@google.com> [Mon, 13 Jan 2020 17:16:54 -0500] rev 44061
sslutil: migrate to hashutil.sha1 instead of hashlib.sha1 This is a straight-line replacement like the others, but I split it out since it's used in a network context and I'm not sure this is appropriate (we should probably drop support for sha1 fingerprints over TLS) and wanted this to be easily dropped. Differential Revision: https://phab.mercurial-scm.org/D7850
Mon, 13 Jan 2020 17:15:14 -0500 core: migrate uses of hashlib.sha1 to hashutil.sha1
Augie Fackler <augie@google.com> [Mon, 13 Jan 2020 17:15:14 -0500] rev 44060
core: migrate uses of hashlib.sha1 to hashutil.sha1 Differential Revision: https://phab.mercurial-scm.org/D7849
Mon, 13 Jan 2020 17:14:19 -0500 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com> [Mon, 13 Jan 2020 17:14:19 -0500] rev 44059
hashutil: new package for hashing-related features Right now this just tries to use our sha1dc and if it's missing (eg a --pure build) we fall back to hashlib. I imagine in the future we'll want some other things in here for detecting what hasher is in use as we transition off sha1. Differential Revision: https://phab.mercurial-scm.org/D7848
Wed, 08 Jan 2020 15:59:52 -0500 sha1dc: initial implementation of Python extension
Augie Fackler <augie@google.com> [Wed, 08 Jan 2020 15:59:52 -0500] rev 44058
sha1dc: initial implementation of Python extension A future change will use this when available to avoid sha1 collision issues until we can get moved to something else. Differential Revision: https://phab.mercurial-scm.org/D7815
Wed, 08 Jan 2020 15:09:01 -0500 sha1dc: import latest version from github
Augie Fackler <augie@google.com> [Wed, 08 Jan 2020 15:09:01 -0500] rev 44057
sha1dc: import latest version from github After the recent SHA1 news, the attacks are serious enough we should be more proactive. This code will at least allow detection of attacks early. It's already widely deployed in Git. This is git revision 855827c583bc30645ba427885caa40c5b81764d2 of the sha1collisiondetection repo[0], with most of the files omitted. A follow-up change will introduce Python bindings for this code. 0: https://github.com/cr-marcstevens/sha1collisiondetection Differential Revision: https://phab.mercurial-scm.org/D7814
Sat, 11 Jan 2020 05:44:58 +0100 transaction: add a `hasfinalize` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 11 Jan 2020 05:44:58 +0100] rev 44056
transaction: add a `hasfinalize` method The method allow code to check if an existing callback exists. It allow them to skip potentially expensive setup for a callback. Differential Revision: https://phab.mercurial-scm.org/D7832
Sat, 11 Jan 2020 04:57:29 +0100 changelog: fix the diverted opener to accept more kwargs
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 11 Jan 2020 04:57:29 +0100] rev 44055
changelog: fix the diverted opener to accept more kwargs The current code prevent the use of `atomictemp` file with the changelog opener. I do not see a good reason for this limitation. Differential Revision: https://phab.mercurial-scm.org/D7831
Mon, 06 Jan 2020 08:08:06 +0100 revlog: reorder a conditionnal about revlogio
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jan 2020 08:08:06 +0100] rev 44054
revlog: reorder a conditionnal about revlogio if we are using REVLOGV0, we will not use a rust based index. This small line movement make it clearer. Differential Revision: https://phab.mercurial-scm.org/D7830
Fri, 10 Jan 2020 15:47:39 -0800 rebase: delete seemingly unnecessary needupdate()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Jan 2020 15:47:39 -0800] rev 44053
rebase: delete seemingly unnecessary needupdate() This seemed to be about checking that the user hasn't updated away when we asked them to resolve merge conflicts. These days we call `cmdutil.checkunfinished()` and refuse to update, so the user shouldn't be able to get into this state. `test-rebase-interruptions.t` actually has some tests where it disables the rebase extension in order to be allowed to do some of these updates. That still passes, but I wouldn't personally haved cared if that failed. Differential Revision: https://phab.mercurial-scm.org/D7825
Fri, 10 Jan 2020 13:24:25 -0800 workingctx: move setparents() logic from localrepo to mirror overlayworkingctx
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Jan 2020 13:24:25 -0800] rev 44052
workingctx: move setparents() logic from localrepo to mirror overlayworkingctx It would be nice to later be able to call `wctx.setparents()` whether `wctx` is a `workingctx` or an `overlayworkingctx`. Differential Revision: https://phab.mercurial-scm.org/D7823
Fri, 10 Jan 2020 21:41:28 -0800 overlayworkginctx: implement a setparents() to mirror dirstate.setparents()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Jan 2020 21:41:28 -0800] rev 44051
overlayworkginctx: implement a setparents() to mirror dirstate.setparents() This lets us make the in-memory and on-disk code a bit more similar. I'll soon also implement setparents() on the regular workingctx. Differential Revision: https://phab.mercurial-scm.org/D7822
Fri, 10 Jan 2020 17:03:23 -0800 overlayworkingctx: default branch to base context's branch
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Jan 2020 17:03:23 -0800] rev 44050
overlayworkingctx: default branch to base context's branch This matches what the dirstate does (it reuses working copy parent's branch unless told otherwise). By moving the default out of `rebase.commitmemorynode()`, it will let us clean that up better later. Differential Revision: https://phab.mercurial-scm.org/D7821
Thu, 09 Jan 2020 15:41:40 -0800 grep: speed up `hg grep --all-files some/path` by using ctx.matches(match)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 09 Jan 2020 15:41:40 -0800] rev 44049
grep: speed up `hg grep --all-files some/path` by using ctx.matches(match) ctx.matches(match) avoids walking unintersting parts of the tree when using tree manifests. That can make a very big difference when grepping in a small subset of the tree (2.0s -> 0.7s in my case, but can of course be made more extreme by picking a smaller subset of files). Differential Revision: https://phab.mercurial-scm.org/D7820
Thu, 09 Jan 2020 10:17:10 -0500 py3: byteify the opener option to use `rust.index` to allow Rust revlogs
Matt Harbison <matt_harbison@yahoo.com> [Thu, 09 Jan 2020 10:17:10 -0500] rev 44048
py3: byteify the opener option to use `rust.index` to allow Rust revlogs It looks like this corresponds to the byteified key written in localrepo in 8042856c90b6. Differential Revision: https://phab.mercurial-scm.org/D7818
Fri, 27 Dec 2019 21:11:36 -0800 graft: use revset for intersecting with ancestor set
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 21:11:36 -0800] rev 44047
graft: use revset for intersecting with ancestor set This addresses a TODO added in a1381eea7c7d (graft: do not use `.remove` on a smart set (regression), 2014-04-28). Differential Revision: https://phab.mercurial-scm.org/D7806
Fri, 27 Dec 2019 21:11:33 -0800 graft: don't remove from a list in a loop
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 21:11:33 -0800] rev 44046
graft: don't remove from a list in a loop This addresses a TODO added in a1381eea7c7d (graft: do not use `.remove` on a smart set (regression), 2014-04-28). I couldn't measure any speedup. Differential Revision: https://phab.mercurial-scm.org/D7805
Fri, 27 Dec 2019 22:40:52 -0800 tests: avoid grafting the same change over and over
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 22:40:52 -0800] rev 44045
tests: avoid grafting the same change over and over The test case added in a1381eea7c7d (graft: do not use `.remove` on a smart set (regression), 2014-04-28) added a test case that grafted the same change (renaming 'a' to 'b') three times over. It had description "graft works on complex revset", but AFACT, all that it cared about was that some ancestor of the working copy was in the set of revisions to graft. So this patch changes the test to do that instead. (I plan to later make it so that grafting these renames on top of each won't create the empty commits they currently create.) Differential Revision: https://phab.mercurial-scm.org/D7804
Wed, 08 Jan 2020 20:23:24 -0500 py3: byteify some `ui.configbool()` parameters
Matt Harbison <matt_harbison@yahoo.com> [Wed, 08 Jan 2020 20:23:24 -0500] rev 44044
py3: byteify some `ui.configbool()` parameters This popped up in 8042856c90b6. Differential Revision: https://phab.mercurial-scm.org/D7817
Mon, 23 Dec 2019 17:47:31 +0100 rust-discovery: type alias for random generator seed
Georges Racinet <georges.racinet@octobus.net> [Mon, 23 Dec 2019 17:47:31 +0100] rev 44043
rust-discovery: type alias for random generator seed It just makes our life easier Differential Revision: https://phab.mercurial-scm.org/D7715
Fri, 27 Dec 2019 15:53:16 -0800 tests: split out another ~1/2 of test-graft.t
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 15:53:16 -0800] rev 44042
tests: split out another ~1/2 of test-graft.t The tests involving renames were also quite independent from the rest. Differential Revision: https://phab.mercurial-scm.org/D7803
Fri, 27 Dec 2019 15:39:48 -0800 tests: split out ~1/3 of test-graft.t
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 15:39:48 -0800] rev 44041
tests: split out ~1/3 of test-graft.t test-graft.t is ~2400 lines and takes 34s to run. This patch moves the last ~1/3 of it to a separate file. The parts now run in 22s + 13s. On top of that, we can remove the #testcases from the old file, so it's only 22s + 2*13s instead of the 2*34s it was before. Differential Revision: https://phab.mercurial-scm.org/D7802
Fri, 27 Dec 2019 14:08:02 -0800 overlwayworkingctx: remove doubly bad reference to wrapped ctx for copies
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 14:08:02 -0800] rev 44040
overlwayworkingctx: remove doubly bad reference to wrapped ctx for copies `_wrappedctx` lives on overlwayworkingctx, not on the repo object, so we should access it as `._wrappedctx`, not `._repo._wrappedctx`. More importantly, the overlayworkingctx is relative to its base, not including it, so the copies returned should not include copies made in the base. Differential Revision: https://phab.mercurial-scm.org/D7801
Fri, 27 Dec 2019 12:41:56 -0800 movedirstate: get copies from dirstate before setting parents
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 12:41:56 -0800] rev 44039
movedirstate: get copies from dirstate before setting parents Setting dirstate parents can modify the copies recorded in the dirstate when there are two dirstate parents. I don't think we ever call movedirstate() when there is more than one parent, but it seems clearer to get the copies from the dirstate first anyway. Differential Revision: https://phab.mercurial-scm.org/D7800
Thu, 12 Dec 2019 14:31:11 -0800 fix: convert clang-format-ignorelist to use wildcards
Kyle Lippincott <spectral@google.com> [Thu, 12 Dec 2019 14:31:11 -0800] rev 44038
fix: convert clang-format-ignorelist to use wildcards It's very brittle to specify the exact filenames for these vendored/thirdparty libraries; when there's an upgrade, it's likely not going to be updated. Differential Revision: https://phab.mercurial-scm.org/D7619
Wed, 08 Jan 2020 11:59:32 -0500 packaging: update Ubuntu docker build dependencies to Python 3
Connor Sheehan <sheehan@mozilla.com> [Wed, 08 Jan 2020 11:59:32 -0500] rev 44037
packaging: update Ubuntu docker build dependencies to Python 3 Changeset 7574ccd87200f02e updated the Debian docker builds to Python 3. In doing so, the Ubuntu docker-based builds broke, as the Dockerfile does not include the new dependencies as specified in `contrib/packaging/debian/control`. This commit changes the dependencies in the Ubuntu Dockerfile template to their Python 3 equivalents, fixing `make docker-ubuntu-bionic`. Differential Revision: https://phab.mercurial-scm.org/D7810
Tue, 07 Jan 2020 12:09:36 +0100 mmap: add a size argument to mmapread
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Jan 2020 12:09:36 +0100] rev 44036
mmap: add a size argument to mmapread With this argument, we can control the size of the mmap created. (previously it was always the whole file. Differential Revision: https://phab.mercurial-scm.org/D7808
Tue, 07 Jan 2020 12:26:37 +0100 revlogutils: move the NodeMap class in a dedicated nodemap module
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Jan 2020 12:26:37 +0100] rev 44035
revlogutils: move the NodeMap class in a dedicated nodemap module We will introduce more nodemap related code, so it make sense to move the existing code in that module first. Differential Revision: https://phab.mercurial-scm.org/D7809
Sun, 29 Dec 2019 21:10:04 -0500 rcutil: drop the `defaultrcpath()` method (API)
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 21:10:04 -0500] rev 44034
rcutil: drop the `defaultrcpath()` method (API) The resource based code can service py2, py3 and an oxidized executable, so there's no reason to leave this around. It was flagged as an API change when it was introduced, so flagging it again. Differential Revision: https://phab.mercurial-scm.org/D7777
Sun, 29 Dec 2019 21:06:34 -0500 ui: add the ability to apply `defaultrc` configs from resources
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 21:06:34 -0500] rev 44033
ui: add the ability to apply `defaultrc` configs from resources We will want the ability to cat out these resources, but the same would apply to templates, so I'm going to wait for the dust to settle on that. Reading the default config directly from the filesystem is still in place for now. Differential Revision: https://phab.mercurial-scm.org/D7776
Sun, 29 Dec 2019 20:51:44 -0500 ui: refactor `readconfig()` into a form that can consume resources
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 20:51:44 -0500] rev 44032
ui: refactor `readconfig()` into a form that can consume resources The old form can't completely go away, because files outside of packages still need to be read. The name passed in here is a tuple of `package name, resource` as needed by the resource API. I like the idea of stating the config file is embedded in the executable by listing is as `exe!package.resource`. This would be consistent with how `debuginstall` points to the executable for the python executable, lib, and installed modules. While in practice the filesystem path is available from the backing ResourceReader when the resource is opened, it is a relative path on py2 and absolute on py3. Further, while this would show in the `hg config` output for each option if set as such here, it doesn't show in the `reading from...` line when `--debug` is used. The file isn't actually open where that prints, so there's no way I see to get that info there. So I opted for the simple prefix to distinguish resources from files. Differential Revision: https://phab.mercurial-scm.org/D7775
Sun, 29 Dec 2019 20:35:34 -0500 resourceutil: implement `contents()` to iterate over resources in a package
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 20:35:34 -0500] rev 44031
resourceutil: implement `contents()` to iterate over resources in a package Differential Revision: https://phab.mercurial-scm.org/D7774
Sun, 29 Dec 2019 20:32:56 -0500 resourceutil: implement `is_resource()`
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 20:32:56 -0500] rev 44030
resourceutil: implement `is_resource()` This will be needed when iterating resources. Differential Revision: https://phab.mercurial-scm.org/D7773
Sat, 28 Dec 2019 23:35:13 -0500 resourceutil: don't limit resources to the `mercurial` package
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 23:35:13 -0500] rev 44029
resourceutil: don't limit resources to the `mercurial` package This should make things a little clearer, in that it now requires the full package name to access a resource. But the real motivation is that `extensions._disabledpaths()` walks the `hgext` directory looking for bundled extensions. This in turn feeds, among other things: 1) Listing disabled extensions in `hg help extensions` 2) Indicating that an unknown command is in a non-enabled extension 3) Displaying help for non-enabled extensions 4) Generating documentation 5) Announcing LFS is auto-enabled (or not) when cloning from an LFS source The filesystem based ResourceReader will happily return *.py and *.pyc, but the one supplied by PyOxidizer doesn't. Presumably we can change that. The only other idea I had here is for setup.py to generate a text file containing the list of extensions, but that doesn't seem great when running from source. Differential Revision: https://phab.mercurial-scm.org/D7772
Sat, 28 Dec 2019 23:08:57 -0500 setup: include `defaultrc` in the package list
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 23:08:57 -0500] rev 44028
setup: include `defaultrc` in the package list This is needed to access the config files via the resourceutil framework, which is needed to embed the config files when uing PyOxidizer. Differential Revision: https://phab.mercurial-scm.org/D7771
Tue, 24 Dec 2019 20:17:40 +0300 tests: update test-releasenotes-formatting.t output
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 24 Dec 2019 20:17:40 +0300] rev 44027
tests: update test-releasenotes-formatting.t output The output seems to be left outdated because running this test requires fuzzy-wuzzy which is not generally installed. Differential Revision: https://phab.mercurial-scm.org/D7723
Sat, 28 Dec 2019 02:11:51 -0500 tests: fix a copy/paste name duplication in storage.py
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 02:11:51 -0500] rev 44026
tests: fix a copy/paste name duplication in storage.py Flagged by PyCharm as a redeclared name without usage, because the name matches the function immediately preceding it. But since this differs by doing regular reads instead of raw reads, I assume we still want it. But I don't see either function being called anywhere. Differential Revision: https://phab.mercurial-scm.org/D7769
Sat, 28 Dec 2019 02:02:34 -0500 commit: change default `editor` parameter to None
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 02:02:34 -0500] rev 44025
commit: change default `editor` parameter to None Flagged by PyCharm as a boolean not being callable later where it is used. There's no actual bug here because of `if editor` checks before using. Differential Revision: https://phab.mercurial-scm.org/D7768
Sat, 28 Dec 2019 01:51:17 -0500 cleanup: drop redundant character escapes outside of `[]`
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 01:51:17 -0500] rev 44024
cleanup: drop redundant character escapes outside of `[]` Flagged by PyCharm. `@`, `:`, `<`, `>`, and `{` aren't special characters. (I'm a bit surprised that it doesn't also want to unescape `}` in schemes.py.) Differential Revision: https://phab.mercurial-scm.org/D7767
(0) -30000 -10000 -3000 -1000 -300 -100 -64 +64 +100 +300 +1000 +3000 tip