FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 26 Jun 2017 03:43:47 +0900] rev 33068
keyword: obtain kwtemplater instance via repository at runtime
Wrapper functions of keyword extension are defined in reposetup(),
because they refer to kwtemplater instantiated in reposetup().
This patch makes them obtain kwtemplater instance via repository at
runtime.
This is a part of preparations for defining them statically.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 26 Jun 2017 03:42:17 +0900] rev 33067
keyword: make wrapped repository and kwtemplater refer to each other
Wrapper functions of keyword extension are defined in reposetup(),
because they refer to kwtemplater instantiated in reposetup().
But these functions can be defined statically, if kwtemplater can be
obtained via repository at runtime.
This is a part of preparations for defining them statically.
To avoid cyclic reference, this patch makes kwtemplater use weakref to
refer related repository instance.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 26 Jun 2017 03:40:57 +0900] rev 33066
keyword: add test for keyword expansion at serving multiple repositories
This is safety for subsequent (and future) patches, which change
function wrapping.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 26 Jun 2017 03:40:12 +0900] rev 33065
keyword: make comparison webcommand suppress keyword expansion
Before this patch, diff in "comparison" webcommand doesn't suppress
keyword expansion as same as diff output of other webcommands.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 26 Jun 2017 03:40:06 +0900] rev 33064
keyword: restore kwtemplater.match at the end of wrapped webcommands
Before this patch, kwweb_skip doesn't restore kwtemplater.match after
wrapped webcommands. This suppresses keyword expansion at wrapped
webcommands.
Typical usecase of this issue is "file" webcommand after annotate,
changeset, filediff or so on.
To ensure kwtemplater.match=util.never while original webcommand
running, this patch makes kwweb_skip yield values returned by it,
because it returns generator object.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 26 Jun 2017 03:38:12 +0900] rev 33063
keyword: restore kwtemplater.restrict at the end of wrapped patch.diff
Before this patch, kwdiff doesn't restore kwtemplater.restrict after
invocation of wrapped patch.diff(). This suppresses keyword expansion
at subsequent filelog.read().
Typical usecase of this issue is "hg cat" after "hg diff" with command
server. In this case, kwtemplater.restrict=True is kept in command
server process even after "hg diff".
To ensure kwtemplater.restrict=True while original patch.diff()
running, this patch makes kwdiff() yield values returned by it,
because it returns generator object.
Strictly speaking, if filelog.read() is invoked before completely
evaluating the result of previous patch.diff(), keyword expansion is
still suppressed, because kwtemplater.restrict isn't restored yet.
But this fixing should be reasonable enough, because patch.diff() is
consumed immediately, AFAIK.
Yuya Nishihara <yuya@tcha.org> [Mon, 26 Jun 2017 22:27:34 +0900] rev 33062
debugrevlog: align chain length, reach, and compression ratio
I think this is what the max(...) exists for.