The current package contains compatibility probrem with bzr 2.6 and fixed version was pushed to upstream vcs.
I want to update it to newer snapshot. I attached a patch. Is the new package acceptable? Regards, -- Koichi Akabe vbkaisetsu at {gmail.com, debian.or.jp}
diff -Nru bzr-stats-0.1.0+bzr48/classify.py bzr-stats-0.1.0+bzr51/classify.py --- bzr-stats-0.1.0+bzr48/classify.py 2010-10-13 13:54:33.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/classify.py 2012-08-28 09:28:39.000000000 +0900 @@ -15,6 +15,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Classify a commit based on the types of files it changed.""" +from __future__ import absolute_import + import os.path from bzrlib import urlutils diff -Nru bzr-stats-0.1.0+bzr48/cmds.py bzr-stats-0.1.0+bzr51/cmds.py --- bzr-stats-0.1.0+bzr48/cmds.py 2011-03-22 08:27:31.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/cmds.py 2012-08-28 09:28:39.000000000 +0900 @@ -15,6 +15,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """A Simple bzr plugin to generate statistics about the history.""" +from __future__ import absolute_import + from bzrlib import ( branch, commands, @@ -26,6 +28,7 @@ ui, workingtree, ) +from bzrlib.revision import NULL_REVISION from bzrlib.plugins.stats.classify import classify_delta from itertools import izip @@ -166,7 +169,10 @@ a_repo.lock_read() try: trace.note('getting ancestry') - ancestry = a_repo.get_ancestry(revision)[1:] + graph = a_repo.get_graph() + ancestry = [ + r for (r, ps) in graph.iter_ancestry([revision]) + if ps is not None and r != NULL_REVISION] revs, canonical_committer = get_revisions_and_committers(a_repo, ancestry) finally: a_repo.unlock() @@ -183,11 +189,9 @@ pb = ui.ui_factory.nested_progress_bar() a_repo.lock_read() try: - trace.note('getting ancestry 1') - start_ancestry = set(a_repo.get_ancestry(start_rev)) - trace.note('getting ancestry 2') - ancestry = a_repo.get_ancestry(end_rev)[1:] - ancestry = [rev for rev in ancestry if rev not in start_ancestry] + graph = a_repo.get_graph() + trace.note('getting ancestry diff') + ancestry = graph.find_difference(start_rev, end_rev)[1] revs, canonical_committer = get_revisions_and_committers(a_repo, ancestry) finally: a_repo.unlock() @@ -366,7 +370,8 @@ } repository.lock_read() try: - ancestry = filter(lambda x: x is not None, repository.get_ancestry(revid)) + graph = repository.get_graph() + ancestry = [r for (r, ps) in graph.iter_ancestry([revid]) if ps is not None] revs = repository.get_revisions(ancestry) pb = ui.ui_factory.nested_progress_bar() try: diff -Nru bzr-stats-0.1.0+bzr48/debian/changelog bzr-stats-0.1.0+bzr51/debian/changelog --- bzr-stats-0.1.0+bzr48/debian/changelog 2012-05-29 07:50:34.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/debian/changelog 2012-08-29 11:32:40.000000000 +0900 @@ -1,3 +1,23 @@ +bzr-stats (0.1.0+bzr51-1) unstable; urgency=low + + * New maintainer (Closes: #668919) + * New upstream snapshot + + fix compatibility with bzr 2.6 (Closes: #686138) + * debian/compat + - up to 9 + * debian/rules + - add get-orig-source target + - change build command for dh9 + * debian/control + - remove half broken Build-Depends: bzr (<< 2.4.0~beta1-2) + - update X-Python-Version to 2.6 or later to follow bzr package + - update debhelper version to 9.0.0 + * debian/copyright + - merge contents of same field + - remove undefined fields: Debianized-Date and Debianized-By + + -- Koichi Akabe <vbkaise...@gmail.com> Tue, 28 Aug 2012 15:57:29 +0900 + bzr-stats (0.1.0+bzr48-2) unstable; urgency=low * Orphan package. diff -Nru bzr-stats-0.1.0+bzr48/debian/compat bzr-stats-0.1.0+bzr51/debian/compat --- bzr-stats-0.1.0+bzr48/debian/compat 2012-05-29 07:50:34.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/debian/compat 2012-08-28 09:30:33.000000000 +0900 @@ -1 +1 @@ -7 +9 diff -Nru bzr-stats-0.1.0+bzr48/debian/control bzr-stats-0.1.0+bzr51/debian/control --- bzr-stats-0.1.0+bzr48/debian/control 2012-05-29 07:50:34.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/debian/control 2012-08-28 20:51:08.000000000 +0900 @@ -1,16 +1,15 @@ Source: bzr-stats Section: vcs Priority: optional -Maintainer: Debian QA Group <packa...@qa.debian.org> -Build-Depends-Indep: python-bzrlib.tests | bzr (<< 2.4.0~beta1-2), - bzr (>= 1.13~), - python-subunit, - python-testtools -Build-Depends: debhelper (>= 7.0.50~), python (>= 2.6.6-3) +Maintainer: Debian Bazaar Maintainers <pkg-bazaar-ma...@lists.alioth.debian.org> +Uploaders: Koichi Akabe <vbkaise...@gmail.com> +Build-Depends-Indep: python-bzrlib.tests, bzr (>= 1.13~), python-subunit, python-testtools +Build-Depends: debhelper (>= 9.0.0), python (>= 2.6.6-3) Standards-Version: 3.9.3 -X-Python-Version: >= 2.4 -Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/bzr-stats/unstable +X-Python-Version: >= 2.6 Homepage: http://launchpad.net/bzr-stats +Vcs-Bzr: http://bzr.debian.org/bzr/pkg-bazaar/bzr-stats/unstable +Vcs-Browser: http://anonscm.debian.org/loggerhead/pkg-bazaar/bzr-stats/unstable/files DM-Upload-Allowed: yes Package: bzr-stats diff -Nru bzr-stats-0.1.0+bzr48/debian/copyright bzr-stats-0.1.0+bzr51/debian/copyright --- bzr-stats-0.1.0+bzr48/debian/copyright 2012-05-29 07:50:34.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/debian/copyright 2012-08-28 09:15:30.000000000 +0900 @@ -1,39 +1,25 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: bzr-stats Upstream-Contact: Bazaar Developers <baz...@lists.canonical.com> -Source: https://launchpad.net/bzr-stats/ - -Files: debian/* -Comment: - This package was debianized by Jelmer Vernooij <jel...@samba.org> on Wed Oct - 24 13:31:13 CET 2007. -Copyright: Jelmer Vernooij <jel...@debian.org> -License: GPL-2+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License with - the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-2; - if not, write to the Free Software Foundation, Inc., 51 Franklin St, - Fifth Floor, Boston, MA 02110-1301, USA. +Source: https://launchpad.net/bzr-stats Files: * Comment: Upstream authors: - Jelmer Vernooij <jel...@samba.org> - John Arbash Meinel <j...@arbash-meinel.com> - Russ Brown <pickscr...@gmail.com> - Lukáš Lalinský <lalin...@gmail.com> - Wesley J. Landaker <wjla...@sandia.gov> + Jelmer Vernooij <jel...@samba.org> + John Arbash Meinel <j...@arbash-meinel.com> + Russ Brown <pickscr...@gmail.com> + Lukáš Lalinský <lalin...@gmail.com> + Wesley J. Landaker <wjla...@sandia.gov> Copyright: 2007-2012 Canonical Ltd -Copyright: 2008-2010 Jelmer Vernooij <jel...@samba.org> + 2008-2010 Jelmer Vernooij <jel...@samba.org> +License: GPL-2+ + +Files: debian/* +Copyright: Jelmer Vernooij <jel...@debian.org> + Koichi Akabe <vbkaise...@gmail.com> +License: GPL-2+ + License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru bzr-stats-0.1.0+bzr48/debian/rules bzr-stats-0.1.0+bzr51/debian/rules --- bzr-stats-0.1.0+bzr48/debian/rules 2012-05-29 07:50:34.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/debian/rules 2012-08-28 15:49:43.000000000 +0900 @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh --with python2 --buildsystem=python_distutils $* + dh "$@" --with python2 --buildsystem=python_distutils ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) CONCURRENCY = BZR_CONCURRENCY=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) @@ -12,3 +12,12 @@ $(CONCURRENCY) BZR_PLUGINS_AT=stats@$(CURDIR) /usr/bin/bzr selftest -s bp.stats \ -v --parallel=fork endif + +PACKAGE = bzr-stats +SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p') +BZR_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/bzr//' ) +TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.bz2 +.PHONY: get-orig-source +get-orig-source: + bzr export $(TARBALL) -r $(BZR_REVISION) "lp:bzr-stats" + echo " "$(TARBALL)" created; move it to the right destination to build the package" diff -Nru bzr-stats-0.1.0+bzr48/info.py bzr-stats-0.1.0+bzr51/info.py --- bzr-stats-0.1.0+bzr48/info.py 2011-02-27 04:26:00.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/info.py 2012-08-28 09:28:39.000000000 +0900 @@ -1,3 +1,5 @@ +from __future__ import absolute_import + bzr_plugin_name = 'stats' bzr_plugin_version = (0, 2, 0, 'dev', 0) diff -Nru bzr-stats-0.1.0+bzr48/po/en_GB.po bzr-stats-0.1.0+bzr51/po/en_GB.po --- bzr-stats-0.1.0+bzr48/po/en_GB.po 1970-01-01 09:00:00.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/po/en_GB.po 2012-08-28 09:28:39.000000000 +0900 @@ -0,0 +1,34 @@ +# English (United Kingdom) translation for bzr-stats +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the bzr-stats package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: bzr-stats\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-11-12 05:56+0100\n" +"PO-Revision-Date: 2012-05-01 11:31+0000\n" +"Last-Translator: Dan Bishop <d...@danbishop.org>\n" +"Language-Team: English (United Kingdom) <en...@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-05-02 05:14+0000\n" +"X-Generator: Launchpad (build 15177)\n" + +#: cmds.py:243 +msgid "Generate statistics for LOCATION." +msgstr "Generate statistics for LOCATION." + +#: cmds.py:248 +msgid "Show the class of contributions." +msgstr "Show the class of contributions." + +#: cmds.py:286 +msgid "Figure out the ancestor graph for LOCATION" +msgstr "Figure out the ancestor graph for LOCATION" + +#: cmds.py:395 +msgid "Determine credits for LOCATION." +msgstr "Determine credits for LOCATION." diff -Nru bzr-stats-0.1.0+bzr48/test_classify.py bzr-stats-0.1.0+bzr51/test_classify.py --- bzr-stats-0.1.0+bzr48/test_classify.py 2010-01-16 07:15:53.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/test_classify.py 2012-08-28 09:28:39.000000000 +0900 @@ -13,8 +13,11 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +from __future__ import absolute_import + from bzrlib.tests import TestCase -from bzrlib.plugins.stats.classify import classify_filename, classify_delta +from bzrlib.plugins.stats.classify import classify_filename class TestClassify(TestCase): diff -Nru bzr-stats-0.1.0+bzr48/test_stats.py bzr-stats-0.1.0+bzr51/test_stats.py --- bzr-stats-0.1.0+bzr48/test_stats.py 2010-06-02 05:41:07.000000000 +0900 +++ bzr-stats-0.1.0+bzr51/test_stats.py 2012-08-28 09:28:39.000000000 +0900 @@ -1,3 +1,5 @@ +from __future__ import absolute_import + from bzrlib.tests import TestCase, TestCaseWithTransport from bzrlib.revision import Revision from bzrlib.plugins.stats.cmds import get_revisions_and_committers, collapse_by_person
pgpV4Zrv1e8Pq.pgp
Description: PGP signature