tags 637399 + patch tags 637399 + pending thanks Dear maintainer,
I've prepared an NMU for hgsubversion (versioned as 1.2.1-2.1) and uploaded it to DELAYED/5. Please feel free to tell me if I should delay it longer.
-- Jakub Wilk
diffstat for hgsubversion-1.2.1 hgsubversion-1.2.1 changelog | 15 +++ control | 4 - patches/fix-mercurial-1.9-compat-1.diff | 98 +++++++++++++++++++++++++ patches/fix-mercurial-1.9-compat-2.diff | 124 ++++++++++++++++++++++++++++++++ patches/series | 2 rules | 2 6 files changed, 242 insertions(+), 3 deletions(-) diff -Nru hgsubversion-1.2.1/debian/changelog hgsubversion-1.2.1/debian/changelog --- hgsubversion-1.2.1/debian/changelog 2011-07-23 09:59:06.000000000 +0200 +++ hgsubversion-1.2.1/debian/changelog 2011-09-17 23:30:15.000000000 +0200 @@ -1,3 +1,18 @@ +hgsubversion (1.2.1-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Convert to dh_python2 (closes: #637399). Thanks to Javi Merino for the bug + report. + + Build depend on python (>= 2.6.6-3) instead of python-support. + + Add ‘--with python2’ to dh call in debian/rules. + + Bump minimum required version of mercurial to 1.9.1-1, which is the + first version using dh_python2. + + Remove python-support from Depends, add ${python:Depends} there. + * Backport two patches from upstream VCS to fix compatibility with Mercurial + 1.9. + + -- Jakub Wilk <jw...@debian.org> Sat, 17 Sep 2011 23:30:14 +0200 + hgsubversion (1.2.1-2) unstable; urgency=medium * Delete README.source. diff -Nru hgsubversion-1.2.1/debian/control hgsubversion-1.2.1/debian/control --- hgsubversion-1.2.1/debian/control 2011-07-23 00:27:07.000000000 +0200 +++ hgsubversion-1.2.1/debian/control 2011-09-17 23:29:50.000000000 +0200 @@ -2,7 +2,7 @@ Section: vcs Priority: extra Maintainer: Qijiang Fan <fqj1...@gmail.com> -Build-Depends: debhelper (>= 7.0.50~), python-support(>= 0.90) +Build-Depends: debhelper (>= 7.0.50~), python (>= 2.6.6-3~) Standards-Version: 3.9.2 Homepage: http://bitbucket.org/durin42/hgsubversion Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/hgsubversion @@ -10,7 +10,7 @@ Package: hgsubversion Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, mercurial(>= 1.3), subversion(>=1.5), python-subvertpy(>= 0.7.4) | python-subversion, python-support(>= 0.90) +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, mercurial (>= 1.9.1-1~), subversion(>=1.5), python-subvertpy(>= 0.7.4) | python-subversion Description: Subversion client as Mercurial extension hgsubversion is an extension for Mercurial that allows using Mercurial as a Subversion client. diff -Nru hgsubversion-1.2.1/debian/patches/fix-mercurial-1.9-compat-1.diff hgsubversion-1.2.1/debian/patches/fix-mercurial-1.9-compat-1.diff --- hgsubversion-1.2.1/debian/patches/fix-mercurial-1.9-compat-1.diff 1970-01-01 01:00:00.000000000 +0100 +++ hgsubversion-1.2.1/debian/patches/fix-mercurial-1.9-compat-1.diff 2011-09-17 23:08:41.000000000 +0200 @@ -0,0 +1,98 @@ +Description: Fix breakage introduced by discovery refactoring in Mercurial 1.9. +Author: Peter Arrenbrecht <peter.arrenbre...@gmail.com> +Origin: upstream, https://bitbucket.org/durin42/hgsubversion/changeset/a3f727c41c1d +Last-Update: 2011-09-17 + +--- a/hgsubversion/__init__.py ++++ b/hgsubversion/__init__.py +@@ -99,14 +99,21 @@ + ]), + } + +- +-# only need the discovery variant of this code when we drop hg < 1.6 + try: + from mercurial import discovery ++ def findcommonoutgoing(orig, *args, **opts): ++ capable = getattr(args[1], 'capable', lambda x: False) ++ if capable('subversion'): ++ return wrappers.findcommonoutgoing(*args, **opts) ++ else: ++ return orig(*args, **opts) ++ extensions.wrapfunction(discovery, 'findcommonoutgoing', findcommonoutgoing) ++except AttributeError: ++ # only need the discovery variant of this code when we drop hg < 1.6 + def findoutgoing(orig, *args, **opts): + capable = getattr(args[1], 'capable', lambda x: False) + if capable('subversion'): +- return wrappers.outgoing(*args, **opts) ++ return wrappers.findoutgoing(*args, **opts) + else: + return orig(*args, **opts) + extensions.wrapfunction(discovery, 'findoutgoing', findoutgoing) +--- a/hgsubversion/svnrepo.py ++++ b/hgsubversion/svnrepo.py +@@ -64,7 +64,7 @@ + + @remotesvn + def findoutgoing(self, remote, base=None, heads=None, force=False): +- return wrappers.outgoing(repo, remote, heads, force) ++ return wrappers.findoutgoing(repo, remote, heads, force) + + def svnmeta(self, uuid=None, subdir=None): + return svnmeta.SVNMeta(self, uuid, subdir) +--- a/hgsubversion/util.py ++++ b/hgsubversion/util.py +@@ -149,6 +149,24 @@ + if sourcerev.node() != node.nullid: + return outgoing_rev_hashes + ++def outgoing_common_and_heads(repo, reverse_map, sourcerev): ++ """Given a repo and an hg_editor, determines outgoing revisions for the ++ current working copy state. Returns a tuple (common, heads) like ++ discovery.findcommonoutgoing does. ++ """ ++ if sourcerev in reverse_map: ++ return ([sourcerev], [sourcerev]) # nothing outgoing ++ sourcecx = repo[sourcerev] ++ while (not sourcecx.node() in reverse_map ++ and sourcecx.node() != node.nullid): ++ ps = sourcecx.parents() ++ if len(ps) != 1: ++ raise hgutil.Abort("Sorry, can't find svn parent of a merge revision.") ++ sourcecx = ps[0] ++ if sourcecx.node() != node.nullid: ++ return ([sourcecx.node()], [sourcerev]) ++ return ([sourcerev], [sourcerev]) # nothing outgoing ++ + def default_commit_msg(ui): + return ui.config('hgsubversion', 'defaultmessage', '') + +--- a/hgsubversion/wrappers.py ++++ b/hgsubversion/wrappers.py +@@ -77,13 +77,22 @@ + ui.status('%s%s\n' % (l1.ljust(13), val)) + + +-def outgoing(repo, dest=None, heads=None, force=False): ++def findcommonoutgoing(repo, other, onlyheads=None, force=False, commoninc=None): ++ assert other.capable('subversion') ++ # split off #rev; TODO implement --revision/#rev support ++ svn = other.svn ++ meta = repo.svnmeta(svn.uuid, svn.subdir) ++ parent = repo.parents()[0].node() ++ hashes = meta.revmap.hashes() ++ return util.outgoing_common_and_heads(repo, hashes, parent) ++ ++ ++def findoutgoing(repo, dest=None, heads=None, force=False): + """show changesets not found in the Subversion repository + """ + assert dest.capable('subversion') +- + # split off #rev; TODO implement --revision/#rev support +- svnurl, revs, checkout = util.parseurl(dest.svnurl, heads) ++ #svnurl, revs, checkout = util.parseurl(dest.svnurl, heads) + svn = dest.svn + meta = repo.svnmeta(svn.uuid, svn.subdir) + parent = repo.parents()[0].node() diff -Nru hgsubversion-1.2.1/debian/patches/fix-mercurial-1.9-compat-2.diff hgsubversion-1.2.1/debian/patches/fix-mercurial-1.9-compat-2.diff --- hgsubversion-1.2.1/debian/patches/fix-mercurial-1.9-compat-2.diff 1970-01-01 01:00:00.000000000 +0100 +++ hgsubversion-1.2.1/debian/patches/fix-mercurial-1.9-compat-2.diff 2011-09-17 23:08:40.000000000 +0200 @@ -0,0 +1,124 @@ +Description: Fix hg.clone() for compatibility with Mercurial 1.9. +Author: Patrick Mezard <pmez...@gmail.com> +Origin: upstream, https://bitbucket.org/durin42/hgsubversion/changeset/86d124a8768e +Last-Update: 2011-09-17 + +--- a/hgsubversion/wrappers.py ++++ b/hgsubversion/wrappers.py +@@ -440,7 +440,13 @@ + """ + + data = {} +- def hgclonewrapper(orig, ui, origsource, dest, **opts): ++ def hgclonewrapper(orig, ui, *args, **opts): ++ if getattr(hg, 'peer', None): ++ # Since 1.9 (d976542986d2) ++ origsource = args[1] ++ else: ++ origsource = args[0] ++ + if isinstance(origsource, str): + source, branch, checkout = util.parseurl(ui.expandpath(origsource), + opts.get('branch')) +@@ -454,7 +460,7 @@ + data['branches'] = branches + ui.setconfig('hgsubversion', 'branch', branches[-1]) + +- data['srcrepo'], data['dstrepo'] = orig(ui, origsource, dest, **opts) ++ data['srcrepo'], data['dstrepo'] = orig(ui, *args, **opts) + + for opt, (section, name) in optionmap.iteritems(): + if opt in opts and opts[opt]: +--- a/tests/comprehensive/test_stupid_pull.py ++++ b/tests/comprehensive/test_stupid_pull.py +@@ -28,7 +28,7 @@ + checkout_path += '/' + subdir + u.setconfig('hgsubversion', 'stupid', '1') + u.setconfig('hgsubversion', 'layout', layout) +- hg.clone(u, test_util.fileurl(checkout_path), wc2_path, update=False) ++ test_util.hgclone(u, test_util.fileurl(checkout_path), wc2_path, update=False) + if layout == 'single': + self.assertEqual(len(self.repo.heads()), 1) + self.repo2 = hg.repository(ui.ui(), wc2_path) +--- a/tests/test_fetch_branches.py ++++ b/tests/test_fetch_branches.py +@@ -16,7 +16,7 @@ + def _load_fixture_and_fetch_with_anchor(self, fixture_name, anchor): + test_util.load_svndump_fixture(self.repo_path, fixture_name) + source = '%s#%s' % (test_util.fileurl(self.repo_path), anchor) +- repo = hg.clone(self.ui(), source=source, dest=self.wc_path) ++ test_util.hgclone(self.ui(), source, self.wc_path) + return hg.repository(self.ui(), self.wc_path) + + def openbranches(self, repo): +--- a/tests/test_fetch_mappings.py ++++ b/tests/test_fetch_mappings.py +@@ -220,8 +220,8 @@ + + # clone & rebuild + ui = self.ui(stupid) +- src, dest = hg.clone(ui, self.wc_path, self.wc_path + '_clone', +- update=False) ++ src, dest = test_util.hgclone(ui, self.wc_path, self.wc_path + '_clone', ++ update=False) + svncommands.rebuildmeta(ui, dest, + args=[test_util.fileurl(self.repo_path)]) + +--- a/tests/test_push_command.py ++++ b/tests/test_push_command.py +@@ -278,14 +278,14 @@ + self.test_push_to_branch(push=False) + wc2path = self.wc_path + '_clone' + u = self.repo.ui +- hg.clone(self.repo.ui, self.wc_path, wc2path, update=False) ++ test_util.hgclone(self.repo.ui, self.wc_path, wc2path, update=False) + res = self.pushrevisions() + self.assertEqual(0, res) + oldf = open(os.path.join(self.wc_path, '.hg', 'hgrc')) + hgrc = oldf.read() + oldf.close() + shutil.rmtree(self.wc_path) +- hg.clone(u, wc2path, self.wc_path, update=False) ++ test_util.hgclone(u, wc2path, self.wc_path, update=False) + oldf = open(os.path.join(self.wc_path, '.hg', 'hgrc'), 'w') + oldf.write(hgrc) + oldf.close() +--- a/tests/test_rebuildmeta.py ++++ b/tests/test_rebuildmeta.py +@@ -21,7 +21,7 @@ + assert len(self.repo) > 0 + wc2_path = self.wc_path + '_clone' + u = ui.ui() +- src, dest = hg.clone(u, self.wc_path, wc2_path, update=False) ++ src, dest = test_util.hgclone(u, self.wc_path, wc2_path, update=False) + + # insert a wrapper that prevents calling changectx.children() + def failfn(orig, ctx): +--- a/tests/test_tags.py ++++ b/tests/test_tags.py +@@ -115,7 +115,7 @@ + "Note: this test failing may be because of a rebuildmeta failure.\n" + "You should check that before assuming issues with this test.\n") + wc2_path = self.wc_path + '2' +- src, dest = hg.clone(repo.ui, self.wc_path, wc2_path, update=False) ++ src, dest = test_util.hgclone(repo.ui, self.wc_path, wc2_path, update=False) + svncommands.rebuildmeta(repo.ui, + dest, + args=[test_util.fileurl(self.repo_path), ]) +--- a/tests/test_util.py ++++ b/tests/test_util.py +@@ -229,6 +229,14 @@ + 'from the wrong path!' + ) + ++def hgclone(ui, source, dest, update=True): ++ if getattr(hg, 'peer', None): ++ # Since 1.9 (d976542986d2) ++ src, dest = hg.clone(ui, {}, source, dest, update=update) ++ else: ++ src, dest = hg.clone(ui, source, dest, update=update) ++ return src, dest ++ + class TestBase(unittest.TestCase): + def setUp(self): + _verify_our_modules() diff -Nru hgsubversion-1.2.1/debian/patches/series hgsubversion-1.2.1/debian/patches/series --- hgsubversion-1.2.1/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ hgsubversion-1.2.1/debian/patches/series 2011-09-17 23:16:15.000000000 +0200 @@ -0,0 +1,2 @@ +fix-mercurial-1.9-compat-1.diff +fix-mercurial-1.9-compat-2.diff diff -Nru hgsubversion-1.2.1/debian/rules hgsubversion-1.2.1/debian/rules --- hgsubversion-1.2.1/debian/rules 2011-07-23 09:59:06.000000000 +0200 +++ hgsubversion-1.2.1/debian/rules 2011-09-17 22:08:46.000000000 +0200 @@ -13,7 +13,7 @@ cp hgsubversion/ -r debian/hgsubversion/$(MODULE_DIR) binary-indep: install - dh binary-indep + dh binary-indep --with python2 binary-arch: