Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 18:04:40 +0100] rev 35974
revlog: rename 'self.checkinlinesize' into '_enforceinlinesize'
The name change has two motivations:
1) The function has no external caller, so we move it to protected space.
2) the function does more than checking it also split the data if we have more
data than 'inline' supports.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 17:57:29 +0100] rev 35973
revlog: add a _datareadfp context manager for data access needs
The helper handles:
1) is there a file handle already open that we shall just reuse,
2) is the revlog inlined or not.
Using a context manager for all read access will help setting up file pointer
caching in later changesets.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 17:35:14 +0100] rev 35972
revlog: use context manager for data file lifetime in checksize
This is clearer, safer and more modern.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 17:34:57 +0100] rev 35971
revlog: use context manager for index file lifetime in checkinlinesize
This is clearer, safer and more modern.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 17:34:47 +0100] rev 35970
revlog: use context manager for data file lifetime in checkinlinesize
This is clearer, safer and more modern.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 17:34:19 +0100] rev 35969
revlog: use context manager for index file life time in __init__
This is clearer, safer and more modern.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 17:22:13 +0100] rev 35968
revlog: move index file opening in a method
Having file operation centralized into a single spot help to factor common
logic out (eg: special flag handling according to the mode).
It is also the first step to simplify file handling during batch operation
(eg: revlog cloning). However, that part does not seems to be a hotspot yet.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 17:03:56 +0100] rev 35967
revlog: move datafile opening in a method
Having file operation centralized into a single spot help to factor common
logic out.
It is also the first step to simplify file handling during batch operation
(eg: revlog cloning). However, that part does not seems to be a hotspot yet.
Boris Feld <boris.feld@octobus.net> [Tue, 06 Feb 2018 12:25:11 +0100] rev 35966
parseindex: implement context manager method on the wrapper
This is needed for incoming cleanups.
Boris Feld <boris.feld@octobus.net> [Tue, 06 Feb 2018 11:52:37 +0100] rev 35965
parseindex: also forward keyword argument in a debug wrapper
Otherwise, it gets in the way of a coming refactoring.
Boris Feld <boris.feld@octobus.net> [Tue, 06 Feb 2018 11:51:39 +0100] rev 35964
dumprevlog: handle being passed a mode parameter
This makes it closer to an actual file opener. Otherwise, it gets in the way
of a coming refactoring.
Boris Feld <boris.feld@octobus.net> [Tue, 06 Feb 2018 11:08:41 +0100] rev 35963
changelog: add the missing 'closed' property on 'appender' object
This mimic file object further.
Boris Feld <boris.feld@octobus.net> [Mon, 05 Feb 2018 20:36:51 +0100] rev 35962
changelog: implement context manager method for 'appender' object
This object mimics a file and was missing the context manager API.
Joerg Sonnenberger <joerg@bec.de> [Sun, 04 Feb 2018 00:29:22 +0100] rev 35961
diff: improve ui.write performance when not coloring on Windows
Differential Revision: https://phab.mercurial-scm.org/D2022
Augie Fackler <augie@google.com> [Tue, 06 Feb 2018 05:25:36 -0500] rev 35960
hgsh: enable clang-format
Nothing looks awful, so we can just turn it on.
Differential Revision: https://phab.mercurial-scm.org/D2059
Augie Fackler <augie@google.com> [Tue, 06 Feb 2018 05:24:28 -0500] rev 35959
chg: enable clang-format on all .c and .h files
Nothing in here looks awful, so I think we may as well just do it.
# skip-blame because it's just reformatting with no functionality change
Differential Revision: https://phab.mercurial-scm.org/D2058
Augie Fackler <augie@google.com> [Wed, 07 Feb 2018 06:28:43 -0500] rev 35958
python3: whitelist an additional 11 tests
I think these are mostly the result of Pulkit's recent work. Thanks!
Differential Revision: https://phab.mercurial-scm.org/D2078
Yuya Nishihara <yuya@tcha.org> [Mon, 05 Feb 2018 20:48:51 +0900] rev 35957
ui: add explicit path to write prompt text bypassing buffers
The prompt= flag was added at
e35d7f131483, when colorui had its own write()
function. Since we've merged colorui to ui, we can simply call the unbuffered
write() function.
Yuya Nishihara <yuya@tcha.org> [Mon, 05 Feb 2018 20:40:49 +0900] rev 35956
ui: write prompt text in ui.prompt(), not in ui._readline()
self.label() is replaced by label= option, which should make it clearer why
we can't pass the text to raw_input(prompt).
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jan 2018 14:00:56 +0900] rev 35955
logcmdutil: mark changesetprinter.showpatch() as private
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jan 2018 14:28:03 +0900] rev 35954
logcmdutil: drop default arguments from changesetdisplayer/templater() calls
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jan 2018 13:47:06 +0900] rev 35953
logcmdutil: make default parameters of changesetprinters consistent
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Feb 2018 10:33:14 +0900] rev 35952
mdiff: use str.startswith/endswith() instead of slicing
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Feb 2018 10:28:03 +0900] rev 35951
patch: unify check_binary and binary flags
Follows up
079b27b5a869. If opts.text=True, check_binary is ignored, so we
can just pass the binary flag to unidiff().
perfunidiff now takes any inputs as text files, which I think is a desired
behavior.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 06 Feb 2018 23:53:37 -0500] rev 35950
fileset: don't abort when running copied() on a revision with a removed file
It looks like AND with any status-y fileset would trigger this, as added() and
removed() also failed. The 4.5-rc revision is a convenient test case, but the
merge isn't necessary.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 07 Feb 2018 13:49:02 +0530] rev 35949
py3: make sure we open the file in bytes mode
# skip-blame because we are just adding b
Differential Revision: https://phab.mercurial-scm.org/D2077
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 07 Feb 2018 13:47:03 +0530] rev 35948
py3: use bytes instead of str
Differential Revision: https://phab.mercurial-scm.org/D2076
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 07 Feb 2018 13:34:51 +0530] rev 35947
py3: add b'' prefixes to string literals in test files
# skip-blame because we are just adding b''
Differential Revision: https://phab.mercurial-scm.org/D2075
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 07 Feb 2018 13:21:06 +0530] rev 35946
py3: use range instead of xrange
xrange is not available on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2074
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 07 Feb 2018 13:19:19 +0530] rev 35945
py3: use open() instead of file()
file() is not present in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2073
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 07 Feb 2018 13:17:19 +0530] rev 35944
py3: use pycompat.bytestr to convert _b85chars to bytes
The tranformer does append b'' to the value and make that a bytes but bytes in
Python 3 returns the ascii value on getting characters using indexing.
Characters of this string are queried using indexing multiple times in the file
and to support that we use pycompat.bytestr which returns the bytechrs using
indexing.
Differential Revision: https://phab.mercurial-scm.org/D2072
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 07 Feb 2018 13:11:38 +0530] rev 35943
py3: use pycompat.bytechr instead of chr
Differential Revision: https://phab.mercurial-scm.org/D2071