summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-01-08 09:28:32 +0100
committerFabian Groffen <grobian@gentoo.org>2019-01-08 09:28:32 +0100
commita6b4a73378a8051adb9bc3a7da7d62412f573139 (patch)
tree92ae8f6c2405f76c437d029c53ba2a24ad95bba2 /dev-vcs
parentsys-apps/fwupd: Removed old. (diff)
downloadgentoo-a6b4a73378a8051adb9bc3a7da7d62412f573139.tar.gz
gentoo-a6b4a73378a8051adb9bc3a7da7d62412f573139.tar.bz2
gentoo-a6b4a73378a8051adb9bc3a7da7d62412f573139.zip
dev-vcs/hg-git: revbump for hg-4.8 support
Signed-off-by: Fabian Groffen <grobian@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'dev-vcs')
-rw-r--r--dev-vcs/hg-git/files/hg-git-0.8.12-hg-4.8.patch219
-rw-r--r--dev-vcs/hg-git/hg-git-0.8.12-r1.ebuild28
2 files changed, 247 insertions, 0 deletions
diff --git a/dev-vcs/hg-git/files/hg-git-0.8.12-hg-4.8.patch b/dev-vcs/hg-git/files/hg-git-0.8.12-hg-4.8.patch
new file mode 100644
index 000000000000..c456ce53c740
--- /dev/null
+++ b/dev-vcs/hg-git/files/hg-git-0.8.12-hg-4.8.patch
@@ -0,0 +1,219 @@
+https://bitbucket.org/durin42/hg-git/commits/ae6b1ba7482963bc9de51f299891e99005794e4e/raw
+https://bitbucket.org/durin42/hg-git/commits/143b7511eadbea7507d847c805241a6db290ffe7/raw
+https://bitbucket.org/durin42/hg-git/commits/8d00fde45adbc6c3c0ccab8e362b5f5c36c171e6/raw
+
+# HG changeset patch
+# User Alain Leufroy
+# Date 1541695757 -3600
+# Node ID ae6b1ba7482963bc9de51f299891e99005794e4e
+# Parent 6ae26ba7b928019e48dd1c73358c18d6dd2d86f3
+compat: fix for hg 4.8
+
+089fc0db0954 introduced a new `createopts` parameter.
+
+`hggit` does not support repository creation, so we can just ignore
+it.
+
+diff --git a/hggit/gitrepo.py b/hggit/gitrepo.py
+--- a/hggit/gitrepo.py
++++ b/hggit/gitrepo.py
+@@ -13,7 +13,7 @@
+
+
+ class gitrepo(peerrepository):
+- def __init__(self, ui, path, create, intents=None):
++ def __init__(self, ui, path, create, intents=None, **kwargs):
+ if create: # pragma: no cover
+ raise error.Abort('Cannot create a git repository.')
+ self._ui = ui
+
+# HG changeset patch
+# User Kevin Bullock <kbullock@ringworld.org>
+# Date 1543713965 21600
+# Node ID 143b7511eadbea7507d847c805241a6db290ffe7
+# Parent ae6b1ba7482963bc9de51f299891e99005794e4e
+compat: glob some verify output that changed in hg 4.8
+
+diff --git a/tests/test-push-r.t b/tests/test-push-r.t
+--- a/tests/test-push-r.t
++++ b/tests/test-push-r.t
+@@ -64,7 +64,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 1 files, 1 changesets, 1 total revisions
++ *1 changesets* (glob)
+ pushing to test-1
+ searching for changes
+ adding changesets
+@@ -75,7 +75,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 1 files, 2 changesets, 2 total revisions
++ *2 changesets* (glob)
+ pushing to test-2
+ searching for changes
+ adding changesets
+@@ -86,7 +86,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 1 files, 3 changesets, 3 total revisions
++ *3 changesets* (glob)
+ pushing to test-3
+ searching for changes
+ adding changesets
+@@ -97,7 +97,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 1 files, 4 changesets, 4 total revisions
++ *4 changesets* (glob)
+ pushing to test-4
+ searching for changes
+ adding changesets
+@@ -108,7 +108,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 1 files, 2 changesets, 2 total revisions
++ *2 changesets* (glob)
+ pushing to test-5
+ searching for changes
+ adding changesets
+@@ -119,7 +119,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 1 files, 3 changesets, 3 total revisions
++ *3 changesets* (glob)
+ pushing to test-6
+ searching for changes
+ adding changesets
+@@ -130,7 +130,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 2 files, 4 changesets, 5 total revisions
++ *4 changesets* (glob)
+ pushing to test-7
+ searching for changes
+ adding changesets
+@@ -141,7 +141,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 3 files, 5 changesets, 6 total revisions
++ *5 changesets* (glob)
+ pushing to test-8
+ searching for changes
+ adding changesets
+@@ -152,7 +152,7 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 2 files, 5 changesets, 5 total revisions
++ *5 changesets* (glob)
+ $ cd test-8
+ $ hg pull ../test-7
+ pulling from ../test-7
+@@ -168,4 +168,4 @@
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+- 4 files, 9 changesets, 7 total revisions
++ *9 changesets* (glob)
+
+# HG changeset patch
+# User Kevin Bullock <kbullock@ringworld.org>
+# Date 1543713996 21600
+# Node ID 8d00fde45adbc6c3c0ccab8e362b5f5c36c171e6
+# Parent 143b7511eadbea7507d847c805241a6db290ffe7
+compat: update how we register gitnode template keyword
+
+diff --git a/hggit/__init__.py b/hggit/__init__.py
+--- a/hggit/__init__.py
++++ b/hggit/__init__.py
+@@ -94,9 +94,11 @@
+ command = registrar.command(cmdtable)
+ configitem = registrar.configitem(configtable)
+ compat.registerconfigs(configitem)
++ templatekeyword = registrar.templatekeyword()
+
+ except (ImportError, AttributeError):
+ command = cmdutil.command(cmdtable)
++ templatekeyword = compat.templatekeyword()
+
+ # support for `hg clone git://github.com/defunkt/facebox.git`
+ # also hg clone git+ssh://git@github.com/schacon/simplegit.git
+@@ -207,7 +209,6 @@
+
+
+ def extsetup(ui):
+- templatekw.keywords.update({'gitnode': gitnodekw})
+ revset.symbols.update({
+ 'fromgit': revset_fromgit, 'gitnode': revset_gitnode
+ })
+@@ -455,12 +456,30 @@
+ raise LookupError(rev, git.map_file, _('ambiguous identifier'))
+
+
+-def gitnodekw(**args):
+- """:gitnode: String. The Git changeset identification hash, as a 40 hexadecimal
+-digit string."""
+- node = args['ctx']
+- repo = args['repo']
++def _gitnodekw(node, repo):
+ gitnode = repo.githandler.map_git_get(node.hex())
+ if gitnode is None:
+ gitnode = ''
+ return gitnode
++
++
++if (hgutil.safehasattr(templatekw, 'templatekeyword') and
++ hgutil.safehasattr(templatekw.templatekeyword._table['node'],
++ '_requires')):
++ @templatekeyword('gitnode', requires={'ctx', 'repo'})
++ def gitnodekw(context, mapping):
++ """:gitnode: String. The Git changeset identification hash, as a
++ 40 hexadecimal digit string."""
++ node = context.resource(mapping, 'ctx')
++ repo = context.resource(mapping, 'repo')
++ return _gitnodekw(node, repo)
++
++else:
++ # COMPAT: hg < 4.6 - templatekeyword API changed
++ @templatekeyword('gitnode')
++ def gitnodekw(**args):
++ """:gitnode: String. The Git changeset identification hash, as a
++ 40 hexadecimal digit string."""
++ node = args['ctx']
++ repo = args['repo']
++ return _gitnodekw(node, repo)
+diff --git a/hggit/compat.py b/hggit/compat.py
+--- a/hggit/compat.py
++++ b/hggit/compat.py
+@@ -2,6 +2,7 @@
+ bookmarks,
+ context,
+ phases,
++ templatekw,
+ url,
+ util as hgutil,
+ )
+@@ -192,3 +193,14 @@
+ if hasconfigitems:
+ return getconfig(section, item)
+ return getconfig(section, item, CONFIG_DEFAULTS[section][item])
++
++
++class templatekeyword(object):
++ def __init__(self):
++ self._table = {}
++
++ def __call__(self, name):
++ def decorate(func):
++ templatekw.keywords.update({name: func})
++ return func
++ return decorate
diff --git a/dev-vcs/hg-git/hg-git-0.8.12-r1.ebuild b/dev-vcs/hg-git/hg-git-0.8.12-r1.ebuild
new file mode 100644
index 000000000000..e5711f08ff40
--- /dev/null
+++ b/dev-vcs/hg-git/hg-git-0.8.12-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="push to and pull from a Git repository using Mercurial"
+HOMEPAGE="http://hg-git.github.io https://pypi.org/project/hg-git/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="
+ >=dev-vcs/mercurial-2.8.2[${PYTHON_USEDEP}]
+ >=dev-python/dulwich-0.9.7[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-hg-4.8.patch
+)