Fri, 22 Dec 2017 21:59:38 +0900 hgweb: make templater mostly compatible with log templates
Yuya Nishihara <yuya@tcha.org> [Fri, 22 Dec 2017 21:59:38 +0900] rev 36518
hgweb: make templater mostly compatible with log templates Prepares for gradually switching templatekw.showsuccsandmarkers() to new API. This was a PoC showing how to reuse templatekw functions in hgweb. We could remove rev, node, author, etc. from the commonentry() table, but we'll have to carefully remove all corresponding symbols from webcommands.*(). Otherwise, we would face the issue5612. Still templatekw.keywords aren't exported. Otherwise some tests would fail because the atom template expects {files} to be empty in filelog, but templatekw.showfiles() provides the {files} implementation.
Sun, 25 Feb 2018 14:42:18 +0900 log: do not invoke templatekw.showobsfate() as a function
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 14:42:18 +0900] rev 36517
log: do not invoke templatekw.showobsfate() as a function Prepares for switching to the (context, mapping) API. I tried, but it appeared not an one-off change to extract a non-template function from showobsfate(), which deeply depends on the templater internals.
Sun, 25 Feb 2018 16:36:38 +0900 templatekw: inline getfiles()
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 16:36:38 +0900] rev 36516
templatekw: inline getfiles() It's just three lines. We don't need a separate function for that.
Sun, 25 Feb 2018 16:35:34 +0900 templatekw: factor out function to build a list of files per status
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 16:35:34 +0900] rev 36515
templatekw: factor out function to build a list of files per status Removes copy-paste code before switching to the (context, mapping) API.
Sun, 25 Feb 2018 13:40:46 +0900 templatekw: switch non-showlist template keywords to new API
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 13:40:46 +0900] rev 36514
templatekw: switch non-showlist template keywords to new API
Sun, 25 Feb 2018 14:28:32 +0900 templatekw: extract non-templatekw function as getgraphnode()
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Feb 2018 14:28:32 +0900] rev 36513
templatekw: extract non-templatekw function as getgraphnode() Prepares for switching to the (context, mapping) API. We still need (repo, ctx) function for the fast path.
Wed, 28 Feb 2018 16:24:39 +0100 convert: avoid closing ui.fout in subversion code (issue5807)
Sascha Nemecek <nemecek@wienfluss.net> [Wed, 28 Feb 2018 16:24:39 +0100] rev 36512
convert: avoid closing ui.fout in subversion code (issue5807) Don't close 'fp' (= 'ui.fout') stream to prevent 'ValueError: I/O operation on closed file' (Bug #5807). Regression of changeset 30261:6bed17ba00a1 (https://www.mercurial-scm.org/repo/hg/rev/6bed17ba00a1)
Sun, 07 Jan 2018 11:53:07 +0900 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Jan 2018 11:53:07 +0900] rev 36511
cmdutil: expand filename format string by templater (BC) This is BC because '{}' could be a valid filename before, but I believe good programmers wouldn't use such catastrophic output filenames. On the other hand, '\' has to be escaped since it is a directory separator on Windows. Thanks to Matt Harbison for spotting this weird issue. This patch also adds cmdutil.rendertemplate(ctx, tmpl, props) as a simpler way of expanding template against single changeset. .. bc:: '{' in output filename passed to archive/cat/export is taken as a start of a template expression.
Wed, 21 Feb 2018 21:14:05 +0900 annotate: do not poorly split lines at CR (issue5798) stable
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Feb 2018 21:14:05 +0900] rev 36510
annotate: do not poorly split lines at CR (issue5798) mdiff and lines(text) take only LF as a line separator, but str.splitlines() breaks our assumption. Use mdiff.splitnewlines() consistently. It's hard to read \r in tests, so \r is replaced with [CR]. I had to wrap sed by a shell function to silence check-code warning.
Sun, 18 Feb 2018 11:53:26 +0900 templater: add option to parse template string just like raw string literal
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Feb 2018 11:53:26 +0900] rev 36509
templater: add option to parse template string just like raw string literal This seems a bit odd because the template syntax has no raw string literal containing template fragments, but is necessary to port filename format string to templater. See the next patch.
Sun, 18 Feb 2018 10:58:15 +0900 cmdutil: reorder optional arguments passed to makefileobj()
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Feb 2018 10:58:15 +0900] rev 36508
cmdutil: reorder optional arguments passed to makefileobj() **props will be passed directly to templater.
Sun, 18 Feb 2018 10:54:24 +0900 cmdutil: strip "%m" pattern (first line of commit message) from both ends
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Feb 2018 10:54:24 +0900] rev 36507
cmdutil: strip "%m" pattern (first line of commit message) from both ends This matches the behavior of the template keyword {desc}.
Tue, 27 Feb 2018 22:37:57 +0900 test-acl: mock up util.getuser() to trust $LOGNAME on Windows
Yuya Nishihara <yuya@tcha.org> [Tue, 27 Feb 2018 22:37:57 +0900] rev 36506
test-acl: mock up util.getuser() to trust $LOGNAME on Windows The test relies on POSIX-like getuser() behavior, so we can't use windows.getuser().
Thu, 01 Mar 2018 04:50:22 -0500 fileset: drop bad "elif:" trying to check invalid size expression
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 04:50:22 -0500] rev 36505
fileset: drop bad "elif:" trying to check invalid size expression Since str.isdigit is a function, the last "elif" was always true. An invalid expression is rejected by util.sizetoint(), so we don't need "elif".
Thu, 01 Mar 2018 08:55:39 -0500 py3: fix test-command-template.t to write files in binary mode
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 08:55:39 -0500] rev 36504
py3: fix test-command-template.t to write files in binary mode
Thu, 01 Mar 2018 08:45:34 -0500 py3: use bytestr() to coerce position carried by ParseError to string
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 08:45:34 -0500] rev 36503
py3: use bytestr() to coerce position carried by ParseError to string The position value is either int or byte string.
Thu, 01 Mar 2018 08:38:39 -0500 py3: use bytes.endswith('\n') to strip off '\n' from debug color output
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 08:38:39 -0500] rev 36502
py3: use bytes.endswith('\n') to strip off '\n' from debug color output
Thu, 01 Mar 2018 08:19:47 -0500 py3: fix type of attribute names forwarded by templatekw._hybrid
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 08:19:47 -0500] rev 36501
py3: fix type of attribute names forwarded by templatekw._hybrid # skip-blame because just r'' prefixes
Thu, 01 Mar 2018 06:47:06 -0500 py3: move between bytes and unicode when re-raising IOError
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 06:47:06 -0500] rev 36500
py3: move between bytes and unicode when re-raising IOError IOError is a Python exception, which argument must be a system string.
Thu, 01 Mar 2018 06:43:13 -0500 py3: use '%d' to format diffstat sum
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 06:43:13 -0500] rev 36499
py3: use '%d' to format diffstat sum
Thu, 01 Mar 2018 06:40:09 -0500 py3: make regexp literal bytes in templatefilters.py
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 06:40:09 -0500] rev 36498
py3: make regexp literal bytes in templatefilters.py # skip-blame because just b'' prefixes
Thu, 01 Mar 2018 06:38:37 -0500 templatefilters: use encoding.unifromlocal/unitolocal() for py3 compatibility
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Mar 2018 06:38:37 -0500] rev 36497
templatefilters: use encoding.unifromlocal/unitolocal() for py3 compatibility
Fri, 02 Mar 2018 00:00:41 +0530 py3: replace str() with it's bytes equivalent in hgext/shelve.py
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Mar 2018 00:00:41 +0530] rev 36496
py3: replace str() with it's bytes equivalent in hgext/shelve.py Internally we are dealing with bytes everywhere, so anything returning a unicode results in an error or some change in behaviour. Differential Revision: https://phab.mercurial-scm.org/D2520
Thu, 01 Mar 2018 23:59:20 +0530 py3: make sure we write bytes in a file open in bytes mode
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Mar 2018 23:59:20 +0530] rev 36495
py3: make sure we write bytes in a file open in bytes mode # skip-blame just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D2519
Thu, 01 Mar 2018 23:58:21 +0530 py3: add b'' prefixes in tests/test-obsolete.t
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Mar 2018 23:58:21 +0530] rev 36494
py3: add b'' prefixes in tests/test-obsolete.t # skip-blame because it's just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D2518
Thu, 01 Mar 2018 23:57:16 +0530 py3: add a b'' prefix in tests/test-fncache.t
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Mar 2018 23:57:16 +0530] rev 36493
py3: add a b'' prefix in tests/test-fncache.t # skip-blame because it's just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D2517
Thu, 01 Mar 2018 23:54:52 +0530 py3: use pycompat.bytestr() to convert error instances to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Mar 2018 23:54:52 +0530] rev 36492
py3: use pycompat.bytestr() to convert error instances to bytes Differential Revision: https://phab.mercurial-scm.org/D2516
Thu, 01 Mar 2018 23:52:30 +0530 py3: listify the return value of filter()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Mar 2018 23:52:30 +0530] rev 36491
py3: listify the return value of filter() filter() on Python 3 returns a filter object. Differential Revision: https://phab.mercurial-scm.org/D2515
Thu, 01 Mar 2018 23:51:32 +0530 py3: use '%d' instead of '%s' for ints
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Mar 2018 23:51:32 +0530] rev 36490
py3: use '%d' instead of '%s' for ints Differential Revision: https://phab.mercurial-scm.org/D2514
Thu, 01 Mar 2018 03:56:41 +0530 py3: add 14 new passing tests to whitelist
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Mar 2018 03:56:41 +0530] rev 36489
py3: add 14 new passing tests to whitelist Differential Revision: https://phab.mercurial-scm.org/D2511
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip