--- python-hglib-1.9.orig/debian/changelog +++ python-hglib-1.9/debian/changelog @@ -0,0 +1,73 @@ +python-hglib (1.9-1) unstable; urgency=medium + + * New upstream release. + + -- Julien Cristau Thu, 12 Nov 2015 16:26:48 +0100 + +python-hglib (1.7-1) unstable; urgency=medium + + * New upstream release + + fix version in egg-info (closes: #794017) + * Update tests for mercurial 3.5 (closes: #797287) + + -- Julien Cristau Tue, 01 Sep 2015 12:25:21 +0200 + +python-hglib (1.6-1) unstable; urgency=medium + + * New upstream release + * Update debian/watch to use https://pypi.python.org/simple. + * Build a python3-hglib package. + + -- Julien Cristau Sat, 25 Apr 2015 09:29:09 +0200 + +python-hglib (1.4-1) unstable; urgency=medium + + * Let uscan verify tarball signatures. + * New upstream release. + + -- Julien Cristau Sun, 05 Oct 2014 21:59:18 +0200 + +python-hglib (1.3-2) unstable; urgency=medium + + * Switch from python-support to dh_python2. + + -- Julien Cristau Fri, 26 Sep 2014 11:14:08 +0200 + +python-hglib (1.3-1) unstable; urgency=medium + + * New upstream release. + + -- Julien Cristau Fri, 26 Sep 2014 10:48:01 +0200 + +python-hglib (1.2-2) unstable; urgency=medium + + * Fix FTBFS with make 4 (closes: #750230) + + -- Julien Cristau Tue, 17 Jun 2014 09:59:56 +0200 + +python-hglib (1.2-1) unstable; urgency=medium + + * New upstream release. + + -- Julien Cristau Tue, 11 Feb 2014 10:59:46 +0100 + +python-hglib (1.0-1) unstable; urgency=medium + + * New upstream release + - fixes tests (closes: #713093) + + -- Julien Cristau Fri, 24 Jan 2014 14:16:38 +0100 + +python-hglib (0.9-1) unstable; urgency=low + + * New upstream release. + * Change Vcs-* control fields. + * Build-Depend on python-all instead of python. + + -- Julien Cristau Wed, 08 May 2013 15:47:24 +0200 + +python-hglib (0.3-1) unstable; urgency=low + + * Initial release. (Closes: #693879) + + -- Julien Cristau Thu, 22 Nov 2012 11:36:07 +0100 --- python-hglib-1.9.orig/debian/compat +++ python-hglib-1.9/debian/compat @@ -0,0 +1 @@ +7 --- python-hglib-1.9.orig/debian/control +++ python-hglib-1.9/debian/control @@ -0,0 +1,42 @@ +Source: python-hglib +Section: vcs +Priority: optional +Maintainer: Julien Cristau +Build-Depends: + debhelper (>= 7.0.50), + dh-python, + python-all, + python-nose, + python3-all, + python3-nose, + mercurial (>= 1.9), +Standards-Version: 3.9.4 +X-Python-Version: >= 2.5 +X-Python3-Version: >= 3.4 +Homepage: http://mercurial.selenic.com/wiki/PythonHglib +Vcs-Browser: http://anonscm.debian.org/hg/private/jcristau/python-hglib/ +Vcs-Hg: http://anonscm.debian.org/hg/private/jcristau/python-hglib/ + +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: + mercurial (>= 1.9), + ${python3:Depends}, + ${misc:Depends}, +Description: Python3 library for interfacing with Mercurial's command server + python3-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. --- python-hglib-1.9.orig/debian/copyright +++ python-hglib-1.9/debian/copyright @@ -0,0 +1,24 @@ +This package was downloaded from + http://pypi.python.org/pypi/python-hglib/ + http://selenic.com/repo/python-hglib + +Copyright (c) 2011 Matt Mackall and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- python-hglib-1.9.orig/debian/python-hglib.install +++ python-hglib-1.9/debian/python-hglib.install @@ -0,0 +1 @@ +usr/lib/python2* --- python-hglib-1.9.orig/debian/python3-hglib.install +++ python-hglib-1.9/debian/python3-hglib.install @@ -0,0 +1 @@ +usr/lib/python3* --- python-hglib-1.9.orig/debian/rules +++ python-hglib-1.9/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +%: + dh --with python2,python3 --buildsystem=pybuild $@ + +build: + dh --with python2,python3 --buildsystem=pybuild $@ + +test_%: + $(MAKE) tests PYTHON=$* + +override_dh_auto_test: $(foreach ver, $(shell pyversions -r) $(shell py3versions -r), test_$(ver)) + +.PHONY: build --- python-hglib-1.9.orig/debian/upstream/signing-key.asc +++ python-hglib-1.9/debian/upstream/signing-key.asc @@ -0,0 +1,51 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQINBE+wFikBEAC4V6mHFMbp1nmufCG7r3o920YtR+wB51HoQSCDoaH+GlXYRsZs +4nEyA9jpGbR5EGRC1lr6VUQgBqds4p1tbAf/5z3z+HiRy7rxQ68gSZzZoaSVG/kP +wTi+hVchnWqvMmZ54piZ/yz8J1IBY+yScfVcqHxPpvEI+u1OfGIT8jzXlkmqiB/S +DAyE1/K65qqlOB3gprG3XQ86e9eUBPCWst887TBSzNVXW64Moc8u5EYQW1OrEr68 +5PyYoXoxfp6I04lL8l5m5hxjw27yxO1me4+iIFghUQMKF95RnrJmXII+Gs67FyyU +YlTyJHXfdf0E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/zo+z7sql51Q6MXewQgq8SIniZAQaISbPwbsUtFtEC/eCJXKV2WZdR2OxrAJk4d9 +TO2jnvJ+o9/rHPpWnplFUHUIpiDBcTg7fjzIzdwzGJ7sAG7z/N6xdsracP80ZLle +jeKK/E2yBM4/cZP9sqcl2ll0Yz28U61hHTnZV/sHNUtE4Hz/fKVb/ey/eJhFpyGz +rZTnwvWBImznday4eTEmaLzzfvOriRAkhBw+2BK5hT4uYhQvQ0YgY6WsRnRniMZT +Evs3tRw31F5GNvfHczRR+vnvg7RYUraJ34HXIWLyqTbTxsq+9igshahpQxp1dkn+ +UdSo7iYmsKP9nro1qlQ/Y6a5EeUEoZGfMQn9L4Uq1/Nqy5r/Pgk0Wv30EvEsDKyI +2eMm2kjJ8E0i8oNGGU83WROOQu4zpzEXpt4eRcrCtkyispmqXyXh1TPP4agKRvTt +y5xw1zg/UosR9qArgqV2HACMJ/Q6eZS9o1GTb/fKBLR7DW7p4XzHYmFjIVc4+HXl +=GjXY +-----END PGP PUBLIC KEY BLOCK----- --- python-hglib-1.9.orig/debian/watch +++ python-hglib-1.9/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=pgpsigurlmangle=s/$/.asc/ \ +https://pypi.debian.net/python-hglib/python-hglib-(.*).tar.gz --- python-hglib-1.9.orig/tests/test-clone.py +++ python-hglib-1.9/tests/test-clone.py @@ -0,0 +1,13 @@ +import os +from tests import common +import hglib +from hglib.util import b + +class test_clone(common.basetest): + def test_basic(self): + self.append('a', 'a') + self.client.commit(b('first'), addremove=True) + cloned = hglib.clone(b('.'), b('cloned')) + self.assertRaises(ValueError, cloned.log) + cloned.open() + self.assertEquals(self.client.log(), cloned.log()) --- python-hglib-1.9.orig/tests/test-context.py +++ python-hglib-1.9/tests/test-context.py @@ -0,0 +1,93 @@ +import sys +from tests import common +from hglib.error import CommandError +import hglib +from hglib import context +from hglib.util import b + +class test_context(common.basetest): + def test_non_existent(self): + self.assertRaises(ValueError, context.changectx, self.client, b('foo')) + + def test_basic(self): + self.append('a', 'a') + self.append('b', 'b') + rev0, node0 = self.client.commit(b('first'), addremove=True) + + self.append('c', 'c') + rev1, node1 = self.client.commit(b('second'), addremove=True) + + ctx = self.client[node0] + + self.assertEquals(ctx.description(), b('first')) + self.assertEquals(str(ctx), node0[:12].decode('latin-1')) + self.assertEquals(ctx.node(), node0) + self.assertEquals(int(ctx), rev0) + self.assertEquals(ctx.rev(), rev0) + self.assertEquals(ctx.branch(), b('default')) + + self.assertTrue(ctx) + + self.assertTrue(b('a') in ctx and b('b') in ctx) + self.assertFalse(b('c') in ctx) + self.assertEquals(list(ctx), [b('a'), b('b')]) + self.assertEquals(ctx.files(), [b('a'), b('b')]) + + self.assertEquals(ctx.modified(), []) + self.assertEquals(ctx.added(), [b('a'), b('b')]) + self.assertEquals(ctx.removed(), []) + self.assertEquals(ctx.ignored(), []) + self.assertEquals(ctx.clean(), []) + + man = {b('a') : b('047b75c6d7a3ef6a2243bd0e99f94f6ea6683597'), + b('b') : b('62452855512f5b81522aa3895892760bb8da9f3f')} + self.assertEquals(ctx.manifest(), man) + + self.assertEquals([int(c) for c in ctx.parents()], [-1]) + self.assertEquals(int(ctx.p1()), -1) + self.assertEquals(int(ctx.p2()), -1) + + self.assertEquals([int(c) for c in ctx.children()], [1]) + self.assertEquals([int(c) for c in ctx.descendants()], [0, 1]) + self.assertEquals([int(c) for c in ctx.ancestors()], [0]) + + self.client.bookmark(b('bookmark'), inactive=True, rev=node0) + self.assertEquals(ctx.bookmarks(), [b('bookmark')]) + + self.client.tag(b('tag'), rev=node0) + # tags are read on construction + self.assertEquals(self.client[node0].tags(), [b('tag')]) + + def test_construction(self): + self.append('a', 'a') + rev0, node0 = self.client.commit(b('first'), addremove=True) + tip = self.client.tip() + + # from client.revision + ctx = context.changectx(self.client, tip) + self.assertEquals(ctx.node(), tip.node) + + # from revset + ctx = context.changectx(self.client, b('all()')) + self.assertEquals(ctx.node(), tip.node) + + def test_in_keyword(self): + """ + test the 'in' keyword using both revision numbers or changeset ids. + """ + if sys.version_info < (2, 7): + return + + self.append('a', 'a') + rev0, node0 = self.client.commit(b('first'), addremove=True) + self.append('a', 'a') + rev1, node1 = self.client.commit(b('second')) + + self.assertIn(1, self.client) + hash_1 = self.client.log(0)[0][1] + self.assertIn(hash_1, self.client) + self.assertNotIn(2, self.client) + hash_2 = self.client.log(1)[0][1] + self.assertIn(hash_2, self.client) + hash_2 = b('deadbeef') + self.assertNotIn(hash_2, self.client) --- python-hglib-1.9.orig/tests/test-hidden.py +++ python-hglib-1.9/tests/test-hidden.py @@ -0,0 +1,71 @@ +from tests import common +import hglib, datetime +from hglib.error import CommandError +from hglib.util import b + +class test_obsolete_reference(common.basetest): + """make sure obsolete changesets are disabled""" + def test_debugobsolete_failure(self): + f = open('gna1','w') + f.write('g') + f.close() + self.client.add(b('gna1')) + cs = self.client.commit(b('gna1'))[1] #get id + self.assertRaises(CommandError, + self.client.rawcommand, [b('debugobsolete'), cs]) + + +class test_obsolete_baselib(common.basetest): + """base test class with obsolete changesets enabled""" + def setUp(self): + #create an extension which only activates obsolete + super(test_obsolete_baselib, self).setUp() + self.append('.hg/obs.py', + "import mercurial.obsolete\n" + "mercurial.obsolete._enabled = True") + self.append('.hg/hgrc','\n[extensions]\nobs=.hg/obs.py') + +class test_obsolete_client(test_obsolete_baselib): + """check client methods with obsolete changesets enabled""" + def test_debugobsolete_success(self): + """check the obsolete extension is available""" + self.append('gna1','ga') + self.client.add(b('gna1')) + cs = self.client.commit(b('gna1'))[1] #get id + self.client.rawcommand([b('debugobsolete'), cs]) + + def test_obsolete_in(self): + """test the 'hidden' keyword with the 'in' method""" + if self.client.version < (2, 9, 0): + return + self.append('gna1','ga') + self.client.add(b('gna1')) + cs0 = self.client.commit(b('gna1'))[1] #get id + self.append('gna2','gaaa') + self.client.add(b('gna2')) + cs1 = self.client.commit(b('gna2'))[1] #get id + self.client.rawcommand([b('debugobsolete'), cs1]) + self.client.update(cs0) + self.assertFalse(cs1 in self.client) + self.assertTrue(cs0 in self.client) + self.client.hidden = True + self.assertTrue(cs1 in self.client) + +class test_hidden_context(test_obsolete_baselib): + """test the "hidden" context method with obsolete changesets enabled on + hidden and visible changesets""" + def test_hidden(self): + if self.client.version < (2, 9, 0): + return + self.append('gna1','ga') + self.client.add(b('gna1')) + cs0 = self.client.commit(b('gna1'))[1] #get id + ctx0 = self.client[cs0] + self.append('gna2','gaaa') + self.client.add(b('gna2')) + cs1 = self.client.commit(b('gna2'))[1] #get id + ctx1 = self.client[cs1] + self.client.rawcommand([b('debugobsolete'), cs1]) + self.client.update(cs0) + self.assertTrue(ctx1.hidden()) + self.assertFalse(ctx0.hidden()) --- python-hglib-1.9.orig/tests/test-phase.py +++ python-hglib-1.9/tests/test-phase.py @@ -0,0 +1,47 @@ +from tests import common +import hglib +from hglib.util import b + +class test_phase(common.basetest): + """test the different ways to use the phase command""" + def test_phase(self): + """test getting data from a single changeset""" + self.append('a', 'a') + rev, node0 = self.client.commit(b('first'), addremove=True) + self.assertEqual([(0, b('draft'))], self.client.phase(node0)) + ctx = self.client[rev] + self.assertEqual(b('draft'), ctx.phase()) + + def test_phase_public(self): + """test phase change from draft to public""" + self.append('a', 'a') + rev, node0 = self.client.commit(b('first'), addremove=True) + self.client.phase(node0, public=True) + self.assertEqual([(0, b('public'))], self.client.phase(node0)) + ctx = self.client[rev] + self.assertEqual(b('public'), ctx.phase()) + + def test_phase_secret(self): + """test phase change from draft to secret""" + self.append('a', 'a') + rev, node0 = self.client.commit(b('first'), addremove=True) + self.assertRaises(hglib.error.CommandError, + self.client.phase, node0, secret=True) + self.client.phase(node0, secret=True, force=True) + self.assertEqual([(0, b('secret'))], self.client.phase(node0)) + ctx = self.client[rev] + self.assertEqual(b('secret'), ctx.phase()) + + + def test_phase_multiple(self): + """test phase changes and show the phases of the different changesets""" + self.append('a', 'a') + rev, node0 = self.client.commit(b('a'), addremove=True) + self.client.phase(node0, public=True) + self.append('b', 'b') + rev, node1 = self.client.commit(b('b'), addremove=True) + self.append('c', 'c') + rev, node2 = self.client.commit(b('c'), addremove=True) + self.client.phase(node2, secret=True, force=True) + self.assertEqual([(0, b('public')), (2, b('secret')), (1, b('draft'))], + self.client.phase([node0, node2, node1]))