Sat, 30 Nov 2019 03:15:17 -0500 pvec: fix a `str` type conditional for py3 stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 30 Nov 2019 03:15:17 -0500] rev 43451
pvec: fix a `str` type conditional for py3 Differential Revision: https://phab.mercurial-scm.org/D7538
Sat, 30 Nov 2019 03:02:53 -0500 githelp: fix a `str` type conditional for py3 stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 30 Nov 2019 03:02:53 -0500] rev 43450
githelp: fix a `str` type conditional for py3 Differential Revision: https://phab.mercurial-scm.org/D7537
Sat, 30 Nov 2019 03:01:44 -0500 histedit: fix an `isinstance(nodelist, str)` check for py3 stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 30 Nov 2019 03:01:44 -0500] rev 43449
histedit: fix an `isinstance(nodelist, str)` check for py3 Differential Revision: https://phab.mercurial-scm.org/D7536
Sat, 30 Nov 2019 02:59:04 -0500 win32mbcs: fix a `str` type conditional for py3 stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 30 Nov 2019 02:59:04 -0500] rev 43448
win32mbcs: fix a `str` type conditional for py3 Differential Revision: https://phab.mercurial-scm.org/D7535
Sat, 30 Nov 2019 02:53:39 -0500 hgweb: fix a few `str` type conditional for py3 stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 30 Nov 2019 02:53:39 -0500] rev 43447
hgweb: fix a few `str` type conditional for py3 Differential Revision: https://phab.mercurial-scm.org/D7534
Sat, 30 Nov 2019 02:38:42 -0500 repair: fix an `isinstance(nodelist, str)` check for py3 stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 30 Nov 2019 02:38:42 -0500] rev 43446
repair: fix an `isinstance(nodelist, str)` check for py3 All of the callers appear to pass a list, so this doesn't fix anything in core hg. But maybe out of tree extensions use this shortcut. Differential Revision: https://phab.mercurial-scm.org/D7533
Fri, 29 Nov 2019 21:43:13 +0100 log: map None rev to wdirrev when filtering revisions with --line-range stable
Denis Laxalde <denis@laxalde.org> [Fri, 29 Nov 2019 21:43:13 +0100] rev 43445
log: map None rev to wdirrev when filtering revisions with --line-range When 'hg log -f --line-range <file>,<range>' is invoked with <range> containing uncommitted changes, the command crashes on Python 3 as follows: [...] File "/usr/lib/python3/dist-packages/mercurial/commands.py", line 4725, in log revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts) File "/usr/lib/python3/dist-packages/mercurial/logcmdutil.py", line 933, in getlinerangerevs if rev not in userrevs: File "/usr/lib/python3/dist-packages/mercurial/smartset.py", line 969, in __contains__ if l < x: TypeError: '<' not supported between instances of 'int' and 'NoneType' The None value is because requested line range has uncommitted changes, so 'rev' is the working directory revision. This only occurs in Python 3 as Python 2 allows comparing None with int. As suggested by Yuya Nishihara, mapping None to node.wdirrev resolves the issue and also make the '--line-range' option properly work with -r 'wdir()'. We add extra tests for non-regression and to illustrate handling of 'wdir()'.
Fri, 29 Nov 2019 21:34:54 +0100 tests: check that 'log --line-range' follows uncommitted changes stable
Denis Laxalde <denis@laxalde.org> [Fri, 29 Nov 2019 21:34:54 +0100] rev 43444
tests: check that 'log --line-range' follows uncommitted changes The reason we start walking revisions from the working directory (None revision) in logcmdutil.getlinerangerevs() is because we can follow uncommitted changes. Adding a test to illustrate this based on an uncommitted rename as there was none before. This helps understand the fix in next changeset.
Fri, 29 Nov 2019 18:49:59 +0100 test: don't put $BINDIR in $PATH for test-merge-tools.t stable
Julien Cristau <jcristau@debian.org> [Fri, 29 Nov 2019 18:49:59 +0100] rev 43443
test: don't put $BINDIR in $PATH for test-merge-tools.t We call $BINDIR/hg explicitly anyway, so don't need it in $PATH. This fixes failures when running the test --with-hg=/usr/bin/hg, where we pick up /usr/bin/false as merge tool when we expected not to find it.
Sat, 23 Nov 2019 23:02:26 -0500 webutil: add missing argument to join() stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 23 Nov 2019 23:02:26 -0500] rev 43442
webutil: add missing argument to join() Differential Revision: https://phab.mercurial-scm.org/D7516
Wed, 20 Nov 2019 19:07:02 +0100 singlehead: making config item a bool again stable
Georges Racinet <georges.racinet@octobus.net> [Wed, 20 Nov 2019 19:07:02 +0100] rev 43441
singlehead: making config item a bool again with the use of `configsuboptions`, the main config item has become a string (unless it's just the default value). This makes it in particular hard to override in a cascade of HGRC files, as we do in Heptapod to re-allow multiple heads on specific repositories while the default behaviour is to forbid them. The added test case reflects that use-case
Thu, 21 Nov 2019 17:25:24 -0500 util: convert an exception to bytes when passing to Abort() stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Nov 2019 17:25:24 -0500] rev 43440
util: convert an exception to bytes when passing to Abort() I happened to notice this searching for how to convert an exception to bytes in the previous patch. I'm pretty sure I've got a bunch of other instances that use `pycompat.bytestr()` suppressed locally. Differential Revision: https://phab.mercurial-scm.org/D7467
Thu, 21 Nov 2019 14:28:28 -0500 patch: fix a str + bytes issue in an exception handler stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Nov 2019 14:28:28 -0500] rev 43439
patch: fix a str + bytes issue in an exception handler Flagged by pytype. Differential Revision: https://phab.mercurial-scm.org/D7466
Wed, 20 Nov 2019 08:11:21 -0800 py3: wrap a __func__ in sysbytes() before logging as bytes stable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 20 Nov 2019 08:11:21 -0800] rev 43438
py3: wrap a __func__ in sysbytes() before logging as bytes Differential Revision: https://phab.mercurial-scm.org/D7461
Wed, 20 Nov 2019 19:16:11 -0800 py3: make doc strings containing deprecated '\.' escape sequence raw strings stable
Daniel Ploch <dploch@google.com> [Wed, 20 Nov 2019 19:16:11 -0800] rev 43437
py3: make doc strings containing deprecated '\.' escape sequence raw strings Differential Revision: https://phab.mercurial-scm.org/D7462
Tue, 19 Nov 2019 14:59:23 -0500 shelve: add the missing `create` parameter to the bundlerepo constructor stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Nov 2019 14:59:23 -0500] rev 43436
shelve: add the missing `create` parameter to the bundlerepo constructor Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D7458
Tue, 19 Nov 2019 14:36:22 -0500 shelve: fix a missing variable in the exception handler for delete stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Nov 2019 14:36:22 -0500] rev 43435
shelve: fix a missing variable in the exception handler for delete Caught by pytype. I haven't paid much attention to the progress of this extension, but I *think* this was the intent. Differential Revision: https://phab.mercurial-scm.org/D7457
Tue, 19 Nov 2019 11:59:43 +0100 py3: use pycompat.bytestr() instead of pycompat.sysstr() stable
Manuel Jacob <me@manueljacob.de> [Tue, 19 Nov 2019 11:59:43 +0100] rev 43434
py3: use pycompat.bytestr() instead of pycompat.sysstr() pycompat.sysstr() doesn’t work because it doesn’t accept arguments of type `type` and returns a unicode object on Python3, while the format string wants a bytes-like object.
Wed, 13 Nov 2019 22:40:32 +0100 zeroconf: fix traceback under py3 stable
Kim Alvefur <zash@zash.se> [Wed, 13 Nov 2019 22:40:32 +0100] rev 43433
zeroconf: fix traceback under py3 hg serve under py3 caused struct.error: char format requires a bytes object of length 1 <pulkit25> ah, I think that should be `pycompat.bytechr` instead of chr
Sun, 17 Nov 2019 19:55:01 +0100 cffi: fix build on Python 3 stable
Manuel Jacob <me@manueljacob.de> [Sun, 17 Nov 2019 19:55:01 +0100] rev 43432
cffi: fix build on Python 3 CFFI expects the arguments to be of type str, which means that the string literals should not have the `b` prefix.
Sat, 16 Nov 2019 20:08:35 +0100 pure: use string for another exception in the pure version of base85 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Nov 2019 20:08:35 +0100] rev 43431
pure: use string for another exception in the pure version of base85 That message does not seems tested, but I am assuming that the same reasoning as for the previous changeset applies.
Sat, 16 Nov 2019 20:07:49 +0100 pure: use string for exception in the pure version of base85 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Nov 2019 20:07:49 +0100] rev 43430
pure: use string for exception in the pure version of base85 Without this change, running the test with python3 and --pure gives the following error:: --- /home/marmoute/src/mercurial-dev/tests/test-import-git.t +++ /home/marmoute/src/mercurial-dev/tests/test-import-git.t.err @@ -518,7 +518,7 @@ > > EOF applying patch from stdin - abort: could not decode "binary2" binary patch: bad base85 character at position 6 + abort: could not decode "binary2" binary patch: b'bad base85 character at position 6' [255] $ hg revert -aq To make the cext implementation, we use a "native" string for the exception. This fix the test failure.
Tue, 12 Nov 2019 11:05:03 +0100 py3: avoid iterating over a literal bytes in highlight stable
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 12 Nov 2019 11:05:03 +0100] rev 43429
py3: avoid iterating over a literal bytes in highlight In Python 3, iterating over a bytes literal yields integers. Since we use the value in `text.replace()`, this fails on Python 3 with the following trackback: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 378, in run_wsgi for r in self._runwsgi(req, res): File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi for r in self._runwsgi(req, res, repo): File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgweb_mod.py", line 449, in _runwsgi return getattr(webcommands, cmd)(rctx) File "/usr/lib/python3/dist-packages/mercurial/hgweb/webcommands.py", line 211, in file return _filerevision(web, webutil.filectx(web.repo, web.req)) File "/usr/lib/python3/dist-packages/hgext/highlight/__init__.py", line 72, in filerevision_highlight pygmentize(web, b'fileline', fctx, web.tmpl) File "/usr/lib/python3/dist-packages/hgext/highlight/__init__.py", line 58, in pygmentize field, fctx, style, tmpl, guessfilenameonly=filenameonly File "/usr/lib/python3/dist-packages/hgext/highlight/highlight.py", line 62, in pygmentize text = text.replace(c, b'') TypeError: a bytes-like object is required, not 'int'
Tue, 05 Nov 2019 13:31:40 -0800 relnotes: copy "next" to "5.2" and clear "next" stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 13:31:40 -0800] rev 43428
relnotes: copy "next" to "5.2" and clear "next" This is the same thing as we did for 5.1 in cba59b338976 (relnotes: copy "next" to "5.1" and clear "next", 2019-08-01). Differential Revision: https://phab.mercurial-scm.org/D7231
Fri, 08 Nov 2019 10:13:05 -0800 py3: avoid `b'%s' % type(...)` in a ProgrammingError stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Nov 2019 10:13:05 -0800] rev 43427
py3: avoid `b'%s' % type(...)` in a ProgrammingError Differential Revision: https://phab.mercurial-scm.org/D7363
Sat, 09 Nov 2019 10:31:58 +0100 py3: fix sorting of obsolete markers in obsutil (issue6217) stable
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 10:31:58 +0100] rev 43426
py3: fix sorting of obsolete markers in obsutil (issue6217) This is similar to 01e8eefd9434 and others. We move the sortedmarkers() function from exchange module to obsutil.
Wed, 06 Nov 2019 16:54:34 +0100 py3: fix handling of ctrl keys in crecord (issue6213) stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Nov 2019 16:54:34 +0100] rev 43425
py3: fix handling of ctrl keys in crecord (issue6213) The "keypressed" value in handlekeypressed() is a key name obtained by curses's getkey(); this can be a multibyte string for special keys like CTRL keys. Calling curses.unctrl() with such a value fails on Python 3 with a TypeError as described in issue6213. (On Python 2, this does not crash, but I'm not sure the result is correct, though it does no matter here.) So instead of calling unctrl(), we compare "keypressed" with the expected "^L" obtained by curses.ascii.ctrl("L").
Wed, 06 Nov 2019 16:53:01 +0100 py3: keep "keypressed" a native str in crecord stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Nov 2019 16:53:01 +0100] rev 43424
py3: keep "keypressed" a native str in crecord This will help in the next changeset by avoiding a decode step. Also, the actual bytes conversion seems superfluous since values coming from curses's getkey() will be a native string. As a consequence, we open the "testcommands" file (used in test-interactive-curses.t) in text mode.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 tip