summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Klitzing2017-05-15 10:30:47 +0200
committerAndré Klitzing2017-05-15 10:31:31 +0200
commitbb33064b9e60044f524c34c0f816a6ea30c1cbaa (patch)
tree43645b7fb227d14af8953449a934d5d329a7cef5
parent64ffec02a70965a29b0e9259df0f8a784239c4af (diff)
downloadaur-bb33064b9e60044f524c34c0f816a6ea30c1cbaa.tar.gz
Apply patch: https://bitbucket.org/tortoisehg/thg/commits/52d403239f00
-rw-r--r--.SRCINFO6
-rw-r--r--52d403239f00200f49e6258965508ab8692fae8a.patch101
-rw-r--r--PKGBUILD9
3 files changed, 111 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 22ae0add2cd6..b94e5a7f82ea 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sun May 7 12:42:56 UTC 2017
+# Mon May 15 08:30:27 UTC 2017
pkgbase = tortoisehg
pkgdesc = Graphical tools for Mercurial
pkgver = 4.2
- pkgrel = 1
+ pkgrel = 2
url = https://tortoisehg.bitbucket.io
arch = any
license = GPL
@@ -15,7 +15,9 @@ pkgbase = tortoisehg
optdepends = python2-pygments: syntax highlighting
optdepends = python2-nautilus: Python binding for Nautilus components
source = http://bitbucket.org/tortoisehg/targz/downloads/tortoisehg-4.2.tar.gz
+ source = 52d403239f00200f49e6258965508ab8692fae8a.patch
sha256sums = 4f3463ebb58a83aa7266c3bdc7e03de9c5e8c39d6793a56b76fd9cdfc29abd11
+ sha256sums = 64f8817d72f870f5ab8b9dda727c60755d95fff2230983aec893527e9bb0e54f
pkgname = tortoisehg
diff --git a/52d403239f00200f49e6258965508ab8692fae8a.patch b/52d403239f00200f49e6258965508ab8692fae8a.patch
new file mode 100644
index 000000000000..0bc59943a0eb
--- /dev/null
+++ b/52d403239f00200f49e6258965508ab8692fae8a.patch
@@ -0,0 +1,101 @@
+# HG changeset patch
+# User Yuya Nishihara <yuya@tcha.org>
+# Date 1494243230 -32400
+# Branch stable
+# Node ID 52d403239f00200f49e6258965508ab8692fae8a
+# Parent 9d3acfb55d3d98f4817c2ae2aabb1cded1d01864
+compat: wrap scmutil.userrcpath() for hg 4.2 (fixes #4744)
+
+diff --git a/tortoisehg/hgqt/commit.py b/tortoisehg/hgqt/commit.py
+--- a/tortoisehg/hgqt/commit.py
++++ b/tortoisehg/hgqt/commit.py
+@@ -10,7 +10,7 @@
+ import tempfile
+ import time
+
+-from mercurial import util, error, scmutil, phases
++from mercurial import util, error, phases
+ from mercurial import obsolete # delete if obsolete becomes enabled by default
+
+ from tortoisehg.util import hglib, i18n, shlib, wconfig
+@@ -1244,7 +1244,7 @@
+ self.saveToPath([fn])
+
+ def saveGlobal(self):
+- self.saveToPath(scmutil.userrcpath())
++ self.saveToPath(hglib.userrcpath())
+
+ def saveToPath(self, path):
+ fn, cfg = hgrcutil.loadIniFile(path, self)
+diff --git a/tortoisehg/hgqt/settings.py b/tortoisehg/hgqt/settings.py
+--- a/tortoisehg/hgqt/settings.py
++++ b/tortoisehg/hgqt/settings.py
+@@ -7,7 +7,7 @@
+
+ import os
+
+-from mercurial import util, error, extensions, scmutil, phases
++from mercurial import util, error, extensions, phases
+
+ from tortoisehg.util import hglib, paths, wconfig, i18n, editor
+ from tortoisehg.util import terminal, gpg
+@@ -1224,7 +1224,7 @@
+ layout.addWidget(self.conftabs)
+ if qtlib.IS_RETINA:
+ self.conftabs.setIconSize(qtlib.barRetinaIconSize())
+- utab = SettingsForm(rcpath=scmutil.userrcpath(), focus=focus)
++ utab = SettingsForm(rcpath=hglib.userrcpath(), focus=focus)
+ self.conftabs.addTab(utab, qtlib.geticon('thg-userconfig'),
+ _("%s's global settings") % username())
+ utab.restartRequested.connect(self._pushRestartRequest)
+@@ -1562,9 +1562,9 @@
+ func = e.values
+ w = func(opts)
+ if e.globalonly:
+- w.setEnabled(self.rcpath == scmutil.userrcpath())
++ w.setEnabled(self.rcpath == hglib.userrcpath())
+ elif e.noglobal:
+- w.setEnabled(self.rcpath != scmutil.userrcpath())
++ w.setEnabled(self.rcpath != hglib.userrcpath())
+ lbl = QLabel(e.label)
+ lbl.setToolTip(e.tooltip)
+ widgets.append(w)
+diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
+--- a/tortoisehg/hgqt/sync.py
++++ b/tortoisehg/hgqt/sync.py
+@@ -12,7 +12,7 @@
+ from PyQt4.QtCore import *
+ from PyQt4.QtGui import *
+
+-from mercurial import hg, util, scmutil, httpconnection
++from mercurial import hg, util, httpconnection
+
+ from tortoisehg.util import hglib, paths, wconfig
+ from tortoisehg.util.i18n import _
+@@ -1441,7 +1441,7 @@
+ e.setText(n)
+
+ def accept(self):
+- path = scmutil.userrcpath()
++ path = hglib.userrcpath()
+ fn, cfg = hgrcutil.loadIniFile(path, self)
+ if not hasattr(cfg, 'write'):
+ qtlib.WarningMsgBox(_('Unable to save authentication'),
+diff --git a/tortoisehg/util/hglib.py b/tortoisehg/util/hglib.py
+--- a/tortoisehg/util/hglib.py
++++ b/tortoisehg/util/hglib.py
+@@ -61,6 +61,14 @@
+ _parserevspec = revsetmod.parse
+ tokenizerevspec = revsetmod.tokenize
+
++try:
++ from mercurial import rcutil
++ userrcpath = rcutil.userrcpath
++except (ImportError, AttributeError):
++ # hg<4.2 (0f8ba0bc1154)
++ from mercurial import scmutil
++ userrcpath = scmutil.userrcpath
++
+ # TODO: use unicode version globally
+ def _(message, context=''):
+ return _gettext(message, context).encode('utf-8')
diff --git a/PKGBUILD b/PKGBUILD
index 7ecc35413fac..ea489966ddfc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=tortoisehg
pkgver=4.2
-pkgrel=1
+pkgrel=2
#_pkgchangeset=169d552db075
pkgdesc="Graphical tools for Mercurial"
url="https://tortoisehg.bitbucket.io"
@@ -19,7 +19,7 @@ optdepends=('python2-pygments: syntax highlighting'
if [ -z ${_pkgchangeset+x} ];
then
- source=("http://bitbucket.org/tortoisehg/targz/downloads/${pkgname}-${pkgver}.tar.gz")
+ source=("http://bitbucket.org/tortoisehg/targz/downloads/${pkgname}-${pkgver}.tar.gz" "52d403239f00200f49e6258965508ab8692fae8a.patch")
else
source=("$pkgname-$pkgver-${_pkgchangeset}.tar.gz::https://bitbucket.org/tortoisehg/thg/get/${_pkgchangeset}.tar.gz")
fi
@@ -32,6 +32,8 @@ package() {
cd "${srcdir}/tortoisehg-thg-${_pkgchangeset}"
fi
+ patch -p1 -i "$srcdir/52d403239f00200f49e6258965508ab8692fae8a.patch"
+
python2 setup.py install --prefix=/usr --root="${pkgdir}"
install -Dm 644 "contrib/mergetools.rc" "${pkgdir}/etc/mercurial/hgrc.d/thgmergetools.rc"
install -Dm 644 "contrib/thg.desktop" "${pkgdir}/usr/share/applications/thg.desktop"
@@ -42,4 +44,5 @@ package() {
rm "${pkgdir}/usr/lib/python2.7/site-packages/hgext3rd/__init__.pyc"
}
-sha256sums=('4f3463ebb58a83aa7266c3bdc7e03de9c5e8c39d6793a56b76fd9cdfc29abd11')
+sha256sums=('4f3463ebb58a83aa7266c3bdc7e03de9c5e8c39d6793a56b76fd9cdfc29abd11'
+ '64f8817d72f870f5ab8b9dda727c60755d95fff2230983aec893527e9bb0e54f')