py3: traceback upon running vdiff
Created originally on Bitbucket by cbillington (Chris Billington)
I'm on Arch Linux with a development build of mercurial and a custom package for installing tortoisehg for python 3. Arch is rapidly dropping Python 2 components, and it's getting harder to keep the required Python 2 components around for thg. So I'm running it on Python 3 - it's hitting many issues but I'm just going to report them all and hopefully things will be in shape at some point!
Here's what I get when I run thg vdiff <some_file>
#!python
** Mercurial version (5.2+86-a78a65c33b5a). TortoiseHg version (5.1+189-2660c64eacb4)
** Command: vdiff /home/bilbo/labscript_suite/userlib/pythonlib/alkali/atom.py
** CWD: /home/bilbo/labscript_suite/userlib/pythonlib/alkali
** Encoding: UTF-8
** Extensions loaded: strip, mq, churn, rebase, tortoisehg.util.configitems
** Python version: 3.7.4 (default, Oct 4 2019, 06:57:26) [GCC 9.2.0]
** System: Linux bilbo-arch 4.19.83-1-lts #1 SMP Sun, 10 Nov 2019 11:29:44 +0000 x86_64
** Qt-5.13.2 PyQt-5.13.2 QScintilla-2.11.3
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/run.py", line 138, in dispatch
return _runcatch(u, args)
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/run.py", line 342, in _runcatch
return runcommand(ui, args)
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/run.py", line 435, in runcommand
return _runcommand(lui, options, cmd, d)
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/run.py", line 487, in _runcommand
return checkargs()
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/run.py", line 440, in checkargs
return cmdfunc()
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/run.py", line 434, in <lambda>
**pycompat.strkwargs(cmdoptions))
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/qtapp.py", line 464, in __call__
dlg, reporoot = self._createdialog(dlgfunc, args, opts)
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/qtapp.py", line 528, in _createdialog
return dlgfunc(self._ui, *args, **opts), reporoot
File "/usr/lib/python3.7/site-packages/mercurial/util.py", line 1843, in check
return func(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/tortoisehg/hgqt/run.py", line 1417, in vdiff
pats = hglib.canonpaths(pats)
File "/usr/lib/python3.7/site-packages/tortoisehg/util/hglib.py", line 379, in canonpaths
canonpats.append(pathutil.canonpath(root, cwd, f))
File "/usr/lib/python3.7/site-packages/mercurial/pathutil.py", line 191, in canonpath
if util.endswithsep(root):
File "/usr/lib/python3.7/site-packages/mercurial/util.py", line 2271, in endswithsep
path.endswith(pycompat.ossep)
TypeError: endswith first arg must be str or a tuple of str, not bytes