Wed, 16 Jan 2019 10:59:32 -0500 tests: fix up uses of xrange in remotefilelog tests for py3
Augie Fackler <augie@google.com> [Wed, 16 Jan 2019 10:59:32 -0500] rev 41254
tests: fix up uses of xrange in remotefilelog tests for py3 Differential Revision: https://phab.mercurial-scm.org/D5604
Wed, 16 Jan 2019 10:59:09 -0500 tests: add missing b prefixes in remotefilelog-getflogheads.py
Augie Fackler <augie@google.com> [Wed, 16 Jan 2019 10:59:09 -0500] rev 41253
tests: add missing b prefixes in remotefilelog-getflogheads.py # skip-blame just b prefixes Differential Revision: https://phab.mercurial-scm.org/D5603
Wed, 16 Jan 2019 10:58:31 -0500 tests: make python oneliner portable to python 3 in remotefilelog test
Augie Fackler <augie@google.com> [Wed, 16 Jan 2019 10:58:31 -0500] rev 41252
tests: make python oneliner portable to python 3 in remotefilelog test Differential Revision: https://phab.mercurial-scm.org/D5602
Wed, 16 Jan 2019 10:58:09 -0500 remotefilelog: implement __bool__ as well as __nonzero__ for py3
Augie Fackler <augie@google.com> [Wed, 16 Jan 2019 10:58:09 -0500] rev 41251
remotefilelog: implement __bool__ as well as __nonzero__ for py3 Differential Revision: https://phab.mercurial-scm.org/D5601
Wed, 16 Jan 2019 10:57:38 -0500 remotefilelog: fix logging in retry decorator
Augie Fackler <augie@google.com> [Wed, 16 Jan 2019 10:57:38 -0500] rev 41250
remotefilelog: fix logging in retry decorator This still fails with an error about no exception being available to re-raise, but so it goes. Differential Revision: https://phab.mercurial-scm.org/D5600
Wed, 16 Jan 2019 10:56:15 -0500 basepack: avoid 'rbe' mode in Python 3
Augie Fackler <augie@google.com> [Wed, 16 Jan 2019 10:56:15 -0500] rev 41249
basepack: avoid 'rbe' mode in Python 3 Differential Revision: https://phab.mercurial-scm.org/D5598
Wed, 16 Jan 2019 10:55:42 -0500 remotefilelog: do file IO in terms of bytes
Augie Fackler <augie@google.com> [Wed, 16 Jan 2019 10:55:42 -0500] rev 41248
remotefilelog: do file IO in terms of bytes Differential Revision: https://phab.mercurial-scm.org/D5597
Fri, 30 Nov 2018 14:35:57 +0100 rust-cpython: using MissingAncestors from Python code
Georges Racinet <georges.racinet@octobus.net> [Fri, 30 Nov 2018 14:35:57 +0100] rev 41247
rust-cpython: using MissingAncestors from Python code As precedently done with LazyAncestors on cpython.rs, we test for the presence of the 'rustext' module. incrementalmissingrevs() has two callers within the Mercurial core: `setdiscovery.partialdiscovery` and the `only()` revset. This move shows a significant discovery performance improvement in cases where the baseline is slow: using perfdiscovery on the PyPy repos, prepared with `contrib/discovery-helper <repo> 50 100`, we get averaged medians of 403ms with the Rust version vs 742ms without (about 45% better). But there are still indications that performance can be worse in cases the baseline is fast, possibly due to the conversion from Python to Rust and back becoming the bottleneck. We could measure this on mozilla-central in cases were the delta is just a few changesets. This requires confirmation, but if that's the reason, then an upcoming `partialdiscovery` fully in Rust should solve the problem. Differential Revision: https://phab.mercurial-scm.org/D5551
Mon, 14 Jan 2019 17:07:39 +0100 rust: MissingAncestors.basesheads()
Georges Racinet <georges.racinet@octobus.net> [Mon, 14 Jan 2019 17:07:39 +0100] rev 41246
rust: MissingAncestors.basesheads() This new API method on `MissingAncestors` leverages directly the Rust implementation for relative heads of a set, and also lowers the cost of returning the results to Python in the context of discovery. These interchange costs can probably be further reduced by implementing the `partialdiscovery` class in Rust, but that will be investigated in the 5.0 development cycle. Differential Revision: https://phab.mercurial-scm.org/D5584
Mon, 14 Jan 2019 18:52:01 +0100 discovery: using the new basesheads()
Georges Racinet <georges.racinet@octobus.net> [Mon, 14 Jan 2019 18:52:01 +0100] rev 41245
discovery: using the new basesheads() Our ultimate goal is to switch eventually to a Rust implementation, but this move actually seems to increase the performance in a pure Python build. What follows is a quick measurement done on PyPy on repos prepared with `contrib/discovery-helper.sh 50 100`. Before: ! wall 0.894384 comb 0.890000 user 0.890000 sys 0.000000 (best of 11) ! wall 0.971199 comb 0.970000 user 0.950000 sys 0.020000 (max of 11) ! wall 0.927993 comb 0.925455 user 0.919091 sys 0.006364 (avg of 11) ! wall 0.921619 comb 0.920000 user 0.910000 sys 0.010000 (median of 11) After: ! wall 0.614278 comb 0.610000 user 0.610000 sys 0.000000 (best of 14) ! wall 0.789459 comb 0.790000 user 0.770000 sys 0.020000 (max of 14) ! wall 0.722765 comb 0.720000 user 0.715714 sys 0.004286 (avg of 14) ! wall 0.734448 comb 0.720000 user 0.720000 sys 0.000000 (median of 14) Differential Revision: https://phab.mercurial-scm.org/D5583
Mon, 14 Jan 2019 18:36:09 +0100 ancestor: incrementalmissingancestors.basesheads()
Georges Racinet <georges.racinet@octobus.net> [Mon, 14 Jan 2019 18:36:09 +0100] rev 41244
ancestor: incrementalmissingancestors.basesheads() This new method will avoid the need to access the `bases` attribute directly in `setdiscovery`, and to prefilter `nullrev` before passing it to the `heads()` revset. Being a method, it can transparently be reimplemented in a Rust (or any native) version. Differential Revision: https://phab.mercurial-scm.org/D5582
Mon, 14 Jan 2019 17:46:14 +0100 rust-cpython: set conversion for MissingAncestors.bases()
Georges Racinet <georges.racinet@octobus.net> [Mon, 14 Jan 2019 17:46:14 +0100] rev 41243
rust-cpython: set conversion for MissingAncestors.bases() Also I hope that the separate `py_set()` helper will help transition to proper `PySet` support in `rust-cpython` Took the opportunity to replace explict for loop with iteration and collect(). Differential Revision: https://phab.mercurial-scm.org/D5581
Mon, 14 Jan 2019 10:07:48 +0100 rust: dagop.headrevs() Rust counterparts
Georges Racinet on ishtar.racinet.fr <georges@racinet.fr> [Mon, 14 Jan 2019 10:07:48 +0100] rev 41242
rust: dagop.headrevs() Rust counterparts This introduces two Rust implementations for `mercurial.dagop.headrevs`. The algorithm is identical to the Python version. Depending on the caller, one or the other could be the most practical, or the most performant, by minimizing the amount of memory copy and allocations. Differential Revision: https://phab.mercurial-scm.org/D5580
Mon, 14 Jan 2019 20:42:25 +0100 rust: factorized testing Graphs
Georges Racinet <georges.racinet@octobus.net> [Mon, 14 Jan 2019 20:42:25 +0100] rev 41241
rust: factorized testing Graphs it will useful to use these outside of `ancestors`, too. Differential Revision: https://phab.mercurial-scm.org/D5579
Sat, 12 Jan 2019 16:57:04 +0100 rust-cpython: moved generic conversion fn out of ancestors module
Georges Racinet <georges.racinet@octobus.net> [Sat, 12 Jan 2019 16:57:04 +0100] rev 41240
rust-cpython: moved generic conversion fn out of ancestors module This will allow to use it easily from other submodules Differential Revision: https://phab.mercurial-scm.org/D5578
Tue, 15 Jan 2019 20:24:17 +0100 revset: transparently forward _intlist argument in all case
Boris Feld <boris.feld@octobus.net> [Tue, 15 Jan 2019 20:24:17 +0100] rev 41239
revset: transparently forward _intlist argument in all case We took a safe approach for the first take, we can get bolder now.
Sun, 30 Dec 2018 00:15:38 -0800 narrow: reuse narrowspec.updateworkingcopy() when narrowing
Martin von Zweigbergk <martinvonz@google.com> [Sun, 30 Dec 2018 00:15:38 -0800] rev 41238
narrow: reuse narrowspec.updateworkingcopy() when narrowing Similar to the previous patch for widening, but here we also need to teach updateworkingcopy() to forcefully delete files that are not recorded in the dirstate as clean. That should be safe because the narrowing command (e.g. `hg tracked --removeinclude`) has already checked that the working copy is clean. Differential Revision: https://phab.mercurial-scm.org/D5511
Fri, 21 Dec 2018 10:05:37 -0800 narrow: reuse narrowspec.updateworkingcopy() when widening
Martin von Zweigbergk <martinvonz@google.com> [Fri, 21 Dec 2018 10:05:37 -0800] rev 41237
narrow: reuse narrowspec.updateworkingcopy() when widening The widening of the working copy we do after widening a repo is practically the same as we do in a repo share after the store narrowspec has been changed in a different share. Let's reuse the code for that that we now have in the narrowspec module. Differential Revision: https://phab.mercurial-scm.org/D5510
Sat, 29 Dec 2018 23:40:18 -0800 narrow: move copytonarrowspec() out of setnarrowpats()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 23:40:18 -0800] rev 41236
narrow: move copytonarrowspec() out of setnarrowpats() I think it was a mistake to write the working copy's narrowspec every time the store narrowspec is written. This starts separating those actions. Differential Revision: https://phab.mercurial-scm.org/D5509
Sat, 29 Dec 2018 23:09:07 -0800 narrow: drop now-unnecessary reassignment of repo attributes
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 23:09:07 -0800] rev 41235
narrow: drop now-unnecessary reassignment of repo attributes Differential Revision: https://phab.mercurial-scm.org/D5507
Fri, 11 Jan 2019 14:55:31 +0100 packaging: allow running packaging with custom uid+gid for CentOS
Mathias De Mare <mathias.de_mare@nokia.com> [Fri, 11 Jan 2019 14:55:31 +0100] rev 41234
packaging: allow running packaging with custom uid+gid for CentOS rpmbuild in CentOS 7 has a bug causing rpmbuild to fail with "Bad owner/group" if spec or source files are owned by a different user: https://github.com/rpm-software-management/rpm/issues/2 This makes it very annoying to try and build the CentOS RPMs on CentOS with Docker. As an alternative, this change makes it possible to do so, using an environment variable. Differential Revision: https://phab.mercurial-scm.org/D5571
Fri, 11 Jan 2019 13:14:25 +0100 hg-docker: fix Python 3.4 compatibility (for CentOS 7)
Mathias De Mare <mathias.de_mare@nokia.com> [Fri, 11 Jan 2019 13:14:25 +0100] rev 41233
hg-docker: fix Python 3.4 compatibility (for CentOS 7) I realize Mercurial is not targetting Python 3.4 compatibility, but without this change, it's not even possible to build it on CentOS 7 (and I assume the same is true for RHEL 7). Differential Revision: https://phab.mercurial-scm.org/D5570
Tue, 15 Jan 2019 11:07:34 -0800 copies: use node.nullrev instead of literal -1
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Jan 2019 11:07:34 -0800] rev 41232
copies: use node.nullrev instead of literal -1 Differential Revision: https://phab.mercurial-scm.org/D5593
Tue, 15 Jan 2019 09:20:47 -0800 copies: use node.wdirrev instead of inventing another constant for it
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Jan 2019 09:20:47 -0800] rev 41231
copies: use node.wdirrev instead of inventing another constant for it Differential Revision: https://phab.mercurial-scm.org/D5592
Sat, 29 Dec 2018 23:35:05 -0800 narrow: extract repo property for store narrowmatcher
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 23:35:05 -0800] rev 41230
narrow: extract repo property for store narrowmatcher When a repo lock is released, we try to persist the manifest cache. That involves getting the narrowmatcher for the manifestlog. That should not fail if the store and working copy narrowspecs are out of sync. Without this patch, the later patches in this series will fail because of that. Differential Revision: https://phab.mercurial-scm.org/D5508
Sat, 29 Dec 2018 23:01:12 -0800 narrow: copy store narrowspec to working copy immediately
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 23:01:12 -0800] rev 41229
narrow: copy store narrowspec to working copy immediately We no longer need to delay it until the end of the transaction since we now restore a backup if the transaction aborts. Differential Revision: https://phab.mercurial-scm.org/D5506
Sat, 29 Dec 2018 22:34:38 -0800 narrow: include working copy narrowspec in transaction journal
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 22:34:38 -0800] rev 41228
narrow: include working copy narrowspec in transaction journal Now that we have separate narrowspecs for the store and the working copy, we need to include both in the transaction journal. Differential Revision: https://phab.mercurial-scm.org/D5505
Sat, 29 Dec 2018 22:27:39 -0800 narrow: make dirstateguard back up and restore working copy narrowspec instead
Martin von Zweigbergk <martinvonz@google.com> [Sat, 29 Dec 2018 22:27:39 -0800] rev 41227
narrow: make dirstateguard back up and restore working copy narrowspec instead We used to have only one narrowspec for the store and the working copy, but now that we have one narrowspec for each, it seems clear that the dirstateguard was supposed to back up and restore the narrowspec associated with the working copy, not the one associated with the store. clearbackup() (for the store narrowspec) is not needed because the presence of the file in localrepository._journalfiles() takes care of that. Differential Revision: https://phab.mercurial-scm.org/D5504
Thu, 10 Jan 2019 13:36:25 -0800 narrow: include journal.narrowspec in transaction journal
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Jan 2019 13:36:25 -0800] rev 41226
narrow: include journal.narrowspec in transaction journal We had missed this file before, which led to it lying around after the transaction completed. Differential Revision: https://phab.mercurial-scm.org/D5556
Tue, 08 Jan 2019 09:50:40 -0800 progress: deprecate ui.progress()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 08 Jan 2019 09:50:40 -0800] rev 41225
progress: deprecate ui.progress() It is now just a weird wrapper for ui.makeprogress(). Differential Revision: https://phab.mercurial-scm.org/D5531
Tue, 15 Jan 2019 15:43:00 -0800 context: use scmutil.matchfiles instead of matchmod.match(exact=True)
Kyle Lippincott <spectral@google.com> [Tue, 15 Jan 2019 15:43:00 -0800] rev 41224
context: use scmutil.matchfiles instead of matchmod.match(exact=True) Differential Revision: https://phab.mercurial-scm.org/D5591
Mon, 14 Jan 2019 22:19:43 -0500 histedit: fix call to _getgoal() by adding a byteskwargs() wrapper
Augie Fackler <augie@google.com> [Mon, 14 Jan 2019 22:19:43 -0500] rev 41223
histedit: fix call to _getgoal() by adding a byteskwargs() wrapper I also added some b-prefixes while I was here because I got confused and it seems silly to not just add them since it clarifies the whole change. Differential Revision: https://phab.mercurial-scm.org/D5585
Fri, 04 Jan 2019 13:41:21 +0100 revset: introduce an API that avoids `formatspec` input serialization
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 13:41:21 +0100] rev 41222
revset: introduce an API that avoids `formatspec` input serialization Instead of having the data fully serialized, the input can be directly inserted in the tree at a later stage. Just using it for simple "%ld" case provide a significant boost. For example here are the impact on a sample discovery run between two pypy repositories with arbitrary differences (using hg perfdiscovery). $ hg perfdiscovery before: ! wall 0.700435 comb 0.710000 user 0.700000 sys 0.010000 (median of 15) after: ! wall 0.501305 comb 0.510000 user 0.490000 sys 0.020000 (median of 20)
Fri, 04 Jan 2019 05:26:13 +0100 revset: detect integer list on parsing
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 05:26:13 +0100] rev 41221
revset: detect integer list on parsing Right now, using "%ld" with `repo.revs("…%ld…", somerevs)` is very inefficient, all items in `somerevs` will be serialized to ascii and then reparsed as integers. If `somerevs` contains just an handful of entry this is fine, however, when you get to thousands or hundreds of thousands of revisions this becomes very slow. To avoid this serialization we need to first detect this situation. The code involved in the whole process is quite complex so we start simple and focus on some "simple" but widespread cases. So far we only detect the situation and don't do anything special about it. The singled out will be serialized in `formatspec` in the same way as before.
Fri, 04 Jan 2019 05:16:57 +0100 revert: extract "%ld" formatting in a _formatintlist function
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 05:16:57 +0100] rev 41220
revert: extract "%ld" formatting in a _formatintlist function We'll have to reuse this logic in different places.
Fri, 04 Jan 2019 02:29:04 +0100 revset: extract parsing logic out of formatspec
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 02:29:04 +0100] rev 41219
revset: extract parsing logic out of formatspec We want to be able to perform better handling of some input when running revset (eg: `repo.revs("%ld", somerevs)`). The first step is to be able to access some of the parsed content before it gets substituted. There are many possible different substitutions, we'll add support for them gradually. In this changeset we support none, we just split some logic in a sub function as a preparatory step.
Thu, 10 Jan 2019 15:23:58 +0100 revset: enforce "%d" to be interpreted as literal revision number (API) (BC)
Boris Feld <boris.feld@octobus.net> [Thu, 10 Jan 2019 15:23:58 +0100] rev 41218
revset: enforce "%d" to be interpreted as literal revision number (API) (BC) Before this change, `formatspec("%d", x)` results in `"%d" % int(x)`. This seems simple and correct until you consider `nullrev`. In revset, a direct "-1" symbol is equivalent to `tip` not `nullrev`. This is a subtle error that went undetected for a while. Wrapping the revision number inside 'rev()' remove the ambiguity, preserving nullrev value passed to formatspec. It got caught by the rebase code, were the following wrongly returned `[1]`: repo.revs("children(%d) and ancestors(%ld)", 0, [nullrev]) This is flagged as API, because `%d` can be used for non-revision integer argument of revset function. We probably need to introduce a new '%…' substitution to allow literal integer (maybe `%i`). However, the `%d` usage is currently widespread for revision number so it is important to fix this issue for `%d`. This choice is reinforced by the fact _intlist is implemented as revisions only. Restricting `%d` to revision only makes things more consistent. This bug can become especially tricky since `_intlist` recognize `nullrev` right. So `revs('%ld', [-1, 0])` → select `[nullrev, 0]` but `revs('%ld', [-1])` is simplified and treated as `%d` selecting `[tip]`. Another side effect is that "%d" of an unknown revision simply match nothing. It was previously raising and error. This is consistent with what "%ld" (and `_intlist`) is doing, so it seems like a good move.
Thu, 10 Jan 2019 16:03:07 +0100 revset: remove the last usage of "%d" for a non-revision entry
Boris Feld <boris.feld@octobus.net> [Thu, 10 Jan 2019 16:03:07 +0100] rev 41217
revset: remove the last usage of "%d" for a non-revision entry In order to fix an important bug, we are about to narrow the semantic of "%d" in revset. This is one of the few exceptions that we need to get rid of before being able to fix the bug. See the later semantic narrowing changeset for full rationale on the semantic change.
Thu, 10 Jan 2019 15:57:13 +0100 revset: remove a rare usage of "%d" for a non-revision item
Boris Feld <boris.feld@octobus.net> [Thu, 10 Jan 2019 15:57:13 +0100] rev 41216
revset: remove a rare usage of "%d" for a non-revision item In order to fix an important bug, we are about to narrow the semantic of "%d" in revset. This is one of the few exceptions that we need to get rid of before being able to fix the bug. See the later semantic narrowing changeset for full rationale on the semantic change.
Mon, 14 Jan 2019 17:45:48 -0500 merge with stable
Augie Fackler <augie@google.com> [Mon, 14 Jan 2019 17:45:48 -0500] rev 41215
merge with stable
Sun, 13 Jan 2019 17:56:02 +0530 tests: replace mockmakedate function in test-amend.t
Taapas Agrawal <taapas2897@gmail.com> [Sun, 13 Jan 2019 17:56:02 +0530] rev 41214
tests: replace mockmakedate function in test-amend.t This is a follow up patch for D5554. This replaces mockmakedate function by `tests/mockmakedate.py`. Differential Revision: https://phab.mercurial-scm.org/D5577
Thu, 10 Jan 2019 20:11:19 +0530 histedit: add rewrite.update-timestamp support to fold and mess
Taapas Agrawal <taapas2897@gmail.com> [Thu, 10 Jan 2019 20:11:19 +0530] rev 41213
histedit: add rewrite.update-timestamp support to fold and mess This adds the config option to update time to current in histedit fold and mess options. Setting rewrite.update-timestamp option to `True` will update the timestamp to current time. This also adds `tests/mockmakedate.py` for supplying testable values in case current time is invoked in the tests. Differential Revision: https://phab.mercurial-scm.org/D5554
Sun, 13 Jan 2019 14:46:15 +0900 histedit: remove trailing space from warning message
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Jan 2019 14:46:15 +0900] rev 41212
histedit: remove trailing space from warning message
Sun, 13 Jan 2019 14:44:44 +0900 histedit: fix weird indent of i18n text
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Jan 2019 14:44:44 +0900] rev 41211
histedit: fix weird indent of i18n text
Sun, 13 Jan 2019 14:36:45 +0900 progress: specify updatebar() function by constructor argument
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Jan 2019 14:36:45 +0900] rev 41210
progress: specify updatebar() function by constructor argument This makes it easy for ui extensions to intercept progress messages. It also seems slightly nicer in that scmutil.progress doesn't touch ui internals.
Sun, 13 Jan 2019 14:21:35 +0900 progress: change _updatebar() to take parameters as arguments
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Jan 2019 14:21:35 +0900] rev 41209
progress: change _updatebar() to take parameters as arguments I want to move updatebar() back to ui. See the next patch for why.
Sun, 13 Jan 2019 14:26:11 +0900 archival: construct progress helper through ui.makeprogress()
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Jan 2019 14:26:11 +0900] rev 41208
archival: construct progress helper through ui.makeprogress() No idea why we didn't.
Sat, 12 Jan 2019 17:47:46 +0900 help: document rewrite.backup-bundle option
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Jan 2019 17:47:46 +0900] rev 41207
help: document rewrite.backup-bundle option
Sat, 12 Jan 2019 17:43:36 +0900 repair: move ui.history-editing-backup to [rewrite] section
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Jan 2019 17:43:36 +0900] rev 41206
repair: move ui.history-editing-backup to [rewrite] section Since we have the "rewrite" section for general history-editing options, the backup option should be there.
Wed, 09 Jan 2019 19:54:01 -0800 revlog: use separate variables to track version flags
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Jan 2019 19:54:01 -0800] rev 41205
revlog: use separate variables to track version flags It wasn't obvious to me that "versionflags" is used both to define the default version+features value for new revlogs and to track the value read from a revlog. We rename the former use and add explicit assignment of "versionflags" later to differentiate between the two. Differential Revision: https://phab.mercurial-scm.org/D5564
Wed, 09 Jan 2019 16:18:00 -0800 revlog: inline opener options logic into _loadindex()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Jan 2019 16:18:00 -0800] rev 41204
revlog: inline opener options logic into _loadindex() We always call _loadindex() during __init__. But we also call _loadindex() as part of censorrevision(). Before, when reloading the index during censorrevision(), we would lose the configured mmapindexthreshold setting from the opener. By inlining the logic in _loadindex(), we ensure that opener options are always respected when loading the index. Differential Revision: https://phab.mercurial-scm.org/D5563
Wed, 09 Jan 2019 16:14:09 -0800 revlog: store mmaplargeindex as an instance attribute
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Jan 2019 16:14:09 -0800] rev 41203
revlog: store mmaplargeindex as an instance attribute This makes it more consistent with everything else. It also makes it possible to move the opener/features processing into _loadindex(). Differential Revision: https://phab.mercurial-scm.org/D5562
Wed, 09 Jan 2019 17:41:36 -0800 revlog: always enable generaldelta on version 2 revlogs
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Jan 2019 17:41:36 -0800] rev 41202
revlog: always enable generaldelta on version 2 revlogs This commit starts the process of diverging version 2 revlogs from version 1 revlogs. generaldelta is a useful feature and has been enabled by default for ages. I can't think of a good reason why the feature should be disabled. Yes, it is true changelogs today don't have generaldelta enabled. But that's because they don't have delta chains enabled, so generaldelta makes no sense there. This commit makes generaldelta always enabled on version 2 revlogs. As part of this, one-off code in changelog.py mucking with revlog.version had to be made conditional on the revlog version, as we don't want to change revlog feature flags on version 2 revlogs. The fact this code exists is horrible and stems from revlog options being shared by the opener. We probably want a better API here. But that can wait for another patch. Differential Revision: https://phab.mercurial-scm.org/D5561
Wed, 09 Jan 2019 15:45:17 -0800 revlog: rename v to versionflags
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Jan 2019 15:45:17 -0800] rev 41201
revlog: rename v to versionflags Single letter variables are harder to read. Differential Revision: https://phab.mercurial-scm.org/D5560
Wed, 09 Jan 2019 19:06:15 -0800 revlog: always process opener options
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Jan 2019 19:06:15 -0800] rev 41200
revlog: always process opener options I'm not sure when ``opener.options`` would ever be explicitly set to None. It is definitely not possible to construct a repo this way because ``localrepo.resolvestorevfsoptions()`` always returns a dict and ``localrepo.makelocalrepository()`` always sets ``opener.options`` to this value. Because we always execute this code now, if options are empty we defaulted to creating version 0 revlogs. So we had to change the code slightly to fall back to the default revlog version and flags. As astute reader will note that it is not possible to create version 0 revlogs now. However, I don't think it was possible before, as this required ``opener.options`` being unset, which I don't think was possible. I suspect this means our test coverage for version 0 revlog repositories is possibly non-existent! Since I don't see a config option to disable revlog v1, I'm not even sure if we had a way to create new repos with version 0 revlogs! Who knows. Differential Revision: https://phab.mercurial-scm.org/D5559
Wed, 09 Jan 2019 15:33:44 -0800 internals: minor rewriting of revlogs documentation
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Jan 2019 15:33:44 -0800] rev 41199
internals: minor rewriting of revlogs documentation In preparation for formalizing revlog version 2. Differential Revision: https://phab.mercurial-scm.org/D5558
Thu, 10 Jan 2019 19:25:07 -0800 tests: make HGCATAPULTSERVERPIPE imply HGTESTCATAPULTSERVERPIPE
Kyle Lippincott <spectral@google.com> [Thu, 10 Jan 2019 19:25:07 -0800] rev 41198
tests: make HGCATAPULTSERVERPIPE imply HGTESTCATAPULTSERVERPIPE I had attempted to do this before, but missed this case. This makes it so that one can do the following to get catapult traces that include both the .t test name (and non-hg commands run by that .t test) *and* the hg-internal tracing, in one trace: HGCATAPULTSERVERPIPE=/tmp/catapult.pipe run-tests.py <args> Without this change, we need to specify both `HG{,TEST}CATAPULTSERVERPIPE`; if we specify just the TEST one, we only get the .t tests (no hg-internals), which is working as intended. If we specify the non-TEST one, we only get the hg-internals (not the rest of the .t test), which was not intended. If you want to restore the previous behavior (just hg internals, not the stuff from the .t tests), run like: HGTESTCATAPULTSERVERPIPE=/dev/null \ HGCATAPULTSERVERPIPE=/tmp/catapult.pipe \ run-tests.py <args> Differential Revision: https://phab.mercurial-scm.org/D5569
Thu, 10 Jan 2019 18:31:46 +0530 tests: add test for warning on histedit with tagged commits
Navaneeth Suresh <navaneeths1998@gmail.com> [Thu, 10 Jan 2019 18:31:46 +0530] rev 41197
tests: add test for warning on histedit with tagged commits This is a follow-up patch to 7b7e081f8954 (D5494). Differential Revision: https://phab.mercurial-scm.org/D5552
Thu, 10 Jan 2019 20:22:03 -0800 extdiff: move external tool command line building into separate function
Ludovic Chabant <ludovic@chabant.com> [Thu, 10 Jan 2019 20:22:03 -0800] rev 41196
extdiff: move external tool command line building into separate function
Thu, 10 Jan 2019 15:42:13 +0100 test: explicit a rebase source in test-rebase-collapse.t
Boris Feld <boris.feld@octobus.net> [Thu, 10 Jan 2019 15:42:13 +0100] rev 41195
test: explicit a rebase source in test-rebase-collapse.t At the time of the rebase, the current revision is `null` so this rebase should fail. However, a current bug in formatspec makes it pass, we fix rebase call of the "affected" test to express its actual intent before we fix the actual bug in a later changeset.
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip