Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 12:21:01 -0500] rev 36734
webutil: some %d instead of %s love on ints
Differential Revision: https://phab.mercurial-scm.org/D2658
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 12:17:02 -0500] rev 36733
py3: whitelist three more cases
Differential Revision: https://phab.mercurial-scm.org/D2657
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 12:08:53 -0500] rev 36732
archival: our filenames are bytes, not strs
Differential Revision: https://phab.mercurial-scm.org/D2656
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 12:08:37 -0500] rev 36731
archival: tar file modes need to be sysstrs
Differential Revision: https://phab.mercurial-scm.org/D2655
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 12:08:19 -0500] rev 36730
archival: fsdecode paths before passing to tar or zip objects
Both of these traffic in unicodes for filenames on Python 3, and
inspection of the tarfile module shows that it uses the filesystem
encoding, so fsdecode is the right choice.
Differential Revision: https://phab.mercurial-scm.org/D2654
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 04 Mar 2018 05:15:24 +0530] rev 36729
py3: add b'' prefixes in tests/test-minirst.py
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D2653
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 04 Mar 2018 22:40:33 +0530] rev 36728
py3: make sure __repr__ returns a str
# skip-blame because just r'' prefix
Differential Revision: https://phab.mercurial-scm.org/D2652
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 04 Mar 2018 22:40:08 +0530] rev 36727
py3: make sure regular expressions are bytes
# skip-blame because just b'' prefix
Differential Revision: https://phab.mercurial-scm.org/D2651
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 04 Mar 2018 05:53:59 +0530] rev 36726
py3: use bytes instead of str to make sure we use bytes internally
Differential Revision: https://phab.mercurial-scm.org/D2650
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 04 Mar 2018 22:37:41 +0530] rev 36725
py3: use util.forcebytestr instead of str to convert error messages
Differential Revision: https://phab.mercurial-scm.org/D2649
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Mar 2018 23:49:39 -0500] rev 36724
lock: block signal interrupt while making a lock file
On Windows where symlink isn't supported, util.makelock() could leave an empty
file if interrupted immediately after os.open(). This empty lock never dies
as it has no process id recorded.
ld = os.open(pathname, os.O_CREAT | os.O_WRONLY | os.O_EXCL)
# an interrupt may occur here
os.write(ld, info)
os.close(ld)
This was a long-standing bug of TortoiseHg which runs a command-server and
kills it by CTRL_C_EVENT, reported by random Windows users.
https://bitbucket.org/tortoisehg/thg/issues/4873/#comment-43591129
At first, I tried to fix makelock() to clean up a stale lock file, which
turned out to be hard because any instructions may be interrupted by a
signal.
ld = None
try:
# CALL_FUNCTION # os.open(...)
# an interrupt may occur here
# STORE_FAST # ld = ...
ld = os.open(pathname, os.O_CREAT | os.O_WRONLY | os.O_EXCL)
os.write(ld, info)
...
return True
except:
if ld:
...
os.unlink(pathname)
return False
So I decided to block signals by temporarily replacing the signal handlers
so makelcok() and held = 1 will never be interrupted.
Many thanks to Fernando Najera for investigating the issue.
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 09:40:12 -0500] rev 36723
fuzz: add some more docs about building/running fuzzers
Differential Revision: https://phab.mercurial-scm.org/D2635
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 11:49:33 -0500] rev 36722
util: also silence py3 warnings from codec module
Fixes warnings like this:
+ mercurial/util.py:2446: DeprecationWarning: invalid escape sequence '\d'
+ return codecs.escape_decode(s)[0]
Differential Revision: https://phab.mercurial-scm.org/D2642
Kyle Lippincott <spectral@google.com> [Thu, 15 Feb 2018 18:05:58 -0800] rev 36721
docs: small fixes for profiling.nested and the overall description
- profiling.nested defaults to 0, not 5
- profiling is not always done with lsprof
Differential Revision: https://phab.mercurial-scm.org/D2641
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 10:20:41 -0500] rev 36720
scmutil: fix oversight in b76248e51605c6 where I forgot to use msg
Thanks to Yuya for spotting my mistake.
Differential Revision: https://phab.mercurial-scm.org/D2636
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 10:23:07 -0500] rev 36719
hghave: remove unused "as ex" in exception block
I overlooked this when removing a debug print in another change.
Differential Revision: https://phab.mercurial-scm.org/D2637
Augie Fackler <augie@google.com> [Sat, 03 Mar 2018 18:33:10 -0500] rev 36718
tests: port test-log to Python 3
Required some porting to >>> inline Python instead of using heredocs
into $PYTHON.
Differential Revision: https://phab.mercurial-scm.org/D2621
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Mar 2018 19:12:47 -0500] rev 36717
py3: make gettext domain a system string
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Mar 2018 07:03:50 -0500] rev 36716
templater: fix position of terminator character in error message
Since a template expression starts after the '{' character, the expression
should be considered to end immediately before the terminator '{'.
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 10:42:51 -0500] rev 36715
merge with stable
Ryan McElroy <rmcelroy@fb.com> [Sat, 03 Mar 2018 15:31:37 -0800] rev 36714
revsetlang: add a hint for more useful parse errors
This logic is largely based on the similar logic added to template error
messages in D2608 and D2609, but with a few tweaks based on how revsets
actually work.
Differential Revision: https://phab.mercurial-scm.org/D2619
Ryan McElroy <rmcelroy@fb.com> [Sat, 03 Mar 2018 11:07:46 -0800] rev 36713
setup: ignore extension load failures when finding working hg
Previously, `make local` would fail if any extension was not properly loading.
Differential Revision: https://phab.mercurial-scm.org/D2589
Matt Harbison <matt_harbison@yahoo.com> [Sat, 03 Mar 2018 00:35:59 -0500] rev 36712
profile: colorize output on Windows
Previously, the ANSI codes were printed to the screen, throwing off the
alignment. We could probably do this unconditionally, but it's kind of a hack,
so I figured I'd limit the scope.
Kevin Bullock <kbullock+mercurial@ringworld.org> [Sat, 03 Mar 2018 19:02:50 -0500] rev 36711
dispatch: don't clamp the range of the exit code twice
We already limit the range to (0, 255) in the call to sys.exit(). The
duplicated operation can't possibly be hurting us, but let's clean it up
to avoid confusion.