summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2015-11-26 08:30:57 +0000
committeragc <agc@pkgsrc.org>2015-11-26 08:30:57 +0000
commit7fd227f93fe301caa266638e0692b4eb6a672e92 (patch)
treee0d454268764a2b28f97619027ecc36284e0bc36 /devel
parent8f98c7208a35705a214a771baf4ef5977173b955 (diff)
downloadpkgsrc-7fd227f93fe301caa266638e0692b4eb6a672e92.tar.gz
Add git-remote-hg, a tool for bridging between git and mercurial, to the
packages collection. git-remote-hg allows you to transparently clone, fetch and push to and from Mercurial repositories as if they were Git ones.
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile3
-rw-r--r--devel/git-remote-hg/DESCR2
-rw-r--r--devel/git-remote-hg/Makefile28
-rw-r--r--devel/git-remote-hg/PLIST3
-rw-r--r--devel/git-remote-hg/distinfo7
-rw-r--r--devel/git-remote-hg/patches/patch-git-remote-hg51
6 files changed, 93 insertions, 1 deletions
diff --git a/devel/Makefile b/devel/Makefile
index a52c551b8a4..7bb3465c6ff 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2167 2015/11/16 17:36:47 leot Exp $
+# $NetBSD: Makefile,v 1.2168 2015/11/26 08:30:57 agc Exp $
#
COMMENT= Development utilities
@@ -259,6 +259,7 @@ SUBDIR+= git-base
SUBDIR+= git-contrib
SUBDIR+= git-docs
SUBDIR+= git-gitk
+SUBDIR+= git-remote-hg
SUBDIR+= git-svn
SUBDIR+= gitolite
SUBDIR+= glade
diff --git a/devel/git-remote-hg/DESCR b/devel/git-remote-hg/DESCR
new file mode 100644
index 00000000000..15bc385a073
--- /dev/null
+++ b/devel/git-remote-hg/DESCR
@@ -0,0 +1,2 @@
+git-remote-hg allows you to transparently clone, fetch and push to and
+from Mercurial repositories as if they were Git ones.
diff --git a/devel/git-remote-hg/Makefile b/devel/git-remote-hg/Makefile
new file mode 100644
index 00000000000..f4f45ff2ee2
--- /dev/null
+++ b/devel/git-remote-hg/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1 2015/11/26 08:30:57 agc Exp $
+
+DISTNAME= git-remote-hg-20140603
+CATEGORIES= devel scm
+MASTER_SITES= ${MASTER_SITE_GITHUB:=felipec/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://felipec.wordpress.com/2012/11/13/git-remote-hg-bzr-2/
+COMMENT= Bridge support in git for mercurial
+LICENSE= gnu-gpl-v2
+
+GITHUB_PROJECT= git-remote-hg
+GITHUB_TAG= aa528c9649bf0fd8031656f21679c380aedc6b82
+WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}
+
+BUILD_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc
+
+USE_TOOLS+= gmake
+MAKE_FLAGS+= prefix=${PREFIX}
+MAKE_FLAGS+= mandir=${PREFIX}/${PKGMANDIR}/man1
+REPLACE_PYTHON= git-remote-hg
+
+INSTALL_TARGET= install install-doc
+AUTO_MKDIRS= yes
+
+.include "../../devel/ncurses/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/git-remote-hg/PLIST b/devel/git-remote-hg/PLIST
new file mode 100644
index 00000000000..2d5299ae45b
--- /dev/null
+++ b/devel/git-remote-hg/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2015/11/26 08:30:57 agc Exp $
+bin/git-remote-hg
+man/man1/git-remote-hg.1
diff --git a/devel/git-remote-hg/distinfo b/devel/git-remote-hg/distinfo
new file mode 100644
index 00000000000..50839855a93
--- /dev/null
+++ b/devel/git-remote-hg/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2015/11/26 08:30:57 agc Exp $
+
+SHA1 (git-remote-hg-20140603-aa528c9649bf0fd8031656f21679c380aedc6b82.tar.gz) = 0fc098fe8135f08c9ab706a14ab29276c075870e
+RMD160 (git-remote-hg-20140603-aa528c9649bf0fd8031656f21679c380aedc6b82.tar.gz) = fd55ff36012d2a80d68d423f009bc5883fb6d3f1
+SHA512 (git-remote-hg-20140603-aa528c9649bf0fd8031656f21679c380aedc6b82.tar.gz) = ab86c2190d09a85acd47e83cd96d966ae6355b9ed9c33eae051adcda0317365ee1c52380d16f766455ebdcc4e341f31f767de90783343435a287ec0aaeaf957f
+Size (git-remote-hg-20140603-aa528c9649bf0fd8031656f21679c380aedc6b82.tar.gz) = 30835 bytes
+SHA1 (patch-git-remote-hg) = cc2b80d31c2f547cacdd43225f9bd7f4f42174f8
diff --git a/devel/git-remote-hg/patches/patch-git-remote-hg b/devel/git-remote-hg/patches/patch-git-remote-hg
new file mode 100644
index 00000000000..1937d579a82
--- /dev/null
+++ b/devel/git-remote-hg/patches/patch-git-remote-hg
@@ -0,0 +1,51 @@
+$NetBSD: patch-git-remote-hg,v 1.1 2015/11/26 08:30:57 agc Exp $
+
+Patch to fix a crash caused by incompatible changes in mercurial API,
+see:
+
+ https://github.com/felipec/git-remote-hg/issues/33
+
+and
+
+ https://github.com/felipec/git-remote-hg/pull/28/files
+
+--- git-remote-hg 2015/11/25 21:51:36 1.1
++++ git-remote-hg 2015/11/25 21:56:29
+@@ -430,7 +430,12 @@
+ peer = hg.peer(repo.ui, {}, url)
+ except:
+ die('Repository error')
+- repo.pull(peer, heads=None, force=True)
++
++ if check_version(3, 2):
++ from mercurial import exchange
++ exchange.pull(repo, peer, heads=None, force=True)
++ else:
++ repo.pull(peer, heads=None, force=True)
+
+ updatebookmarks(repo, peer)
+
+@@ -803,7 +808,11 @@
+ def getfilectx(repo, memctx, f):
+ of = files[f]
+ if 'deleted' in of:
+- raise IOError
++ # the file is not available anymore - was deleted
++ if check_version(3, 2):
++ return None
++ else:
++ raise IOError
+ if 'ctx' in of:
+ return of['ctx']
+ is_exec = of['mode'] == 'x'
+@@ -1036,7 +1045,9 @@
+ if not checkheads(repo, remote, p_revs):
+ return None
+
+- if check_version(3, 0):
++ if check_version(3, 2):
++ cg = changegroup.getchangegroup(repo, 'push', heads=list(p_revs), common=common)
++ elif check_version(3, 0):
+ cg = changegroup.getbundle(repo, 'push', heads=list(p_revs), common=common)
+ else:
+ cg = repo.getbundle('push', heads=list(p_revs), common=common)