debian/0000755000000000000000000000000012227171467007177 5ustar debian/control0000644000000000000000000000225212227062627010600 0ustar Source: hg-git Section: vcs Priority: optional Maintainer: Qijiang Fan Uploaders: Python Applications Packaging Team Build-Depends: debhelper (>= 7.0.8), python (>= 2.6.6-3~) Standards-Version: 3.9.4 X-Python-Version: >= 2.5 Homepage: http://hg-git.github.com/ Vcs-Svn: svn://anonscm.debian.org/python-apps/packages/hg-git/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-apps/packages/hg-git/trunk/ Package: mercurial-git Architecture: all Depends: ${misc:Depends}, ${python:Depends}, mercurial (>= 1.9.1-1~), python-dulwich (>= 0.9.1) Description: Git plugin for Mercurial The Hg-Git plugin for Mercurial adds the ability to push and pull to/from a Git server repository. This means you can collaborate on Git based projects from Mercurial, or use a Git server as a collaboration point for a team with developers using both Git and Mercurial. . The plugin can convert commits/changesets losslessly from one system to another, so you can push via a Mercurial repository and another Mercurial client can pull it and their changeset node ids will be identical - Mercurial data does not get lost in translation. debian/docs0000644000000000000000000000003612225565003010040 0ustar DESIGN.txt README.md TODO.txt debian/source/0000755000000000000000000000000012227171467010477 5ustar debian/source/format0000644000000000000000000000001412225565003011674 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000014212225565003010214 0ustar version=3 https://bitbucket.org/durin42/hg-git/downloads /durin42/hg-git/get/([0-9.]+)[.]tar[.]gz debian/changelog0000644000000000000000000001203512227065020011035 0ustar hg-git (0.4.0-2) unstable; urgency=low * Team upload. * Fix "Incompatible with python-dulwich 0.9.1" by adding patches "from_upstream__upgraded_to_use_latest_version_of_dulwich_0.9.1.patch", "from_upstream__fix_work_around_https_bugs_launchpad_net_dulwich_bug_1025886.patch" and "from_upstream__git_handler_fix_bugs_introduced_by_47df57f2bb2b.patch" (Closes: #724638) * Update standards to 3.9.4 (no change needed) -- Javi Merino Mon, 14 Oct 2013 23:02:56 +0100 hg-git (0.4.0-1) unstable; urgency=low [Jakub Wilk] * Use canonical URIs for Vcs-* fields. [Qijiang Fan] * New upstream release. * New release fixes broken `hg out` (closes: #686855). -- Qijiang Fan Fri, 24 May 2013 16:45:14 +0800 hg-git (0.3.4-1) unstable; urgency=low * New upstream release. -- Qijiang Fan Thu, 15 Nov 2012 17:38:54 +0800 hg-git (0.3.3-1) unstable; urgency=low * New upstream release. * Patches token from upstream are dropped. * Add postinst script. -- Qijiang Fan Wed, 05 Sep 2012 10:49:40 +0800 hg-git (0.3.2-2) unstable; urgency=low * Backport a patch from upstream to handle incorrect hg metadata gracefully (closes: 636879). -- Qijiang Fan Wed, 25 Apr 2012 23:41:25 +0800 hg-git (0.3.2-1) unstable; urgency=low * New upstream release. * debian/watch updated. * Bump copyright format uri to http://www.debian.org/doc/packaging-manuals/copyright-format/1.0. * Bump standards version to 3.9.3. -- Qijiang Fan Fri, 20 Apr 2012 16:46:20 +0800 hg-git (0.3.1-1) unstable; urgency=low * New upstream release. * Patches taken from upstream are dropped. * Bump minimum required version of python-dulwich to 0.8. * New release fixes the crash with Mercurial 1.9 (closes:645037). -- Qijiang Fan Mon, 17 Oct 2011 21:32:57 +0800 hg-git (0.2.6-2) unstable; urgency=medium * Team upload. * Backport two patches from upstream VCS to fix compatiblity with Mercurial 1.9 (closes: #635500). * Convert to dh_python2: + Build depend on python (>= 2.6.6-3) instead of python-support. + Add ‘--with python2’ to dh call in debian/rules. + Rename XS-Python-Version to X-Python-Version. + Bump minimum required version of mercurial to 1.9.1-1, which is the first version using dh_python2. * Add build-arch and build-indep targets to debian/rules. * Bump standards version to 3.9.2 (no changes needed). -- Jakub Wilk Tue, 09 Aug 2011 17:09:34 +0200 hg-git (0.2.6-1) unstable; urgency=low * New upstream release. * Upstream fixed compatibility with Mercurial 1.8 (closes: #617892). -- Qijiang Fan Sun, 27 Mar 2011 16:43:37 +0800 hg-git (0.2.5-1) unstable; urgency=low * New upstream release. * Maintainer changed to Qijiang Fan (closes: #589961). * Copyright has been updated. * NEWS has been deleted. -- Qijiang Fan Sun, 08 Feb 2011 10:30:41 +0800 hg-git (0.2.4-1) experimental; urgency=low * New upstream release. * Fix a typo in package description. * Bump standards version to 3.9.1 (no changes needed). -- Jakub Wilk Fri, 03 Sep 2010 12:56:04 +0200 hg-git (0.2.3-1) unstable; urgency=low * New upstream release. + Fix compatiblity with Mercurial 1.6 (closes: #588325). * Bump standards version to 3.9.0 (no changes needed). -- Jakub Wilk Wed, 07 Jul 2010 13:51:05 +0200 hg-git (0.2.2-1) unstable; urgency=low * New upstream release. * Bump dependency on dulwich to >= 0.6. * Bump standards version to 3.8.4 (no changes needed). * Update my e-mail address. * Update debian/copryright: toposort.py and a copy of the Dulwich library are no longer shipped in the tarball. * Remove debian/patches/ directory, as there are currently no patches. -- Jakub Wilk Sun, 23 May 2010 15:00:01 +0200 hg-git (0.2.1-1) unstable; urgency=low * New upstream release. * Switch to source format 3.0 (quilt). * Document usage of bookmarks in README.source (closes: #548215). * Drop superfluous ‘XB-Python-Version’ from debian/control. -- Jakub Wilk Fri, 08 Jan 2010 13:29:45 +0100 hg-git (0.1.0-1) unstable; urgency=low * New upstream release. * Depend on python-dulwich, as hg-git no longer embeds the Dulwich library (closes: #541996, #544272). * Drop mercurial-1.3.diff patch, applied upstream. * Remove get-orig-source target, no longer needed; add watch file instead. * Bump standards version to 3.8.3 (no changes needed). -- Jakub Wilk Wed, 21 Oct 2009 21:58:02 +0200 hg-git (0+hg20090603-2) unstable; urgency=low * Use quilt to manage patches. * Fix compatiblity with Mercurial 1.3 (closes: #540989). -- Jakub Wilk Tue, 11 Aug 2009 09:12:24 +0200 hg-git (0+hg20090603-1) unstable; urgency=low * Initial release (closes: #531028). -- Jakub Wilk Tue, 30 Jun 2009 14:19:10 +0200 debian/README.Debian0000644000000000000000000000044212225565003011227 0ustar hg-git for Debian ----------------- To enable the extension, add the following lines to your hgrc:: [extensions] hgext.bookmarks = hgext.git = Hg-git uses bookmarks [1]_ (rather than branches) to track git branches. .. [1] http://mercurial.selenic.com/wiki/BookmarksExtension debian/copyright0000644000000000000000000000110512225565003011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: hg-git Upstream-Contact: Scott Chacon Source: http://hg-git.github.com/ Files: * Copyright: 2008, Scott Chacon License: GPL-2 Files: tests/run-tests.py Copyright: 2006, Matt Mackall License: GPL-2 Files: debian/* Copyright: 2009, 2010, Jakub Wilk License: GPL-2 License: GPL-2 On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2" debian/rules0000755000000000000000000000120612227062627010253 0ustar #!/usr/bin/make -f MODULE_DIR = usr/lib/$(shell pyversions -d)/site-packages/hgext/git/ build build-arch build-indep: clean: dh clean find $(CURDIR) -type f -name '*\.py[co]' -delete install: build dh install --until dh_prep dh_installdirs $(MODULE_DIR) cp -r hggit/*.py debian/mercurial-git/$(MODULE_DIR)/ dh install --after dh_install --with python2 # Build architecture-independent files here. binary-indep: install dh binary-indep binary-arch: binary: binary-indep binary-arch patch unpatch: dh_quilt_$(@) .PHONY: build build-arch build-indep clean binary-indep binary-arch binary install patch unpatch # vim:ts=4 sw=4 noet debian/compat0000644000000000000000000000000212225565003010364 0ustar 7 debian/postinst0000644000000000000000000000053412227064777011014 0ustar #!/bin/sh -e case "$1" in configure) echo 'mercurial-git extension is disabled by default.' echo 'You can follow the instructions in /usr/share/doc/mercurial-git/README.Debian to enable it.' ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# debian/patches/0000755000000000000000000000000012227171467010626 5ustar debian/patches/from_upstream__upgraded_to_use_latest_version_of_dulwich_0.9.1.patch0000644000000000000000000000133512225344565026174 0ustar From: Alex Regueiro Origin: https://bitbucket.org/durin42/hg-git/commits/980c37f6a8f965abd3fd10b0cc6065ec99fab9c2 Description: Upgraded to use latest version of dulwich (0.9.1). Bug-Debian: http://bugs.debian.org/724638 diff --git a/hggit/_ssh.py b/hggit/_ssh.py index 8d1f35e..a49c82c 100644 --- a/hggit/_ssh.py +++ b/hggit/_ssh.py @@ -11,7 +11,7 @@ def generate_ssh_vendor(ui): """ class _Vendor(SSHVendor): - def connect_ssh(self, host, command, username=None, port=None): + def run_command(self, host, command, username=None, port=None): from dulwich.client import SubprocessWrapper from mercurial import util import subprocess -- 1.8.4.rc3 debian/patches/from_upstream__fix_work_around_https_bugs_launchpad_net_dulwich_bug_1025886.patch0000644000000000000000000000357512225564062030576 0ustar Author: domruf Origin: https://bitbucket.org/durin42/hg-git/commits/980c37f6a8f965abd3fd10b0cc6065ec99fab9c2 Description: fix/work around https://bugs.launchpad.net/dulwich/+bug/1025886 Bug-Debian: http://bugs.debian.org/724638 diff --git a/hggit/git_handler.py b/hggit/git_handler.py --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -8,6 +8,7 @@ from dulwich.pack import create_delta, a from dulwich.repo import Repo from dulwich import client from dulwich import config as dul_config +from StringIO import StringIO try: from mercurial import bookmarks @@ -993,19 +994,19 @@ class GitHandler(object): if not ref.endswith('^{}') and ( ref.startswith('refs/heads/') or ref.startswith('refs/tags/') ) ] want = [x for x in want if x not in self.git] + return want - f, commit = self.git.object_store.add_pack() try: - try: - progress = GitProgress(self.ui) - ret = client.fetch_pack(path, determine_wants, graphwalker, - f.write, progress.progress) - progress.flush() - return ret - except (HangupException, GitProtocolError), e: - raise hgutil.Abort(_("git remote error: ") + str(e)) - finally: - commit() + progress = GitProgress(self.ui) + f = StringIO() + ret = client.fetch_pack(path, determine_wants, graphwalker, f.write, progress.progress) + if(f.pos != 0): + f.seek(0) + po = self.git.object_store.add_thin_pack(f.read, None) + progress.flush() + return ret + except (HangupException, GitProtocolError), e: + raise hgutil.Abort(_("git remote error: ") + str(e)) ## REFERENCES HANDLING debian/patches/series0000644000000000000000000000033412225563553012042 0ustar from_upstream__upgraded_to_use_latest_version_of_dulwich_0.9.1.patch from_upstream__fix_work_around_https_bugs_launchpad_net_dulwich_bug_1025886.patch from_upstream__git_handler_fix_bugs_introduced_by_47df57f2bb2b.patch debian/patches/from_upstream__git_handler_fix_bugs_introduced_by_47df57f2bb2b.patch0000644000000000000000000000171512225564100026001 0ustar Author: Augie Fackler Origin: https://bitbucket.org/durin42/hg-git/commits/30d502905da9e670f4131cc76d539f5539368023 Description: git_handler: fix bugs introduced by 47df57f2bb2b which could never have passed tests Bug-Debian: http://bugs.debian.org/724638 diff --git a/hggit/git_handler.py b/hggit/git_handler.py --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -8,7 +8,6 @@ from dulwich.pack import create_delta, a from dulwich.repo import Repo from dulwich import client from dulwich import config as dul_config -from StringIO import StringIO try: from mercurial import bookmarks @@ -998,7 +997,7 @@ class GitHandler(object): return want try: progress = GitProgress(self.ui) - f = StringIO() + f = StringIO.StringIO() ret = client.fetch_pack(path, determine_wants, graphwalker, f.write, progress.progress) if(f.pos != 0): f.seek(0)