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: 125
Popularity: 0.001915
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 .. 22 Next › Last »

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"

j77h commented on 2019-11-27 15:58 (UTC) (edited on 2019-11-27 16:02 (UTC) by j77h)

this might help others with the same need.

(sorry for lack of verbosity, it's very late here, but it should be self-explanatory when you try it)

mkdir pkgbld
cd pkgbld
yay -G tortoisehg
cd tortoisehg

edited PKGBUILD:

from depends=('python' 'mercurial>=5.1' 'mercurial<5.3' 'python-qscintilla-qt5' 'python-iniparse' 'qt5-svg' 'python-pyqt5')

to depends=('python' 'mercurial' 'python-qscintilla-qt5' 'python-iniparse' 'qt5-svg' 'python-pyqt5')

yay -S python-iniparse
makepkg -si

error: failed to commit transaction (conflicting files)

tortoisehg: /usr/lib/python3.7/site-packages/hgext3rd/init.py exists in filesystem (owned by mercurial-stable-hg)

tortoisehg: /usr/lib/python3.7/site-packages/hgext3rd/pycache/init.cpython-37.pyc exists in filesystem (owned by mercurial-stable-hg)

sudo rm /usr/lib/python3.7/site-packages/hgext3rd/__init__.py
sudo rm /usr/lib/python3.7/site-packages/hgext3rd/__pycache__/__init__.cpython-37.pyc

sudo pacman -U tortoisehg-5.2.0-0-any.pkg.tar.xz

I could then run tortoisehg

chrisjbillington commented on 2019-11-27 14:49 (UTC)

@j77h you can read about how to download and build (after editing their PKGBUILDs if you like) packages from the AUR without an AUR helper here:

https://wiki.archlinux.org/index.php/Arch_User_Repository#Acquire_build_files

This is assumed knowledge on the AUR since Arch doesn't include AUR helpers in its repository (i.e. people must manually build at least one AUR package before they can use the AUR). So it will be good to know it since much advice in comment threads like this will assume you're familiar (and yeah, some people will get annoyed at people who don't know).

Also what kind of AUR helper doesn't let you download PKGBUILDs for editing before installing them? That is pretty contrary to what the AUR is supposed to be. Might I recommend yay?

j77h commented on 2019-11-27 14:10 (UTC) (edited on 2019-11-27 14:46 (UTC) by j77h)

@chrisjbillington

"You could use mercurial-stable-hg ... need to modify this package's PKGBUILD ..."

I installed mercurial-stable-hg, and now I'm wondering how to edit PKGBUILD of tortoisehg, as these AUR helpers don't get as far as offering that possibility.

EDIT: Sorry for very n00b question; this probably answers it: https://github.com/Jguer/yay/issues/750

$ pikaur -S tortoisehg
...
tortoisehg depends on: 'mercurial>=5.2,mercurial<5.3'
 found in 'PackageSource.REPO': '{'mercurial': '5.1.2-1'}'
$ yay -S tortoisehg
...
==> Error: Could not find all required packages:
    mercurial>=5.2 (Wanted by: tortoisehg)

vlatkoB commented on 2019-11-25 17:17 (UTC)

@chrisjbillington Thanks a lot for the detailed instructions. thg works. :-)