tags 703864 + patch thanks Hi Jonathan,
On 25/03/13 02:05, Jonathan Nieder wrote: > Paul Wise wrote: >> Please move these two files to the correct path and give them execute >> permissions so that git clone hg::... and git clone bzr::... work out of >> the box. For now I've enabled them via a wrapper script in $PATH. >> >> /usr/share/doc/git/contrib/remote-helpers/git-remote-bzr >> /usr/share/doc/git/contrib/remote-helpers/git-remote-hg > > Thanks for filing this. Upstream doesn't include documentation or > installation rules for these, so splitting into two bugs to track work > on each separately. Please consider applying the attached patch to the next git upload. It adds git-remote-hg support to git through the use of a git-hg package. I tried to follow the style of the recent git-bzr package; feel free to make any changes as required. Thanks, Jon
From 64e81b12b3fcce2926019c08b6aeaf830a527da2 Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan <jmccro...@gmail.com> Date: Wed, 16 Oct 2013 01:09:00 +0100 Subject: [PATCH] Add git-remote-hg support though git-hg package Signed-off-by: Jonathan McCrohan <jmccro...@gmail.com> --- debian/changelog | 14 ++++++++++++++ debian/control | 23 +++++++++++++++++++++-- debian/git-doc.docs | 1 + debian/git-remote-hg.txt | 36 ++++++++++++++++++++++++++++++++++++ debian/rules | 28 +++++++++++++++++++++++++++- 5 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 debian/git-remote-hg.txt diff --git a/debian/changelog b/debian/changelog index f78b6ec..3a2bcbc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +git (1:1.8.4-2) UNRELEASED; urgency=low + + * 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 <jmccro...@gmail.com> Wed, 16 Oct 2013 01:06:36 +0100 + git (1:1.8.4-1.1) experimental; urgency=low * debian/control: Build-Depends tcl instead of tcl8.5. diff --git a/debian/control b/debian/control index 75c4359..36d10e6 100644 --- a/debian/control +++ b/debian/control @@ -26,7 +26,7 @@ Depends: ${shlibs:Depends}, perl-modules, liberror-perl, 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-svn + git-arch, git-bzr, git-cvs, git-hg, 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), @@ -172,6 +172,25 @@ Description: fast, scalable, distributed revision control system (cvs interopera 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 @@ -358,7 +377,7 @@ Architecture: all Multi-Arch: foreign Depends: git (>> ${source:Upstream-Version}), git (<< ${source:Upstream-Version}-.), git-doc, git-el, git-arch, git-cvs, 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 --git a/debian/git-doc.docs b/debian/git-doc.docs index 4caccf4..6ef3d46 100644 --- a/debian/git-doc.docs +++ b/debian/git-doc.docs @@ -1,3 +1,4 @@ tmp/html/* debian/git-remote-bzr.html +debian/git-remote-hg.html Documentation/technical diff --git a/debian/git-remote-hg.txt b/debian/git-remote-hg.txt new file mode 100644 index 0000000..d9d0157 --- /dev/null +++ b/debian/git-remote-hg.txt @@ -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/trunk - 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 --git a/debian/rules b/debian/rules index 4cdd764..4d4dca3 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,6 @@ CPPFLAGS :=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS :=-Wall $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) LDFLAGS :=$(shell dpkg-buildflags --get LDFLAGS) STRIP =strip -TEST =test OPTS =NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core \ mandir=/usr/share/man htmldir=/usr/share/doc/git/html \ INSTALLDIRS=vendor \ @@ -37,6 +36,7 @@ PKG_INDEP += git-doc PKG_INDEP += git-arch PKG_INDEP += git-bzr PKG_INDEP += git-cvs +PKG_INDEP += git-hg PKG_INDEP += git-svn PKG_INDEP += git-daemon-run PKG_INDEP += git-daemon-sysvinit @@ -87,12 +87,29 @@ build-indep-stamp: patch-stamp build-arch-stamp $(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 + $(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 touch build-indep-stamp clean: deb-checkdir 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 || \ for i in `ls -1r debian/diff/*.diff debian/diff/*.patch \ @@ -309,6 +326,15 @@ install-indep: build-arch-stamp build-indep-stamp 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 -- 1.8.4.rc3