diff -Nru breezy-debian-2.8.9/debian/changelog breezy-debian-2.8.10/debian/changelog --- breezy-debian-2.8.9/debian/changelog 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/debian/changelog 2017-11-08 23:23:20.000000000 +0000 @@ -1,3 +1,11 @@ +breezy-debian (2.8.10) unstable; urgency=medium + + * debian/copyright: Fix package name. + * Fix compatibility with newer versions of breezy. + * Bump standards version to 4.1.1 + + -- Jelmer Vernooij Wed, 08 Nov 2017 23:23:20 +0000 + breezy-debian (2.8.9) unstable; urgency=medium * Update to be compatible with breezy rather than bazaar. diff -Nru breezy-debian-2.8.9/debian/control breezy-debian-2.8.10/debian/control --- breezy-debian-2.8.9/debian/control 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/debian/control 2017-11-08 23:23:20.000000000 +0000 @@ -4,16 +4,16 @@ Maintainer: Debian Bazaar Maintainers Uploaders: Jelmer Vernooij Build-Depends: debhelper (>= 9), python-all (>= 2.6.6-3), xz-utils -Build-Depends-Indep: brz, python-docutils, python-debian (>= 0.1.11), python-apt, patchutils, python-testtools (>= 0.9.2), pristine-tar, devscripts (>= 2.10.59), python-subunit, python-breezy.tests, python-lzma, libalgorithm-merge-perl, python-distro-info, quilt +Build-Depends-Indep: brz, python-docutils, python-debian (>= 0.1.11), python-apt, patchutils, python-testtools (>= 0.9.2), pristine-tar, devscripts (>= 2.10.59), python-subunit, python-breezy.tests (>= 3.0.0~bzr6819), python-lzma, libalgorithm-merge-perl, python-distro-info, quilt Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/brz-debian/unstable Vcs-Browser: http://bzr.debian.org/loggerhead/pkg-bazaar/brz-debian/unstable X-Python-Version: >= 2.4 -Standards-Version: 4.0.0 +Standards-Version: 4.1.1 XS-Testsuite: autopkgtest Package: brz-debian Architecture: all -Depends: brz (>= 2.1~), python-debian (>= 0.1.11), python-apt, ${python:Depends}, dpkg-dev, fakeroot, devscripts (>= 2.10.59), patchutils, pristine-tar, quilt, ${misc:Depends} +Depends: brz (>= 3.0.0~bzr6819), python-breezy (>= 3.0.0~bzr6819), python-debian (>= 0.1.11), python-apt, ${python:Depends}, dpkg-dev, fakeroot, devscripts (>= 2.10.59), patchutils, pristine-tar, quilt, ${misc:Depends} Recommends: python-launchpadlib, libalgorithm-merge-perl, python-distro-info Suggests: python-lzma Provides: brz-buildpackage diff -Nru breezy-debian-2.8.9/debian/copyright breezy-debian-2.8.10/debian/copyright --- breezy-debian-2.8.9/debian/copyright 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/debian/copyright 2017-11-08 23:23:20.000000000 +0000 @@ -14,18 +14,18 @@ License: - brz-debian is free software; you can redistribute it and/or modify + breezy-debian 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. - brz-debian is distributed in the hope that it will be useful, + breezy-debian 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 - along with brz-debian; if not, write to the Free Software + along with breezy-debian; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General @@ -39,5 +39,12 @@ and is also under the GPL, version 2 or later. +bzrtools_bzrtools.py comes from bzrtools and is: + +# Copyright (C) 2005, 2006, 2007 Aaron Bentley +# Copyright (C) 2007 John Arbash Meinel + +and is also under the GPL, version 2 or later. + The Debian packaging is (C) 2006 James Westby , and is placed under the same license as the rest of the package. diff -Nru breezy-debian-2.8.9/import_dsc.py breezy-debian-2.8.10/import_dsc.py --- breezy-debian-2.8.9/import_dsc.py 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/import_dsc.py 2017-11-08 23:23:20.000000000 +0000 @@ -454,7 +454,7 @@ return None, None, None tree.lock_read() try: - config = ConfigObj(tree.get_file(c_fileid, path)) + config = ConfigObj(tree.get_file(path, c_fileid)) try: config['BUILDDEB'] except KeyError: diff -Nru breezy-debian-2.8.9/__init__.py breezy-debian-2.8.10/__init__.py --- breezy-debian-2.8.9/__init__.py 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/__init__.py 2017-11-08 23:23:20.000000000 +0000 @@ -138,10 +138,10 @@ # Not a file in one tree if change[6][0] != 'file' or change[6][1] != 'file': return start_message - old_text = commit.work_tree.basis_tree().get_file(change[0], - path=change[1][0]).readlines() - new_text = commit.work_tree.get_file(change[0], - path=change[1][1]).readlines() + old_text = commit.work_tree.basis_tree().get_file( + change[1][0], file_id=change[0]).readlines() + new_text = commit.work_tree.get_file( + change[1][1], file_id=change[0]).readlines() import difflib sequencematcher = difflib.SequenceMatcher for group in sequencematcher(None, old_text, diff -Nru breezy-debian-2.8.9/Makefile breezy-debian-2.8.10/Makefile --- breezy-debian-2.8.9/Makefile 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/Makefile 2017-11-08 23:23:20.000000000 +0000 @@ -1,18 +1,27 @@ +BRZ ?= $(shell which brz) +BRZ_OPTIONS ?= -Derror +PYTHON ?= $(shell which python) +SETUP ?= $(PYTHON) ./setup.py +TESTS ?= "^breezy.plugins.debian." + all: update-pot -.PHONY: update-pot po/bzr-builddeb.pot -update-pot: po/bzr-builddeb.pot +.PHONY: update-pot po/breezy-debian.pot +update-pot: po/breezy-debian.pot TRANSLATABLE_PYFILES:=$(shell find . -name '*.py' \ | grep -v 'tests/' \ ) -po/bzr-builddeb.pot: $(PYFILES) $(DOCFILES) - BZR_PLUGINS_AT=builddeb@$(shell pwd) bzr export-pot \ - --plugin=builddeb > po/bzr-builddeb.pot +po/breezy-debian.pot: $(PYFILES) $(DOCFILES) + BRZ_PLUGINS_AT=builddeb@$(shell pwd) $(BRZ) export-pot \ + --plugin=builddeb > po/breezy-debian.pot echo $(TRANSLATABLE_PYFILES) | xargs \ - xgettext --package-name "bzr-builddeb" \ + xgettext --package-name "breezy-debian" \ --msgid-bugs-address "" \ --copyright-holder "Canonical Ltd. " \ --from-code ISO-8859-1 --sort-by-file --join --add-comments=i18n: \ - -d bzr-builddeb -p po -o bzr-builddeb.pot + -d breezy-debian -p po -o breezy-debian.pot + +check: + BRZ_PLUGINS_AT=debian@$(shell pwd) $(PYTHON) $(PYTHON_OPTIONS) $(BRZ) $(BRZ_OPTIONS) selftest $(TEST_OPTIONS) $(TESTS) diff -Nru breezy-debian-2.8.9/quilt.py breezy-debian-2.8.10/quilt.py --- breezy-debian-2.8.9/quilt.py 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/quilt.py 2017-11-08 23:23:20.000000000 +0000 @@ -153,13 +153,12 @@ """Find the list of applied quilt patches. """ - file_id = tree.path2id(".pc/applied-patches") - if file_id is None: - return [] try: return [patch.rstrip("\n") for patch in - tree.get_file_lines(file_id, ".pc/applied-patches") + tree.get_file_lines(".pc/applied-patches") if patch.strip() != ""] + except errors.NoSuchFile: + return [] except (IOError, OSError), e: if e.errno == errno.ENOENT: # File has already been removed @@ -194,15 +193,14 @@ :param tree: Tree to read from """ - file_id = tree.path2id("debian/patches/series") - if file_id is None: - return [] try: return [patch.rstrip("\n") for patch in - tree.get_file_lines(file_id, "debian/patches/series") + tree.get_file_lines("debian/patches/series") if patch.strip() != ""] except (IOError, OSError), e: if e.errno == errno.ENOENT: # File has already been removed return [] raise + except errors.NoSuchFile: + return [] diff -Nru breezy-debian-2.8.9/tests/test_import_dsc.py breezy-debian-2.8.10/tests/test_import_dsc.py --- breezy-debian-2.8.9/tests/test_import_dsc.py 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/tests/test_import_dsc.py 2017-11-08 23:23:20.000000000 +0000 @@ -1826,7 +1826,7 @@ builder.add_default_control() builder.add_upstream_file("b", "Renamed a") builder.build() - upstream_tree.unversion(['b-id']) + upstream_tree.unversion(['b']) os.unlink('upstream/b') upstream_tree.rename_one('a', 'b') # We don't add the new file upstream, as the new file id would diff -Nru breezy-debian-2.8.9/tests/test_merge_changelog.py breezy-debian-2.8.10/tests/test_merge_changelog.py --- breezy-debian-2.8.9/tests/test_merge_changelog.py 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/tests/test_merge_changelog.py 2017-11-08 23:23:20.000000000 +0000 @@ -319,7 +319,7 @@ def make_params(self): builder = self.make_branch_builder('source') builder.start_series() - builder.build_snapshot('A', None, [ + builder.build_snapshot(None, [ ('add', ('', 'TREE_ROOT', 'directory', None)), ('add', ('debian', 'deb-id', 'directory', None)), ('add', ('debian/changelog', 'c-id', 'file', '')), @@ -336,7 +336,7 @@ def __init__(self, this_tree): self.this_tree = this_tree def get_lines(self, tree, file_id): - return tree.get_file_lines(file_id) + return tree.get_file_lines(tree.id2path(file_id), file_id) merger = FakeMerger(tree) params_cls = merge.MergeFileHookParams diff -Nru breezy-debian-2.8.9/upstream/__init__.py breezy-debian-2.8.10/upstream/__init__.py --- breezy-debian-2.8.9/upstream/__init__.py 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/upstream/__init__.py 2017-11-08 23:23:20.000000000 +0000 @@ -258,7 +258,7 @@ (tmp, tempfilename) = tempfile.mkstemp() try: tmp = os.fdopen(tmp, 'wb') - watch = self.tree.get_file_text(watch_id) + watch = self.tree.get_file_text(watchfile, watch_id) tmp.write(watch) finally: tmp.close() diff -Nru breezy-debian-2.8.9/util.py breezy-debian-2.8.10/util.py --- breezy-debian-2.8.9/util.py 2017-06-17 14:10:48.000000000 +0000 +++ breezy-debian-2.8.10/util.py 2017-11-08 23:23:20.000000000 +0000 @@ -20,6 +20,7 @@ from __future__ import absolute_import +import errno try: import hashlib as md5 except ImportError: @@ -187,17 +188,15 @@ # If it is a "top_level" package and debian is a symlink to # "." then it will have found debian/changelog. Try and detect # this. - debian_file_id = t.path2id('debian') - if (debian_file_id is not None and - t.kind(debian_file_id) == 'symlink' and - t.get_symlink_target(t.path2id('debian')) == '.'): + if (t.path2id('debian') and + t.kind('debian') == 'symlink' and + t.get_symlink_target('debian') == '.'): changelog_file = 'changelog' top_level = True mutter("Using '%s' to get package information", changelog_file) - changelog_id = t.path2id(changelog_file) - if changelog_id is None: + if t.path2id(changelog_file) is None: raise AddChangelogError(changelog_file) - contents = t.get_file_text(changelog_id) + contents = t.get_file_text(changelog_file) finally: t.unlock() changelog = Changelog() @@ -562,14 +561,14 @@ user_config = None if (working_tree and tree.has_filename(new_local_conf)): if tree.path2id(new_local_conf) is None: - config_files.append((tree.get_file_byname(new_local_conf), True, + config_files.append((tree.get_file(new_local_conf), True, "local.conf")) else: warning('Not using configuration from %s as it is versioned.', new_local_conf) if (working_tree and tree.has_filename(local_conf)): if tree.path2id(local_conf) is None: - config_files.append((tree.get_file_byname(local_conf), True, + config_files.append((tree.get_file(local_conf), True, "local.conf")) else: warning('Not using configuration from %s as it is versioned.', @@ -577,10 +576,10 @@ config_files.append((global_conf(), True)) user_config = global_conf() if tree.path2id(new_conf): - config_files.append((tree.get_file(tree.path2id(new_conf)), False, + config_files.append((tree.get_file(new_conf), False, "bzr-builddeb.conf")) if tree.path2id(default_conf): - config_files.append((tree.get_file(tree.path2id(default_conf)), False, + config_files.append((tree.get_file(default_conf), False, "default.conf")) config = DebBuildConfig(config_files, tree=tree) config.set_user_config(user_config) @@ -664,10 +663,14 @@ :return: String with package format """ filename = "debian/source/format" - if not tree.has_filename(filename): + try: + text = tree.get_file_text(filename) + except IOError as (num, unused_msg): + if num == errno.ENOENT: + return FORMAT_1_0 + raise + except errors.NoSuchFile: return FORMAT_1_0 - file_id = tree.path2id(filename) - text = tree.get_file_text(file_id, filename) return text.strip()