1 |
commit: a6b4a73378a8051adb9bc3a7da7d62412f573139 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 8 08:28:32 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 8 08:28:32 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6b4a733 |
7 |
|
8 |
dev-vcs/hg-git: revbump for hg-4.8 support |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
dev-vcs/hg-git/files/hg-git-0.8.12-hg-4.8.patch | 219 ++++++++++++++++++++++++ |
14 |
dev-vcs/hg-git/hg-git-0.8.12-r1.ebuild | 28 +++ |
15 |
2 files changed, 247 insertions(+) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..c456ce53c74 |
20 |
--- /dev/null |
21 |
+++ b/dev-vcs/hg-git/files/hg-git-0.8.12-hg-4.8.patch |
22 |
@@ -0,0 +1,219 @@ |
23 |
+https://bitbucket.org/durin42/hg-git/commits/ae6b1ba7482963bc9de51f299891e99005794e4e/raw |
24 |
+https://bitbucket.org/durin42/hg-git/commits/143b7511eadbea7507d847c805241a6db290ffe7/raw |
25 |
+https://bitbucket.org/durin42/hg-git/commits/8d00fde45adbc6c3c0ccab8e362b5f5c36c171e6/raw |
26 |
+ |
27 |
+# HG changeset patch |
28 |
+# User Alain Leufroy |
29 |
+# Date 1541695757 -3600 |
30 |
+# Node ID ae6b1ba7482963bc9de51f299891e99005794e4e |
31 |
+# Parent 6ae26ba7b928019e48dd1c73358c18d6dd2d86f3 |
32 |
+compat: fix for hg 4.8 |
33 |
+ |
34 |
+089fc0db0954 introduced a new `createopts` parameter. |
35 |
+ |
36 |
+`hggit` does not support repository creation, so we can just ignore |
37 |
+it. |
38 |
+ |
39 |
+diff --git a/hggit/gitrepo.py b/hggit/gitrepo.py |
40 |
+--- a/hggit/gitrepo.py |
41 |
++++ b/hggit/gitrepo.py |
42 |
+@@ -13,7 +13,7 @@ |
43 |
+ |
44 |
+ |
45 |
+ class gitrepo(peerrepository): |
46 |
+- def __init__(self, ui, path, create, intents=None): |
47 |
++ def __init__(self, ui, path, create, intents=None, **kwargs): |
48 |
+ if create: # pragma: no cover |
49 |
+ raise error.Abort('Cannot create a git repository.') |
50 |
+ self._ui = ui |
51 |
+ |
52 |
+# HG changeset patch |
53 |
+# User Kevin Bullock <kbullock@×××××××××.org> |
54 |
+# Date 1543713965 21600 |
55 |
+# Node ID 143b7511eadbea7507d847c805241a6db290ffe7 |
56 |
+# Parent ae6b1ba7482963bc9de51f299891e99005794e4e |
57 |
+compat: glob some verify output that changed in hg 4.8 |
58 |
+ |
59 |
+diff --git a/tests/test-push-r.t b/tests/test-push-r.t |
60 |
+--- a/tests/test-push-r.t |
61 |
++++ b/tests/test-push-r.t |
62 |
+@@ -64,7 +64,7 @@ |
63 |
+ checking manifests |
64 |
+ crosschecking files in changesets and manifests |
65 |
+ checking files |
66 |
+- 1 files, 1 changesets, 1 total revisions |
67 |
++ *1 changesets* (glob) |
68 |
+ pushing to test-1 |
69 |
+ searching for changes |
70 |
+ adding changesets |
71 |
+@@ -75,7 +75,7 @@ |
72 |
+ checking manifests |
73 |
+ crosschecking files in changesets and manifests |
74 |
+ checking files |
75 |
+- 1 files, 2 changesets, 2 total revisions |
76 |
++ *2 changesets* (glob) |
77 |
+ pushing to test-2 |
78 |
+ searching for changes |
79 |
+ adding changesets |
80 |
+@@ -86,7 +86,7 @@ |
81 |
+ checking manifests |
82 |
+ crosschecking files in changesets and manifests |
83 |
+ checking files |
84 |
+- 1 files, 3 changesets, 3 total revisions |
85 |
++ *3 changesets* (glob) |
86 |
+ pushing to test-3 |
87 |
+ searching for changes |
88 |
+ adding changesets |
89 |
+@@ -97,7 +97,7 @@ |
90 |
+ checking manifests |
91 |
+ crosschecking files in changesets and manifests |
92 |
+ checking files |
93 |
+- 1 files, 4 changesets, 4 total revisions |
94 |
++ *4 changesets* (glob) |
95 |
+ pushing to test-4 |
96 |
+ searching for changes |
97 |
+ adding changesets |
98 |
+@@ -108,7 +108,7 @@ |
99 |
+ checking manifests |
100 |
+ crosschecking files in changesets and manifests |
101 |
+ checking files |
102 |
+- 1 files, 2 changesets, 2 total revisions |
103 |
++ *2 changesets* (glob) |
104 |
+ pushing to test-5 |
105 |
+ searching for changes |
106 |
+ adding changesets |
107 |
+@@ -119,7 +119,7 @@ |
108 |
+ checking manifests |
109 |
+ crosschecking files in changesets and manifests |
110 |
+ checking files |
111 |
+- 1 files, 3 changesets, 3 total revisions |
112 |
++ *3 changesets* (glob) |
113 |
+ pushing to test-6 |
114 |
+ searching for changes |
115 |
+ adding changesets |
116 |
+@@ -130,7 +130,7 @@ |
117 |
+ checking manifests |
118 |
+ crosschecking files in changesets and manifests |
119 |
+ checking files |
120 |
+- 2 files, 4 changesets, 5 total revisions |
121 |
++ *4 changesets* (glob) |
122 |
+ pushing to test-7 |
123 |
+ searching for changes |
124 |
+ adding changesets |
125 |
+@@ -141,7 +141,7 @@ |
126 |
+ checking manifests |
127 |
+ crosschecking files in changesets and manifests |
128 |
+ checking files |
129 |
+- 3 files, 5 changesets, 6 total revisions |
130 |
++ *5 changesets* (glob) |
131 |
+ pushing to test-8 |
132 |
+ searching for changes |
133 |
+ adding changesets |
134 |
+@@ -152,7 +152,7 @@ |
135 |
+ checking manifests |
136 |
+ crosschecking files in changesets and manifests |
137 |
+ checking files |
138 |
+- 2 files, 5 changesets, 5 total revisions |
139 |
++ *5 changesets* (glob) |
140 |
+ $ cd test-8 |
141 |
+ $ hg pull ../test-7 |
142 |
+ pulling from ../test-7 |
143 |
+@@ -168,4 +168,4 @@ |
144 |
+ checking manifests |
145 |
+ crosschecking files in changesets and manifests |
146 |
+ checking files |
147 |
+- 4 files, 9 changesets, 7 total revisions |
148 |
++ *9 changesets* (glob) |
149 |
+ |
150 |
+# HG changeset patch |
151 |
+# User Kevin Bullock <kbullock@×××××××××.org> |
152 |
+# Date 1543713996 21600 |
153 |
+# Node ID 8d00fde45adbc6c3c0ccab8e362b5f5c36c171e6 |
154 |
+# Parent 143b7511eadbea7507d847c805241a6db290ffe7 |
155 |
+compat: update how we register gitnode template keyword |
156 |
+ |
157 |
+diff --git a/hggit/__init__.py b/hggit/__init__.py |
158 |
+--- a/hggit/__init__.py |
159 |
++++ b/hggit/__init__.py |
160 |
+@@ -94,9 +94,11 @@ |
161 |
+ command = registrar.command(cmdtable) |
162 |
+ configitem = registrar.configitem(configtable) |
163 |
+ compat.registerconfigs(configitem) |
164 |
++ templatekeyword = registrar.templatekeyword() |
165 |
+ |
166 |
+ except (ImportError, AttributeError): |
167 |
+ command = cmdutil.command(cmdtable) |
168 |
++ templatekeyword = compat.templatekeyword() |
169 |
+ |
170 |
+ # support for `hg clone git://github.com/defunkt/facebox.git` |
171 |
+ # also hg clone git+ssh://git@××××××.com/schacon/simplegit.git |
172 |
+@@ -207,7 +209,6 @@ |
173 |
+ |
174 |
+ |
175 |
+ def extsetup(ui): |
176 |
+- templatekw.keywords.update({'gitnode': gitnodekw}) |
177 |
+ revset.symbols.update({ |
178 |
+ 'fromgit': revset_fromgit, 'gitnode': revset_gitnode |
179 |
+ }) |
180 |
+@@ -455,12 +456,30 @@ |
181 |
+ raise LookupError(rev, git.map_file, _('ambiguous identifier')) |
182 |
+ |
183 |
+ |
184 |
+-def gitnodekw(**args): |
185 |
+- """:gitnode: String. The Git changeset identification hash, as a 40 hexadecimal |
186 |
+-digit string.""" |
187 |
+- node = args['ctx'] |
188 |
+- repo = args['repo'] |
189 |
++def _gitnodekw(node, repo): |
190 |
+ gitnode = repo.githandler.map_git_get(node.hex()) |
191 |
+ if gitnode is None: |
192 |
+ gitnode = '' |
193 |
+ return gitnode |
194 |
++ |
195 |
++ |
196 |
++if (hgutil.safehasattr(templatekw, 'templatekeyword') and |
197 |
++ hgutil.safehasattr(templatekw.templatekeyword._table['node'], |
198 |
++ '_requires')): |
199 |
++ @templatekeyword('gitnode', requires={'ctx', 'repo'}) |
200 |
++ def gitnodekw(context, mapping): |
201 |
++ """:gitnode: String. The Git changeset identification hash, as a |
202 |
++ 40 hexadecimal digit string.""" |
203 |
++ node = context.resource(mapping, 'ctx') |
204 |
++ repo = context.resource(mapping, 'repo') |
205 |
++ return _gitnodekw(node, repo) |
206 |
++ |
207 |
++else: |
208 |
++ # COMPAT: hg < 4.6 - templatekeyword API changed |
209 |
++ @templatekeyword('gitnode') |
210 |
++ def gitnodekw(**args): |
211 |
++ """:gitnode: String. The Git changeset identification hash, as a |
212 |
++ 40 hexadecimal digit string.""" |
213 |
++ node = args['ctx'] |
214 |
++ repo = args['repo'] |
215 |
++ return _gitnodekw(node, repo) |
216 |
+diff --git a/hggit/compat.py b/hggit/compat.py |
217 |
+--- a/hggit/compat.py |
218 |
++++ b/hggit/compat.py |
219 |
+@@ -2,6 +2,7 @@ |
220 |
+ bookmarks, |
221 |
+ context, |
222 |
+ phases, |
223 |
++ templatekw, |
224 |
+ url, |
225 |
+ util as hgutil, |
226 |
+ ) |
227 |
+@@ -192,3 +193,14 @@ |
228 |
+ if hasconfigitems: |
229 |
+ return getconfig(section, item) |
230 |
+ return getconfig(section, item, CONFIG_DEFAULTS[section][item]) |
231 |
++ |
232 |
++ |
233 |
++class templatekeyword(object): |
234 |
++ def __init__(self): |
235 |
++ self._table = {} |
236 |
++ |
237 |
++ def __call__(self, name): |
238 |
++ def decorate(func): |
239 |
++ templatekw.keywords.update({name: func}) |
240 |
++ return func |
241 |
++ return decorate |
242 |
|
243 |
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 |
244 |
new file mode 100644 |
245 |
index 00000000000..e5711f08ff4 |
246 |
--- /dev/null |
247 |
+++ b/dev-vcs/hg-git/hg-git-0.8.12-r1.ebuild |
248 |
@@ -0,0 +1,28 @@ |
249 |
+# Copyright 1999-2019 Gentoo Authors |
250 |
+# Distributed under the terms of the GNU General Public License v2 |
251 |
+ |
252 |
+EAPI="7" |
253 |
+PYTHON_COMPAT=( python2_7 ) |
254 |
+ |
255 |
+inherit distutils-r1 |
256 |
+ |
257 |
+DESCRIPTION="push to and pull from a Git repository using Mercurial" |
258 |
+HOMEPAGE="http://hg-git.github.io https://pypi.org/project/hg-git/" |
259 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
260 |
+ |
261 |
+LICENSE="GPL-2" |
262 |
+SLOT="0" |
263 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
264 |
+IUSE="" |
265 |
+ |
266 |
+RDEPEND=" |
267 |
+ >=dev-vcs/mercurial-2.8.2[${PYTHON_USEDEP}] |
268 |
+ >=dev-python/dulwich-0.9.7[${PYTHON_USEDEP}] |
269 |
+" |
270 |
+DEPEND="${RDEPEND} |
271 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
272 |
+" |
273 |
+ |
274 |
+PATCHES=( |
275 |
+ "${FILESDIR}"/${P}-hg-4.8.patch |
276 |
+) |