Pulkit Goyal <7895pulkit@gmail.com> [Mon, 25 Jun 2018 01:07:23 +0530] rev 38444
py3: use stringutil.pprint() to print NoneType
Before this patch, when running test-debugcommands.t, we get a TypeError because
NoneType can't be converted into bytes. This patch uses stringutil.pprint() to
print the ui._colormode.
We are now close to getting test-debugcommands.t passing on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D3831
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 23 Jun 2018 08:59:18 +0530] rev 38443
rebase: make dry-run return 1 or 0 according to result
In dry-run mode, if there is no conflict return 0, if any then return 1
Differential Revision: https://phab.mercurial-scm.org/D3829
Matt Harbison <matt_harbison@yahoo.com> [Fri, 24 Mar 2017 00:33:35 -0400] rev 38442
relink: use context manager for lock management
Matt Harbison <matt_harbison@yahoo.com> [Fri, 24 Mar 2017 00:32:31 -0400] rev 38441
censor: use context manager for lock management
Yuya Nishihara <yuya@tcha.org> [Thu, 21 Jun 2018 22:33:42 +0900] rev 38440
templater: remove redundant member variables from templater class
We no longer need them since the engine is instantiated in __init__().
Yuya Nishihara <yuya@tcha.org> [Thu, 21 Jun 2018 22:27:30 +0900] rev 38439
templater: resurrect cache of engine instance
The engine-level cache was effectively disabled at
48289eafb37d "templater:
drop extension point of engine classes (API)" by mistake, which made template
rendering quite slow.
Spotted by Martin von Zweigbergk.
Yuya Nishihara <yuya@tcha.org> [Thu, 21 Jun 2018 22:23:43 +0900] rev 38438
templater: extract template loader to separate class
This avoids reference cycle in the subsequent patch:
templater -> _proc -> templater.load -> templater
The templater class will be a thin wrapper around the loader and the engine.
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 14:34:35 +0900] rev 38437
tests: rename and document test-command-template.t
So that we can specify templater tests as test-template-*.
(original)
$ wc -l test-command-template.t test-template-*
5041 test-command-template.t
23 test-template-filters.t
5064 total
(at this patch)
$ wc -l test-template-*
1088 test-template-basic.t
1376 test-template-functions.t
1195 test-template-keywords.t
1760 test-template-map.t
5419 total
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 14:14:52 +0900] rev 38436
tests: extract test-template-keywords.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 14:10:12 +0900] rev 38435
tests: fold test-template-filters.t into test-template-functions.t
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 13:17:11 +0900] rev 38434
tests: extract test-template-functions.t from test-command-template.t
I decided to not split filters and functions into two test files since
we sometimes reimplement a filter as a function.
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 12:37:43 +0900] rev 38433
tests: extract test-template-map.t from test-command-template.t
test-command-template.t is one of the slowest tests. Let's split it into
4 files of manageable size.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 21 Jun 2018 08:22:11 -0700] rev 38432
cleanupnodes: preserve phase of parents of new nodes
As Yuya noted in the review of D3818, passing in
targetphase=phases.draft would result in advancing the phase boundary
of a secret-phase parent. We never pass targetphase=phases.draft so
far, but it's a bug waiting to happen.
I tried to refactor it so max(parentphase, X) happened in one place,
but I couldn't come up with good variables names and I ended up with a
"newphase = max(newphase, parentphase)" line, which made the whole
block not look any better to me.
Differential Revision: https://phab.mercurial-scm.org/D3824
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 16 Jun 2018 18:36:25 +0530] rev 38431
rebase: delete the comment which was not following "do not eat my data"
Differential Revision: https://phab.mercurial-scm.org/D3756
Yuya Nishihara <yuya@tcha.org> [Fri, 08 Jun 2018 22:16:23 +0900] rev 38430
tags: unblock log-like template keywords and functions
It checks if ctx will be used in template since loading ctx per revision
could take extra 10-100msec in total depending on the number of tags.
Yuya Nishihara <yuya@tcha.org> [Fri, 08 Jun 2018 22:10:22 +0900] rev 38429
formatter: provide hint of context keys required by template
This allows us to create ctx objects only if necessary.
I tried another idea which is to populate ctx from 'repo' and 'node' value
on demand. It worked, but seemed unnecessarily complicated. So I chose a
simpler one.
The datafields argument is a space-separated string for consistency with
fm.write() API.