dev-vcs/tortoisehg: 7.2.2 version bump

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Part-of: https://github.com/gentoo/gentoo/pull/46552
Closes: https://github.com/gentoo/gentoo/pull/46552
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sergey Torokhov
2026-07-12 21:10:06 +03:00
committed by Sam James
parent 959f880c38
commit ddfa87965c
3 changed files with 147 additions and 0 deletions

View File

@@ -1,2 +1,3 @@
DIST tortoisehg-6.9.tar.gz 8862668 BLAKE2B b7f917a8c9f0ca575e27ab1670bfe940e6257940691c53fca464b4012417283c9915fe5f604b0c1a5cb7f620ce20b47e945bb9e88b301f7ac036c19fcb4508b5 SHA512 f9f7ed9c3a1cdf633c453a12c7f68505027975fbd858c4e9cd4ce09920126f22043c1621a5d949391d31a9a13331cee2466d718635aa16dc8558bac5536d14fb
DIST tortoisehg-7.0.1.tar.gz 8863754 BLAKE2B fa2c750ac88a48d96845f026161a8f72979ea2caa2fcfcc7b25ed82726ffc68e57771ee4b7690f096c173cfbbb881cd9d1173020b2acb943d3a4c6a899b3c51c SHA512 237e14245af58c7f0d0976ea207c4d73c3b7738420ac0b6c2f9a7fb13e4b966ed5be9e3bbf6a4964b5ddbb78118603e151fa75a4d01f026696f641a6dd28dc7b
DIST tortoisehg-7.2.2.tar.gz 8864760 BLAKE2B 5760f21dea604dfd00d4cb103bf48164806529747b02c65f49395ef823f1346d3d3587ab06d21bf8b1b53c25062cfb6aa92caeb227a0d19b755d48ec7a06b1c5 SHA512 ba482384f178ee7bd01770667eeb444b482774e330abd3a91032471d1c4fc911b4e472943b23afd5670d2be19a4bb617c72a5b40cc0b2c379467d3a8108db1f2

View File

@@ -0,0 +1,62 @@
# HG changeset patch
# User Antonio Muci <a.mux@inwind.it>
# Date 1782306386 -7200
# Wed Jun 24 15:06:26 2026 +0200
# Branch stable
# Node ID ff01aa72ea781c0dc689a9fa82931b15afccedb8
# Parent 15d028aec364def81d4b2fb952db5dbeec5bf128
commit: fix wrong size of commit button on Qt6
On my system (Fedora 44, PyQt6) this change fixes the visual issue, without
breaking when run under PyQt5. However, I only tested on my system (linux,
Fedora 44). For example, I did not do any Windows testing.
The patch also removes the functions menuButtonWidth() and styleOption(), which
have no callers left. The introduction of menuButtonWidth() can be tracked back
to afe08b4e6fd6 from 2011.
Discussions at:
https://groups.google.com/g/thg-dev/c/rdFlpNnMVto (2026)
https://groups.google.com/g/thg-dev/c/o0AgzdVKazo/m/4soNAHtFBgAJ (2024)
Fixes #5968 (that also contains screenshots before and after the change).
diff --git a/tortoisehg/hgqt/commit.py b/tortoisehg/hgqt/commit.py
--- a/tortoisehg/hgqt/commit.py
+++ b/tortoisehg/hgqt/commit.py
@@ -48,7 +48,6 @@
QSizePolicy,
QStyle,
QStyleFactory,
- QStyleOptionToolButton,
QSplitter,
QToolBar,
QToolButton,
@@ -482,17 +481,6 @@
acts = tuple(acts)
class CommitToolButton(QToolButton):
- def styleOption(self):
- opt = QStyleOptionToolButton()
- opt.initFrom(self)
- return opt
- def menuButtonWidth(self):
- style = self.style()
- opt = self.styleOption()
- opt.features = QStyleOptionToolButton.ToolButtonFeature.MenuButtonPopup
- rect = style.subControlRect(QStyle.ComplexControl.CC_ToolButton, opt,
- QStyle.SubControl.SC_ToolButtonMenu, self)
- return rect.width()
def setBold(self):
f = self.font()
f.setWeight(QFont.Weight.Bold)
@@ -505,8 +493,7 @@
committb.setBold()
committb.setPopupMode(QToolButton.ToolButtonPopupMode.MenuButtonPopup)
fmk = lambda s: committb.fontMetrics().horizontalAdvance(hglib.tounicode(s[2]))
- committb._width = (max(pycompat.maplist(fmk, acts))
- + 4*committb.menuButtonWidth())
+ committb._width = max(pycompat.maplist(fmk, acts)) + 50
class CommitButtonMenu(QMenu):
def __init__(self, parent, repo):

View File

@@ -0,0 +1,84 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
DISTUTILS_USE_PEP517=setuptools
inherit desktop distutils-r1 optfeature xdg-utils
if [[ ${PV} != *9999* ]]; then
KEYWORDS="~amd64 ~arm64 ~x86"
SRC_URI="https://foss.heptapod.net/mercurial/${PN}/thg/-/archive/${PV}/thg-${PV}.tar.gz -> ${P}.tar.gz"
HG_DEPEND=">=dev-vcs/mercurial-6.7[${PYTHON_USEDEP}]
<dev-vcs/mercurial-7.3[${PYTHON_USEDEP}]"
S="${WORKDIR}/thg-${PV}"
else
inherit mercurial
EHG_REPO_URI="https://foss.heptapod.net/mercurial/${PN}/thg"
EHG_REVISION="stable"
HG_DEPEND=">=dev-vcs/mercurial-6.7[${PYTHON_USEDEP}]"
fi
DESCRIPTION="Set of graphical tools for Mercurial"
HOMEPAGE="https://tortoisehg.bitbucket.io/"
LICENSE="GPL-2+"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="${HG_DEPEND}
dev-python/iniparse[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/pyqt6[network,svg,${PYTHON_USEDEP}]
>=dev-python/qscintilla-2.14.1-r1[qt6(+),${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"
BDEPEND="
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)
"
PATCHES=(
"${FILESDIR}/${P}_fix_Qt6_commit_button_size.patch"
)
distutils_enable_sphinx doc/source
python_prepare_all() {
# Remove file that collides with >=mercurial-4.0 (bug #599266).
rm "${S}"/hgext3rd/__init__.py || die "can't remove /hgext3rd/__init__.py"
sed -i -e 's:share/doc/tortoisehg:share/doc/'"${PF}"':' setup.py || die
export THG_QT_API=PyQt6
distutils-r1_python_prepare_all
}
python_test() {
${EPYTHON} tests/run-tests.py -m 'not largefiles' --disable-pytest-warnings --doctest-modules tests || die "Tests failed with ${EPYTHON}"
${EPYTHON} tests/run-tests.py -m largefiles --disable-pytest-warnings tests || die "Tests failed with ${EPYTHON}"
}
python_install_all() {
export THG_QT_API=PyQt6
distutils-r1_python_install_all
dodoc doc/ReadMe*.txt doc/TODO contrib/mergetools.rc
newicon -s scalable icons/scalable/apps/thg.svg thg_logo.svg
domenu contrib/thg.desktop
}
pkg_postinst() {
xdg_icon_cache_update
elog "When startup of ${PN} fails with an API version mismatch error"
elog "between dev-python/sip and dev-python/pyqt6 please rebuild"
elog "dev-python/qscintilla."
optfeature "the core git extension support" dev-python/pygit2
}
pkg_postrm() {
xdg_icon_cache_update
}