Package Details: tortoisehg 6.6.3-4

Git Clone URL: https://aur.archlinux.org/tortoisehg.git (read-only, click to copy)
Package Base: tortoisehg
Description: Graphical tools for Mercurial
Upstream URL: https://foss.heptapod.net/mercurial/tortoisehg/thg
Licenses: GPL
Submitter: bwalle
Maintainer: Misery
Last Packager: Misery
Votes: 126
Popularity: 0.108967
First Submitted: 2011-06-11 12:14 (UTC)
Last Updated: 2024-03-14 17:39 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 12 .. 23 Next › Last »

chrisjbillington commented on 2019-12-11 14:01 (UTC)

@Artalus no worries, now you can experience the actual bugs tortoisehg has on Python 3 :)

Artalus commented on 2019-12-11 13:51 (UTC)

Oh, my bad! Apparently I was reusing cached build files that were somehow created back with python 3.7. After I cleaned up yay cache and reinstalled both packages, thg started just fine. Cheers!

chrisjbillington commented on 2019-12-11 13:37 (UTC)

@Artalus, it definitely shouldn't have installed to python3.7/site-packages - did you have a venv or conda env active when you ran makepkg? If so it would have used the Python interpreter from the venv/conda env. You'll need to deactivate the env (having one active permenently in your shell, as conda does by default, causes all sorts of issues of this nature)

Artalus commented on 2019-12-11 10:22 (UTC)

I installed mercurial-python3, but it put all its files in /usr/lib/python3.7/site-packages instead of /usr/lib/python3.8. After I created symlinks for mercurial, semver, iniparse, hgext (couldn't create for hgext3rd since tortoisehg package creates the directory for itself), I managed to install tortoisehg. However when starting it it fails with this traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 69, in _importfrom
    fakelocals[modname] = mod = getattr(pkg, modname)
  File "/usr/lib/python3.8/site-packages/mercurial/pycompat.py", line 283, in w
    return f(object, sysstr(name), *args)
AttributeError: module 'mercurial.cext' has no attribute 'parsers'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/thg", line 91, in <module>
    tortoisehg.hgqt.run.run()
  File "/usr/lib/python3.8/importlib/util.py", line 245, in __getattribute__
    self.__spec__.loader.exec_module(self)
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/tortoisehg/hgqt/run.py", line 499, in <module>
    _('repository root directory or symbolic path name')),
  File "/usr/lib/python3.8/site-packages/tortoisehg/util/i18n.py", line 96, in agettext
    return hglib.fromunicode(u)
  File "/usr/lib/python3.8/importlib/util.py", line 245, in __getattribute__
    self.__spec__.loader.exec_module(self)
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/tortoisehg/util/hglib.py", line 55, in <module>
    nullsubrepostate = subrepoutil.nullstate
  File "/usr/lib/python3.8/importlib/util.py", line 245, in __getattribute__
    self.__spec__.loader.exec_module(self)
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/mercurial/subrepoutil.py", line 15, in <module>
    from .i18n import _
  File "/usr/lib/python3.8/importlib/util.py", line 245, in __getattribute__
    self.__spec__.loader.exec_module(self)
  File "/usr/lib/python3.8/site-packages/mercurial/i18n.py", line 115, in <module>
    if _plain():
  File "/usr/lib/python3.8/site-packages/mercurial/i18n.py", line 107, in _plain
    b'HGPLAIN' not in encoding.environ
  File "/usr/lib/python3.8/importlib/util.py", line 245, in __getattribute__
    self.__spec__.loader.exec_module(self)
  File "/usr/lib/python3.8/site-packages/mercurial/encoding.py", line 23, in <module>
    charencode = policy.importmod(r'charencode')
  File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 116, in importmod
    mod = _importfrom(pn, mn)
  File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 71, in _importfrom
    raise ImportError(r'cannot import name %s' % modname)
ImportError: cannot import name parsers

chrisjbillington commented on 2019-11-28 22:20 (UTC)

@schnedan, sorry, I forgot to add the version number to the provides array, so pacman didn't accept mercurial-python3 as satisfying mercurial>=5.2. I've fixed it now so you shouldn't have to edit PKGBUILDs anymore.

There are still many bugs using tortoisehg under Python 3, looks like you're hitting this one, or something with a similar underlying cause:

https://bitbucket.org/tortoisehg/thg/issues/5491/py3-propertychanged

I don't hit that bug upon simply opening a repo, but I hit something similar looking if I open tortoisehg twice:

https://bitbucket.org/tortoisehg/thg/issues/5479/py3-traceback-upon-starting-workbench

Best you can do for now is report bugs to the bitbucket issue tracker, follow the tortoisehg dev mailing list to see when things are fixed, try to use tortoisehg in a way that avoids hitting the bugs that break things, and use tortoisehg-hg to get the latest commits from the stable branch that fix the bugs.

schnedan commented on 2019-11-28 22:02 (UTC) (edited on 2019-11-28 22:03 (UTC) by schnedan)

Hi, build your mercurial-python3, edited the tortoisehg PKGBUILD, replacing the dependency to mecurial with mecurial-python3... installed fine then. but when running tortoisehg and openning a repository it crashed with this message:

#!python
** Mercurial version (5.2).  TortoiseHg version (5.1+200-fb9035853199)
** Command: --nofork
** CWD: /home/xyz
** Encoding: UTF-8
** Extensions loaded: strip, mq, rebase, transplant, tortoisehg.util.configitems
** Python version: 3.8.0 (default, Oct 23 2019, 18:51:26) [GCC 9.2.0]
** System: Linux hostname 5.3.13-arch1-1 #1 SMP PREEMPT Sun, 24 Nov 2019 10:15:50 +0000 x86_64
** Qt-5.13.2 PyQt-5.13.2 QScintilla-2.11.3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/tortoisehg/hgqt/lexers.py", line 119, in refreshProperties
    self.propertyChanged.emit('lexer.cpp.track.preprocessor', '0')
TypeError: propertyChanged(self, str, str).emit(): argument 1 has unexpected type 'str'

chrisjbillington commented on 2019-11-28 14:50 (UTC)

Until Mercurial built with Python 3 is in the repositories, I've made mercurial-python3, which is the latest released mercurial built with Python 3. It can be used to satisfy the mercurial requirement of this package.

chrisjbillington commented on 2019-11-28 14:28 (UTC) (edited on 2019-11-28 14:36 (UTC) by chrisjbillington)

@sotoleni, the Arch package is still built with Python 2 - you need mercurial 5.2 built with Python 3. You can build the mercurial package from the repos with 5.2 and Python 3 like so:

cd /tmp && asp checkout mercurial && cd mercurial/trunk/
sed -i 's/5.1.2/5.2/g; s/python2/python/g; s/pkgrel=1/pkgrel=0/g'
updpkgsums 
makepkg --skippgpcheck -i

The updpkgsums and ---skippgpcheck are essentially not checking the integrity of the sources at all, so feel free to verify them yourself, but since they are downloaded from mercurial-scm.org over HTTP I would not be concerned.

(Edited out a lot of nonsense from this comment - I thought the repos updated to 5.2, but they didn't, they updated to 5.1.2 which is still "beta" python 3 support)

sotoleni commented on 2019-11-28 09:05 (UTC)

Now the official mercurial 5.3 package is available on the repository. Using it I tried to install tortoisehg, and the makepkg give me the following error:

==> Starting package()... Traceback (most recent call last): File "setup.py", line 29, in <module> from i18n.msgfmt import Msgfmt File "/home/toni/.cache/pacaur/tortoisehg/src/tortoisehg-thg-fb9035853199/i18n/msgfmt.py", line 39, in <module> from mercurial import ( ModuleNotFoundError: No module named 'mercurial' ==> ERROR: A failure occurred in package().

Has anyone solved this problem? Thank you very much.

chrisjbillington commented on 2019-11-27 16:04 (UTC) (edited on 2019-11-27 16:05 (UTC) by chrisjbillington)

@j77h the file conflicts are because you are on Python 3.7, whereas the PKGBUILD assumes Python 3.8. That will break if mercurial updates, since the two packages have conflicting files you'll be deleting them back and forth every update until you update Python.

This package would do better to work out the Python version at build time in order to delete the right conflicting files from the pkgdir. I suggested the following snippet which is used in the tortoisehg-hg package to delete the duped files:

PYTHONMINOR=$(python -c 'import sys; print(sys.version_info.minor)')
SITEPACKAGES="${pkgdir}/usr/lib/python3.${PYTHONMINOR}/site-packages"
# Remove files conflicting with Mercurial.
# https://bitbucket.org/tortoisehg/thg/issues/4629/
rm -f "${SITEPACKAGES}/hgext3rd/__init__.py" \
  "${SITEPACKAGES}/hgext3rd/__pycache__/__init__.cpython-3${PYTHONMINOR}.pyc" \
  "${SITEPACKAGES}/hgext3rd/__pycache__/__init__.cpython-3${PYTHONMINOR}.opt-1.pyc"