summaryrefslogtreecommitdiff
path: root/dev-vcs/hg-git
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-01-12 16:58:08 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-01-12 16:58:08 +0000
commitc8a77dfe4d3d307c1d5dd2650b7297447d8b609d (patch)
tree9ea78393bc3ecd6ab4de449383d4e97e5f3648ae /dev-vcs/hg-git
parent2891d29af8907ce881662f4a02844926d7a293c7 (diff)
gentoo resync : 12.01.2019
Diffstat (limited to 'dev-vcs/hg-git')
-rw-r--r--dev-vcs/hg-git/Manifest4
-rw-r--r--dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memctx.patch43
-rw-r--r--dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memfilectx.patch73
-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
5 files changed, 249 insertions, 118 deletions
diff --git a/dev-vcs/hg-git/Manifest b/dev-vcs/hg-git/Manifest
index aa1af8360bb8..54a4f5064dfa 100644
--- a/dev-vcs/hg-git/Manifest
+++ b/dev-vcs/hg-git/Manifest
@@ -1,9 +1,9 @@
-AUX hg-git-0.8.10-hg45-memctx.patch 1817 BLAKE2B 73e638b88698950e3f178c30c063ea269717738923c4f81a25795eb3ac90b14b5477a08c185a37931a174d18855709cf55089819e5c73859c8af7323959adc6f SHA512 63b24d3a5cf0f553521184049b9c8452e1d66af9a89bb20960ca5198c58af53b0e106dead0cbe2b61f1b6a786ef33547eb9215483eafb57191dd1c053ec124be
-AUX hg-git-0.8.10-hg45-memfilectx.patch 2586 BLAKE2B c40212ab0d201993d2f97b425e84e0f09cabe94e804078c680dd3084859e65d3beb4a570d717f57c1eb2bfeda10d3fdc1440d3d12fcf816d05cf2ea033bb8969 SHA512 3211680a1ebcd508f7a4794ac796bd25fda22087a98f51b7d06e8b9ba16314db061ac8a0085dd0ccecf834c316f27bca54acd87c2152b3bb72df7d6580d5dff9
+AUX hg-git-0.8.12-hg-4.8.patch 6647 BLAKE2B 86e0fb6bd9f9b9d10e38024cecf447857ae5339085a3f919cd924d3a397003d85b59014ba920ee5f5f62ef54acb862feeef325a9d76168e5f5ba37c34dfa9dad SHA512 8536ba20dbe5e8d1e3872a058d3e4f402ee39a7f91d1fc0102e6d169bc246ed728bfac517ef620b157d563644b18982f7f8d2fd63ab1f5138e5550b4280b8619
DIST hg-git-0.8.11.tar.gz 118537 BLAKE2B 05a63633f8909260428197334812d314cdba115324fa7dd70ccb5d0ee1e21089be0b8bb0cb1cf09f5f738cbee00e3e688646daa3debed9fa36fac2ff62bfcb8b SHA512 ced6b8b522f75b0e2b59c5113b3afd7b02eb2e3798a7aecdc211a15aba1363d3785234e909644626b5c16d7e8b158a6fe1f1120dcd85b5709d8a84ff1f4b6655
DIST hg-git-0.8.12.tar.gz 124456 BLAKE2B 31a899ba1f2e0de861d81e7ff5fac9f82e9c08813b77fa8a4da3aeae590d7e8cb6c37abb80ebe34a80835c210f10145df7429685cb71ffab7bfe8d5a628d3d12 SHA512 77af45c8f35febe354382ee043be7f0f2c53e1ac7ae331a7068a0e117ed0f54adaa7c7f5127e247e089c9204b9130dde286aa887997b7ab7ede48f447797608e
DIST hg-git-0.8.8.tar.gz 98508 BLAKE2B e7636c3809b2be8a7fcce44a72f89f39927a282c34384047036470fc832b34be1922de75a2a9b468ec125ea716263333f5f58e6a0c7de12729b7dd18c68b657a SHA512 c3b28273024f2429ed526354048f0e37d0af6be591020fa3b1e8d1321247d72129f7c8fbcef73e69d60e243a6f86380dc4d89f0e8f913b786ef4497421237aac
EBUILD hg-git-0.8.11.ebuild 707 BLAKE2B 6bf0f75ecf2877a5b3d4775949aea77332dbb57d874c21acf36c10c0a377e543f6087e882a34127c56b92931ab47456f36a10019091c247cd81e0e84c4fa0b71 SHA512 b404e426bbfe1cefe5d56db9ef463ca4833c1e40dd7ec5ef9c4fd2eb249301fafcc8e321417557058307b8992420a56244245e1a908485c30977b30428849123
+EBUILD hg-git-0.8.12-r1.ebuild 750 BLAKE2B b8e1005953ae97583fabbcd3c72e0e732fe76abd3c089aecd3f9590f809253dfca1b694c14cfc51e5867f7beca5e9bcba3202399610bdf1df422ac57fb48a395 SHA512 aad9af3857bbc577d54af072c0913183a9eeaf2bf1e2846e773273cf6adf53ca5a170630d98786887d1d4d11357edfc9f6c7f65a9d88dbcd80c7ff2191787344
EBUILD hg-git-0.8.12.ebuild 704 BLAKE2B 67f021ab754992b636235ffd2ad7dd43dca05ea63096764f4e63e77ea683b6a6ab057b6581300fb38f95d2dab3a7425a7694b9ea2e24146f38be240400303de8 SHA512 a23762cace05828e78628187a6fd4c34acb6d2a9b9ae9889005d209560fe36af792b8d81eda6e831a97b509c22378e966aaec7153408cf1d07234bdbaed5cac9
EBUILD hg-git-0.8.8.ebuild 697 BLAKE2B de1b6b49eeef84667cad1bbe50a10ef919352b49e402f9d0a48c7ff2c6f560dbd5e208d5456a38c07473bc8dbab1f23eef8cc85a8d90d333a4b98f30715601a8 SHA512 b0f24d48a56171a5c30575df57db48ac859bedd5912a48194a9183c06930e5e56b01a06e5dbcee7462d692f1c9a41f79fb593a73cdd0ebf418da05b24bee9cf2
MISC metadata.xml 317 BLAKE2B 53e7e3877f6f42a888ad50ba824e4a50f4535d4a9345ff2a661ae3df79e57bddfb8faa80ea632856a530b99518e90d4311f8090003880f3a5cf073fec1d8c926 SHA512 98a36b756fe1f1ee4f2d7c1f7f0dee8925a1396d2b44eff84274aa4c6e871d87d17808e157c6020cbeeec763e44fc4ba6e5d266561b3fe5c015f04c864349a09
diff --git a/dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memctx.patch b/dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memctx.patch
deleted file mode 100644
index ff9d4d66d15f..000000000000
--- a/dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memctx.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-# HG changeset patch
-# User Tony Tung <tonytung@merly.org>
-# Date 1517901695 28800
-# Node ID 843f409526fbea3ffde674922b730075d5cfd4d3
-# Parent 6dc827703bfb995b89b0da5b2e9eaffe3479ea45
-compat: pass memctx to memfilectx constructor on hg 4.5+
-
-diff --git a/hggit/git_handler.py b/hggit/git_handler.py
---- a/hggit/git_handler.py
-+++ b/hggit/git_handler.py
-@@ -985,16 +985,22 @@
- if copied:
- copied_path = copied[0]
-
-- try:
-- return context.memfilectx(self.repo, f, data,
-- islink='l' in e,
-- isexec='x' in e,
-- copied=copied_path)
-- except TypeError:
-- return context.memfilectx(f, data,
-- islink='l' in e,
-- isexec='x' in e,
-- copied=copied_path)
-+ # Different versions of mercurial have different parameters to
-+ # memfilectx. Try them from newest to oldest.
-+ args_to_try = (
-+ (self.repo, memctx, f, data), # hg 4.5+
-+ (self.repo, f, data), # hg 3.1 - 4.5
-+ (f, data), # hg < 3.1
-+ )
-+ for args in args_to_try:
-+ try:
-+ return context.memfilectx(*args,
-+ islink='l' in e,
-+ isexec='x' in e,
-+ copied=copied_path)
-+ except TypeError as ex:
-+ last_ex = ex
-+ raise last_ex
-
- p1, p2 = (nullid, nullid)
- octopus = False
diff --git a/dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memfilectx.patch b/dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memfilectx.patch
deleted file mode 100644
index 5c94617f881b..000000000000
--- a/dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memfilectx.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-# HG changeset patch
-# User Kevin Bullock <kbullock@ringworld.org>
-# Date 1517928348 21600
-# Node ID e326b349eba6b6ee57ac8df221727f79c313d04a
-# Parent 89303af1c4aa76b37e6d16f99f6279012eda7100
-compat: extract function for memfilectx signature variants
-
-diff --git a/hggit/compat.py b/hggit/compat.py
---- a/hggit/compat.py
-+++ b/hggit/compat.py
-@@ -1,4 +1,5 @@
- from mercurial import (
-+ context,
- url,
- util as hgutil,
- )
-@@ -96,6 +97,26 @@
- return refs, set(server_capabilities)
-
-
-+def memfilectx(repo, changectx, path, data, islink=False,
-+ isexec=False, copied=None):
-+ # Different versions of mercurial have different parameters to
-+ # memfilectx. Try them from newest to oldest.
-+ args_to_try = (
-+ (repo, changectx, path, data), # hg 4.5+
-+ (repo, path, data), # hg 3.1 - 4.5
-+ (path, data), # hg < 3.1
-+ )
-+ for args in args_to_try:
-+ try:
-+ return context.memfilectx(*args,
-+ islink=islink,
-+ isexec=isexec,
-+ copied=copied)
-+ except TypeError as ex:
-+ last_ex = ex
-+ raise last_ex
-+
-+
- CONFIG_DEFAULTS = {
- 'git': {
- 'authors': None,
-diff --git a/hggit/git_handler.py b/hggit/git_handler.py
---- a/hggit/git_handler.py
-+++ b/hggit/git_handler.py
-@@ -985,22 +985,10 @@
- if copied:
- copied_path = copied[0]
-
-- # Different versions of mercurial have different parameters to
-- # memfilectx. Try them from newest to oldest.
-- args_to_try = (
-- (self.repo, memctx, f, data), # hg 4.5+
-- (self.repo, f, data), # hg 3.1 - 4.5
-- (f, data), # hg < 3.1
-- )
-- for args in args_to_try:
-- try:
-- return context.memfilectx(*args,
-- islink='l' in e,
-- isexec='x' in e,
-- copied=copied_path)
-- except TypeError as ex:
-- last_ex = ex
-- raise last_ex
-+ return compat.memfilectx(self.repo, memctx, f, data,
-+ islink='l' in e,
-+ isexec='x' in e,
-+ copied=copied_path)
-
- p1, p2 = (nullid, nullid)
- octopus = False
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
+)