<pre style='margin:0'>
Dan Villiom Podlaski Christiansen (danchr) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/486436d8acf7bc35630642df7706cd5af5c5aee0">https://github.com/macports/macports-ports/commit/486436d8acf7bc35630642df7706cd5af5c5aee0</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 486436d8acf7bc35630642df7706cd5af5c5aee0
</span>Author: Dan Villiom Podlaski Christiansen <danchr@macports.org>
AuthorDate: Fri May 7 18:27:57 2021 +0200
<span style='display:block; white-space:pre;color:#404040;'> hg-git: add backport of patch for mercurial 5.8
</span>---
devel/hg-git/Portfile | 10 ++-
devel/hg-git/files/patch-mercurial58.diff | 130 ++++++++++++++++++++++++++++++
2 files changed, 138 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/hg-git/Portfile b/devel/hg-git/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index bf23589cc66..b41c381f651 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/hg-git/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/hg-git/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,7 +5,7 @@ PortGroup python 1.0
</span>
name hg-git
version 0.10.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span>
categories devel
license GPL-2
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -27,11 +27,17 @@ checksums rmd160 0761909e050e4d03d63c1ff41b8bbac2daae5272 \
</span>
python.default_version 39
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://foss.heptapod.net/mercurial/hg-git/-/merge_requests/100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patch.pre_args -p1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-mercurial58.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> depends_lib-append port:mercurial port:py${python.version}-dulwich
# workaround for https://foss.heptapod.net/mercurial/hg-git/-/issues/326
depends_lib-append port:py${python.version}-brotli
<span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_test-append port:git
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> notes "
To enable hggit, add the following to your ~/.hgrc:
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -40,5 +46,5 @@ hggit =
</span> "
test {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system -W ${worksrcpath} "${python.bin} ./tests/run-tests.py -v -j ${build.jobs}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${worksrcpath} "${python.bin} ./tests/run-tests.py -j ${build.jobs}"
</span> }
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/hg-git/files/patch-mercurial58.diff b/devel/hg-git/files/patch-mercurial58.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..31aade60200
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/hg-git/files/patch-mercurial58.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,130 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# HG changeset patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Date 1620205158 -7200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Wed May 05 10:59:18 2021 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Branch 0.10.x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Node ID bedf9b77f0bec57e0bdb9cb6344c8cb2df954c0e
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Parent cc4f3340afc9b6cb859b9737b4b782fff08f9d56
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# EXP-Topic hg58-0.10.x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compat: add support for mercurial 5.8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/hggit/__init__.py b/hggit/__init__.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/hggit/__init__.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/hggit/__init__.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -127,7 +127,6 @@ from mercurial import (
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exchange,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extensions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ hg,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ui as hgui,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ util as hgutil,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ localrepo,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ manifest,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -200,7 +199,7 @@ def _isgitdir(path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def _local(path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- p = hgutil.url(path).localpath()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p = compat.url(path).localpath()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if _isgitdir(p):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return gitrepo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # detect git ssh urls (which mercurial thinks is a file-like path)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -520,9 +519,15 @@ def isvalidlocalpath(orig, self, path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return orig(self, path) or _isgitdir(path)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if (hgutil.safehasattr(hgui, b'path') and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- hgutil.safehasattr(hgui.path, b'_isvalidlocalpath')):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- extensions.wrapfunction(hgui.path, b'_isvalidlocalpath', isvalidlocalpath)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extensions.wrapfunction(compat.path, b'_isvalidlocalpath', isvalidlocalpath)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++def isurllocal(orig, path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # recognise git scp-style paths when cloning
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return orig(path) and not util.isgitsshuri(path._origpath)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extensions.wrapfunction(compat.url, b'islocal', isurllocal)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def islocal(orig, path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -538,7 +543,7 @@ def hasscheme(orig, path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return orig(path) or util.isgitsshuri(path)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extensions.wrapfunction(hgutil, b'hasscheme', hasscheme)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extensions.wrapfunction(compat.urlutil, b'hasscheme', hasscheme)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @util.transform_notgit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/hggit/compat.py b/hggit/compat.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/hggit/compat.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/hggit/compat.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -49,6 +49,17 @@ except ImportError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ itervalues = lambda x: x.itervalues()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # added in 5.8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ from mercurial.utils import urlutil
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ url = urlutil.url
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ path = urlutil.path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++except ImportError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ urlutil = hgutil
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ url = hgutil.url
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ path = ui.path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from mercurial.cmdutil import check_at_most_one_arg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except (ImportError, AttributeError):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # added in 5.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/hggit/git_handler.py b/hggit/git_handler.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/hggit/git_handler.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/hggit/git_handler.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1860,7 +1860,7 @@ class GitHandler(object):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # not available in dulwich 0.19, used on Python 2.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if hasattr(client, 'get_credentials_from_store'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- urlobj = hgutil.url(uri)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ urlobj = compat.url(uri)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ auth = client.get_credentials_from_store(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ urlobj.scheme,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ urlobj.host,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1894,7 +1894,7 @@ class GitHandler(object):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if uri.startswith(b'file://'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return client.LocalGitClient(), hgutil.url(uri).path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return client.LocalGitClient(), compat.url(uri).path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # if its not git or git+ssh, try a local url..
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return client.SubprocessGitClient(), uri
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/hggit/gitrepo.py b/hggit/gitrepo.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/hggit/gitrepo.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/hggit/gitrepo.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -3,7 +3,6 @@ from __future__ import absolute_import,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from .util import isgitsshuri
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from mercurial import (
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- util
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from . import compat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -158,5 +157,5 @@ def islocal(path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if isgitsshuri(path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- u = util.url(path)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ u = compat.url(path)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return not u.scheme or u.scheme == b'file'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/tests/test-networking.t b/tests/test-networking.t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/tests/test-networking.t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/tests/test-networking.t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -88,6 +88,8 @@ So, that went well; now push...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $ hg add thefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $ fn_hg_commit -m 'add the file'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $ hg book -r tip master
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $ hg path default
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ git@git-server:/srv/repo.git
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $ hg push
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Warning: Permanently added * (glob) (?)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pushing to git@git-server:/srv/repo.git
</span></pre><pre style='margin:0'>
</pre>