* [gentoo-commits] repo/gentoo:master commit in: dev-vcs/hg-git/files/
@ 2019-01-08 8:29 Fabian Groffen
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Groffen @ 2019-01-08 8:29 UTC (permalink / raw
To: gentoo-commits
commit: cf99d7eb30f271ba41b457df92f33113a8c9c2dc
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 8 08:29:30 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jan 8 08:29:30 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf99d7eb
dev-vcs/hg-git: drop unused patches
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
.../hg-git/files/hg-git-0.8.10-hg45-memctx.patch | 43 -------------
.../files/hg-git-0.8.10-hg45-memfilectx.patch | 73 ----------------------
2 files changed, 116 deletions(-)
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 ff9d4d66d15..00000000000
--- 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 5c94617f881..00000000000
--- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-vcs/hg-git/files/
@ 2020-05-31 13:17 Fabian Groffen
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Groffen @ 2020-05-31 13:17 UTC (permalink / raw
To: gentoo-commits
commit: da19e604f1bf4146810681c32f06542be2fd4ceb
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun May 31 13:13:53 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun May 31 13:16:28 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da19e604
dev-vcs/hg-git: drop unused files
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
dev-vcs/hg-git/files/hg-git-0.8.12-hg-4.8.patch | 219 ------------------------
1 file changed, 219 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
deleted file mode 100644
index c456ce53c74..00000000000
--- a/dev-vcs/hg-git/files/hg-git-0.8.12-hg-4.8.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-31 13:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-08 8:29 [gentoo-commits] repo/gentoo:master commit in: dev-vcs/hg-git/files/ Fabian Groffen
-- strict thread matches above, loose matches on Subject: below --
2020-05-31 13:17 Fabian Groffen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox