Control: tags 937808 + patch
Dear maintainer, I've prepared an NMU for python-hglib (versioned as 2.6.1-1.1). The diff is attached to this message. Regards.
diff -Nru python-hglib-2.6.1/debian/changelog python-hglib-2.6.1/debian/changelog --- python-hglib-2.6.1/debian/changelog 2019-12-31 17:58:41.000000000 -0500 +++ python-hglib-2.6.1/debian/changelog 2019-12-31 17:55:13.000000000 -0500 @@ -1,3 +1,13 @@ +python-hglib (2.6.1-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Drop python2 support; Closes: #937808 + * debian/patches + - add upstream fixes for mercurial 5.2 compatibility (tests) + - switch to 3.0 (quilt) source format + + -- Sandro Tosi <mo...@debian.org> Tue, 31 Dec 2019 17:55:13 -0500 + python-hglib (2.6.1-1) unstable; urgency=medium * New upstream release diff -Nru python-hglib-2.6.1/debian/control python-hglib-2.6.1/debian/control --- python-hglib-2.6.1/debian/control 2019-12-31 17:58:41.000000000 -0500 +++ python-hglib-2.6.1/debian/control 2019-12-31 15:32:29.000000000 -0500 @@ -5,26 +5,12 @@ Build-Depends: debhelper (>= 7.0.50), dh-python, - python-all, - python-nose, python3-all, python3-nose, mercurial (>= 1.9), Standards-Version: 3.9.8 Homepage: https://www.mercurial-scm.org/wiki/PythonHglib -Package: python-hglib -Architecture: all -Depends: - mercurial (>= 1.9), - ${python:Depends}, - ${misc:Depends}, -Description: Python library for interfacing with Mercurial's command server - python-hglib is a library with a fast, convenient interface to Mercurial. - It uses Mercurial's command server for communication with hg. This approach - avoids relying on Mercurial's (unstable) internal Python API, and avoids - licensing issues for non-GPL code. - Package: python3-hglib Architecture: all Depends: diff -Nru python-hglib-2.6.1/debian/patches/12e6aaef0f6e.patch python-hglib-2.6.1/debian/patches/12e6aaef0f6e.patch --- python-hglib-2.6.1/debian/patches/12e6aaef0f6e.patch 1969-12-31 19:00:00.000000000 -0500 +++ python-hglib-2.6.1/debian/patches/12e6aaef0f6e.patch 2019-12-31 17:49:41.000000000 -0500 @@ -0,0 +1,25 @@ + +# HG changeset patch +# User Matt Harbison <matt_harbi...@yahoo.com> +# Date 1557281819 14400 +# Node ID 12e6aaef0f6ed289658ed2df3240e705fae3e029 +# Parent 33b512aa8dba0cbe523188fbb62d30ae2125a236 +tests: handle the removal of `obsolete._enabled` in Mercurial + +I'm not sure why we can't just set `experimental.evolution=all`, but it didn't +work. + +diff -r 33b512aa8dba -r 12e6aaef0f6e tests/test-hidden.py +--- a/tests/test-hidden.py Mon Apr 30 10:38:03 2018 -0400 ++++ b/tests/test-hidden.py Tue May 07 22:16:59 2019 -0400 +@@ -22,6 +22,9 @@ + super(test_obsolete_baselib, self).setUp() + self.append('.hg/obs.py', + "import mercurial.obsolete\n" ++ "# 3.2 and later\n" ++ "mercurial.obsolete.isenabled = lambda r, opt: True\n" ++ "# Dropped in 5.1\n" + "mercurial.obsolete._enabled = True") + self.append('.hg/hgrc','\n[extensions]\nobs=.hg/obs.py') + + diff -Nru python-hglib-2.6.1/debian/patches/1a318162f06f.patch python-hglib-2.6.1/debian/patches/1a318162f06f.patch --- python-hglib-2.6.1/debian/patches/1a318162f06f.patch 1969-12-31 19:00:00.000000000 -0500 +++ python-hglib-2.6.1/debian/patches/1a318162f06f.patch 2019-12-31 17:50:00.000000000 -0500 @@ -0,0 +1,79 @@ + +# HG changeset patch +# User Augie Fackler <r...@durin42.com> +# Date 1576077658 18000 +# Node ID 1a318162f06f171f0fe1ebc26ff016ebbccc0dbd +# Parent 513ebe91dc7228babfd1096617ba86dc172349d0 +grep: update tests to cope with behavior change in hg 5.2 + +I wonder if we should make hglib's grep behave consistently across all +hg versions somehow, but I'm not going to attempt that for now. + +diff -r 513ebe91dc72 -r 1a318162f06f tests/test-grep.py +--- a/tests/test-grep.py Wed Dec 11 09:39:53 2019 -0500 ++++ b/tests/test-grep.py Wed Dec 11 10:20:58 2019 -0500 +@@ -10,13 +10,22 @@ + # no match + self.assertEquals(list(self.client.grep(b('c'))), []) + +- self.assertEquals(list(self.client.grep(b('a'))), +- [(b('a'), b('0'), b('a')), (b('b'), b('0'), b('ab'))]) +- self.assertEquals(list(self.client.grep(b('a'), b('a'))), +- [(b('a'), b('0'), b('a'))]) ++ if self.client.version >= (5, 2): ++ self.assertEquals(list(self.client.grep(b('a'))), ++ [(b('a'), b('a'), b('b'))]) ++ self.assertEquals(list(self.client.grep(b('a'), b('a'))), ++ [(b('a'), b('a'), b(''))]) + +- self.assertEquals(list(self.client.grep(b('b'))), +- [(b('b'), b('0'), b('ab'))]) ++ self.assertEquals(list(self.client.grep(b('b'))), ++ [(b('b'), b('ab'), b(''))]) ++ else: ++ self.assertEquals(list(self.client.grep(b('a'))), ++ [(b('a'), b('0'), b('a')), (b('b'), b('0'), b('ab'))]) ++ self.assertEquals(list(self.client.grep(b('a'), b('a'))), ++ [(b('a'), b('0'), b('a'))]) ++ ++ self.assertEquals(list(self.client.grep(b('b'))), ++ [(b('b'), b('0'), b('ab'))]) + + def test_options(self): + self.append('a', 'a\n') +@@ -27,16 +36,26 @@ + (b('b'), b('0'), b('+'), b('ab'))], + list(self.client.grep(b('a'), all=True))) + +- self.assertEquals([(b('a'), b('0')), (b('b'), b('0'))], +- list(self.client.grep(b('a'), fileswithmatches=True))) ++ if self.client.version >= (5, 2): ++ self.assertEquals([(b('a'), b('b'))], ++ list(self.client.grep(b('a'), fileswithmatches=True))) ++ ++ self.assertEquals([(b('a'), b('1'), b('a'), b('b'))], ++ list(self.client.grep(b('a'), line=True))) + +- self.assertEquals([(b('a'), b('0'), b('1'), b('a')), +- (b('b'), b('0'), b('1'), b('ab'))], +- list(self.client.grep(b('a'), line=True))) ++ self.assertEquals([(b('a'), b('test'), b('a'), b('b'))], ++ list(self.client.grep(b('a'), user=True))) ++ else: ++ self.assertEquals([(b('a'), b('0')), (b('b'), b('0'))], ++ list(self.client.grep(b('a'), fileswithmatches=True))) + +- self.assertEquals([(b('a'), b('0'), b('test'), b('a')), +- (b('b'), b('0'), b('test'), b('ab'))], +- list(self.client.grep(b('a'), user=True))) ++ self.assertEquals([(b('a'), b('0'), b('1'), b('a')), ++ (b('b'), b('0'), b('1'), b('ab'))], ++ list(self.client.grep(b('a'), line=True))) ++ ++ self.assertEquals([(b('a'), b('0'), b('test'), b('a')), ++ (b('b'), b('0'), b('test'), b('ab'))], ++ list(self.client.grep(b('a'), user=True))) + + self.assertEquals([(b('a'), b('0'), b('1'), b('+'), b('test')), + (b('b'), b('0'), b('1'), b('+'), b('test'))], + diff -Nru python-hglib-2.6.1/debian/patches/series python-hglib-2.6.1/debian/patches/series --- python-hglib-2.6.1/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ python-hglib-2.6.1/debian/patches/series 2019-12-31 17:50:00.000000000 -0500 @@ -0,0 +1,2 @@ +12e6aaef0f6e.patch +1a318162f06f.patch diff -Nru python-hglib-2.6.1/debian/python3-hglib.install python-hglib-2.6.1/debian/python3-hglib.install --- python-hglib-2.6.1/debian/python3-hglib.install 2019-12-31 17:58:41.000000000 -0500 +++ python-hglib-2.6.1/debian/python3-hglib.install 1969-12-31 19:00:00.000000000 -0500 @@ -1 +0,0 @@ -usr/lib/python3* diff -Nru python-hglib-2.6.1/debian/python-hglib.install python-hglib-2.6.1/debian/python-hglib.install --- python-hglib-2.6.1/debian/python-hglib.install 2019-12-31 17:58:41.000000000 -0500 +++ python-hglib-2.6.1/debian/python-hglib.install 1969-12-31 19:00:00.000000000 -0500 @@ -1 +0,0 @@ -usr/lib/python2* diff -Nru python-hglib-2.6.1/debian/rules python-hglib-2.6.1/debian/rules --- python-hglib-2.6.1/debian/rules 2019-12-31 17:58:41.000000000 -0500 +++ python-hglib-2.6.1/debian/rules 2019-12-31 15:33:35.000000000 -0500 @@ -1,14 +1,14 @@ #!/usr/bin/make -f %: - dh --with python2,python3 --buildsystem=pybuild $@ + dh --with python3 --buildsystem=pybuild $@ build: - dh --with python2,python3 --buildsystem=pybuild $@ + dh --with python3 --buildsystem=pybuild $@ test_%: $(MAKE) tests PYTHON=$* -override_dh_auto_test: $(foreach ver, $(shell pyversions -r) $(shell py3versions -r), test_$(ver)) +override_dh_auto_test: $(foreach ver, $(shell py3versions -r), test_$(ver)) .PHONY: build diff -Nru python-hglib-2.6.1/debian/source/format python-hglib-2.6.1/debian/source/format --- python-hglib-2.6.1/debian/source/format 1969-12-31 19:00:00.000000000 -0500 +++ python-hglib-2.6.1/debian/source/format 2013-03-13 15:28:31.000000000 -0400 @@ -0,0 +1 @@ +3.0 (quilt)