debian/0000755000000000000000000000000012245146545007176 5ustar debian/patches/0000755000000000000000000000000012245146316010621 5ustar debian/patches/dont-use-get_ancestry.diff0000644000000000000000000000203512244500763015675 0ustar Description: Don't use get_ancestry() call The get_ancestry() method was removed from bzr sometime in the past. The actual code was pulled from a similar bug in bzr-stat where get_ancestry() is reimplemented as a two-liner. . This is just a work around until upstream has a better implementation. Author: Zygmunt Krynicki Bug-Ubuntu: https://bugs.launchpad.net/bugs/1084749 Reviewed-By: Andrew Starr-Bochicchio Sun, 24 Nov 2013 17:46:36 -0500 --- bzr-fastimport-0.13.0.orig/branch_updater.py +++ bzr-fastimport-0.13.0/branch_updater.py @@ -165,7 +165,8 @@ class BranchUpdater(object): # apply tags known in this branch my_tags = {} if self.tags: - ancestry = self.repo.get_ancestry(last_rev_id) + graph = self.repo.get_graph() + ancestry = [r for (r, ps) in graph.iter_ancestry([last_rev_id]) if ps is not None] for tag,rev in self.tags.items(): if rev in ancestry: my_tags[tag] = rev debian/patches/disable-known-graph-feature.patch0000644000000000000000000000125412245146316017131 0ustar Description: Disable know graph feature. repo.get_known_graph_ancestry() can't be called while in the middle of a write group. Otherwise bzr will crash with: 'BTreeBuilder' object has no attribute '_find_ancestors'. Author: Felipe Contreras Bug: https://launchpad.net/bugs/541626 Bug-Ubuntu: https://launchpad.net/bugs/541626 --- a/revision_store.py +++ b/revision_store.py @@ -170,7 +170,7 @@ """ self.repo = repo self._graph = None - self._use_known_graph = True + self._use_known_graph = False self._supports_chks = getattr(repo._format, 'supports_chks', False) def expects_rich_root(self): debian/patches/series0000644000000000000000000000013012245146006012024 0ustar dont-use-get_ancestry.diff improve_error_message.diff disable-known-graph-feature.patch debian/patches/improve_error_message.diff0000644000000000000000000001002512244501555016046 0ustar Description: Print sane error when a fastimport file is incomplete. Origin: commit, revision id: jelmer@samba.org-20120301211718-3hcascmwxdkt2knz Author: Jelmer Vernooij Bug: https://launchpad.net/bugs/937972 Last-Update: 2012-03-01 Applied-Upstream: merged in revision 355 X-Bzr-Revision-Id: jelmer@samba.org-20120301211718-3hcascmwxdkt2knz === modified file 'NEWS' Index: unstable/NEWS =================================================================== --- unstable.orig/NEWS 2013-11-24 17:53:19.352598575 -0500 +++ unstable/NEWS 2013-11-24 17:53:19.344598575 -0500 @@ -4,6 +4,12 @@ .. contents:: +Bug fixes +--------- + +* Print sane error when a fastimport file is incomplete. + (Jelmer Vernooij, #937972) + 0.13 2012-02-29 Changes Index: unstable/cmds.py =================================================================== --- unstable.orig/cmds.py 2013-11-24 17:53:19.352598575 -0500 +++ unstable/cmds.py 2013-11-24 17:53:19.348598575 -0500 @@ -31,12 +31,17 @@ :param processor_factory: a callable for creating a processor :param user_map: if not None, the file containing the user map. """ + from fastimport.errors import ParsingError + from bzrlib.errors import BzrCommandError from fastimport import parser stream = _get_source_stream(source) user_mapper = _get_user_mapper(user_map) proc = processor_factory(verbose=verbose, **kwargs) p = parser.ImportParser(stream, verbose=verbose, user_mapper=user_mapper) - return proc.process(p.iter_commands) + try: + return proc.process(p.iter_commands) + except ParsingError, e: + raise BzrCommandError("%d: Parse error: %s" % (e.lineno, e)) def _get_source_stream(source): @@ -309,13 +314,18 @@ def _generate_info(self, source): from cStringIO import StringIO from fastimport import parser + from fastimport.errors import ParsingError + from bzrlib.errors import BzrCommandError from bzrlib.plugins.fastimport.processors import info_processor stream = _get_source_stream(source) output = StringIO() try: proc = info_processor.InfoProcessor(verbose=True, outf=output) p = parser.ImportParser(stream) - return_code = proc.process(p.iter_commands) + try: + return_code = proc.process(p.iter_commands) + except ParsingError, e: + raise BzrCommandError("%d: Parse error: %s" % (e.lineno, e)) lines = output.getvalue().splitlines() finally: output.close() @@ -442,12 +452,16 @@ " a newer python-fastimport to use " "--dont-squash-empty-commits") + from fastimport.errors import ParsingError from fastimport import parser stream = _get_source_stream(source) user_mapper = _get_user_mapper(user_map) proc = filter_processor.FilterProcessor(params=params, verbose=verbose) p = parser.ImportParser(stream, verbose=verbose, user_mapper=user_mapper) - return proc.process(p.iter_commands) + try: + return proc.process(p.iter_commands) + except ParsingError, e: + raise BzrCommandError("%d: Parse error: %s" % (e.lineno, e)) class cmd_fast_import_info(Command): Index: unstable/tests/test_commands.py =================================================================== --- unstable.orig/tests/test_commands.py 2013-11-24 17:53:19.352598575 -0500 +++ unstable/tests/test_commands.py 2013-11-24 17:53:19.348598575 -0500 @@ -228,6 +228,16 @@ data = self.run_bzr("fast-import file.fi br")[0] self.assertEquals(1, tree.branch.revno()) + def test_missing_bytes(self): + self.build_tree_contents([('empty.fi', """ +commit refs/heads/master +mark :1 +committer +data 15 +""")]) + self.make_branch_and_tree("br") + self.run_bzr_error(['bzr: ERROR: 4: Parse error: line 4: Command commit is missing section committer\n'], "fast-import empty.fi br") + class TestFastImportFilter(ExternalBase): debian/copyright0000644000000000000000000000137712245146540011134 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: bzr-fastimport Upstream-Contact: Bazaar Developers Debianized-By: Jelmer Vernooij Debianized-Date: Mi 6. Aug 19:42:18 CEST 2008 Source: http://launchpad.net/bzr-fastimport Files: * Copyright: Copyright (C) 2008-2012 Canonical Ltd License: GPL-2+ On Debian systems the full text of the GNU General Public License version 2 can be found in the `/usr/share/common-licenses/GPL-2' file. Files: debian/* Copyright: Copyright (C) 2008-2009 Jelmer Vernooij License: GPL-2+ On Debian systems the full text of the GNU General Public License version 2 can be found in the `/usr/share/common-licenses/GPL-2' file. debian/control0000644000000000000000000000252112245146540010574 0ustar Source: bzr-fastimport Section: vcs Priority: optional Maintainer: Debian QA Group Homepage: https://launchpad.net/bzr-fastimport Build-Depends-Indep: bzr (>= 1.0), python-bzrlib.tests | bzr (<< 2.4.0~beta1-2), python-fastimport (>= 0.9.0~), python-testtools Build-Depends: debhelper (>= 9), python (>= 2.6.6-3) Standards-Version: 3.9.4 X-Python-Version: >= 2.4 Vcs-Bzr: http://anonscm.debian.org/bzr/pkg-bazaar/bzr-fastimport/unstable/ XS-Testsuite: autopkgtest Package: bzr-fastimport Architecture: all Depends: bzr (>= 1.0), python-fastimport (>= 0.9.0~), ${misc:Depends}, ${python:Depends} Suggests: cvs2svn, git, monotone, python-subvertpy | svn-all-fast-export Enhances: bzr Description: Fast-import/fast-export plugin for Bazaar Bazaar Fast Import is a plugin providing fast loading of revision control data into Bazaar. . It is designed to be used in combination with front-end programs that generate a command/data stream for it to process. Front-ends are available for a wide range of foreign VCS tools including Subversion, CVS, Git, Mercurial, Darcs and Perforce. New front-ends are easy to develop in whatever programming language you prefer, making Bazaar Fast Import useful for teams needing a custom migration solution. debian/tests/0000755000000000000000000000000012244502536010333 5ustar debian/tests/control0000644000000000000000000000010312244502422011722 0ustar Tests: testsuite Depends: bzr, python-bzrlib.tests, python-subunit debian/tests/testsuite0000755000000000000000000000026512244477411012320 0ustar #!/bin/sh # Note that since the installed version of the package has to be tested, # there is no mucking about with BZR_PLUGINS_AT. bzr selftest -s bp.fastimport -v --parallel=fork debian/source/0000755000000000000000000000000012244502536010471 5ustar debian/source/format0000644000000000000000000000001412244477411011702 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000033412245145160010246 0ustar #!/usr/bin/make -f %: dh $@ --with python2 --buildsystem=python_distutils ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: BZR_PLUGINS_AT=fastimport@$(CURDIR) bzr selftest -s bp.fastimport endif debian/compat0000644000000000000000000000000212245145245010370 0ustar 9 debian/changelog0000644000000000000000000001354412245146355011056 0ustar bzr-fastimport (0.13.0-4) unstable; urgency=low * QA upload. * Disable know graph feature to fix a crash. (LP: #541626) * Switch to debhelper 9. -- Benjamin Drung Tue, 26 Nov 2013 17:18:12 +0100 bzr-fastimport (0.13.0-3) unstable; urgency=low * QA upload. [ Jelmer Vernooij ] * Add XS-Testsuite: autopkgtest header. Closes: #692658 [ Zygmunt Krynicki ] * debian/patches/dont-use-get_ancestry.diff: Don't use deprecated and removed get_ancestry() method (LP: #1084749). [ Andrew Starr-Bochicchio ] * debian/patches/improve_error_message.diff: Backport upstream commit to print sane error when a fastimport file is incomplete (LP: #937972). * debian/control: Bump Standards-Version to 3.9.4, no changes needed. * debian/tests/control: - Add python-subunit test dependency. - Drop undefined "no-build-needed" feature. -- Andrew Starr-Bochicchio Sun, 24 Nov 2013 18:01:20 -0500 bzr-fastimport (0.13.0-2) unstable; urgency=low * Orphan package. -- Jelmer Vernooij Mon, 28 May 2012 23:19:26 +0200 bzr-fastimport (0.13.0-1) unstable; urgency=low * New upstream release. * Bump standards version to 3.9.3 (no changes). * Add tests for autopkgtest. -- Jelmer Vernooij Wed, 29 Feb 2012 13:42:26 +0100 bzr-fastimport (0.12.0+bzr351-1) unstable; urgency=low * New upstream snapshot. -- Jelmer Vernooij Tue, 28 Feb 2012 22:25:16 +0100 bzr-fastimport (0.12.0-1) unstable; urgency=low * New upstream release. + Fixes compatibility with bzr 2.5. LP: #923031 -- Jelmer Vernooij Sat, 18 Feb 2012 15:19:59 +0100 bzr-fastimport (0.11.0-1) unstable; urgency=low * New upstream release. + Fixes crash in "bzr fast-import-filter". LP: #792935 + Fixes attribute error in iter_entries_by_dir() during fast-export. LP: #631979 -- Jelmer Vernooij Mon, 22 Aug 2011 18:55:41 +0200 bzr-fastimport (0.10.0+bzr324-1) unstable; urgency=low * New upstream snapshot. -- Jelmer Vernooij Wed, 20 Jul 2011 16:34:20 +0200 bzr-fastimport (0.10.0+bzr317-3) unstable; urgency=low * Re-arrange | condition in build deps to make sbuild happy. * Bump standards version to 3.9.2 (no changes). -- Jelmer Vernooij Fri, 06 May 2011 02:57:20 +0200 bzr-fastimport (0.10.0+bzr317-2) unstable; urgency=low * Add build dependency on python-bzrlib.tests for compatibility with newer versions of bzr. -- Jelmer Vernooij Sun, 01 May 2011 04:09:08 +0200 bzr-fastimport (0.10.0+bzr317-1) unstable; urgency=low * New upstream snapshot. + Fixes 'bzr fast-import' command. LP: #736681 -- Jelmer Vernooij Thu, 28 Apr 2011 16:16:34 +0200 bzr-fastimport (0.10.0+bzr311-1) unstable; urgency=low * Suggest python-subvertpy, which includes a Subversion fast exporter. * New upstream snapshot. * Suggest monotone, which comes with a fast exporter. -- Jelmer Vernooij Mon, 04 Apr 2011 13:36:36 +0200 bzr-fastimport (0.9.0+bzr305-2) unstable; urgency=low * Switch to dh_python2. * Switch to debhelper 7, drop cdbs. -- Jelmer Vernooij Mon, 07 Mar 2011 15:36:33 +0100 bzr-fastimport (0.9.0+bzr305-1) unstable; urgency=low * Add tarball location to watch file. * New upstream snapshot. * Switch to python-support. -- Jelmer Vernooij Wed, 02 Feb 2011 11:43:11 +0100 bzr-fastimport (0.9.0+bzr299-1) unstable; urgency=low * New upstream snapshot. + Emits only a single author when --plain is specified. LP: #496677 + Imports binary_stream from python-fastimport helpers. Closes: #605351 + Supports newer marks file format. Closes: #523858, LP: #347729 * New upstream snapshot. -- Jelmer Vernooij Sat, 18 Dec 2010 00:59:57 +0100 bzr-fastimport (0.9.0+bzr279-1) unstable; urgency=low * New upstream snapshot. * Bump standards version to 3.9.1 (no changes). * Run testsuite during package build. -- Jelmer Vernooij Sat, 06 Nov 2010 18:40:27 +0100 bzr-fastimport (0.9.0-2) unstable; urgency=low * Drop remaining patches. Closes: #577774 * Bump standards version to 3.9.0. -- Jelmer Vernooij Tue, 20 Jul 2010 21:23:39 +0200 bzr-fastimport (0.9.0-1ubuntu1) maverick; urgency=low * Suggest cvs2svn. -- Jelmer Vernooij Tue, 20 Jul 2010 20:20:55 +0200 bzr-fastimport (0.9.0-1) unstable; urgency=low * New upstream release. + Fixes compatibility with versions of bzr that lack configobj. Closes: #582519 * Bump standards version to 3.8.4. -- Jelmer Vernooij Fri, 21 May 2010 17:39:57 +0200 bzr-fastimport (0.9.0~bzr261-1) unstable; urgency=low * New upstream snapshot. [ Felix Zielcke ] * Fix installation of exporters module. (Closes: #550794) -- Jelmer Vernooij Thu, 26 Nov 2009 20:00:28 +0100 bzr-fastimport (0.9.0~bzr243-1) unstable; urgency=low * New upstream snapshot. * Bump standards version to 3.8.3. -- Jelmer Vernooij Sat, 26 Sep 2009 00:21:27 +0200 bzr-fastimport (0.9.0~bzr188-1) unstable; urgency=low * New upstream snapshot. * Bump standards version to 3.8.2. -- Jelmer Vernooij Fri, 24 Jul 2009 16:19:21 +0200 bzr-fastimport (0.8.0~bzr181-1) unstable; urgency=low * Move to section vcs. * New upstream snapshot. -- Jelmer Vernooij Tue, 05 May 2009 20:23:22 +0200 bzr-fastimport (0.8.0~bzr167-1) unstable; urgency=low * New upstream snapshot. * Bump standards version to 3.8.1. -- Jelmer Vernooij Sat, 28 Mar 2009 18:19:14 +0100 bzr-fastimport (0.8.0~bzr136-1) unstable; urgency=low * Initial release. (Closes: #513280) -- Jelmer Vernooij Mon, 02 Mar 2009 14:40:13 +0100 debian/watch0000644000000000000000000000025712244477411010231 0ustar version=3 opts="uversionmangle=s/(b(eta)?[0-9]+)$/~\\1/" \ https://launchpad.net/bzr-fastimport/+download https://launchpad.net/bzr-fastimport/.*/bzr-fastimport-(.*)\.tar\.gz debian/bzr-builddeb.conf0000644000000000000000000000015012244477411012404 0ustar [BUILDDEB] upstream-branch = lp:bzr-fastimport export-upstream-revision = tag:release-$UPSTREAM_VERSION