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.
Fri, 11 Jan 2019 13:12:19 -0800 tags: join string that's unnecessarily split across lines
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 Jan 2019 13:12:19 -0800] rev 41194
tags: join string that's unnecessarily split across lines Differential Revision: https://phab.mercurial-scm.org/D5574
Fri, 11 Jan 2019 13:11:49 -0800 dispatch: add newline after ui.log "ui blocked ms" message
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 Jan 2019 13:11:49 -0800] rev 41193
dispatch: add newline after ui.log "ui blocked ms" message Differential Revision: https://phab.mercurial-scm.org/D5573
Fri, 11 Jan 2019 14:07:35 -0800 remotefilelog: fix {file_copies} template keyword
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 Jan 2019 14:07:35 -0800] rev 41192
remotefilelog: fix {file_copies} template keyword remotefilelog overrides templatekw.getrenamedfn(). I changed the return type of that function in ec37df9042f9 (templatekw: make getrenamed() return only filename, not nodeid, 2018-03-26). So we need to change remotefilelog too. The function is used by the {file_copies} template keyword and by `hg log --copies`. Differential Revision: https://phab.mercurial-scm.org/D5576
Fri, 11 Jan 2019 16:44:39 -0800 tests: demonstrate broken {file_copies} template with remotefilelog
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 Jan 2019 16:44:39 -0800] rev 41191
tests: demonstrate broken {file_copies} template with remotefilelog Differential Revision: https://phab.mercurial-scm.org/D5575
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip