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 44037
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 44036
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 44035
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 44034
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
Thu, 02 Jan 2020 17:27:37 -0800 progress: flush stderr after clearing stable
Kyle Lippincott <spectral@google.com> [Thu, 02 Jan 2020 17:27:37 -0800] rev 44033
progress: flush stderr after clearing On python3, ui.stderr is buffered, it seems, so we need to flush it to actually get the progress bar off the screen. This is important since ui.write() will call into progbar.clear() if it thinks there's a progress bar on the screen, with the intent that the next thing it outputs is at the beginning of the line (instead of at the end of the progress bar line). Without the flush, we buffer up the clearing of the screen, and we get some really weird/corrupt output. Differential Revision: https://phab.mercurial-scm.org/D7784
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 44032
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 44031
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 44030
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 44029
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 44028
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 44027
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 44026
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 44025
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 44024
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 44023
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 44022
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
Sat, 28 Dec 2019 01:35:05 -0500 cleanup: drop redundant character escapes from `[]` character sets
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 01:35:05 -0500] rev 44021
cleanup: drop redundant character escapes from `[]` character sets Flagged by PyCharm. Most special characters lose their special meaning inside square brackets. The `-` in util.py doesn't need to be escaped because it is the last character in the set. Differential Revision: https://phab.mercurial-scm.org/D7766
Sat, 28 Dec 2019 01:12:19 -0500 cleanup: replace contiguous spaces in regex patterns with an explicit count
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 01:12:19 -0500] rev 44020
cleanup: replace contiguous spaces in regex patterns with an explicit count Flagged by PyCharm, this form should be more readable. Differential Revision: https://phab.mercurial-scm.org/D7765
Mon, 30 Dec 2019 12:17:02 -0500 mq: avoid using `__file__` to compare modules
Matt Harbison <matt_harbison@yahoo.com> [Mon, 30 Dec 2019 12:17:02 -0500] rev 44019
mq: avoid using `__file__` to compare modules This fixes ~70 tests when using an oxidized executable, bringing the current failure count down to 92 (with 110 skips) when templates/ is copied next to the executable. Differential Revision: https://phab.mercurial-scm.org/D7778
Tue, 31 Dec 2019 16:24:38 -0500 util: avoid referencing `time.clock()` on Windows when missing (issue6238)
Matt Harbison <matt_harbison@yahoo.com> [Tue, 31 Dec 2019 16:24:38 -0500] rev 44018
util: avoid referencing `time.clock()` on Windows when missing (issue6238) It's been removed in 3.8, and issues a deprecation warning since 3.3. Differential Revision: https://phab.mercurial-scm.org/D7780
Mon, 30 Dec 2019 23:53:53 -0500 py3: replace `time.clock()` with `time.perf_counter()`
Matt Harbison <matt_harbison@yahoo.com> [Mon, 30 Dec 2019 23:53:53 -0500] rev 44017
py3: replace `time.clock()` with `time.perf_counter()` The former was removed in 3.8. The util function uses `time.clock()` if the latter is unavailable. Differential Revision: https://phab.mercurial-scm.org/D7779
Wed, 08 Jan 2020 09:59:34 -0800 tests: fix a "naked exception" issue in test-remotefilelog-prefetch.t
Kyle Lippincott <spectral@google.com> [Wed, 08 Jan 2020 09:59:34 -0800] rev 44016
tests: fix a "naked exception" issue in test-remotefilelog-prefetch.t Differential Revision: https://phab.mercurial-scm.org/D7811
Tue, 24 Dec 2019 01:38:02 -0500 subrepo: fix a crash when archiving an svn or git subrepo stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 24 Dec 2019 01:38:02 -0500] rev 44015
subrepo: fix a crash when archiving an svn or git subrepo Only hgsubrepos have a repository attribute. This is pretty hacky, but probably the best we can do on stable. Pushing the lfstatus check down into the wrapper for hgsubrepo (and dropping the check for lfstatus at the top of `hgsubrepoarchive()`) resulted in various test failures because: 1) hgsubrepoarchive isn't returning the number of files archived at the bottom, resulting in an error about += NoneType 2) These copypasta archive wrappers don't use progress bars 3) Largefiles are *not* currently archived when using extdiff (68822b7cdd01), but pushing this context manager down into the subrepo resulted in it apparently doing so (as evidenced by progress bars being dropped) The other uses of `lfstatus()` are not in the substate processing loop, so they shouldn't be an issue. I initially put testcases in this test for largefiles-{on,off}, and it flagged a bunch of exit code differences for `cat` and `diff`, so I backed that off. Differential Revision: https://phab.mercurial-scm.org/D7714
Thu, 12 Dec 2019 18:31:17 +0100 rust-index: add a `experimental.rust.index` option to use the wrapper
Georges Racinet <georges.racinet@octobus.net> [Thu, 12 Dec 2019 18:31:17 +0100] rev 44014
rust-index: add a `experimental.rust.index` option to use the wrapper Now we can start putting this wrapper on the test and benchmark grill. Differential Revision: https://phab.mercurial-scm.org/D7660
Wed, 11 Dec 2019 18:10:20 +0100 rust-index: use the new method in shortesthexnodeidprefix
Georges Racinet <georges.racinet@octobus.net> [Wed, 11 Dec 2019 18:10:20 +0100] rev 44013
rust-index: use the new method in shortesthexnodeidprefix This code can now run with both a Rust or a C index. Differential Revision: https://phab.mercurial-scm.org/D7659
Thu, 12 Dec 2019 03:39:14 +0100 rust-index: expose a method to retrieve the C index
Georges Racinet <georges.racinet@octobus.net> [Thu, 12 Dec 2019 03:39:14 +0100] rev 44012
rust-index: expose a method to retrieve the C index The code for `shortesthexnodeidprefix` need to access the actual C index. For now we grant its wish and expose a method to do so. Once we have the nodemap in Rust, we will be able to implement the same feature from rust and we will be able to drop this method. Differential Revision: https://phab.mercurial-scm.org/D7658
Thu, 12 Dec 2019 18:11:44 +0100 rust-index: handle `MixedIndex` in `pyindex_to_graph`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Dec 2019 18:11:44 +0100] rev 44011
rust-index: handle `MixedIndex` in `pyindex_to_graph` On the long run we will want to implement the Graph trait directly in Rust, but for now we take the path with the least amount of change to focus on the coming persistent NodeMap code. We test this new code through with the lazy ancestors code. Differential Revision: https://phab.mercurial-scm.org/D7657
Fri, 13 Dec 2019 19:52:26 +0100 rust-index: make it possible to clone the struct referencing the C index
Georges Racinet <georges.racinet@octobus.net> [Fri, 13 Dec 2019 19:52:26 +0100] rev 44010
rust-index: make it possible to clone the struct referencing the C index If we are to hand over the C index object to other code, we need to be able to create a new python reference to it. Differential Revision: https://phab.mercurial-scm.org/D7656
Fri, 06 Dec 2019 20:40:02 -0500 match: resolve filesets against the passed `cwd`, not the current one
Matt Harbison <matt_harbison@yahoo.com> [Fri, 06 Dec 2019 20:40:02 -0500] rev 44009
match: resolve filesets against the passed `cwd`, not the current one This allows filesets to be resolved relative to `repo.root`, the same as other patterns are since f02d3c0eed18. The current example in contrib/ wasn't working from the tests directory because of this. Differential Revision: https://phab.mercurial-scm.org/D7570
Thu, 12 Dec 2019 14:28:31 -0800 fix: correct the clang-format example hgrc so that it actually works
Kyle Lippincott <spectral@google.com> [Thu, 12 Dec 2019 14:28:31 -0800] rev 44008
fix: correct the clang-format example hgrc so that it actually works There are three changes here: * Remove -i from `command`, it causes fix to eat your file and empty it out * Add `set:` to pattern, otherwise this is interpreted as just a glob * Switch `listfile:` to `include:`; `listfile:` is relative to the current working directory, while `include:` is relative to the repo root. This makes it so that you don't receive errors when running outside of the repo root about being unable to find the file. Differential Revision: https://phab.mercurial-scm.org/D7618
Wed, 18 Dec 2019 00:41:12 -0500 inno: drop support for Windows 95/98/ME
Matt Harbison <matt_harbison@yahoo.com> [Wed, 18 Dec 2019 00:41:12 -0500] rev 44007
inno: drop support for Windows 95/98/ME Differential Revision: https://phab.mercurial-scm.org/D7696
Wed, 25 Dec 2019 19:03:07 +0100 rust-matchers: fixing cargo doc
Georges Racinet <georges.racinet@octobus.net> [Wed, 25 Dec 2019 19:03:07 +0100] rev 44006
rust-matchers: fixing cargo doc Block quotes marked as `ignore` are still parsed as Rust source examples. Differential Revision: https://phab.mercurial-scm.org/D7783
Wed, 25 Dec 2019 15:17:55 +0100 rust-core: extracted a revlog submodule
Georges Racinet <georges.racinet@octobus.net> [Wed, 25 Dec 2019 15:17:55 +0100] rev 44005
rust-core: extracted a revlog submodule This moves fundamental definitions from the top of the crate to the newly created `revlog` submodule and reexports them for easy compatibility. As we are about to add new features to this crate, we felt it will improve clarity, and moreso if `ancestors` and `dagops` would become submodules of `revlog`. Differential Revision: https://phab.mercurial-scm.org/D7782
Thu, 19 Dec 2019 00:32:42 -0800 phases: make the working directory consistently a draft
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Thu, 19 Dec 2019 00:32:42 -0800] rev 44004
phases: make the working directory consistently a draft Before this change, `hg log -r 'wdir() and public()'` would return it. Differential Revision: https://phab.mercurial-scm.org/D7705
Wed, 25 Dec 2019 14:53:45 +0100 rust-core: updated copyright notice
Georges Racinet <georges.racinet@octobus.net> [Wed, 25 Dec 2019 14:53:45 +0100] rev 44003
rust-core: updated copyright notice The intention here is to put an email address that actually works (I did have full personal copyrights with my former affiliation). It is also an opportunity to acknowledge that I've not been the only one to work on this file. Differential Revision: https://phab.mercurial-scm.org/D7781
Fri, 27 Dec 2019 09:55:35 -0800 tests: fix failing doctest in match.py by adding dummy auditor
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 09:55:35 -0800] rev 44002
tests: fix failing doctest in match.py by adding dummy auditor It was failing with "OSError: [Errno 13] Permission denied: '/root/sub'". It has been failing since 8b1a9ba375e5 (match: make sure `root` argument is always an absolute path (API), 2019-12-13). I don't know why I didn't notice it before sending that patch. Differential Revision: https://phab.mercurial-scm.org/D7731
Thu, 02 Jan 2020 17:30:27 -0800 remotefilelog: actually fix (and test this time) a bytes vs str issue
Kyle Lippincott <spectral@google.com> [Thu, 02 Jan 2020 17:30:27 -0800] rev 44001
remotefilelog: actually fix (and test this time) a bytes vs str issue I attempted this in 94670e124d29 but we didn't actually have any tests for this function it seems, and I mistook "it works now" for it being fixed (when what had actually happened was that my cache had populated enough that I didn't trigger the minimum threshold on my reattempts). Differential Revision: https://phab.mercurial-scm.org/D7785
Tue, 07 Jan 2020 09:26:06 -0500 merge with stable
Augie Fackler <augie@google.com> [Tue, 07 Jan 2020 09:26:06 -0500] rev 44000
merge with stable
Mon, 06 Jan 2020 14:58:32 -0500 Added signature for changeset b4c82b704180 stable
Augie Fackler <raf@durin42.com> [Mon, 06 Jan 2020 14:58:32 -0500] rev 43999
Added signature for changeset b4c82b704180
Mon, 06 Jan 2020 14:58:31 -0500 Added tag 5.2.2 for changeset b4c82b704180 stable
Augie Fackler <raf@durin42.com> [Mon, 06 Jan 2020 14:58:31 -0500] rev 43998
Added tag 5.2.2 for changeset b4c82b704180
Fri, 27 Dec 2019 19:00:38 -0500 revset: drop some unused code in the `remote` revset
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 19:00:38 -0500] rev 43997
revset: drop some unused code in the `remote` revset PyCharm flagged the `revs = [..]` as an unused assignment. But then neither `revs` nor `checkout` is used, and I can't see where `hg.addbranchrevs()` has external side effects. Differential Revision: https://phab.mercurial-scm.org/D7764
Fri, 27 Dec 2019 18:52:48 -0500 tests: avoid using a list comprehension to fill a list with fixed values
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:52:48 -0500] rev 43996
tests: avoid using a list comprehension to fill a list with fixed values Flagged by PyCharm as an unused assignment for the variable in the list. Differential Revision: https://phab.mercurial-scm.org/D7763
Fri, 27 Dec 2019 18:21:41 -0500 histedit: avoid using a list comprehension to fill a list with fixed values
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:21:41 -0500] rev 43995
histedit: avoid using a list comprehension to fill a list with fixed values Flagged by PyCharm as an unused assignment for the variable in the list. Differential Revision: https://phab.mercurial-scm.org/D7762
Sat, 28 Dec 2019 09:55:45 -0800 zstandard: vendor python-zstandard 0.13.0
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Dec 2019 09:55:45 -0800] rev 43994
zstandard: vendor python-zstandard 0.13.0 Version 0.13.0 of the package was just released. It contains an upgraded zstd C library which can result in some performance wins, official support for Python 3.8, and a blackened code base. There were no meaningful code or functionality changes in this release of python-zstandard: just reformatting and an upgraded zstd library version. So the diff seems much larger than what it is. Files were added without modifications. The clang-format-ignorelist file was updated to reflect a new header file in the zstd distribution. # no-check-commit because 3rd party code has different style guidelines Differential Revision: https://phab.mercurial-scm.org/D7770
Fri, 27 Dec 2019 18:54:57 -0500 hgweb: delete a local variable instead of setting to `None`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:54:57 -0500] rev 43993
hgweb: delete a local variable instead of setting to `None` The previous code was flagged by PyCharm as an unused variable assignment. Differential Revision: https://phab.mercurial-scm.org/D7761
Fri, 27 Dec 2019 18:52:15 -0500 tests: drop unused local variable assignments in linelog
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:52:15 -0500] rev 43992
tests: drop unused local variable assignments in linelog Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7760
Fri, 27 Dec 2019 18:51:45 -0500 ui: delete local variables instead of setting to `None`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:51:45 -0500] rev 43991
ui: delete local variables instead of setting to `None` The previous code was flagged by PyCharm as an unused variable assignment. Differential Revision: https://phab.mercurial-scm.org/D7759
Fri, 27 Dec 2019 18:50:40 -0500 tests: drop unused local variable assignments in remotefilelog
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:50:40 -0500] rev 43990
tests: drop unused local variable assignments in remotefilelog Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7758
Fri, 27 Dec 2019 18:43:18 -0500 fastannotate: drop unused local variable assignments
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:43:18 -0500] rev 43989
fastannotate: drop unused local variable assignments Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7757
Fri, 27 Dec 2019 18:34:12 -0500 fsmonitor: drop an unused local variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:34:12 -0500] rev 43988
fsmonitor: drop an unused local variable assignment Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7756
Fri, 27 Dec 2019 18:26:51 -0500 mq: drop an unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:26:51 -0500] rev 43987
mq: drop an unused variable assignment Flagged by PyCharm. This variable is the index of a `for` loop below. Differential Revision: https://phab.mercurial-scm.org/D7755
Fri, 27 Dec 2019 18:19:40 -0500 hgweb: delete local variable instead of setting it to `None`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 18:19:40 -0500] rev 43986
hgweb: delete local variable instead of setting it to `None` The previous code was flagged by PyCharm as an unused variable assignment. Differential Revision: https://phab.mercurial-scm.org/D7754
Fri, 27 Dec 2019 17:58:17 -0500 annotate: avoid using a list comprehension to fill a list with fixed values
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 17:58:17 -0500] rev 43985
annotate: avoid using a list comprehension to fill a list with fixed values Flagged by PyCharm as an unused assignment for the variable in the list. Differential Revision: https://phab.mercurial-scm.org/D7753
Fri, 27 Dec 2019 17:54:45 -0500 fsmonitor: drop an unused local variable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 17:54:45 -0500] rev 43984
fsmonitor: drop an unused local variable Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7752
Fri, 27 Dec 2019 17:53:56 -0500 absorb: avoid using a list comprehension to fill a list with fixed values
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 17:53:56 -0500] rev 43983
absorb: avoid using a list comprehension to fill a list with fixed values Flagged by PyCharm as an unused assignment for the variable in the list. Differential Revision: https://phab.mercurial-scm.org/D7751
Fri, 27 Dec 2019 16:57:28 -0500 run-tests: ensure the script exits when it fails to change directories
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 16:57:28 -0500] rev 43982
run-tests: ensure the script exits when it fails to change directories Caught by PyCharm as an unused variable assignment. This regressed in c496e8c14b9e. Differential Revision: https://phab.mercurial-scm.org/D7750
Fri, 27 Dec 2019 16:30:14 -0500 shelve: drop an unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 16:30:14 -0500] rev 43981
shelve: drop an unused variable assignment Caught by PyCharm. This stopped being used in a3b285882724. Differential Revision: https://phab.mercurial-scm.org/D7749
Fri, 27 Dec 2019 14:58:02 -0500 hgweb: drop an unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 14:58:02 -0500] rev 43980
hgweb: drop an unused variable assignment Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7748
Fri, 27 Dec 2019 13:56:08 -0500 revlog: drop an unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:56:08 -0500] rev 43979
revlog: drop an unused variable assignment Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7747
Fri, 27 Dec 2019 13:52:39 -0500 rebase: drop an unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:52:39 -0500] rev 43978
rebase: drop an unused variable assignment Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7746
Fri, 27 Dec 2019 13:50:53 -0500 polib: drop an unused local function
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:50:53 -0500] rev 43977
polib: drop an unused local function Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7745
Fri, 27 Dec 2019 13:47:17 -0500 perf: drop an unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:47:17 -0500] rev 43976
perf: drop an unused variable assignment Caught by PyCharm. A different formatter is created below in `_displaystats()`. Differential Revision: https://phab.mercurial-scm.org/D7744
Fri, 27 Dec 2019 13:45:05 -0500 perf: drop an unnecessary `pass`
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:45:05 -0500] rev 43975
perf: drop an unnecessary `pass` Differential Revision: https://phab.mercurial-scm.org/D7743
Fri, 27 Dec 2019 13:42:52 -0500 perf: fix the time measurement for pathcopies relative to p2
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:42:52 -0500] rev 43974
perf: fix the time measurement for pathcopies relative to p2 PyCharm flagged this as unused. But it seems more likely that it was intended to reset the time for the p2 path. Differential Revision: https://phab.mercurial-scm.org/D7742
Fri, 27 Dec 2019 13:29:45 -0500 githelp: drop unused variable assignments
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:29:45 -0500] rev 43973
githelp: drop unused variable assignments Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7741
Fri, 27 Dec 2019 13:24:20 -0500 debug: drop unused variable assignments
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:24:20 -0500] rev 43972
debug: drop unused variable assignments Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7740
Fri, 27 Dec 2019 13:18:19 -0500 changegroup: drop an unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:18:19 -0500] rev 43971
changegroup: drop an unused variable assignment Caught by PyCharm. The variable is assigned again below before it is used. Differential Revision: https://phab.mercurial-scm.org/D7739
Fri, 27 Dec 2019 13:13:33 -0500 bugzilla: drop an unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:13:33 -0500] rev 43970
bugzilla: drop an unused variable assignment Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7738
Fri, 27 Dec 2019 13:11:22 -0500 ancestor: drop another unused variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:11:22 -0500] rev 43969
ancestor: drop another unused variable assignment Also caught by PyCharm. The only time this is used is immediately after another assignment below this. Differential Revision: https://phab.mercurial-scm.org/D7737
Fri, 27 Dec 2019 13:05:22 -0500 ancestor: drop an unused local variable assignment
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 13:05:22 -0500] rev 43968
ancestor: drop an unused local variable assignment Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7736
Fri, 27 Dec 2019 02:44:00 -0500 cleanup: drop unused import from pywatchman
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 02:44:00 -0500] rev 43967
cleanup: drop unused import from pywatchman Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7735
Fri, 27 Dec 2019 02:05:01 -0500 narrow: move `testedwith` after module imports
Matt Harbison <matt_harbison@yahoo.com> [Fri, 27 Dec 2019 02:05:01 -0500] rev 43966
narrow: move `testedwith` after module imports PyCharm flagged this as a PEP 8 violation, for module level imports not being at the top of the file. Differential Revision: https://phab.mercurial-scm.org/D7734
Thu, 26 Dec 2019 18:26:06 -0500 match: don't util.normpath() cwd
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Dec 2019 18:26:06 -0500] rev 43965
match: don't util.normpath() cwd The problem here is that `util.normpath()` calls `util.pconvert()`, which switches to Unix style separators. That results in two test failures like this since 5685ce2ea3bf: --- c:/Users/Matt/hg/tests/test-globalopts.t +++ c:/Users/Matt/hg/tests/test-globalopts.t.err @@ -89,7 +89,7 @@ [255] $ hg -R b ann a/a abort: a/a not under root '$TESTTMP/b' - (consider using '--cwd b') + (consider using '--cwd ..\$TESTTMP\b') [255] $ hg log abort: no repository found in '$TESTTMP' (.hg not found)! ERROR: test-globalopts.t output changed Martin originally had `os.path.normpath()` (which *would* work here too), but changed it during review. He didn't remember why he thought any form is needed here. Most uses simply pass '' or `repo.getcwd()`, so these should generally be in local format anyway. It seems better if `cwd` and `root` use consistent styles here. Differential Revision: https://phab.mercurial-scm.org/D7725
Thu, 26 Dec 2019 16:45:56 -0500 tests: convert the `root` arg of matchmod.match() to local path separators
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Dec 2019 16:45:56 -0500] rev 43964
tests: convert the `root` arg of matchmod.match() to local path separators This fixes tests that broke with 8b1a9ba375e5, complaining that "X not under root /repo". The vast majority of real uses are to pass `repo.root`, which is normalized by `wdirvfs.base` being set to the result of `os.path.realpath()`. Failure to convert looks like this: --- c:/Users/Matt/hg/tests/test-match.py.out +++ c:/Users/Matt/hg/tests/test-match.py.err @@ -0,0 +1,48 @@ +ERROR: testVisitchildrensetGlob (__main__.IncludeMatcherTests) + +Traceback (most recent call last): + File "c:\Users\Matt\hg\tests\test-match.py", line 180, in testVisitchildrensetGlob + m = matchmod.match(b'/repo', b'', include=[b'glob:dir/z*']) + File "c:\Users\Matt\hg\mercurial\match.py", line 271, in match + kindpats = normalize(include, b'glob', root, cwd, auditor, warn) + File "c:\Users\Matt\hg\mercurial\match.py", line 322, in _donormalize + pat = pathutil.canonpath(root, cwd, pat, auditor=auditor) + File "c:\Users\Matt\hg\mercurial\pathutil.py", line 251, in canonpath + _(b"%s not under root '%s'") % (myname, root), hint=hint +Abort: dir/z* not under root '/repo' +ERROR: testVisitdirGlob (__main__.IncludeMatcherTests) Differential Revision: https://phab.mercurial-scm.org/D7724
Fri, 27 Dec 2019 16:47:47 +0100 commitablectx: fix the default phase
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Dec 2019 16:47:47 +0100] rev 43963
commitablectx: fix the default phase The code was ignoring the config option. Since the config option will control the actual phase of the committed result, we better take it in account early. Differential Revision: https://phab.mercurial-scm.org/D7726
Wed, 18 Dec 2019 14:07:58 -0800 fix: fix handling of merge commits by using overlayworkingctx
Kyle Lippincott <spectral@google.com> [Wed, 18 Dec 2019 14:07:58 -0800] rev 43962
fix: fix handling of merge commits by using overlayworkingctx Most of this code was conceptually copied from what rebase does, with one small difference: hgext.rebaserev.rebase uses branchmerge=True, while I had to use branchmerge=False, or else it got really confused about updating to the same revision in some situations. I believe that the difference is that rebase is always dealing with *some* form of update - it never gets to mergemod.update if the source and destination are the same, while we can encounter that situation with fix. This may imply that this code has some issues with named branches that should be investigated. Differential Revision: https://phab.mercurial-scm.org/D7703
Mon, 23 Dec 2019 10:02:50 -0800 rust-index: add a struct wrapping the C index
Georges Racinet <georges.racinet@octobus.net> [Mon, 23 Dec 2019 10:02:50 -0800] rev 43961
rust-index: add a struct wrapping the C index Implementing the full index logic in one go is journey larger than we would like. To achieve a smoother transition, we start with a simple Rust wrapper that delegates allwork to the current C implementation. Once we will have a fully working index object in Rust, we can easily start using more and more Rust Code with it. The object in this patch is functional and tested. However, multiple of the currently existing rust (in the `hg-cpython` crate) requires a `Graph`. Right now we build this `Graph` (as cindex::Index) using the C index passed as a PyObject. They will have to be updated to be made compatible. Differential Revision: https://phab.mercurial-scm.org/D7655
Thu, 12 Dec 2019 03:46:47 +0100 rust-index: add a `inner` method to the Index struct
Georges Racinet <georges.racinet@octobus.net> [Thu, 12 Dec 2019 03:46:47 +0100] rev 43960
rust-index: add a `inner` method to the Index struct We are about to introduce a Rust wrapper to the C index. It will be exposed as a Python object. As a start all call will be forwarded to an internal index object (as used now). For this forwarding to works, we need to access that index object (from the C extensions). We adds a method doing to on the existing `Index` rust struct. Differential Revision: https://phab.mercurial-scm.org/D7654
Wed, 27 Nov 2019 17:59:58 +0100 revlog: made C Capsule an array of function pointers
Georges Racinet <georges.racinet@octobus.net> [Wed, 27 Nov 2019 17:59:58 +0100] rev 43959
revlog: made C Capsule an array of function pointers Although it's perfectly valid to put a function pointer in a capsule, as we've been doing since the start of rust/hg-cpython, an array of function pointers has several advantages: - it can hold several functions. That's our main motivation here. We plan to expose index_length() and index_node(), which will be needed for a Rust implementation of nodemap. - it could also have data - (probably minor in the case of Mercurial) proper support for architectures for which data and code pointers don't have the same size. Differential Revision: https://phab.mercurial-scm.org/D7543
Sun, 22 Dec 2019 23:09:37 -0500 lfs: fix a discrepancy with a function wanting a filelog, but calling it rlog
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Dec 2019 23:09:37 -0500] rev 43958
lfs: fix a discrepancy with a function wanting a filelog, but calling it rlog This conceptually broke in 1541e1a8e87d when the filelog isa revlog relationship was changed to containment of the revlog. It was made more obvious in 62a532045e71 and related API simplification. It's resolved in favor of passing a revlog because the revlog verification code doesn't have a reference to a filelog. Differential Revision: https://phab.mercurial-scm.org/D7711
Sun, 22 Dec 2019 16:36:09 -0500 revlog: split the content verification of a node into a separate method
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Dec 2019 16:36:09 -0500] rev 43957
revlog: split the content verification of a node into a separate method This will be used by LFS to tune what is skipped. In the future, this could also be used by LFS to indicate which nodes tagged with `skipread` are simply in need of a blob fetch, so that they can be done in a batch later. (Currently, `skipread` also indicates censored data and errors.) Additionally, it could be used to cache the sha1 hash value for each blob so that large blobs don't need to be re-read and re-hashed if they are used by multiple nodes. Differential Revision: https://phab.mercurial-scm.org/D7710
Sun, 22 Dec 2019 00:47:33 -0500 verify: update comment to say that lfs doesn't need fulltext to check renames
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Dec 2019 00:47:33 -0500] rev 43956
verify: update comment to say that lfs doesn't need fulltext to check renames The reason is that `filelog.renamed()` indirectly calls `filelog.revision()`, which is what accesses the full text. However, LFS wraps `filelog.renamed()` and completely handles the case where an LFS blob is in play by using rawdata. I've got a test to demonstrate that this is the case, and prevent regressions. But the `skipread` flag is set on all lfs revisions when using `--no-lfs`, regardless of whether or not the blobs are local. Just above this, that flag is consulted, causing the rename checks to be skipped. That will need to be loosened up first. Differential Revision: https://phab.mercurial-scm.org/D7709
Wed, 18 Dec 2019 13:30:48 -0800 resourceutil: use `from importlib import resources`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Dec 2019 13:30:48 -0800] rev 43955
resourceutil: use `from importlib import resources` Without this patch, we get the following error from when trying to run hg with PyOxidizer: module 'importlib' has no attribute 'resources' I don't know what why that happens, but `from importlib import resources` is the form I would prefer anyway, so let's use that now that the impoort-checker has been fixed. Differential Revision: https://phab.mercurial-scm.org/D7701
Wed, 18 Dec 2019 13:39:44 -0800 import-checker: allow all absolute imports of stdlib modules
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Dec 2019 13:39:44 -0800] rev 43954
import-checker: allow all absolute imports of stdlib modules Before this patch, we didn't allow imports like from importlib import resources (That's the reason I used `import importlib.resources` in D7629.) I think that form is still an absolute import, so I don't think we forbade on purpose. Differential Revision: https://phab.mercurial-scm.org/D7700
Tue, 17 Dec 2019 22:36:40 -0500 help: drop a reference to Windows 9x
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Dec 2019 22:36:40 -0500] rev 43953
help: drop a reference to Windows 9x Differential Revision: https://phab.mercurial-scm.org/D7694
Tue, 17 Dec 2019 22:33:37 -0500 help: clarify that the Windows registry key for hgrc files is systemwide
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Dec 2019 22:33:37 -0500] rev 43952
help: clarify that the Windows registry key for hgrc files is systemwide 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
Tue, 17 Dec 2019 22:08:07 -0500 windows: add a global equivalent to /etc/mercurial for *.rc processing
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Dec 2019 22:08:07 -0500] rev 43951
windows: add a global equivalent to /etc/mercurial for *.rc processing 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
Fri, 13 Dec 2019 10:31:00 -0800 match: normalize `cwd` early
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Dec 2019 10:31:00 -0800] rev 43950
match: normalize `cwd` early 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
Fri, 13 Dec 2019 11:21:31 -0800 match: make sure `root` argument is always an absolute path (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Dec 2019 11:21:31 -0800] rev 43949
match: make sure `root` argument is always an absolute path (API) 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
Fri, 06 Dec 2019 20:29:02 -0500 tests: show that fileset patterns don't work with `fix` when not in repo root
Matt Harbison <matt_harbison@yahoo.com> [Fri, 06 Dec 2019 20:29:02 -0500] rev 43948
tests: show that fileset patterns don't work with `fix` when not in repo root Differential Revision: https://phab.mercurial-scm.org/D7569
Wed, 18 Dec 2019 20:17:21 +0100 py3: force bytestr conversion of "reason" in scmutil.callcatch() stable 5.2.2
Denis Laxalde <denis@laxalde.org> [Wed, 18 Dec 2019 20:17:21 +0100] rev 43947
py3: force bytestr conversion of "reason" in scmutil.callcatch() For instance, reason may be an InvalidURL as shown in added test.
Fri, 20 Dec 2019 17:19:25 +0100 tests-pure: fixing test-parseindex2
Georges Racinet <georges.racinet@octobus.net> [Fri, 20 Dec 2019 17:19:25 +0100] rev 43946
tests-pure: fixing test-parseindex2 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
Fri, 13 Dec 2019 19:59:59 +0100 rust-index: add a function to convert PyObject index for hg-core
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 13 Dec 2019 19:59:59 +0100] rev 43945
rust-index: add a function to convert PyObject index for hg-core 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
Wed, 11 Dec 2019 18:40:04 +0100 test: extract some generic data and utility from test-rust-ancestor.py
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Dec 2019 18:40:04 +0100] rev 43944
test: extract some generic data and utility from test-rust-ancestor.py 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
Tue, 17 Dec 2019 23:33:35 -0500 patch: fix header.__repr__() to not have `b''` prefixes in file names
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Dec 2019 23:33:35 -0500] rev 43943
patch: fix header.__repr__() to not have `b''` prefixes in file names Spotted by Denis Laxalde. Differential Revision: https://phab.mercurial-scm.org/D7695
Wed, 18 Dec 2019 11:11:40 -0800 cmdutil: allow native string as input to check_at_most_one_arg()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Dec 2019 11:11:40 -0800] rev 43942
cmdutil: allow native string as input to check_at_most_one_arg() 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
(0) -30000 -10000 -3000 -1000 -300 -100 -96 +96 +100 +300 +1000 +3000 tip