Hello,

I would like to see this bug resolved too. I updated Jonathan McCrohan's
patch since it no longer applies (due to git-mediawiki changes, see attachment)
and it seems to work fine.

Thank you.
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/
diff -Nru git-1.8.5.3/debian/changelog git-1.8.5.3/debian/changelog
--- git-1.8.5.3/debian/changelog	2014-01-17 01:18:46.000000000 +0100
+++ git-1.8.5.3/debian/changelog	2014-01-24 13:50:03.000000000 +0100
@@ -1,3 +1,17 @@
+git (1:1.8.5.3-1hg1) UNRELEASED; urgency=medium
+
+  * add a git-hg package with hg remote helper (closes: #703864).
+    * debian/control: new package git-hg; Priority: extra; Depends: mercurial;
+      package git now Suggests and git-all Recommends: git-hg
+  * debian/git-remote-hg.txt: new; explain usage.
+  * debian/rules: process debian/git-remote-hg.txt with git's documentation
+    toolchain and install to /usr/share/man/man1/; munge
+    contrib/remote-helpers/git-remote-hg shebang line and install to
+    /usr/lib/git-core
+  * debian/git-doc.docs install git-remote-hg.html
+
+ -- Jonathan McCrohan <[email protected]>  Sat, 19 Oct 2013 00:47:35 +0100
+
 git (1:1.8.5.3-1) unstable; urgency=low
 
   * new upstream point release.
diff -Nru git-1.8.5.3/debian/control git-1.8.5.3/debian/control
--- git-1.8.5.3/debian/control	2014-01-17 01:18:46.000000000 +0100
+++ git-1.8.5.3/debian/control	2014-01-24 13:46:22.000000000 +0100
@@ -26,7 +26,7 @@
 Recommends: patch, less, rsync, ssh-client
 Suggests: gettext-base, git-daemon-run | git-daemon-sysvinit,
  git-doc, git-el, git-email, git-gui, gitk, gitweb,
- git-arch, git-bzr, git-cvs, git-mediawiki, git-svn
+ git-arch, git-bzr, git-cvs, git-hg, git-mediawiki, git-svn
 Replaces: gitweb (<< 1:1.7.4~rc1),
  git-core (<< 1:1.7.0.4-1.)
 Breaks: bash-completion (<< 1:1.90-1), gitweb (<< 1:1.7.4~rc1),
@@ -173,6 +173,25 @@
  incorrect results. For reliable, one-shot imports, cvs2git from the
  cvs2svn package or parsecvs may be a better fit.
 
+Package: git-hg
+Architecture: all
+Multi-Arch: foreign
+Depends: git (>> ${source:Upstream-Version}), git (<< ${source:Upstream-Version}-.), python, mercurial
+Suggests: git-doc, mercurial
+Description: fast, scalable, distributed revision control system (hg interoperability)
+ Git is a popular version control system designed to handle very large         
+ projects with speed and efficiency; it is used for many high profile          
+ open source projects, most notably the Linux kernel.                          
+ .                                                                             
+ Git falls in the category of distributed source code management tools.        
+ Every Git working directory is a full-fledged repository with full            
+ revision tracking capabilities, not dependent on network access or a          
+ central server.                                                               
+ .                                                                             
+ This package provides the hg remote helper, which allows Git to              
+ read from and write to Mercurial repositories as though they were remote         
+ Git repositories. 
+
 Package: git-svn
 Architecture: all
 Multi-Arch: foreign
@@ -381,7 +400,7 @@
 Depends: git (>> ${source:Upstream-Version}), git (<< ${source:Upstream-Version}-.),
  git-doc, git-el, git-arch, git-cvs, git-mediawiki, git-svn,
  git-email, git-gui, gitk, gitweb
-Recommends: git-bzr, git-daemon-run | git-daemon-sysvinit
+Recommends: git-bzr, git-hg, git-daemon-run | git-daemon-sysvinit
 Description: fast, scalable, distributed revision control system (all subpackages)
  Git is popular version control system designed to handle very large
  projects with speed and efficiency; it is used for many high profile
diff -Nru git-1.8.5.3/debian/git-doc.docs git-1.8.5.3/debian/git-doc.docs
--- git-1.8.5.3/debian/git-doc.docs	2014-01-17 01:18:46.000000000 +0100
+++ git-1.8.5.3/debian/git-doc.docs	2014-01-24 13:44:37.000000000 +0100
@@ -1,3 +1,4 @@
 tmp/html/*
 debian/git-remote-bzr.html
+debian/git-remote-hg.html
 Documentation/technical
diff -Nru git-1.8.5.3/debian/git-hg.postinst git-1.8.5.3/debian/git-hg.postinst
--- git-1.8.5.3/debian/git-hg.postinst	1970-01-01 01:00:00.000000000 +0100
+++ git-1.8.5.3/debian/git-hg.postinst	2014-01-24 13:44:37.000000000 +0100
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+cmd=git-remote-hg
+update-alternatives --install \
+  /usr/bin/$cmd $cmd /usr/lib/git-core/$cmd--git 50 \
+  --slave /usr/share/man/man1/$cmd.1.gz $cmd.1.gz \
+          /usr/share/man/man1/$cmd--git.1.gz
diff -Nru git-1.8.5.3/debian/git-hg.prerm git-1.8.5.3/debian/git-hg.prerm
--- git-1.8.5.3/debian/git-hg.prerm	1970-01-01 01:00:00.000000000 +0100
+++ git-1.8.5.3/debian/git-hg.prerm	2014-01-24 13:44:37.000000000 +0100
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+test "$1" != upgrade || exit 0
+
+cmd=git-remote-hg
+update-alternatives --remove $cmd /usr/lib/git-core/$cmd--git
diff -Nru git-1.8.5.3/debian/git-hg.README.Debian git-1.8.5.3/debian/git-hg.README.Debian
--- git-1.8.5.3/debian/git-hg.README.Debian	1970-01-01 01:00:00.000000000 +0100
+++ git-1.8.5.3/debian/git-hg.README.Debian	2014-01-24 13:44:37.000000000 +0100
@@ -0,0 +1,27 @@
+git-remote-hg for Debian
+-------------------------
+
+See the git-remote-hg(1) man page for documentation.
+
+Multiple packages include hg remote helpers that allow Git to access
+a Bazaar repository as though it were a remote Git repository.
+
+The default handler of hg:// and hg:: URLs is set using the
+alternatives system:
+
+	# update-alternatives --config git-remote-hg
+
+Users without root access can override that default for their own
+usage by installing a symbolic link git-remote-hg ->
+/usr/lib/git-core/git-remote-hg--git to their $PATH.
+
+To request Git's hg remote helper for an individual request, use a
+"hg--git::" in the URL instead of "hg::".  For example:
+
+	git clone hg--git::$HOME/myrepo
+
+or
+
+	git clone hg--git::http://host.xz/path/to/hg/tip
+
+ -- Jonathan McCrohan <[email protected]>  Fri, 18 Oct 2013 23:48:34 +0100
diff -Nru git-1.8.5.3/debian/git-remote-hg.txt git-1.8.5.3/debian/git-remote-hg.txt
--- git-1.8.5.3/debian/git-remote-hg.txt	1970-01-01 01:00:00.000000000 +0100
+++ git-1.8.5.3/debian/git-remote-hg.txt	2014-01-24 13:44:37.000000000 +0100
@@ -0,0 +1,36 @@
+git-remote-hg(1)
+=================
+
+NAME
+----
+git-remote-hg - Fetch from or push to a Mercurial repository
+
+SYNOPSIS
+--------
+'git clone' hg::/path/to/hg/repo/or/url
+
+DESCRIPTION
+-----------
+
+This remote helper allows commands like 'git fetch' and 'git push'
+to access a repository that was created using the *hg*(1) tool.
+
+Any URL that Mercurial supports can be used by preceding it with
+"hg::".  For example:
+
+- hg::ssh://host.xz/path/to/hg/tip - Bi-directional Mercurial over SSH
+- hg::http://host.xz/path/to/hg/tip - Uni-directional Mercurial over HTTP
+- hg::https://host.xz/path/to/hg/tip - Uni-directional Mercurial over HTTPS
+- hg::/path/to/hg/tip - local filesystem
+
+DEPENDENCIES
+------------
+mercurial (the Mercurial Python library)
+
+SEE ALSO
+--------
+linkgit:git-fetch[1], *hg*(1), linkgit:gitremote-helpers[1]
+
+GIT
+---
+Part of the linkgit:git[1] suite
diff -Nru git-1.8.5.3/debian/rules git-1.8.5.3/debian/rules
--- git-1.8.5.3/debian/rules	2014-01-17 01:18:46.000000000 +0100
+++ git-1.8.5.3/debian/rules	2014-01-24 13:48:22.000000000 +0100
@@ -37,6 +37,7 @@
 PKG_INDEP += git-arch
 PKG_INDEP += git-bzr
 PKG_INDEP += git-cvs
+PKG_INDEP += git-hg
 PKG_INDEP += git-svn
 PKG_INDEP += git-mediawiki
 PKG_INDEP += git-daemon-run
@@ -90,6 +91,21 @@
 	    $(MAKE) -C t $(OPTS) $(CURDIR)/debian/test-bzr.sh || \
 	  PATH=$(CURDIR)/debian:$(PATH) GIT_TEST_OPTS=--verbose \
 	    $(MAKE) -C t $(OPTS) $(CURDIR)/debian/test-bzr.sh
+	# git-hg
+	$(MAKE) -CDocumentation $(DOC_OPTS) \
+	  MAN_TXT=../debian/git-remote-hg.txt \
+	  ../debian/git-remote-hg.1 \
+	  ../debian/git-remote-hg.html
+	sed -e 's,/usr/bin/env python,/usr/bin/python,' \
+	  contrib/remote-helpers/git-remote-hg >debian/git-remote-hg
+	sed -e 's/test_have_prereq PYTHON/true/' \
+	  contrib/remote-helpers/test-hg.sh >debian/test-hg.sh
+	chmod +x debian/git-remote-hg debian/test-hg.sh
+	test -z '$(TEST)' || \
+	  PATH=$(CURDIR)/debian:$(PATH) \
+	    $(MAKE) -C t $(OPTS) $(CURDIR)/debian/test-hg.sh || \
+	  PATH=$(CURDIR)/debian:$(PATH) GIT_TEST_OPTS=--verbose \
+	    $(MAKE) -C t $(OPTS) $(CURDIR)/debian/test-hg.sh
 	# git-mediawiki
 	$(MAKE) -Ccontrib/mw-to-git all $(OPTS)
 	touch build-indep-stamp
@@ -98,6 +114,9 @@
 	rm -f debian/git-remote-bzr debian/test-bzr.sh
 	rm -f debian/git-remote-bzr.xml debian/git-remote-bzr.html
 	rm -f Documentation/git-remote-bzr.1
+	rm -f debian/git-remote-hg debian/test-hg.sh
+	rm -f debian/git-remote-hg.xml debian/git-remote-hg.html
+	rm -f Documentation/git-remote-hg.1
 	$(MAKE) clean $(OPTS)
 	! test -e patch-stamp || \
 	{ \
@@ -332,6 +351,15 @@
 	gzip -9 '$(GIT)'-gui/usr/share/man/man1/*.1
 	install -d -m0755 '$(GIT)'-gui/usr/share/git-gui
 	cp -a '$(TMP)'/usr/share/git-gui/lib '$(GIT)'-gui/usr/share/git-gui/
+	# git-hg
+	rm -rf '$(GIT)'-hg
+	install -d -m0755 '$(GIT)'-hg/usr/lib/git-core
+	install -m0755 debian/git-remote-hg \
+	  '$(GIT)'-hg/usr/lib/git-core/git-remote-hg--git
+	install -d -m0755 '$(GIT)'-hg/usr/share/man/man1
+	install -m0644 Documentation/git-remote-hg.1 \
+	  '$(GIT)'-hg/usr/share/man/man1/git-remote-hg--git.1
+	gzip -9 '$(GIT)'-hg/usr/share/man/man1/*.1
 	# gitk
 	rm -rf '$(GIT)'k
 	install -d -m0755 '$(GIT)'k/usr/bin

Reply via email to