summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2011-08-29 18:37:52 +0000
committerFabian Groffen <grobian@gentoo.org>2011-08-29 18:37:52 +0000
commite29850e0ddc8dbc29215ae4020f0d63753cec0c3 (patch)
treea797bb90a851f89fc783521de05f721fca860c33 /dev-vcs/hg-git
parentTransfer Prefix keywords, bug #359833 (diff)
downloadgentoo-2-e29850e0ddc8dbc29215ae4020f0d63753cec0c3.tar.gz
gentoo-2-e29850e0ddc8dbc29215ae4020f0d63753cec0c3.tar.bz2
gentoo-2-e29850e0ddc8dbc29215ae4020f0d63753cec0c3.zip
Add patches from upstream to allow functioning properly with >=mercurial-1.9, take co-maintainership, bug #375433
(Portage version: 2.2.01.19074-prefix/cvs/Darwin i386)
Diffstat (limited to 'dev-vcs/hg-git')
-rw-r--r--dev-vcs/hg-git/ChangeLog12
-rw-r--r--dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-1.patch30
-rw-r--r--dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-2.patch33
-rw-r--r--dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-3.patch35
-rw-r--r--dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-4.patch43
-rw-r--r--dev-vcs/hg-git/hg-git-0.2.6-r1.ebuild30
-rw-r--r--dev-vcs/hg-git/metadata.xml4
7 files changed, 186 insertions, 1 deletions
diff --git a/dev-vcs/hg-git/ChangeLog b/dev-vcs/hg-git/ChangeLog
index a43a6c29c6dd..bd01afd09b46 100644
--- a/dev-vcs/hg-git/ChangeLog
+++ b/dev-vcs/hg-git/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for dev-vcs/hg-git
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/hg-git/ChangeLog,v 1.25 2011/08/18 19:28:14 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/hg-git/ChangeLog,v 1.26 2011/08/29 18:37:52 grobian Exp $
+
+*hg-git-0.2.6-r1 (29 Aug 2011)
+
+ 29 Aug 2011; Fabian Groffen <grobian@gentoo.org> +hg-git-0.2.6-r1.ebuild,
+ +files/hg-git-0.2.6-mercurial-1.9-1.patch,
+ +files/hg-git-0.2.6-mercurial-1.9-2.patch,
+ +files/hg-git-0.2.6-mercurial-1.9-3.patch,
+ +files/hg-git-0.2.6-mercurial-1.9-4.patch, metadata.xml:
+ Add patches from upstream to allow functioning properly with >=mercurial-1.9,
+ take co-maintainership, bug #375433
18 Aug 2011; Fabian Groffen <grobian@gentoo.org> hg-git-0.2.6.ebuild:
Marked ~x64-macos
diff --git a/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-1.patch b/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-1.patch
new file mode 100644
index 000000000000..01613b43aec9
--- /dev/null
+++ b/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-1.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Mads Kiilerich <mads@kiilerich.com>
+# Date 1302003088 -7200
+# Node ID 61865ad887403865743391e682ce116ad817cd55
+# Parent f55869b556f0532604404966c612b326e360b7ca
+compatibility with new url handling in Mercurial 1.9
+
+diff -r f55869b556f0532604404966c612b326e360b7ca -r 61865ad887403865743391e682ce116ad817cd55 hggit/__init__.py
+--- a/hggit/__init__.py Wed Mar 23 21:31:26 2011 -0500
++++ b/hggit/__init__.py Tue Apr 05 13:31:28 2011 +0200
+@@ -24,6 +24,7 @@
+ from mercurial import hg
+ from mercurial import localrepo
+ from mercurial import util as hgutil
++from mercurial import url
+ from mercurial.i18n import _
+
+ demandimport.ignore.extend([
+@@ -42,7 +43,10 @@
+ _oldlocal = hg.schemes['file']
+
+ def _local(path):
+- p = hgutil.drop_scheme('file', path)
++ try:
++ p = hgutil.drop_scheme('file', path)
++ except AttributeError:
++ p = url.url(path).localpath()
+ if (os.path.exists(os.path.join(p, '.git')) and
+ not os.path.exists(os.path.join(p, '.hg'))):
+ return gitrepo
diff --git a/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-2.patch b/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-2.patch
new file mode 100644
index 000000000000..29b635ec164a
--- /dev/null
+++ b/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-2.patch
@@ -0,0 +1,33 @@
+# HG changeset patch
+# User Augie Fackler <durin42@gmail.com>
+# Date 1305480363 18000
+# Node ID bcc79fa3fe09c43a011936f7d8b2c1075e0d94da
+# Parent ed28dd69df6169396bfb72d4aa3349aac8a32ed1
+url wasn't ever published as url.url, and is now util.url
+
+diff -r ed28dd69df6169396bfb72d4aa3349aac8a32ed1 -r bcc79fa3fe09c43a011936f7d8b2c1075e0d94da hggit/__init__.py
+--- a/hggit/__init__.py Sun May 15 12:24:25 2011 -0500
++++ b/hggit/__init__.py Sun May 15 12:26:03 2011 -0500
+@@ -42,11 +42,18 @@
+ # support for `hg clone localgitrepo`
+ _oldlocal = hg.schemes['file']
+
++try:
++ urlcls = hgutil.url
++except AttributeError:
++ class urlcls(object):
++ def __init__(self, path):
++ self.p = hgutil.drop_scheme('file', path)
++
++ def localpath(self):
++ return self.p
++
+ def _local(path):
+- try:
+- p = hgutil.drop_scheme('file', path)
+- except AttributeError:
+- p = url.url(path).localpath()
++ p = urlcls(path).localpath()
+ if (os.path.exists(os.path.join(p, '.git')) and
+ not os.path.exists(os.path.join(p, '.hg'))):
+ return gitrepo
diff --git a/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-3.patch b/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-3.patch
new file mode 100644
index 000000000000..60bbcdc3cdac
--- /dev/null
+++ b/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-3.patch
@@ -0,0 +1,35 @@
+# HG changeset patch
+# User Augie Fackler <durin42@gmail.com>
+# Date 1305480384 18000
+# Node ID 5fdff9b8e7420572624dae2941251f11cd9bd6d7
+# Parent bcc79fa3fe09c43a011936f7d8b2c1075e0d94da
+Cope with new discovery code without crashing.
+
+diff -r bcc79fa3fe09c43a011936f7d8b2c1075e0d94da -r 5fdff9b8e7420572624dae2941251f11cd9bd6d7 hggit/__init__.py
+--- a/hggit/__init__.py Sun May 15 12:26:03 2011 -0500
++++ b/hggit/__init__.py Sun May 15 12:26:24 2011 -0500
+@@ -125,6 +125,8 @@
+ kwname = 'heads'
+ if hg.util.version() >= '1.7':
+ kwname = 'remoteheads'
++ if getattr(discovery, 'findcommonoutgoing', None):
++ kwname = 'onlyheads'
+ def findoutgoing(orig, local, remote, *args, **kwargs):
+ kw = {}
+ kw.update(kwargs)
+@@ -141,8 +143,14 @@
+ if kwname == 'heads':
+ r = orig(local, remote, **kw)
+ return [x[0] for x in r]
++ if kwname == 'onlyheads':
++ del kw['base']
+ return orig(local, remote, **kw)
+- extensions.wrapfunction(discovery, 'findoutgoing', findoutgoing)
++ if getattr(discovery, 'findoutgoing', None):
++ extensions.wrapfunction(discovery, 'findoutgoing', findoutgoing)
++ else:
++ extensions.wrapfunction(discovery, 'findcommonoutgoing',
++ findoutgoing)
+ except ImportError:
+ pass
+
diff --git a/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-4.patch b/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-4.patch
new file mode 100644
index 000000000000..52a90f6e66d2
--- /dev/null
+++ b/dev-vcs/hg-git/files/hg-git-0.2.6-mercurial-1.9-4.patch
@@ -0,0 +1,43 @@
+# HG changeset patch
+# User Brendan Cully <brendan@kublai.com>
+# Date 1308853770 25200
+# Node ID 6867b01d1379cb27faca4c4cb06ed2fba38963e8
+# Parent b8eeabb61c7b720713565a645aacffa7213128aa
+Unbreak outgoing to non-git repos with hg pre-1.9
+
+The wrapped version of findoutgoing unconditionally mangled the
+keyword arguments, but doesn't do version fixups unless the
+remote is a git repository. This change only mangles the argument
+list when the remote is a git repository.
+
+diff -r b8eeabb61c7b720713565a645aacffa7213128aa -r 6867b01d1379cb27faca4c4cb06ed2fba38963e8 hggit/__init__.py
+--- a/hggit/__init__.py Fri Jun 17 15:01:31 2011 -0500
++++ b/hggit/__init__.py Thu Jun 23 11:29:30 2011 -0700
+@@ -129,13 +129,13 @@
+ if getattr(discovery, 'findcommonoutgoing', None):
+ kwname = 'onlyheads'
+ def findoutgoing(orig, local, remote, *args, **kwargs):
+- kw = {}
+- kw.update(kwargs)
+- for val, k in zip(args, ('base', kwname, 'force')):
+- kw[k] = val
+ if isinstance(remote, gitrepo.gitrepo):
+ # clean up this cruft when we're 1.7-only, remoteheads and
+ # the return value change happened between 1.6 and 1.7.
++ kw = {}
++ kw.update(kwargs)
++ for val, k in zip(args, ('base', kwname, 'force')):
++ kw[k] = val
+ git = GitHandler(local, local.ui)
+ base, heads = git.get_refs(remote.path)
+ newkw = {'base': base, kwname: heads}
+@@ -146,7 +146,8 @@
+ return [x[0] for x in r]
+ if kwname == 'onlyheads':
+ del kw['base']
+- return orig(local, remote, **kw)
++ return orig(local, remote, **kw)
++ return orig(local, remote, *args, **kwargs)
+ if getattr(discovery, 'findoutgoing', None):
+ extensions.wrapfunction(discovery, 'findoutgoing', findoutgoing)
+ else:
diff --git a/dev-vcs/hg-git/hg-git-0.2.6-r1.ebuild b/dev-vcs/hg-git/hg-git-0.2.6-r1.ebuild
new file mode 100644
index 000000000000..53621ff30239
--- /dev/null
+++ b/dev-vcs/hg-git/hg-git-0.2.6-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/hg-git/hg-git-0.2.6-r1.ebuild,v 1.1 2011/08/29 18:37:52 grobian Exp $
+
+EAPI="3"
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit distutils eutils
+
+DESCRIPTION="push and pull from a Git server using Mercurial"
+HOMEPAGE="http://hg-git.github.com/ http://pypi.python.org/pypi/hg-git"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND=">=dev-vcs/mercurial-1.1
+ >=dev-python/dulwich-0.6"
+DEPEND="${RDEPEND}
+ dev-python/setuptools"
+
+PYTHON_MODNAME="hggit"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-mercurial-1.9-{1,2,3,4}.patch
+}
diff --git a/dev-vcs/hg-git/metadata.xml b/dev-vcs/hg-git/metadata.xml
index 1be5f914d40a..c879b4bf4714 100644
--- a/dev-vcs/hg-git/metadata.xml
+++ b/dev-vcs/hg-git/metadata.xml
@@ -5,5 +5,9 @@
<email>djc@gentoo.org</email>
<name>Dirkjan Ochtman</name>
</maintainer>
+ <maintainer>
+ <email>grobian@gentoo.org</email>
+ <name>Fabian Groffen</name>
+ </maintainer>
<herd>python</herd>
</pkgmetadata>