diff options
Diffstat (limited to 'dev-vcs/hg-git')
-rw-r--r-- | dev-vcs/hg-git/Manifest | 3 | ||||
-rw-r--r-- | dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memctx.patch | 43 | ||||
-rw-r--r-- | dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memfilectx.patch | 73 | ||||
-rw-r--r-- | dev-vcs/hg-git/hg-git-0.8.10-r1.ebuild | 29 |
4 files changed, 148 insertions, 0 deletions
diff --git a/dev-vcs/hg-git/Manifest b/dev-vcs/hg-git/Manifest index 70f0f30d1653..4a8fe8e37e05 100644 --- a/dev-vcs/hg-git/Manifest +++ b/dev-vcs/hg-git/Manifest @@ -1,5 +1,8 @@ +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 DIST hg-git-0.8.10.tar.gz 116019 BLAKE2B 425a066864051f03e3a3305e74a5920055a7f4c79826711c567a59fcb32171db3ca732ba3bb61edac4ac9847fff897cca4fe0d02e65f69e7b0f0440fa2f32cf4 SHA512 ea6de91114005d38568eae1fa5f38aafe73c472c480496ea05b4472c1d8fbc89e76c9bb34eef2641b89e6d0c3f2a9a187d844687214f5599d0b4d0f6b7928c32 DIST hg-git-0.8.8.tar.gz 98508 BLAKE2B e7636c3809b2be8a7fcce44a72f89f39927a282c34384047036470fc832b34be1922de75a2a9b468ec125ea716263333f5f58e6a0c7de12729b7dd18c68b657a SHA512 c3b28273024f2429ed526354048f0e37d0af6be591020fa3b1e8d1321247d72129f7c8fbcef73e69d60e243a6f86380dc4d89f0e8f913b786ef4497421237aac +EBUILD hg-git-0.8.10-r1.ebuild 803 BLAKE2B 7694672e47f10d06aedae961061358d504bd795efa9ca8dfae7e0b9b6c82090b2650b10a0fb4fedef25d4d54433d5fb6e24cd09a1b0f4ec0c7dcc548a8f20658 SHA512 e967dfc35f7f78613ec036a43bb39b368475a80f452434a06b10054410377820437f518659478a1409cd492e3b83009f810d24006f8c459eb4f03b0932ac08a7 EBUILD hg-git-0.8.10.ebuild 710 BLAKE2B f25d6c95473260e35cbf9de15438bee4ddd3bfbe11cbdc7ad92107a37b422425dc2416fc4a1a0a98ad0d4c0c0a11a2cf5a0d5e259d89232a30920d8d29d1f50a SHA512 6c2dc7d32d9e2c1473cf139d663c864739c563918765006bf32e2b778aa3db1dcd317faf3053b95c7bb34542536dc90813eb4bbcfc83569e5dab1907e10f7e7d EBUILD hg-git-0.8.8.ebuild 701 BLAKE2B f2e08830007b605d2a9f0e9eab8e3744445f8bb2d35759d5381a194f5a829cec4470e76bd4f87d86568d19ecf13c2d5dfdef46a20f3fb3ac52fa529e3de423e2 SHA512 021f0208a2ffbf06f32cb3fbbff682015d5c7a4ca56577eb87ced69eaec176b3bd9ac746f2c5c40bd1edbf84cd839127785c4769b0df2aa35e14266f7ac85ebf 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 new file mode 100644 index 000000000000..ff9d4d66d15f --- /dev/null +++ b/dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memctx.patch @@ -0,0 +1,43 @@ +# 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 new file mode 100644 index 000000000000..5c94617f881b --- /dev/null +++ b/dev-vcs/hg-git/files/hg-git-0.8.10-hg45-memfilectx.patch @@ -0,0 +1,73 @@ +# 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/hg-git-0.8.10-r1.ebuild b/dev-vcs/hg-git/hg-git-0.8.10-r1.ebuild new file mode 100644 index 000000000000..265c21099139 --- /dev/null +++ b/dev-vcs/hg-git/hg-git-0.8.10-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +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.python.org/pypi/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}-hg45-memctx.patch + "${FILESDIR}"/${P}-hg45-memfilectx.patch +) |