debian/0000775000000000000000000000000012321377754007203 5ustar debian/rules0000775000000000000000000000652212276770570010272 0ustar #!/usr/bin/make -f # Get the suppoirted Python versions PYVERS = $(shell pyversions -r -v) # Get the default Python version PYVERSION = $(shell pyversions -d -v) # Callable functions to determine the correct PYTHONPATH pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1)) pythonpath_dbg = $$(ls -d $(CURDIR)/build/lib_d.*-$(1) 2>/dev/null || ls -d $(CURDIR)/build/lib.*$(1)-pydebug) %: dh $* --with python2,sphinxdoc --buildsystem=python_distutils ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) CONCURRENCY = BZR_CONCURRENCY=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) [ -d debian/bzrhome ] || mkdir debian/bzrhome $(CONCURRENCY) \ BZR_HOME=debian/bzrhome \ BZR_PLUGIN_PATH=-site:-user \ BZR_DISABLE_PLUGINS=launchpad \ PYTHONPATH=$(wildcard $(CURDIR)/build/lib.*-$(PYVERSION)) \ $(CURDIR)/build/scripts-$(PYVERSION)/bzr selftest -v --parallel=fork endif override_dh_auto_clean: dh_auto_clean rm -rf debian/bzrhome rm -f bzrlib/*_pyx.c # 'make clean-sphinx' calls Makefiles in sub-directories that are # created only after calling 'make docs-sphinx'. Check for them first. if [ -f doc/es/Makefile ]; then $(MAKE) clean-sphinx; fi # It also doesn't really clean every thing... ls doc/en/user-reference/*txt | grep -v readme.txt | xargs rm -rf rm -rf doc/developers/make.bat \ doc/es/make.bat \ doc/ja/make.bat \ doc/ru/make.bat \ doc/developers/Makefile \ doc/es/Makefile \ doc/ja/Makefile \ doc/ru/Makefile \ doc/*/_build/ \ doc/en/release-notes/index.txt override_dh_install: find debian/tmp/ -name "*.pyc" | xargs rm -f find debian/tmp/ -name "*.pyo" | xargs rm -f mkdir -p debian/python-bzrlib.tests/usr/lib \ debian/python-bzrlib.tests/usr/share/pyshared/bzrlib for py in $(shell pyversions -r); do \ mkdir -p debian/python-bzrlib.tests/usr/lib/$$py/dist-packages/bzrlib; \ mv debian/tmp/usr/lib/$$py/dist-packages/bzrlib/tests \ debian/python-bzrlib.tests/usr/lib/$$py/dist-packages/bzrlib/tests; \ done if [ -d debian/tmp/usr/share/locale ]; then \ mkdir -p debian/python-bzrlib/usr/share; \ mv debian/tmp/usr/share/locale debian/python-bzrlib/usr/share/locale; \ fi; dh_install --list-missing --fail-missing # Install the documentation; since html and txt and intermixed # under doc/, this is handier than trying to do it from bzr-doc.install. ( cd doc && find -name "*.txt" -not -wholename "*/_build/*" -print0 ) | \ xargs -r0 -i'{}' -n1 install -D -m 644 'doc/{}' \ "debian/bzr-doc/usr/share/doc/bzr/txt/{}" override_dh_auto_build: dh_auto_build $(MAKE) docs-sphinx override_dh_compress: dh_compress -X.xvg -X.pdf override_dh_strip: dh_strip -ppython-bzrlib --dbg-package=python-bzrlib-dbg override_dh_link: # symlink identical resources. cd debian/bzr-doc/usr/share/doc && fdupes -rnq . | while read line; do \ if [ -z "$$line" ]; then \ target=""; \ elif [ -z "$$target" ]; then \ target=$$line; \ else \ echo "symlinking duplicate file '$$line' to '$$target'"; \ ln -sf /usr/share/doc/"$$target" "$$line"; \ fi; \ done dh_link override_dh_sphinxdoc: ifneq "$(shell dh_listpackages | grep -- -doc)" "" dh_sphinxdoc -X searchtools.js endif # dh_sphinxdoc chokes if we delete the extra licence files before it runs. find debian/bzr-doc/usr/share/doc/bzr -name "licence.txt" -print | xargs rm -f debian/bzr-builddeb.conf0000664000000000000000000000004412276770570012417 0ustar [BUILDDEB] upstream-branch = lp:bzr debian/copyright0000664000000000000000000000540312276770570011142 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: bzr Upstream-Contact: Bazaar Developers Source: https://launchpad.net/bzr/+download Files: debian/* Copyright: Debian Bazaar Team Comment: Debianized by Norbert Tretkowski 2005-04-16 New co-maintainer Jeff Bailey 2005-09-05 New co-maintainer Rob Weir 2005-09-15 New co-maintainer Andres Salomon 2006-01-24 New co-maintainer Lars Wirzenius 2006-04-13 New co-maintainer Adeodato Simó 2006-07-24 New co-maintainer Wouter van Heyst 2007-01-17 New co-maintainer Jelmer Vernooij 2008-05-02 New co-maintainer John Francesco Ferlito Robert Collins Aaron Bentley John Arbash Meinel 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 along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA . On Debian systems, the full text of the GNU General Public License is available in /usr/share/common-licenses/GPL-2. debian/changelog0000664000000000000000000017374612321372731011065 0ustar bzr (2.6.0+bzr6593-1ubuntu1) trusty; urgency=medium * Merge from Debian unstable. Remaining changes: - Drop non-main build dependencies on python-{meliae,lzma,medusa} -- Andrew Starr-Bochicchio Wed, 09 Apr 2014 21:36:21 -0400 bzr (2.6.0+bzr6593-1) unstable; urgency=medium * New upstream snapshot: - Use LooseVersion from distutils to check Pyrex/Cython version in order to handle non-integers in the version string. Closes: #743096, #683130, LP: #1030521 - Fix test failures with python-2.7.6 (LP: #1303879). * debian/control: No longer suggest bzr-svn (Closes: #709290). -- Andrew Starr-Bochicchio Wed, 09 Apr 2014 20:26:48 -0400 bzr (2.6.0+bzr6591-1ubuntu1) trusty; urgency=medium * Merge from Debian unstable. Remaining changes: - Drop non-main build dependencies on python-{meliae,lzma,medusa} -- Andrew Starr-Bochicchio Wed, 12 Feb 2014 22:53:07 -0500 bzr (2.6.0+bzr6591-1) unstable; urgency=low * New upstream snapshot. - Remove wrong assumption about how TCP server and client interact when run inside the same process. (Closes: #736158, LP #1269886). - The XDG Base Directory Specification uses the XDG_CACHE_HOME, not XDG_CACHE_DIR (Closes: #736448). * Drop 04_test_netrc_fix_perms, applied upstream. * Bump Standards-Version to 3.9.5, no changes needed. -- Andrew Starr-Bochicchio Wed, 12 Feb 2014 14:26:26 -0500 bzr (2.6.0-3ubuntu2) trusty; urgency=medium * debian/tests/testsuite: Ignore flaky test which is now failing persistently with current python2.7 (LP #1269886). It'll still fail during package build, so the next upload has to fix this properly. -- Martin Pitt Fri, 17 Jan 2014 09:06:17 +0100 bzr (2.6.0-3ubuntu1) saucy; urgency=low * Merge with Debian unstable to fix the testsuite, remaining changes: - Drop non-main build dependencies on python-{meliae,lzma,medusa} -- Adam Conrad Thu, 10 Oct 2013 00:38:18 -0600 bzr (2.6.0-3) unstable; urgency=low * Backport upstream commit that makes .netrc 0600 in tests so python-2.7.5-8's netrc is happy (Closes: #723894). -- Andrew Starr-Bochicchio Fri, 04 Oct 2013 18:10:33 -0400 bzr (2.6.0-2) unstable; urgency=low * Drop suggestion of bzr-gtk, which is about to be removed from the archive. -- Jelmer Vernooij Wed, 11 Sep 2013 21:46:30 +0100 bzr (2.6.0-1ubuntu1) saucy; urgency=low * Merge from Debian unstable. Remaining Ubuntu changes: - Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. -- Andrew Starr-Bochicchio Sat, 03 Aug 2013 20:42:25 -0400 bzr (2.6.0-1) unstable; urgency=low * New upstream release. -- Andrew Starr-Bochicchio Thu, 01 Aug 2013 15:50:13 -0400 bzr (2.6.0~bzr6574-1ubuntu1) saucy; urgency=low * Merge from Debian unstable. Remaining Ubuntu changes: - Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. * Drop changes to Vcs fields. The UDD imports are out of date. -- Andrew Starr-Bochicchio Mon, 20 May 2013 20:55:13 -0400 bzr (2.6.0~bzr6574-1) unstable; urgency=low * New upstream snapshot. - Fix CVE 2013-2009. Avoid allowing multiple wildcards in a single SSL cert hostname segment (Closes: #709068, LP: #1182124). -- Andrew Starr-Bochicchio Mon, 20 May 2013 19:16:44 -0400 bzr (2.6.0~bzr6573-1) unstable; urgency=low * Upload to unstable. * New upstream snapshot. * Remove the test_tuned_gzip.TestToGzip.test_enormous_chunks test (LP: #1116079, #1160572). * Drop debian/patches/04_revert_ui_changes, fixed upstream. * Drop deprecated Dm-Upload-Allowed field. * Bump Standards-Version to 3.9.4, no changes needed. * Drop un-needed Build-Conflicts on python-gpgme. -- Andrew Starr-Bochicchio Sat, 11 May 2013 19:13:15 -0400 bzr (2.6.0~bzr6571-4ubuntu2) raring; urgency=low * Remove the test_tuned_gzip.TestToGzip.test_enormous_chunks test. LP: #1116079, #1160572. -- Matthias Klose Tue, 02 Apr 2013 12:09:24 +0200 bzr (2.6.0~bzr6571-4ubuntu1) raring; urgency=low * Merge from Debian experimental (LP: #1097100). Remaining Ubuntu changes: - Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. - Adjust Vcs field in debian/control for Ubuntu. * Drop 04_apport_bytesio and 05_tcp_serve_localhost, they are not used in Debian and it seems to build fine without them. -- Andrew Starr-Bochicchio Mon, 07 Jan 2013 20:02:12 -0500 bzr (2.6.0~bzr6571-4) experimental; urgency=low * debian/tests/control: Add python-subunit to autopkgtest dependencies (LP: #1101206). -- Andrew Starr-Bochicchio Fri, 18 Jan 2013 18:41:31 -0500 bzr (2.6.0~bzr6571-3) experimental; urgency=low * debian/rules: Don't call dh_sphinxdoc if doc package is not being built. Fixes FTBFS on buildds where arch:all packages are not built. -- Andrew Starr-Bochicchio Tue, 08 Jan 2013 20:02:55 -0500 bzr (2.6.0~bzr6571-2) experimental; urgency=low * Add myself to uploaders. * Fix Vcs-Bzr link and add Vcs-Browser field. * Run wrap-and-sort over the debian/control file and install files. * Bump debian/compat to 9. * Build Sphinx-based docs rather than the plain html ones. The fixes a number of outstanding doc related bugs: - Closes: #670526, #606009 - LP: #544149, LP: #1014572, LP: #514609 -- Andrew Starr-Bochicchio Sun, 06 Jan 2013 19:20:39 -0500 bzr (2.6.0~bzr6571-1ubuntu2) raring; urgency=low * Add python-subunit test dependency. (LP: #1101206) -- Martin Pitt Fri, 18 Jan 2013 17:56:00 +0100 bzr (2.6.0~bzr6571-1ubuntu1) raring; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. + Drop 06_new_zlib patch and add build-conflicts for newer versions of zlib. + Adjust Vcs field in debian/control for Ubuntu -- Jelmer Vernooij Thu, 13 Dec 2012 18:49:21 +0100 bzr (2.6.0~bzr6571-1) experimental; urgency=low [ Jelmer Vernooij ] * Remove myself from uploaders. * New upstream snapshot. + Now ships bzr-grep. Added relevant Replaces/Breaks/Provides. + Add 04_revert_ui_changes to work around test failures. * Add autopkgtest header. Closes: #692680 [ Max Bowsher] * Fix 03_spurious_test_failure to not patch the same file twice, causing dpkg-source -x to emit a warning. -- Jelmer Vernooij Tue, 04 Dec 2012 00:42:41 +0100 bzr (2.6.0~bzr6531-1) unstable; urgency=low * New upstream snapshot. + Reverts use of --no-tty when gpg signing commits. Closes: #673484 -- Jelmer Vernooij Wed, 27 Jun 2012 18:01:47 +0200 bzr (2.6.0~bzr6525-1) unstable; urgency=low * New upstream snapshot. -- Jelmer Vernooij Mon, 18 Jun 2012 17:06:50 +0200 bzr (2.6.0~bzr6520-2) unstable; urgency=low * Remove Jeff Bailey and Reinhard Tartler from uploaders. * Update 03_spurious_test_failure: Disable two more flaky tests. -- Jelmer Vernooij Mon, 16 Apr 2012 17:30:16 +0200 bzr (2.6.0~bzr6520-1) unstable; urgency=low * New upstream snapshot. + Drop 04_serve_address patch, now applied upstream. + Fixes cloning from HTTP URLs using urllib. Closes: #666496 -- Jelmer Vernooij Tue, 10 Apr 2012 12:55:57 +0200 bzr (2.6.0~bzr6511-2) unstable; urgency=low * Add 04_serve_address to cope with localhost lookup issues during the testsuite on some buildds. -- Jelmer Vernooij Wed, 21 Mar 2012 15:04:19 +0100 bzr (2.6.0~bzr6511-1) unstable; urgency=low * New upstream snapshot. + Fixes acute accent marks in manual page. Closes: #458157 + Documents launchpad plugin commands in manual page. Closes: #452503 + Fixes 'bzr help branches'. Closes: #664777 -- Jelmer Vernooij Mon, 19 Mar 2012 03:05:46 +0100 bzr (2.6.0~beta2-0ubuntu3) raring; urgency=low * debian/patches/07_fix_ftbfs_on_doc.patch: - Fixed a syntax error in ``doc/ja/user-guide/http_smart_server.txt`` that causes breakage with docutils 0.9.1. (Thanks to Vincent Ladeuil, Jelmer Vernooij, LP: #1066307) -- Didier Roche Thu, 22 Nov 2012 15:41:45 +0100 bzr (2.6.0~beta2-0ubuntu2) raring; urgency=low * debian/patches/06_set_bzrtip_revid_for_propose.patch: - set bzr proposed branch tip revid as reviewed_id for bzr lp-propose --approve (LP: #1082032) -- Didier Roche Thu, 22 Nov 2012 15:21:51 +0100 bzr (2.6.0~beta2-0ubuntu1) quantal; urgency=low * New upstream release. + Make lazy imports proxy by default so that concurrent resolution is robust. LP: #593536 + Crash report squashes errors when formatting plugin list. LP: #488766 + Launchpad plugin subcommands are now documented in the manual page. LP: #843801 + New shortcut 'co:' for referring to colocated branches. LP: #833665 + bzr missing will now show revision tags. LP: #559072 + BZR_REMOTE_PATH is now documented in the manual page. LP: #197618 + Prevent erroneous writing of branch configuration. LP: #948339 + New --overwrite-tags option for push and pull. LP: #681792 + Support readline() when streaming files over HTTP. LP: #963769 * Drop no-tty reversion patch; now included upstream. -- Jelmer Vernooij Wed, 11 Jul 2012 12:58:34 +0200 bzr (2.6.0~beta1-0ubuntu2) quantal; urgency=low * Revert use of --no-tty. LP: #1014570 -- Jelmer Vernooij Fri, 29 Jun 2012 11:17:51 +0200 bzr (2.6.0~beta1-0ubuntu1) quantal; urgency=low * New upstream release. + Fixes handling of colocated branches in `bzr rmbranch`. LP: #920653 + rmbranch now refuses to remove active branch. LP: #922953 + Connecting with HTTPS via HTTP correctly uses host name of destination rather than that of proxy. LP: #944696 + No longer requires tty when GPG signing commits. LP: #847388 + Fixes unicode erorrs when translated progress task messages contain non-ascii text. LP: #966934 + Fixes display of help for configuration options that overlap with other topics. LP: #941672 + Drop 06_spurious_test_failure: applied upstream. LP: #874153 + Drop 05_allow_no_slash_controldirs: applied upstream. * Drop unnecessary build conflicts with zlib. -- Jelmer Vernooij Fri, 08 Jun 2012 12:59:27 +0200 bzr (2.5.0+bzr6492-1) unstable; urgency=low * Recommend python-gpgme in the bzr package. Closes: #663272 * New upstream snapshot. -- Jelmer Vernooij Mon, 19 Mar 2012 02:38:36 +0100 bzr (2.5.0-2ubuntu2) precise; urgency=low * Add 06_spurious_test_failure: mark flapping test as known failing if it fails. * Update Vcs-Bzr field to refer to precise rather than oneiric location. -- Jelmer Vernooij Wed, 04 Apr 2012 02:09:24 +0200 bzr (2.5.0-2ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. + Drop 06_new_zlib patch and add build-conflicts for newer versions of zlib. + Adjust Vcs field in debian/control for Ubuntu -- Scott Kitterman Wed, 21 Mar 2012 23:10:53 -0400 bzr (2.5.0-2) unstable; urgency=low * Use parseable format for copyright file. * Bump standards version to 3.9.3. * Add 05_allow_no_slash_controldirs: Allow control directories to not support creating branches with forward slashes in their name. * Add basic test for autopkgtest. -- Jelmer Vernooij Tue, 06 Mar 2012 01:27:01 +0100 bzr (2.5.0-1ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. * Drop 06_new_zlib patch and add build-conflicts for newer versions of zlib. -- Jelmer Vernooij Sat, 25 Feb 2012 16:13:22 +0100 bzr (2.5.0-1) unstable; urgency=low * New upstream release. * New zlib versions are slightly more efficient. + Add build dependency on zlib >= 1.2.6. + Add 06_new_zlib patch to fix test failures expecting slightly larger output in bzrlib.tests.test_btree_index. -- Jelmer Vernooij Fri, 24 Feb 2012 18:13:29 +0100 bzr (2.5.0~bzr6473-1ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. -- Jelmer Vernooij Mon, 23 Jan 2012 13:42:55 +0100 bzr (2.5.0~bzr6473-1) unstable; urgency=low * New upstream snapshot. + No longer attempts to create directories with empty name. Closes: #657349 -- Jelmer Vernooij Tue, 07 Feb 2012 16:24:36 +0100 bzr (2.5.0~bzr6458-2) unstable; urgency=low * Ignore spurious test failures in ``test_handle_request_closes_if_it_doesnt_process``, causing spurious FTBFS on some architectures. -- Jelmer Vernooij Wed, 25 Jan 2012 14:56:26 +0100 bzr (2.5.0~bzr6458-1) unstable; urgency=low * New upstream snapshot. + urllib HTTPS backend now verifies SSL certificates. Closes: #558460, LP: #651161 -- Jelmer Vernooij Tue, 24 Jan 2012 23:43:36 +0100 bzr (2.5.0~beta5-3ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. -- Jelmer Vernooij Mon, 23 Jan 2012 13:42:55 +0100 bzr (2.5.0~beta5-3) unstable; urgency=low * Use CommitBuilder.get_basis_delta() in commit builder tests (necessary for bzr-svn). -- Jelmer Vernooij Sun, 22 Jan 2012 20:35:57 +0100 bzr (2.5.0~beta5-2ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. -- Jelmer Vernooij Fri, 20 Jan 2012 19:19:52 +0100 bzr (2.5.0~beta5-2) unstable; urgency=low * Add patch to use empty string for default colocated branch name. -- Jelmer Vernooij Fri, 20 Jan 2012 18:00:20 +0100 bzr (2.5.0~beta5-1ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. -- Jelmer Vernooij Mon, 16 Jan 2012 20:04:45 +0100 bzr (2.5.0~beta5-1) unstable; urgency=low * New upstream release.. + Add Breaks: for older versions of bzr-pqm, which don't provide config stacks. + Add Breaks: for older versions of bzr-xmloutput, which use relative lazy imports. + Drop 03_external_elementtree, now upstream. -- Jelmer Vernooij Mon, 16 Jan 2012 18:58:22 +0100 bzr (2.5.0~beta4-2) unstable; urgency=low * Fix Vcs-Bzr URL. * Drop python-gpgme from build-depends again until 0.2 lands in sid, to prevent test failures. -- Jelmer Vernooij Thu, 08 Dec 2011 14:22:35 +0100 bzr (2.5.0~beta4-1ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. -- Jelmer Vernooij Thu, 08 Dec 2011 13:21:44 +0100 bzr (2.5.0~beta4-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Thu, 08 Dec 2011 12:24:34 +0100 bzr (2.5.0~beta3-2ubuntu2) precise; urgency=low * Drop python-gpgme-dbg from build-depends, since it is not in main. -- Jelmer Vernooij Tue, 29 Nov 2011 18:50:24 +0100 bzr (2.5.0~beta3-2ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{meliae,lzma,medusa}, which are not in main. -- Jelmer Vernooij Thu, 10 Nov 2011 16:02:01 +0100 bzr (2.5.0~beta3-2) experimental; urgency=low * Build-depend on python-paramiko, python-pycurl and python-gpgme for use in the testsuite. * Support installing po files. * Don't install duplicate licence files, already documented in debian/copyright. -- Jelmer Vernooij Fri, 11 Nov 2011 18:11:58 +0100 bzr (2.5.0~beta3-1ubuntu1) precise; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{subunit,meliae,lzma,medusa}, which are not in main. + Disable support for running selftest in parallel (requires subunit). -- Jelmer Vernooij Thu, 10 Nov 2011 16:02:01 +0100 bzr (2.5.0~beta3-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Thu, 10 Nov 2011 15:07:50 +0100 bzr (2.5.0~beta2-2) experimental; urgency=low * Fix bzrlib.osutils.local_concurrency() when used on GNU/kFreeBSD with Python's multiprocessing module available. Closes: #647690 -- Jelmer Vernooij Mon, 07 Nov 2011 16:15:28 +0100 bzr (2.5.0~beta2-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Fri, 04 Nov 2011 23:32:32 +0100 bzr (2.5.0~beta2-0ubuntu1) precise; urgency=low * New upstream release. + Fixes compatibility with cython 0.15. LP: #837221 + Fixes handling of timestamps in diffs for absent files in working tree. LP: #847435 + Fixes overflow error in dirstate when dealing with large files. LP: #683191 * Merge from Debian. Remaining changes: + Drop build dependencies on python-{subunit,meliae,lzma,medusa}, which are not in main. + Disable support for running selftest in parallel (requires subunit). -- Jelmer Vernooij Fri, 04 Nov 2011 22:55:11 +0100 bzr (2.5.0~beta1-2) experimental; urgency=low * Add Build-Conflicts to python-gpgme, to work around test suite failures. -- Jelmer Vernooij Tue, 20 Sep 2011 22:08:37 +0200 bzr (2.5.0~beta1-1) experimental; urgency=medium * New upstream release. * Move bzrtools from Recommends to Suggests. * Add python-gpgme-dbg to build dependencies. -- Jelmer Vernooij Tue, 06 Sep 2011 17:05:06 +0200 bzr (2.4.2-2) unstable; urgency=low * Fix bzrlib.osutils.local_concurrency() when used on GNU/kFreeBSD with Python's multiprocessing module available. Closes: #647690 -- Jelmer Vernooij Mon, 07 Nov 2011 17:15:56 +0100 bzr (2.4.2-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Fri, 04 Nov 2011 23:16:04 +0100 bzr (2.4.1-1ubuntu1) oneiric; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{subunit,meliae,lzma,medusa}, which are not in main. + Disable support for running selftest in parallel (requires subunit). -- Jelmer Vernooij Tue, 13 Sep 2011 15:39:19 +0200 bzr (2.4.1-1) unstable; urgency=low * New upstream release. + Remove 04_fix_i18n, now applied upstream. -- Jelmer Vernooij Tue, 13 Sep 2011 14:23:54 +0200 bzr (2.4.0-3ubuntu1) oneiric; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{subunit,meliae,lzma,medusa}, which are not in main. + Disable support for running selftest in parallel (requires subunit). -- Jelmer Vernooij Wed, 31 Aug 2011 17:08:56 +0200 bzr (2.4.0-3) unstable; urgency=medium * Fix regression in open_write_stream, which breaks the bzr-builddeb testsuite. Closes: #638219, LP: #831351 -- Jelmer Vernooij Wed, 31 Aug 2011 14:21:44 +0200 bzr (2.4.0-2) unstable; urgency=medium * Ignore permission denied errors when opening configuration files. LP: #837324, Closes: #639004 -- Jelmer Vernooij Tue, 30 Aug 2011 14:12:41 +0200 bzr (2.4.0-1) unstable; urgency=low * New upstream release. + Suggest python-gpgme python-gpgme-dbg for new signatures features. + Build-conflict with python-gpgme for the moment because of failing GPG tests when it is installed. -- Jelmer Vernooij Sat, 13 Aug 2011 21:57:09 +0200 bzr (2.4.0-0ubuntu2) oneiric; urgency=low * Add support for older versions of python-testtools. -- Jelmer Vernooij Mon, 15 Aug 2011 00:15:08 +0200 bzr (2.4.0-0ubuntu1) oneiric; urgency=low * New upstream release. + Fixes version number in deprecation warnings. LP: #794960 + Fixes some spelling mistakes in manual page. LP: #814311 + Prevents taking file system locks in read only transactions. LP: #786980 + Fix support for configuration files containing UTF-8 data. LP: #688677 -- Jelmer Vernooij Sun, 14 Aug 2011 02:35:33 +0200 bzr (2.4.0~beta5-3) unstable; urgency=low * Fix compatibility with Python 2.7. -- Jelmer Vernooij Tue, 19 Jul 2011 00:14:35 +0200 bzr (2.4.0~beta5-2ubuntu1) oneiric; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{subunit,meliae,lzma,medusa}, which are not in main. + Disable support for running selftest in parallel (requires subunit). * Fix compatibility with newer versions of Python 2.7. LP: #809048 -- Jelmer Vernooij Thu, 14 Jul 2011 18:18:11 +0200 bzr (2.4.0~beta5-2) unstable; urgency=low * Support all i18n-related environment variables not being set. Closes: #633892 -- Jelmer Vernooij Fri, 15 Jul 2011 11:03:53 +0200 bzr (2.4.0~beta5-1) unstable; urgency=low [ Jelmer Vernooij ] * Fix typo in package description. Thanks Paul Stewart. * Mark python-bzrlib as breaking with older versions of bzr that predate python-bzrlib. LP: #803362 [ Max Bowsher ] * New upstream release. -- Jelmer Vernooij Thu, 14 Jul 2011 15:35:42 +0200 bzr (2.4.0~beta4-4ubuntu2) oneiric; urgency=low * Fix FTBFS: build without --parallel. -- Jelmer Vernooij Thu, 23 Jun 2011 11:45:29 +0200 bzr (2.4.0~beta4-4ubuntu1) oneiric; urgency=low * Merge from Debian. Remaining changes: + Drop build dependencies on python-{subunit,meliae,lzma,medusa}, which are not in main. + Disable support for running selftest in parallel (requires subunit). -- Jelmer Vernooij Thu, 23 Jun 2011 10:57:10 +0200 bzr (2.4.0~beta4-4) unstable; urgency=low * Add 09_utf8_config_files. + Fixes use of configuration files with non-ascii characters. Closes: #630872 LP: #799212 -- Jelmer Vernooij Tue, 21 Jun 2011 21:57:29 +0200 bzr (2.4.0~beta4-3) unstable; urgency=low * Drop no longer necessary dependency on python-elementtree, as it is included in all currently supported versions of Python. * Add python-bzrlib-dbg package. -- Jelmer Vernooij Sun, 19 Jun 2011 03:45:44 +0200 bzr (2.4.0~beta4-2) unstable; urgency=low * Fix tests when home directory does not exist. Thanks Vincent Ladeuil. -- Jelmer Vernooij Fri, 17 Jun 2011 16:10:52 +0200 bzr (2.4.0~beta4-1ubuntu1) oneiric; urgency=low * Merge from Debian. -- Jelmer Vernooij Fri, 17 Jun 2011 12:30:59 +0200 bzr (2.4.0~beta4-1) unstable; urgency=low * New upstream release. + Using "bzr blame" no longer requires user to set identity. LP: #667408 * Bump standards version to 3.9.2 (no changes). -- Jelmer Vernooij Fri, 17 Jun 2011 01:15:56 +0200 bzr (2.4.0~beta3-2) unstable; urgency=low * Add 04_fix_undecodable_argv; cope with $HOME not existing on some buildd machines. -- Jelmer Vernooij Wed, 01 Jun 2011 13:17:25 +0100 bzr (2.4.0~beta3-1) unstable; urgency=low * New upstream release. + Requires at least Python 2.6 or higher. + Fixes permissions on directories in zip files. LP: #207253 + Prints proper error when encountering encoding-invalid characters in commit messages on the commandline. LP: #745712 + Drop patches merged upstream: 04_auto_user_id_test_fix, 05_fix_locale_test * Add upper bound version dependency on python-bzrlib in bzr. LP: #778696 -- Jelmer Vernooij Wed, 01 Jun 2011 10:54:35 +0100 bzr (2.4.0~beta2-3) unstable; urgency=low * Upload to unstable. * Update 05_fix_locale_test to cope with home directory not existing. -- Jelmer Vernooij Sun, 01 May 2011 01:52:14 +0200 bzr (2.4.0~beta2-2ubuntu1) oneiric; urgency=low * Merge from Debian experimental. + Remove build dependencies not present in main: python-medusa, python-subunit, python-meliae, python-lzma. + Disable parallel testing. -- Jelmer Vernooij Sat, 30 Apr 2011 16:20:58 +0200 bzr (2.4.0~beta2-2) experimental; urgency=low * Fix locale setting during TestExceptionReporting.test_undecodable_argv. -- Jelmer Vernooij Sat, 30 Apr 2011 02:27:33 +0200 bzr (2.4.0~beta2-1) experimental; urgency=low * New upstream release. + No longer requires setting user identity to commit. LP: #616878 + Sets proper permissions on files in exported zip files. LP: #207253 + Prints better error message when argv can't be decoded in application locale. LP: #745712 + Now uses /etc/mailname when determining default identity. Closes: #574933 -- Jelmer Vernooij Thu, 28 Apr 2011 18:18:35 +0200 bzr (2.4.0~beta1-2) experimental; urgency=low * Split bzrlib.tests out from python-bzrlib into python-bzrlib.tests, as it is fairly large (16Mb) and not needed by most users. -- Jelmer Vernooij Wed, 06 Apr 2011 18:43:12 +0200 bzr (2.4.0~beta1-1) experimental; urgency=low * New upstream release. + Drop patches merged upstream: 01_test_locale, 04_cpu_count, 05_kfreebsd_tests, 06_format_gc_chk_sha1_record + Fixes directory modes in zip files. LP: #207253 -- Jelmer Vernooij Thu, 31 Mar 2011 12:03:48 +0200 bzr (2.3.1-2) unstable; urgency=low [ Jelmer Vernooij ] * Add python-medusa, python-lzma and python-meliae as build dependencies (used by the test suite). [ John Ferlito ] * Remove John Ferlito from Uploaders. [ Jelmer Vernooij ] * Prefer cython as build dependency. * Remove generated C files during clean. -- Jelmer Vernooij Tue, 05 Apr 2011 14:38:50 +0200 bzr (2.3.1-1) unstable; urgency=low * New upstream release. + Build depend on python-configobj >= 4.7.2+ds-2 which has a fix for bug #618349 which breaks the Bazaar testsuite. * Switch to dh_python2. * Switch to debhelper 7, drop cdbs. -- Jelmer Vernooij Sun, 13 Mar 2011 15:08:21 +0100 bzr (2.3.0-7) unstable; urgency=low * Switch to dh_python2. * Switch to debhelper 7, drop cdbs. -- Jelmer Vernooij Mon, 07 Mar 2011 12:02:02 +0100 bzr (2.3.0-6) unstable; urgency=low * Support running the test suite in parallel. * Run selftest with -v so there is some indication of progress. This should prevent builds from being killed on buildds due to a lack of output. * Cherry-pick fix to use correct format character for unsigned int gc_chk_sha1_record members. Fixes FTBFS on alpha. -- Jelmer Vernooij Sat, 26 Feb 2011 04:07:18 +0100 bzr (2.3.0-5) unstable; urgency=low * Add 05_kfreebsd_tests: Enable FreeBSD kernel specific workarounds for Debian/kFreeBSD. Fixes FTBFS on kfreebsd-{i386,amd64}. * Set BZR_HOME during test run for hosts that don't have a home directory set. -- Jelmer Vernooij Fri, 25 Feb 2011 16:32:22 +0100 bzr (2.3.0-4) unstable; urgency=low * Use multiprocessing.cpu_count to retrieve number of CPUs if possible. Closes: #588853 -- Jelmer Vernooij Wed, 23 Feb 2011 14:55:32 +0100 bzr (2.3.0-3) unstable; urgency=low [ Jelmer Vernooij ] * Bump debhelper dependency to debhelper 7.4.16, required for our use of --list-missing and --fail-missing. [ Max Bowsher ] * Run testsuite on bzr including compiled extensions. * Run testsuite on all architectures, not just when doing an architecture-independent build. [ Jelmer Vernooij ] * Disable launchpad plugin tests as they currently require access to Launchpad production. Closes: #614544 -- Jelmer Vernooij Tue, 22 Feb 2011 15:47:00 +0100 bzr (2.3.0-2) unstable; urgency=low * Split python library into a separate package. Closes: #561647 -- Jelmer Vernooij Sun, 06 Feb 2011 14:49:49 +0100 bzr (2.3.0-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Thu, 03 Feb 2011 18:58:06 +0100 bzr (2.3.0~beta5-1) unstable; urgency=medium [ Jelmer Vernooij ] * Cherrypick fix for compatibility with python2.7 >= 2.7.1-2. LP: #693880 * Switch to python-support. Closes: #568462 * Add missing build dependency on python-configobj. * Make dependency on python-testtools versioned (>= 0.9.5). * Re-remove included elementtree and configobj. Closes: #555343, #555336 [ Vincent Ladeuil ] * New upstream release. + Fix https python-2.7 compatibility. Closes: #608085 + Follow the Freedesktop XDG Base Directory Specification. LP: #195397 * Drop unnecessary dependency on graphviz. [ Max Bowsher ] * Run testsuite for bundled plugins too. [ Jelmer Vernooij ] * Cherrypick fix around default locales. -- Jelmer Vernooij Fri, 21 Jan 2011 22:08:19 +0100 bzr (2.3.0~beta3-1) unstable; urgency=low [ Jelmer Vernooij ] * Add testtools to build dependencies. * Run tests by default again, unless "nocheck" is present in DEB_BUILD_OPTIONS. (per policy) [ Max Bowsher ] * Amend watch file to match current package version scheme. * New upstream release. -- Max Bowsher Fri, 05 Nov 2010 23:21:04 +0000 bzr (2.3.0~beta2-1) unstable; urgency=low * New upstream release. * Rebuild with python2.5 modules. Closes: #593409 -- Jelmer Vernooij Mon, 11 Oct 2010 02:21:33 +0200 bzr (2.3.0~beta1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Mon, 20 Sep 2010 11:30:28 -0700 bzr (2.2.0-1) unstable; urgency=low * New upstream release. + Adds support for setting timestamps to originating revisions. Closes: #473450 + Removes remaining string exception. Closes: #585193, LP: #586926 + Add C extension to work around Python issue 1628205. LP: #583941, Closes: #577110 + Avoids showing progress bars when --quiet is used. Closes: #542105, LP: #320035 + No longer creates ~/.bazaar as root when run under sudo. LP: #376388 + 'bzr commit' now supports -p as alternative for --show-diff. LP: #571467 + 'bzr add' no longer adds .THIS/.BASE/.THEIRS files unless explicitly requested. LP: #322767 + When parsing patch files, Bazaar now supports diff lines before each patch. LP: #502076 + WorkingTrees now no longer requires using signal.signal, so can be used in a threaded environment. LP: #521989 + An assertion error is no longer triggered when pushing to a pre-1.6 Bazaar server. LP: #528041 * Bump standards version to 3.9.1. -- Jelmer Vernooij Sat, 07 Aug 2010 00:54:52 +0200 bzr (2.2.0~b4-1) experimental; urgency=low * New upstream beta. * Bump standards version to 3.9.0. * Drop build dependency on zlib. -- Jelmer Vernooij Wed, 21 Jul 2010 01:02:00 +0200 bzr (2.2.0~b2-1) experimental; urgency=low * New upstream release. * Recommend python-launchpadlib. Closes: #568937 -- Jelmer Vernooij Fri, 21 May 2010 19:56:07 +0200 bzr (2.2~b4-1) experimental; urgency=low * New upstream beta. * Bump standards version to 3.9.0. * Drop build dependency on zlib. -- Jelmer Vernooij Wed, 21 Jul 2010 01:02:00 +0200 bzr (2.2~b2-1) experimental; urgency=low * New upstream release. * Recommend python-launchpadlib. Closes: #568937 -- Jelmer Vernooij Fri, 21 May 2010 19:56:07 +0200 bzr (2.1.2-1.1) unstable; urgency=low * Non-maintainer upload. * Fix access via http_proxy. Closes: #588430 -- Maximiliano Curia Fri, 30 Jul 2010 19:14:08 -0400 bzr (2.1.2-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Thu, 27 May 2010 21:58:49 +0200 bzr (2.1.1-1.1) unstable; urgency=low * Non-maintainer upload with Jelmer's permission. * Backport fix from bzr 2.2 that makes bzr-git and bzr-svn operations work reliably again. Closes: #582033 -- Steve Langasek Mon, 17 May 2010 13:48:25 -0700 bzr (2.1.1-1) unstable; urgency=low * Remove bob2 from uploaders. Closes: #573427 * New upstream release. -- Jelmer Vernooij Wed, 24 Mar 2010 22:27:38 +0100 bzr (2.1.0-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Wed, 17 Feb 2010 17:47:40 +0100 bzr (2.1.0~rc2-1) experimental; urgency=low * New upstream release. * Switch to dpkg-source 3.0 (quilt) format. * Bump standards version to 3.8.4. * Remove embedded copy of python-configobj. Closes: #555336 * Remove embedded copy of python-elementtree. Closes: #555343 -- Jelmer Vernooij Fri, 05 Feb 2010 13:53:30 +0100 bzr (2.0.4-1) unstable; urgency=low [ Andrew Starr-Bochicchio ] * debian/control: Fix obsolete-relation-form-in-source lintian warning. [ John Francesco Ferlito ] * New upstream release. -- John Francesco Ferlito Mon, 25 Jan 2010 19:53:02 +1100 bzr (2.0.3-1) unstable; urgency=low * New upstream release. -- John Francesco Ferlito Wed, 16 Dec 2009 21:43:42 +1100 bzr (2.0.2-1) unstable; urgency=low * New upstream release. -- John Francesco Ferlito Wed, 04 Nov 2009 22:47:44 +1100 bzr (2.0.1-1) unstable; urgency=low * New upstream release. * Split out docs into bzr-doc package. -- John Francesco Ferlito Fri, 16 Oct 2009 22:52:14 +1100 bzr (2.0.0-1) unstable; urgency=low * New upstream release. * Added John Francesco Ferlito to Uploaders. * Fix install path to quick-reference guide -- John Francesco Ferlito Fri, 25 Sep 2009 13:30:35 +1000 bzr (1.18-1) unstable; urgency=low [ James Westby ] * New upstream release. [ Jelmer Vernooij ] * Bump standards version to 3.8.3. * Remove unused patch system. -- Jelmer Vernooij Tue, 08 Sep 2009 14:14:23 +0200 bzr (1.17-1) unstable; urgency=low * New upstream release. + Fixes compatibility with Python 2.4. Closes: #537708 -- Jelmer Vernooij Tue, 21 Jul 2009 11:25:12 +0200 bzr (1.17~rc1-1) unstable; urgency=low * New upstream version. * Bump standards version to 3.8.2. -- Jelmer Vernooij Tue, 14 Jul 2009 00:52:47 +0200 bzr (1.16-1) unstable; urgency=low * New upstream release. * Add python-pyrex to build-deps to ensure C extensions are always build. -- Jelmer Vernooij Thu, 18 Jun 2009 13:08:56 +0200 bzr (1.15-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Fri, 29 May 2009 10:19:30 +0200 bzr (1.15~rc1-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Sat, 16 May 2009 13:51:08 +0200 bzr (1.14-2) unstable; urgency=low * Fix API compatibility version. (Closes: #526233) -- Jelmer Vernooij Thu, 30 Apr 2009 20:40:24 +0200 bzr (1.14-1) unstable; urgency=low * New upstream release. + Fixes default format for upgrade command. (Closes: #464688) -- Jelmer Vernooij Wed, 29 Apr 2009 19:56:21 +0200 bzr (1.14~rc1-2) unstable; urgency=low * Add missing dependency on zlib development library. (Closes: #523595) -- Jelmer Vernooij Sat, 11 Apr 2009 14:25:12 +0200 bzr (1.14~rc1-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Wed, 08 Apr 2009 22:31:48 +0200 bzr (1.13.1-1) unstable; urgency=low * New upstream release. * Move to section vcs. * Bump standards version to 3.8.1. -- Jelmer Vernooij Thu, 19 Mar 2009 18:16:35 +0100 bzr (1.13~rc1-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Tue, 10 Mar 2009 14:11:59 +0100 bzr (1.12-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Sat, 14 Feb 2009 00:24:06 +0100 bzr (1.12~rc1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Tue, 10 Feb 2009 21:45:04 +0100 bzr (1.11-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Mon, 19 Jan 2009 16:01:04 +0100 bzr (1.11~rc1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Tue, 13 Jan 2009 16:52:58 +0100 bzr (1.10-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Tue, 16 Dec 2008 22:46:54 +0100 bzr (1.10~rc1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Fri, 28 Nov 2008 16:50:05 +0100 bzr (1.9-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Fri, 07 Nov 2008 14:12:23 +0100 bzr (1.9~rc1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Sat, 01 Nov 2008 21:22:45 +0100 bzr (1.8~rc1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Wed, 08 Oct 2008 12:32:01 +0200 bzr (1.7.1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Thu, 02 Oct 2008 01:58:58 +0200 bzr (1.7.1~rc1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Tue, 30 Sep 2008 23:14:23 +0200 bzr (1.7-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Wed, 24 Sep 2008 16:03:44 +0200 bzr (1.6.1-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Fri, 05 Sep 2008 23:19:34 +0200 bzr (1.6.1~rc1-1) experimental; urgency=low * New upstream release. * Recommend ca-certificates. (Closes: #452024) -- Jelmer Vernooij Sat, 30 Aug 2008 04:34:17 +0200 bzr (1.6-1) experimental; urgency=low * New upstream release. -- Jelmer Vernooij Mon, 25 Aug 2008 19:06:49 +0200 bzr (1.6~rc5-1) experimental; urgency=low * New upstream release. * Update watch file. bazaar now uses launchpad to host its sources. * Remove patch for inventory root revision copy, applied upstream. -- Reinhard Tartler Tue, 19 Aug 2008 19:44:28 +0200 bzr (1.6~rc1-2) experimental; urgency=low * Bump standards version. * Include patch for inventory root revision copy, required for bzr-svn. -- Jelmer Vernooij Sat, 09 Aug 2008 15:54:51 +0200 bzr (1.6~rc1-1) experimental; urgency=low * New upstream release. * Remove unused lintian overrides. -- Jelmer Vernooij Wed, 06 Aug 2008 17:37:14 +0200 bzr (1.5-1) unstable; urgency=low * Final 1.5 release. -- Jelmer Vernooij Sat, 17 May 2008 14:42:51 +0200 bzr (1.5~rc1-1) unstable; urgency=low * New upstream release. -- Jelmer Vernooij Mon, 12 May 2008 00:14:54 +0200 bzr (1.4-1) unstable; urgency=low [ Jelmer Vernooij ] * New upstream release. * Add myself as a co-maintainer. [ Adeodato Simó ] * Add a Dm-Upload-Allowed: yes header. -- Adeodato Simó Sat, 03 May 2008 19:30:43 +0200 bzr (1.3.1-1) unstable; urgency=low * New upstream bugfix release. -- Adeodato Simó Wed, 16 Apr 2008 19:13:43 +0200 bzr (1.3-1) unstable; urgency=low * Final 1.3 release. -- Adeodato Simó Fri, 21 Mar 2008 17:56:59 +0100 bzr (1.3~rc1-1) unstable; urgency=low * First release candidate of the upcoming 1.3 release. -- Adeodato Simó Mon, 17 Mar 2008 13:45:21 +0100 bzr (1.2~rc1-1) unstable; urgency=low * First release candidate of the upcoming 1.2 release. (NB: 1.1 final was never packaged because there were no code changes between 1.1~rc1 and 1.1 itself.) -- Adeodato Simó Thu, 14 Feb 2008 13:32:37 +0100 bzr (1.1~rc1-1) unstable; urgency=low * First release candidate of the upcoming 1.1 release. * Bump Standard-Versions to 3.7.3 (no changes required). -- Adeodato Simó Sat, 05 Jan 2008 20:28:38 +0100 bzr (1.0-1) unstable; urgency=low * Final 1.0 release. + Wrong download links in User Guide fixed. (Closes: #455592) + Drop now unneeded patch fix_version_strings.diff. * After some chat with upstream, recommend `bzr upgrade` and then `bzr reconcile` in NEWS.Debian, instead of reconcile before upgrade, since reconciling in the old format (knits) can be remarkably slower than in the new format (packs). (NB: this should only be done with 1.0~rc2 and later, due to LP #165290.) -- Adeodato Simó Fri, 14 Dec 2007 13:12:06 +0100 bzr (1.0~rc2-2) unstable; urgency=low * Apply patch to fix wrong version numbers in bzr and bzrlib. (See https://bugs.launchpad.net/bzr/+bug/175171.) -- Adeodato Simó Sun, 09 Dec 2007 23:20:52 +0100 bzr (1.0~rc2-1) unstable; urgency=low [ Adeodato Simó ] * New 1.0 release candidate. * debian/control: + revamp the description. + add bzrtools to Recommends. + add bzr-gtk and bzr-svn to Suggests. + remove libxml2-utils from Suggests. + drop conflicts on obsolete bzr-doc. + demote python-pycurl to Suggests, mention in the description what's useful for. + properly capitalize Vcs-Bzr. * Add graphviz to Build-Depends in order to build performance.png. [ James Westby ] * debian/rules: + use '$(MAKE)' instead of 'make' to at least allow a parallel build. -- Adeodato Simó Sun, 09 Dec 2007 21:31:49 +0100 bzr (1.0~rc1-2) unstable; urgency=low * Install images that come with the documentation. * Remove unnecessary stuff from the clean target in debian/rules, and invoke $(MAKE) clean-docs from there so that building twice in a row works. -- Adeodato Simó Sat, 01 Dec 2007 11:42:50 +0100 bzr (1.0~rc1-1) unstable; urgency=low [ Adeodato Simó ] * First release candidate of the upcoming 1.0 release; see NEWS.Debian for more information. [ Arnaud Fontaine ] * Rename XS-Vcs-Bzr to Vcs-Bzr field (dpkg supports it now). * Add Homepage field. * Update GPL path to GPL-2 as GPL-3 is now the default. -- Adeodato Simó Fri, 30 Nov 2007 15:43:46 +0100 bzr (0.92-1) unstable; urgency=low * Final 0.92 release. - Introduction Packs as experimental format, which is expected to become the default format for the final release. (Closes: #396227) -- Reinhard Tartler Tue, 13 Nov 2007 07:44:48 +0100 bzr (0.92~rc1-1) unstable; urgency=low * First release candidate for the upcoming 0.92 version. * Dropped Andres Salomon from the Uploaders field, at his request. -- Adeodato Simó Fri, 02 Nov 2007 22:29:16 +0100 bzr (0.91-2) unstable; urgency=low * remove python-celementree and python-paramiko from build-depends. rationale: - python-celementree is purely an optimisation for python2.4, and is already included in python2.5 - python-paramiko is not used during build at all. However, the testsuite currently fails when paramiko is not installed (see also #59150 in launchpad.net for details). Since we currently don't run the testsuite by default on the buildds, it is safe to remove that dependency, at least for now. -- Reinhard Tartler Thu, 27 Sep 2007 12:25:43 +0200 bzr (0.91-1) unstable; urgency=low * Final 0.91 release. -- Adeodato Simó Wed, 26 Sep 2007 22:16:47 +0200 bzr (0.91~rc2-1) unstable; urgency=low * Second release candidate for the upcoming 0.91 release. * Give a Files line in the HTML section of bzr.doc-base, since the doc-base package in etch requires it. * Suggest xdg-utils for /usr/bin/xdg-email, used if present in `bzr send`. -- Adeodato Simó Fri, 14 Sep 2007 10:02:29 +0200 bzr (0.90-1) unstable; urgency=low * Final 0.90 upstream release: + the doc/ directory has been re-organized in subdirectories, thus separating between *.txt and *.html cannot be easily done from bzr.install anymore. Do it from debian/rules instead. + update bzr.doc-base for this new layout as well. * Ship documents under doc/developers, following upstream wishes. * Use "/usr/bin/python" in the she-bang line instead of "/usr/bin/env python". Rationale in LP: #134046 is right. -- Adeodato Simó Wed, 29 Aug 2007 12:29:26 +0200 bzr (0.90~rc1-1) unstable; urgency=low * New upstream release candidate: + drop no_python2.4_shebangs.diff, applied upstream. + adjust dont_build_developers_doc.diff. + HTML docs are now .html instead of .htm; adjust bzr.doc-base, bzr.install and rules accordingly. * The package now includes Pyrex extensions, so: + move Build-Depends-Indep to Build-Depends. + add python-all-dev to Build-Depends. + make the package arch:any. + add ${shlibs:Depends} to Depends. * Swap the order of the 'python (>> 2.5) | python-celementtree' build-dependency to make sbuild in the buildds happy. (Closes: #436396) * Pass --executable "/usr/bin/env python" to setup.py, to avoid spurious dependencies on python2.X. -- Adeodato Simó Wed, 15 Aug 2007 11:54:51 +0200 bzr (0.18-1) unstable; urgency=low * New upstream version. * Drop version constraints in Build-Depends and Depends, all are satisfied in etch. * Add a patch to skip the generation of doc/developers/*.htm, since we don't ship those in the package. * debian/rules: + pass -r to xargs. + drop commented out install/bzr:: hunk. + don't abort the test suite on the first error. * Bits to help Ubuntu: + prefix dependency and build-dependency on python-celementtree with a "python (>> 2.5)" alternative, since Python 2.5 includes celementtree. + apply patch from Ubuntu to drop python2.4-specific shebang lines, and hence spurious dependency on python2.4 (submitted upstream). + drop build-dependency on python-medusa, only needed to exercise the FTP part of the test suite. -- Adeodato Simó Tue, 17 Jul 2007 16:48:37 +0200 bzr (0.17-1) unstable; urgency=low * Final release of 0.17 -- Reinhard Tartler Mon, 18 Jun 2007 11:23:17 +0100 bzr (0.17~rc1-1) unstable; urgency=low * First release candidate for 0.17 packaged. * Delete man1/bzr.1 in clean, and delete all *.htm files under doc/ as well, not only the ones in the top-level dir. * Change Bazaar-NG to Bazaar in debian/bzr.doc-base. * Fix watch file to properly compare rc versions. * Add XS-VCS-Bzr header. -- Adeodato Simó Tue, 12 Jun 2007 16:08:46 +0100 bzr (0.16-1) unstable; urgency=low * new upstream version * add a note about this package being maintained by pkg-bazaar * add myself to uploaders * generate docs via make docs, upstream has the html links right now * merge ubuntu changes: - add lintian overrides - install doc/README.1st and doc/default.css - debian/control: The upstream name is 'Bazaar', not bazaar-ng anymore -- Reinhard Tartler Tue, 8 May 2007 18:23:31 +0200 bzr (0.16~rc1-1) unstable; urgency=low * New upstream release candidate. * Change the maintainer address to the pkg-bazaar-maint alioth list. * Add a NEWS entry on the `bzr rm` behaviour change. -- Wouter van Heyst Fri, 27 Apr 2007 23:09:46 +0200 bzr (0.15-1) unstable; urgency=low * New upstream release * Extend copyright to 2007 -- Wouter van Heyst Fri, 6 Apr 2007 22:41:36 +0200 bzr (0.14-1) experimental; urgency=low * New upstream release + More gracefully deals with readonly branches (Closes: #374673) * Acknowledge NMUs. (Closes: #395203, #389518, #397535, #397852) * Bump debhelper compat to 5. * Comply with python policy mandated dependencies of debhelper and pycentral. * Flip DEB_BUILD_OPTIONS logic on the testsuite until someone figures out why it intermittently hangs under fakeroot. -- Wouter van Heyst Wed, 24 Jan 2007 00:05:48 +0100 bzr (0.14~rc1-1) experimental; urgency=low * New upstream release candidate. * Add myself as a co-maintainer. -- Wouter van Heyst Wed, 17 Jan 2007 00:53:33 +0100 bzr (0.13-0.1) experimental; urgency=low * Non-maintainer upload. [ Wouter van Heyst ] * New upstream release (Closes: #397852) + Supersedes listdir patch (Closes: #397535) * The rst documentation generates *.htm files, not *.html (Closes: #389518) -- Wouter van Heyst Wed, 27 Dec 2006 02:18:08 +0100 bzr (0.11-1.1) unstable; urgency=medium * Non-maintainer upload. * In test_osutils.py, sort what we get from os.listdir() before checking it; the OS can give back directory entries in whatever order it likes, and this shouldn't break the tests. Fixes intermittent test failures and FTBFS. (Closes: #395203) -- Steinar H. Gunderson Wed, 8 Nov 2006 01:28:55 +0100 bzr (0.11-1) unstable; urgency=low * New upstream release (closes: #389606). -- Andres Salomon Sat, 7 Oct 2006 04:50:50 +0000 bzr (0.10-1) unstable; urgency=low * New upstream release. -- Andres Salomon Mon, 11 Sep 2006 07:43:50 +0000 bzr (0.10~rc2-1) unstable; urgency=low * Second release candidate for the upcoming 0.10 version, fixes Launchpad #58057, `bzr selftest` only works from build tree. * Update download URL in debian/copyright. * Fix typo in previous changelog entry. -- Adeodato Simó Tue, 29 Aug 2006 03:49:33 +0200 bzr (0.10~rc1-1) unstable; urgency=low * First release candidate of the upcoming 0.10 version. Dropped patches, present upstream now (series file now empty): + bazaar.conf_is_file_not_dir.diff + bzr.dev.r1929_handle_TZ=UTC.diff * Changes in control fields: + add python-paramiko to Build-Depends, since now the test suite requires its presence. + change Build-Dependency on, er, python-all-dev, to python (>= 2.4). + bump version on python-central Build-Dependency-Indep to 0.5, and move it to Build-Depends; both suggested by lintian. * Dropped Lars Wirzenius from the Uploaders field, at his request. Thanks for the time you spent on the package, Lars! -- Adeodato Simó Mon, 28 Aug 2006 08:00:11 +0200 bzr (0.9-2) unstable; urgency=low * Instead of setting TZ in debian/rules, appply patch from bzr.dev r1929 to handle TZ=UTC correctly. Thanks for the suggestion, Martin Pitt. -- Adeodato Simó Wed, 16 Aug 2006 18:54:07 +0200 bzr (0.9-1) unstable; urgency=low * Bazaar 0.9 released and uploaded. * Fix download URL in debian/copyright (thanks, Etienne Goyer), add 2004 to the copyright statement, mention all co-maintainers and reformat the file a bit. * Create a stamp-doc after creating the HTML docs, so that it doesn't get invoked twice (once in build, and another time in binary). * Run test suite with TZ explicitly set to non-UTC from debian/rules, to workaround Launchpad #56290. -- Adeodato Simó Mon, 14 Aug 2006 19:52:23 +0200 bzr (0.9~rc1-1) unstable; urgency=low * First 0.9 release candidate packaged (closes: #381920). Bugs reported in Debian's BTS fixed with this upload: + more informative error message when paramiko is not installed and an operation over SFTP is attempted. (Closes: #370099) + progress bar and other output respect terminal width. (Closes: #374674) + does not raise UnicodeEncodeError when launching an editor to enter commit message, and infotext is non-ASCII. (Closes: #375405) * Patches updates: + move debian/001-bazaar.conf.patch to debian/patches, and use quilt to apply it (added build-dependency on it). + remove 003-unboundlocalerror.patch and 004-unboundlocalerror2.patch, included upstream. + drop 002-execute_path.patch, which is not needed anymore as per https://lists.ubuntu.com/archives/bazaar-ng/2006q2/012247.html. Add a note to debian/TODO about preserving executable bits. * Move python-all-dev from Build-Depends-Indep to Build-Depends, well spotted by lintian. * Do not run `bzr selftest` if 'nocheck' is present in DEB_BUILD_OPTIONS. * Add python-medusa to Build-Depends-Indep to make the FTP tests runnable. -- Adeodato Simó Wed, 9 Aug 2006 09:30:17 +0200 bzr (0.8.2-5) unstable; urgency=high * Add python-pycurl to Recommends. (Addresses: #353213) -- Adeodato Simó Thu, 3 Aug 2006 02:05:29 +0200 bzr (0.8.2-4) unstable; urgency=low * Update debian/control to refer to python-* instead of python2.4-* for docutils, paramiko, and celementtree. (Closes: #376559, #363561) * Promote paramiko from Suggests to Recommends. (Closes: #376837) * Update to new Python policy using pycentral. * Pass --no-plugins to `bzr selftest` in debian/rules. * Update Standards-Version to 3.7.2 (no changes needed). * Add myself as an uploader. -- Adeodato Simó Mon, 24 Jul 2006 13:49:24 +0200 bzr (0.8.2-3) unstable; urgency=low * Keep unit tests around for now, since bzr's sftp transport depend upon it (closes: #368760). -- Andres Salomon Tue, 30 May 2006 16:35:29 +0000 bzr (0.8.2-2) unstable; urgency=low * Set the tutorial as the Index page for doc-base (closes: #368120). * Add comments to the top of all patches in debian/ that describe upstream submission status. * Don't throw UnboundLocalError when attempting to write to a read-only repository; thanks to Martin F. Krafft and Bob Tanner (closes: #352707). * Don't throw UnboundLocalError on bzr ignore; thanks to Martin F. Krafft and Bob Tanner (closes: #352791). -- Andres Salomon Sat, 20 May 2006 03:34:32 +0000 bzr (0.8.2-1) unstable; urgency=low * New upstream release (closes: #366083). * No longer call bzr_man.py; upstream's install now automatically builds and installs the manpage. * Upstream cleaned up their docs, and reduced the number of them quite significantly (~30k vs. 300k). There's not much point in bzr-doc anymore, so drop it and merge docs into the main package. Conflict w/ the old bzr-doc package, too. * Include bzr.simple in /etc/bash_completion.d. * Add an entry to NEWS describing changes to how a user's email address is set, and point users at the (now correct) manpage (closes: #353540). * Don't install unit tests; this saves a few megs of code, and end users don't really need to be running this anyways (it's certainly not documented in end-user stuff). * Throw 002-execute_path.patch into debian/, as this is needed to shut lintian up (as originally done by Lars). * Misc additional lintian/linda changes/suggestions. * Don't create empty doc/text directory; create doc/txt instead (closes: #357254). -- Andres Salomon Fri, 19 May 2006 02:08:17 -0400 bzr (0.7-3) unstable; urgency=low * Adding myself to Uploaders with the agreement of Andreas and Jeff. Unfortunately, it seems that Rob is inaccessible right now. * bzrlib/uncommit.py, bzrlib/tests/test_weave.py: Removed #! line. This silences lintian, and the lines also didn't do anything useful since the files didn't have a main program so executing them was a no-op, basically. * doc/Makefile: Call rst2html, not rest2html. * debian/bzr-doc.linda-overrides: Added an override to silence linda about html-only-changelogs. This is actually a bug in linda, which will be filed, but until it's fixed, we still need to be quiet. * debian/control: Added python2.4-paramiko to Suggests for bzr. Closes: #352921. -- Lars Wirzenius Thu, 13 Apr 2006 21:26:57 +0300 bzr (0.7-2) unstable; urgency=low * Update copyright file (closes: #345128). * Be sure to really clean up after build, working around a CDBS bug; thanks Bob Tanner (closes: #336550). -- Andres Salomon Wed, 25 Jan 2006 14:30:06 +0000 bzr (0.7-1) unstable; urgency=low * New upstream release. * Add myself to uploaders. * bzr-man.py -> bzr_man.py, and be sure to clean *all* .pyc files (by searching in root, not just in bzrlib/ subdir). -- Andres Salomon Tue, 24 Jan 2006 21:28:02 +0000 bzr (0.6-2) unstable; urgency=low * Update NEWS.Debian file to have the correct backup dir name. -- Rob Weir Mon, 31 Oct 2005 00:43:25 +1100 bzr (0.6-1) unstable; urgency=low * New upstream release. * Remove {build-,}deps on python, use python2.4 specifically (Closes: #334838). Thanks, Bob Tanner. * Also explicitly build-dep on python2.4-docutils to try to avoid bringing in python 2.3 at all. Sadly, python2.4-docutils Depends on python-docutils, which brings in python2.3-docutils and python2.3 anyway. -- Rob Weir Fri, 28 Oct 2005 22:03:24 +1000 bzr (0.1.1-1) unstable; urgency=low * New upstream release. -- Rob Weir Wed, 12 Oct 2005 21:30:27 +1000 bzr (0.1-1) unstable; urgency=low * New upstream version (Closes: #329950). + It now installs testsweet.py, so "bzr selftest" works (Closes: #331330). + This release uses a new weave-based tree format, and requires a "bzr upgrade" to continue working on old trees. + Incorporates patch so the man page can be built. * Add NEWS.Debian file detailing the above format change. * Run "./bzr selftest" as part of the package build, and bail if it fails. * Add new some new lintian overrides for non-executable-but-hash-banged .py files * debian/control fiddling: + Remove Recommends of urlgrabber, bzr doesn't use it anymore. + Convert Recommends of python2.4-celementtree to Depends. + Build-depend on python2.4-celementtree so it's used by the tests. + Remove Depends on regular elementtree. * Update debian/copyright with the FSF's new address. * Thanks to Jeff Bailey again. -- Rob Weir Tue, 11 Oct 2005 10:48:45 +1000 bzr (0.0.7-2) unstable; urgency=low * Add build-dep on python2.4 and python2.4-dev (Closes: #327160). Thanks, Matt Kraai! * Update lintian override for the fact we're using python2.4. * Add doc-base support. * Clean up generated html documentation on 'clean'. * Thanks again to Jeff Bailey. -- Rob Weir Thu, 15 Sep 2005 17:20:04 +1000 bzr (0.0.7-1) unstable; urgency=low * Add myself to Uploaders, update packagin based on Debian Snapshot and Ubuntu packaging. -- Jeff Bailey Mon, 5 Sep 2005 14:56:49 -0400 bzr (0.0.5-2.1) unstable; urgency=low * Dont' depend on URL Grabber -- Jeff Bailey Thu, 30 Jun 2005 08:31:21 -0400 bzr (0.0.5-2) unstable; urgency=low * New maintainer. * Add build-dep on python2.3 (closes: #315152). * Upload sponsored by Norbert Tretkowski . -- Rob Weir Tue, 21 Jun 2005 16:59:00 +1000 bzr (0.0.5-1) unstable; urgency=low * New upstream release. * First upload to unstable. -- Norbert Tretkowski Wed, 15 Jun 2005 11:44:22 +0200 bzr (0.0.4+20050610-1) experimental; urgency=low * Updated to latest tree. * Used dh_python instead hardcoded postinst/prerm files, thanks to Jeff Bailey for debugging (see #312661 for details). * Removed patch added in 0.0.4+20050602-1, it was integrated upstream. * Added recommendation on python2.3-urlgrabber. -- Norbert Tretkowski Sat, 11 Jun 2005 15:54:20 +0200 bzr (0.0.4+20050606-1) experimental; urgency=low * Updated to latest tree. * Added bash completion file. -- Norbert Tretkowski Mon, 6 Jun 2005 12:52:55 +0200 bzr (0.0.4+20050602-2) experimental; urgency=low * Don't ship *.pyc and *.pyo files, instead compile them when installing the package. -- Norbert Tretkowski Thu, 2 Jun 2005 11:41:48 +0200 bzr (0.0.4+20050602-1) experimental; urgency=low * Updated to latest tree. * Added patch from Hans Ulrich Niedermann to create a manpage. -- Norbert Tretkowski Thu, 2 Jun 2005 01:18:54 +0200 bzr (0.0.4+20050530-1) experimental; urgency=low * Updated to latest tree. -- Norbert Tretkowski Mon, 30 May 2005 20:56:41 +0200 bzr (0.0.4+20050526-1) experimental; urgency=low * Updated to latest tree. -- Norbert Tretkowski Thu, 26 May 2005 22:17:58 +0200 bzr (0.0.4+20050522-1) experimental; urgency=low * Updated to latest tree. * Added TODO file. * Added lintian override for bzrlib/remotebranch.py. -- Norbert Tretkowski Sun, 22 May 2005 11:51:35 +0200 bzr (0.0.4-2) experimental; urgency=low * Mention 'bazaar-ng' in short and long descriptions. -- Norbert Tretkowski Tue, 26 Apr 2005 20:45:11 +0200 bzr (0.0.4-1) experimental; urgency=low * New upstream release. * Added lintian override for bzrlib/revfile.py. -- Norbert Tretkowski Mon, 25 Apr 2005 08:00:17 +0200 bzr (0.0.3-2) experimental; urgency=low * Added copyright of debian/ subdir to copyright file. * Changed section of bzr-doc from devel to doc. -- Norbert Tretkowski Mon, 18 Apr 2005 08:26:11 +0200 bzr (0.0.3-1) experimental; urgency=low * Initial release. (closes: #303724) -- Norbert Tretkowski Sat, 16 Apr 2005 16:48:35 +0200 debian/bzr.manpages0000664000000000000000000000000612276770570011513 0ustar bzr.1 debian/python-bzrlib-dbg.install0000664000000000000000000000004412276770570014130 0ustar usr/lib/python*/*-packages/*/*_d.so debian/bzr-doc.install0000664000000000000000000000041212276770570012132 0ustar doc/developers/_build/html/* usr/share/doc/bzr/html/developers doc/en/_build/html/* usr/share/doc/bzr/html/en doc/es/_build/html/* usr/share/doc/bzr/html/es doc/ja/_build/html/* usr/share/doc/bzr/html/ja doc/ru/_build/html/* usr/share/doc/bzr/html/ru debian/TODO0000664000000000000000000000016012276770570007672 0ustar - preserve executable bits of those .py files that are runnable (weave.py, patiencediff.py, bundle/common.py) debian/overrides/0000775000000000000000000000000012276770571011210 5ustar debian/NEWS0000664000000000000000000000420412276770570007704 0ustar bzr (1.0~rc1-1) unstable; urgency=low This version of Bazaar changes the default format used for newly created branches and repositories. This format is understood by Bazaar 0.92 and later; previous versions won't be able to read this format. To create new branches while maintaining compatibility with previous Bazaar versions, pass --dirstate or --dirstate-tags (>= 0.15) to `bzr init`. To upgrade existing branches or repositories to this new format, run `bzr upgrade`, and then `bzr reconcile`. You need to run these two commands in each standalone branch (those that are not inside a shared repository), but only once in the toplevel directory for shared repositories. Additionally, you can run `bzr upgrade` in branches inside a shared repository to upgrade them to a format that support tags, introduced in version 0.15. -- Adeodato Simó Fri, 30 Nov 2007 16:56:57 +0100 bzr (0.16~rc1-1) unstable; urgency=low This release changes the behaviour of `bzr remove/rm` to remove the working file if it could be recovered again. If you prefer keeping the file instead, issue the --keep option to rm and/or consider using an alias that always sets it (see /usr/share/doc/bzr/txt/using_aliases.txt) If it so happens that a file gets unexpectedly deleted, use `bzr revert ` to get it back. -- Wouter van Heyst Fri, 27 Apr 2007 23:11:12 +0000 bzr (0.8-1) unstable; urgency=low Versions of bzr prior to 0.7 had users setting their email address in ~/.bzr.conf/email. This has changed; email addresses are now set either via environment variables ($BZREMAIL or $EMAIL) or through the config file ~/.bazaar/bazaar.conf. See the bzr(1) man page for more details. -- Andres Salomon Mon, 15 May 2006 00:38:43 -0400 bzr (0.1-1) unstable; urgency=low This release updates the bzr tree-format, and old trees will not be usable until they are upgraded with "bzr upgrade". This should proceed smoothly, but the old .bzr dir is backed up to .bzr.backup should anything go wrong. -- Rob Weir Tue, 11 Oct 2005 11:45:21 +1000 debian/bzr.dirs0000664000000000000000000000002312276770570010660 0ustar usr/share/man/man1 debian/watch0000664000000000000000000000021212276770570010231 0ustar version=3 opts="uversionmangle=s/rc/~rc/;s/b/.0~beta/" \ https://launchpad.net/bzr/+download https://launchpad.net/bzr/.*/bzr-(.+).tar.gz debian/compat0000664000000000000000000000000212276770570010403 0ustar 9 debian/patches/0000775000000000000000000000000012276770571010635 5ustar debian/patches/03_spurious_test_failure0000664000000000000000000000524712276770570015530 0ustar Description: Fix some spurious test failures Author: Jelmer Vernooij Status: Not forwarded upstream (workaround) --- a/bzrlib/tests/test_test_server.py +++ b/bzrlib/tests/test_test_server.py @@ -74,7 +74,12 @@ return self.sock.sendall(s) def read(self, bufsize=4096): - return self.sock.recv(bufsize) + try: + return self.sock.recv(bufsize) + except socket.error, e: + if e.errno == errno.ECONNRESET: + return "" + raise class TCPConnectionHandler(SocketServer.BaseRequestHandler): @@ -167,37 +172,6 @@ self.assertRaises(CantStart, self.get_server, server_class=CantStartServer) - def test_server_fails_while_serving_or_stopping(self): - class CantConnect(Exception): - pass - - class FailingConnectionHandler(TCPConnectionHandler): - - def handle(self): - raise CantConnect() - - server = self.get_server( - connection_handler_class=FailingConnectionHandler) - # The server won't fail until a client connect - client = self.get_client() - client.connect((server.host, server.port)) - # We make sure the server wants to handle a request, but the request is - # guaranteed to fail. However, the server should make sure that the - # connection gets closed, and stop_server should then raise the - # original exception. - client.write('ping\n') - try: - self.assertEqual('', client.read()) - except socket.error, e: - # On Windows, failing during 'handle' means we get - # 'forced-close-of-connection'. Possibly because we haven't - # processed the write request before we close the socket. - WSAECONNRESET = 10054 - if e.errno in (WSAECONNRESET,): - pass - # Now the server has raised the exception in its own thread - self.assertRaises(CantConnect, server.stop_server) - def test_server_crash_while_responding(self): # We want to ensure the exception has been caught caught = threading.Event() --- a/bzrlib/tests/blackbox/test_serve.py +++ b/bzrlib/tests/blackbox/test_serve.py @@ -330,8 +330,6 @@ # request to finish self.assertEqual('Requested to stop gracefully\n', process.stderr.readline()) - self.assertEqual('Waiting for 1 client(s) to finish\n', - process.stderr.readline()) body = response_handler.read_body_bytes() if body != big_contents: self.fail('Failed to properly read the contents of "bigfile"') debian/patches/01_selftest_package0000664000000000000000000000137012276770570014364 0ustar Description: Suggest installing python-bzrlib.tests when bzrlib.tests is unavailable Author: Jelmer Vernooij Status: Not upstream, Debian-specific === modified file 'bzrlib/builtins.py' --- old/bzrlib/builtins.py 2012-01-13 13:45:44 +0000 +++ new/bzrlib/builtins.py 2012-01-13 13:46:18 +0000 @@ -4013,7 +4013,11 @@ # backtraces. lazy_import.disallow_proxying() - from bzrlib import tests + try: + from bzrlib import tests + except ImportError: + raise errors.BzrCommandError("tests not available. Install the " + "python-bzrlib.tests package to run the bzr testsuite.") if testspecs_list is not None: pattern = '|'.join(testspecs_list) debian/patches/02_external_configobj0000664000000000000000000025637512276770570014744 0ustar Description: Remove included copy of python-configobj Author: Jelmer Vernooij Bug-Debian: http://bugs.debian.org/555336 === modified file 'bzrlib/config.py' --- old/bzrlib/config.py 2011-12-19 17:39:40 +0000 +++ new/bzrlib/config.py 2011-12-22 10:22:09 +0000 @@ -104,7 +104,7 @@ win32utils, ) from bzrlib.i18n import gettext -from bzrlib.util.configobj import configobj +import configobj """) from bzrlib import ( commands, === modified file 'bzrlib/rules.py' --- old/bzrlib/rules.py 2011-12-19 17:39:40 +0000 +++ new/bzrlib/rules.py 2011-12-22 10:22:09 +0000 @@ -28,7 +28,7 @@ globbing, osutils, ) -from bzrlib.util.configobj import configobj +import configobj # Name of the file holding rules in a tree === modified file 'bzrlib/tests/test_config.py' --- old/bzrlib/tests/test_config.py 2011-12-16 06:14:26 +0000 +++ new/bzrlib/tests/test_config.py 2011-12-22 10:22:09 +0000 @@ -48,7 +48,7 @@ scenarios, test_server, ) -from bzrlib.util.configobj import configobj +import configobj def lockable_config_scenarios(): === removed directory 'bzrlib/util/configobj' === removed file 'bzrlib/util/configobj/__init__.py' --- old/bzrlib/util/configobj/__init__.py 2011-12-19 17:39:40 +0000 +++ new/bzrlib/util/configobj/__init__.py 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -from __future__ import absolute_import === removed file 'bzrlib/util/configobj/configobj.py' --- old/bzrlib/util/configobj/configobj.py 2011-12-19 17:39:40 +0000 +++ new/bzrlib/util/configobj/configobj.py 1970-01-01 00:00:00 +0000 @@ -1,2461 +0,0 @@ -# configobj.py -# A config file reader/writer that supports nested sections in config files. -# Copyright (C) 2005-2009 Michael Foord, Nicola Larosa -# E-mail: fuzzyman AT voidspace DOT org DOT uk -# nico AT tekNico DOT net - -# ConfigObj 4 -# http://www.voidspace.org.uk/python/configobj.html - -# Released subject to the BSD License -# Please see http://www.voidspace.org.uk/python/license.shtml - -# Scripts maintained at http://www.voidspace.org.uk/python/index.shtml -# For information about bugfixes, updates and support, please join the -# ConfigObj mailing list: -# http://lists.sourceforge.net/lists/listinfo/configobj-develop -# Comments, suggestions and bug reports welcome. - - -from __future__ import absolute_import - -import sys -import os -import re - -compiler = None -# Bzr modification: Disabled import of 'compiler' module -# bzr doesn't use the 'unrepr' feature of configobj, so importing compiler just -# wastes several milliseconds on every single bzr invocation. -# -- Andrew Bennetts, 2008-10-14 -#try: -# import compiler -#except ImportError: -# # for IronPython -# pass - - -try: - from codecs import BOM_UTF8, BOM_UTF16, BOM_UTF16_BE, BOM_UTF16_LE -except ImportError: - # Python 2.2 does not have these - # UTF-8 - BOM_UTF8 = '\xef\xbb\xbf' - # UTF-16, little endian - BOM_UTF16_LE = '\xff\xfe' - # UTF-16, big endian - BOM_UTF16_BE = '\xfe\xff' - if sys.byteorder == 'little': - # UTF-16, native endianness - BOM_UTF16 = BOM_UTF16_LE - else: - # UTF-16, native endianness - BOM_UTF16 = BOM_UTF16_BE - -# A dictionary mapping BOM to -# the encoding to decode with, and what to set the -# encoding attribute to. -BOMS = { - BOM_UTF8: ('utf_8', None), - BOM_UTF16_BE: ('utf16_be', 'utf_16'), - BOM_UTF16_LE: ('utf16_le', 'utf_16'), - BOM_UTF16: ('utf_16', 'utf_16'), - } -# All legal variants of the BOM codecs. -# TODO: the list of aliases is not meant to be exhaustive, is there a -# better way ? -BOM_LIST = { - 'utf_16': 'utf_16', - 'u16': 'utf_16', - 'utf16': 'utf_16', - 'utf-16': 'utf_16', - 'utf16_be': 'utf16_be', - 'utf_16_be': 'utf16_be', - 'utf-16be': 'utf16_be', - 'utf16_le': 'utf16_le', - 'utf_16_le': 'utf16_le', - 'utf-16le': 'utf16_le', - 'utf_8': 'utf_8', - 'u8': 'utf_8', - 'utf': 'utf_8', - 'utf8': 'utf_8', - 'utf-8': 'utf_8', - } - -# Map of encodings to the BOM to write. -BOM_SET = { - 'utf_8': BOM_UTF8, - 'utf_16': BOM_UTF16, - 'utf16_be': BOM_UTF16_BE, - 'utf16_le': BOM_UTF16_LE, - None: BOM_UTF8 - } - - -def match_utf8(encoding): - return BOM_LIST.get(encoding.lower()) == 'utf_8' - - -# Quote strings used for writing values -squot = "'%s'" -dquot = '"%s"' -noquot = "%s" -wspace_plus = ' \r\n\v\t\'"' -tsquot = '"""%s"""' -tdquot = "'''%s'''" - -try: - enumerate -except NameError: - def enumerate(obj): - """enumerate for Python 2.2.""" - i = -1 - for item in obj: - i += 1 - yield i, item - -# Sentinel for use in getattr calls to replace hasattr -MISSING = object() - -__version__ = '4.6.0' - -__revision__ = '$Id: configobj.py 156 2006-01-31 14:57:08Z fuzzyman $' - -__docformat__ = "restructuredtext en" - -__all__ = ( - '__version__', - 'DEFAULT_INDENT_TYPE', - 'DEFAULT_INTERPOLATION', - 'ConfigObjError', - 'NestingError', - 'ParseError', - 'DuplicateError', - 'ConfigspecError', - 'ConfigObj', - 'SimpleVal', - 'InterpolationError', - 'InterpolationLoopError', - 'MissingInterpolationOption', - 'RepeatSectionError', - 'ReloadError', - 'UnreprError', - 'UnknownType', - '__docformat__', - 'flatten_errors', -) - -DEFAULT_INTERPOLATION = 'configparser' -DEFAULT_INDENT_TYPE = ' ' -MAX_INTERPOL_DEPTH = 10 - -OPTION_DEFAULTS = { - 'interpolation': True, - 'raise_errors': False, - 'list_values': True, - 'create_empty': False, - 'file_error': False, - 'configspec': None, - 'stringify': True, - # option may be set to one of ('', ' ', '\t') - 'indent_type': None, - 'encoding': None, - 'default_encoding': None, - 'unrepr': False, - 'write_empty_values': False, -} - - - -def getObj(s): - s = "a=" + s - if compiler is None: - raise ImportError('compiler module not available') - p = compiler.parse(s) - return p.getChildren()[1].getChildren()[0].getChildren()[1] - - -class UnknownType(Exception): - pass - - -class Builder(object): - - def build(self, o): - m = getattr(self, 'build_' + o.__class__.__name__, None) - if m is None: - raise UnknownType(o.__class__.__name__) - return m(o) - - def build_List(self, o): - return map(self.build, o.getChildren()) - - def build_Const(self, o): - return o.value - - def build_Dict(self, o): - d = {} - i = iter(map(self.build, o.getChildren())) - for el in i: - d[el] = i.next() - return d - - def build_Tuple(self, o): - return tuple(self.build_List(o)) - - def build_Name(self, o): - if o.name == 'None': - return None - if o.name == 'True': - return True - if o.name == 'False': - return False - - # An undefined Name - raise UnknownType('Undefined Name') - - def build_Add(self, o): - real, imag = map(self.build_Const, o.getChildren()) - try: - real = float(real) - except TypeError: - raise UnknownType('Add') - if not isinstance(imag, complex) or imag.real != 0.0: - raise UnknownType('Add') - return real+imag - - def build_Getattr(self, o): - parent = self.build(o.expr) - return getattr(parent, o.attrname) - - def build_UnarySub(self, o): - return -self.build_Const(o.getChildren()[0]) - - def build_UnaryAdd(self, o): - return self.build_Const(o.getChildren()[0]) - - -_builder = Builder() - - -def unrepr(s): - if not s: - return s - return _builder.build(getObj(s)) - - - -class ConfigObjError(SyntaxError): - """ - This is the base class for all errors that ConfigObj raises. - It is a subclass of SyntaxError. - """ - def __init__(self, message='', line_number=None, line=''): - self.line = line - self.line_number = line_number - SyntaxError.__init__(self, message) - - -class NestingError(ConfigObjError): - """ - This error indicates a level of nesting that doesn't match. - """ - - -class ParseError(ConfigObjError): - """ - This error indicates that a line is badly written. - It is neither a valid ``key = value`` line, - nor a valid section marker line. - """ - - -class ReloadError(IOError): - """ - A 'reload' operation failed. - This exception is a subclass of ``IOError``. - """ - def __init__(self): - IOError.__init__(self, 'reload failed, filename is not set.') - - -class DuplicateError(ConfigObjError): - """ - The keyword or section specified already exists. - """ - - -class ConfigspecError(ConfigObjError): - """ - An error occured whilst parsing a configspec. - """ - - -class InterpolationError(ConfigObjError): - """Base class for the two interpolation errors.""" - - -class InterpolationLoopError(InterpolationError): - """Maximum interpolation depth exceeded in string interpolation.""" - - def __init__(self, option): - InterpolationError.__init__( - self, - 'interpolation loop detected in value "%s".' % option) - - -class RepeatSectionError(ConfigObjError): - """ - This error indicates additional sections in a section with a - ``__many__`` (repeated) section. - """ - - -class MissingInterpolationOption(InterpolationError): - """A value specified for interpolation was missing.""" - - def __init__(self, option): - InterpolationError.__init__( - self, - 'missing option "%s" in interpolation.' % option) - - -class UnreprError(ConfigObjError): - """An error parsing in unrepr mode.""" - - - -class InterpolationEngine(object): - """ - A helper class to help perform string interpolation. - - This class is an abstract base class; its descendants perform - the actual work. - """ - - # compiled regexp to use in self.interpolate() - _KEYCRE = re.compile(r"%\(([^)]*)\)s") - - def __init__(self, section): - # the Section instance that "owns" this engine - self.section = section - - - def interpolate(self, key, value): - def recursive_interpolate(key, value, section, backtrail): - """The function that does the actual work. - - ``value``: the string we're trying to interpolate. - ``section``: the section in which that string was found - ``backtrail``: a dict to keep track of where we've been, - to detect and prevent infinite recursion loops - - This is similar to a depth-first-search algorithm. - """ - # Have we been here already? - if (key, section.name) in backtrail: - # Yes - infinite loop detected - raise InterpolationLoopError(key) - # Place a marker on our backtrail so we won't come back here again - backtrail[(key, section.name)] = 1 - - # Now start the actual work - match = self._KEYCRE.search(value) - while match: - # The actual parsing of the match is implementation-dependent, - # so delegate to our helper function - k, v, s = self._parse_match(match) - if k is None: - # That's the signal that no further interpolation is needed - replacement = v - else: - # Further interpolation may be needed to obtain final value - replacement = recursive_interpolate(k, v, s, backtrail) - # Replace the matched string with its final value - start, end = match.span() - value = ''.join((value[:start], replacement, value[end:])) - new_search_start = start + len(replacement) - # Pick up the next interpolation key, if any, for next time - # through the while loop - match = self._KEYCRE.search(value, new_search_start) - - # Now safe to come back here again; remove marker from backtrail - del backtrail[(key, section.name)] - - return value - - # Back in interpolate(), all we have to do is kick off the recursive - # function with appropriate starting values - value = recursive_interpolate(key, value, self.section, {}) - return value - - - def _fetch(self, key): - """Helper function to fetch values from owning section. - - Returns a 2-tuple: the value, and the section where it was found. - """ - # switch off interpolation before we try and fetch anything ! - save_interp = self.section.main.interpolation - self.section.main.interpolation = False - - # Start at section that "owns" this InterpolationEngine - current_section = self.section - while True: - # try the current section first - val = current_section.get(key) - if val is not None: - break - # try "DEFAULT" next - val = current_section.get('DEFAULT', {}).get(key) - if val is not None: - break - # move up to parent and try again - # top-level's parent is itself - if current_section.parent is current_section: - # reached top level, time to give up - break - current_section = current_section.parent - - # restore interpolation to previous value before returning - self.section.main.interpolation = save_interp - if val is None: - raise MissingInterpolationOption(key) - return val, current_section - - - def _parse_match(self, match): - """Implementation-dependent helper function. - - Will be passed a match object corresponding to the interpolation - key we just found (e.g., "%(foo)s" or "$foo"). Should look up that - key in the appropriate config file section (using the ``_fetch()`` - helper function) and return a 3-tuple: (key, value, section) - - ``key`` is the name of the key we're looking for - ``value`` is the value found for that key - ``section`` is a reference to the section where it was found - - ``key`` and ``section`` should be None if no further - interpolation should be performed on the resulting value - (e.g., if we interpolated "$$" and returned "$"). - """ - raise NotImplementedError() - - - -class ConfigParserInterpolation(InterpolationEngine): - """Behaves like ConfigParser.""" - _KEYCRE = re.compile(r"%\(([^)]*)\)s") - - def _parse_match(self, match): - key = match.group(1) - value, section = self._fetch(key) - return key, value, section - - - -class TemplateInterpolation(InterpolationEngine): - """Behaves like string.Template.""" - _delimiter = '$' - _KEYCRE = re.compile(r""" - \$(?: - (?P\$) | # Two $ signs - (?P[_a-z][_a-z0-9]*) | # $name format - {(?P[^}]*)} # ${name} format - ) - """, re.IGNORECASE | re.VERBOSE) - - def _parse_match(self, match): - # Valid name (in or out of braces): fetch value from section - key = match.group('named') or match.group('braced') - if key is not None: - value, section = self._fetch(key) - return key, value, section - # Escaped delimiter (e.g., $$): return single delimiter - if match.group('escaped') is not None: - # Return None for key and section to indicate it's time to stop - return None, self._delimiter, None - # Anything else: ignore completely, just return it unchanged - return None, match.group(), None - - -interpolation_engines = { - 'configparser': ConfigParserInterpolation, - 'template': TemplateInterpolation, -} - - -def __newobj__(cls, *args): - # Hack for pickle - return cls.__new__(cls, *args) - -class Section(dict): - """ - A dictionary-like object that represents a section in a config file. - - It does string interpolation if the 'interpolation' attribute - of the 'main' object is set to True. - - Interpolation is tried first from this object, then from the 'DEFAULT' - section of this object, next from the parent and its 'DEFAULT' section, - and so on until the main object is reached. - - A Section will behave like an ordered dictionary - following the - order of the ``scalars`` and ``sections`` attributes. - You can use this to change the order of members. - - Iteration follows the order: scalars, then sections. - """ - - - def __setstate__(self, state): - dict.update(self, state[0]) - self.__dict__.update(state[1]) - - def __reduce__(self): - state = (dict(self), self.__dict__) - return (__newobj__, (self.__class__,), state) - - - def __init__(self, parent, depth, main, indict=None, name=None): - """ - * parent is the section above - * depth is the depth level of this section - * main is the main ConfigObj - * indict is a dictionary to initialise the section with - """ - if indict is None: - indict = {} - dict.__init__(self) - # used for nesting level *and* interpolation - self.parent = parent - # used for the interpolation attribute - self.main = main - # level of nesting depth of this Section - self.depth = depth - # purely for information - self.name = name - # - self._initialise() - # we do this explicitly so that __setitem__ is used properly - # (rather than just passing to ``dict.__init__``) - for entry, value in indict.iteritems(): - self[entry] = value - - - def _initialise(self): - # the sequence of scalar values in this Section - self.scalars = [] - # the sequence of sections in this Section - self.sections = [] - # for comments :-) - self.comments = {} - self.inline_comments = {} - # the configspec - self.configspec = None - # for defaults - self.defaults = [] - self.default_values = {} - - - def _interpolate(self, key, value): - try: - # do we already have an interpolation engine? - engine = self._interpolation_engine - except AttributeError: - # not yet: first time running _interpolate(), so pick the engine - name = self.main.interpolation - if name == True: # note that "if name:" would be incorrect here - # backwards-compatibility: interpolation=True means use default - name = DEFAULT_INTERPOLATION - name = name.lower() # so that "Template", "template", etc. all work - class_ = interpolation_engines.get(name, None) - if class_ is None: - # invalid value for self.main.interpolation - self.main.interpolation = False - return value - else: - # save reference to engine so we don't have to do this again - engine = self._interpolation_engine = class_(self) - # let the engine do the actual work - return engine.interpolate(key, value) - - - def __getitem__(self, key): - """Fetch the item and do string interpolation.""" - val = dict.__getitem__(self, key) - if self.main.interpolation and isinstance(val, basestring): - return self._interpolate(key, val) - return val - - - def __setitem__(self, key, value, unrepr=False): - """ - Correctly set a value. - - Making dictionary values Section instances. - (We have to special case 'Section' instances - which are also dicts) - - Keys must be strings. - Values need only be strings (or lists of strings) if - ``main.stringify`` is set. - - ``unrepr`` must be set when setting a value to a dictionary, without - creating a new sub-section. - """ - if not isinstance(key, basestring): - raise ValueError('The key "%s" is not a string.' % key) - - # add the comment - if key not in self.comments: - self.comments[key] = [] - self.inline_comments[key] = '' - # remove the entry from defaults - if key in self.defaults: - self.defaults.remove(key) - # - if isinstance(value, Section): - if key not in self: - self.sections.append(key) - dict.__setitem__(self, key, value) - elif isinstance(value, dict) and not unrepr: - # First create the new depth level, - # then create the section - if key not in self: - self.sections.append(key) - new_depth = self.depth + 1 - dict.__setitem__( - self, - key, - Section( - self, - new_depth, - self.main, - indict=value, - name=key)) - else: - if key not in self: - self.scalars.append(key) - if not self.main.stringify: - if isinstance(value, basestring): - pass - elif isinstance(value, (list, tuple)): - for entry in value: - if not isinstance(entry, basestring): - raise TypeError('Value is not a string "%s".' % entry) - else: - raise TypeError('Value is not a string "%s".' % value) - dict.__setitem__(self, key, value) - - - def __delitem__(self, key): - """Remove items from the sequence when deleting.""" - dict. __delitem__(self, key) - if key in self.scalars: - self.scalars.remove(key) - else: - self.sections.remove(key) - del self.comments[key] - del self.inline_comments[key] - - - def get(self, key, default=None): - """A version of ``get`` that doesn't bypass string interpolation.""" - try: - return self[key] - except KeyError: - return default - - - def update(self, indict): - """ - A version of update that uses our ``__setitem__``. - """ - for entry in indict: - self[entry] = indict[entry] - - - def pop(self, key, *args): - """ - 'D.pop(k[,d]) -> v, remove specified key and return the corresponding value. - If key is not found, d is returned if given, otherwise KeyError is raised' - """ - val = dict.pop(self, key, *args) - if key in self.scalars: - del self.comments[key] - del self.inline_comments[key] - self.scalars.remove(key) - elif key in self.sections: - del self.comments[key] - del self.inline_comments[key] - self.sections.remove(key) - if self.main.interpolation and isinstance(val, basestring): - return self._interpolate(key, val) - return val - - - def popitem(self): - """Pops the first (key,val)""" - sequence = (self.scalars + self.sections) - if not sequence: - raise KeyError(": 'popitem(): dictionary is empty'") - key = sequence[0] - val = self[key] - del self[key] - return key, val - - - def clear(self): - """ - A version of clear that also affects scalars/sections - Also clears comments and configspec. - - Leaves other attributes alone : - depth/main/parent are not affected - """ - dict.clear(self) - self.scalars = [] - self.sections = [] - self.comments = {} - self.inline_comments = {} - self.configspec = None - - - def setdefault(self, key, default=None): - """A version of setdefault that sets sequence if appropriate.""" - try: - return self[key] - except KeyError: - self[key] = default - return self[key] - - - def items(self): - """D.items() -> list of D's (key, value) pairs, as 2-tuples""" - return zip((self.scalars + self.sections), self.values()) - - - def keys(self): - """D.keys() -> list of D's keys""" - return (self.scalars + self.sections) - - - def values(self): - """D.values() -> list of D's values""" - return [self[key] for key in (self.scalars + self.sections)] - - - def iteritems(self): - """D.iteritems() -> an iterator over the (key, value) items of D""" - return iter(self.items()) - - - def iterkeys(self): - """D.iterkeys() -> an iterator over the keys of D""" - return iter((self.scalars + self.sections)) - - __iter__ = iterkeys - - - def itervalues(self): - """D.itervalues() -> an iterator over the values of D""" - return iter(self.values()) - - - def __repr__(self): - """x.__repr__() <==> repr(x)""" - return '{%s}' % ', '.join([('%s: %s' % (repr(key), repr(self[key]))) - for key in (self.scalars + self.sections)]) - - __str__ = __repr__ - __str__.__doc__ = "x.__str__() <==> str(x)" - - - # Extra methods - not in a normal dictionary - - def dict(self): - """ - Return a deepcopy of self as a dictionary. - - All members that are ``Section`` instances are recursively turned to - ordinary dictionaries - by calling their ``dict`` method. - - >>> n = a.dict() - >>> n == a - 1 - >>> n is a - 0 - """ - newdict = {} - for entry in self: - this_entry = self[entry] - if isinstance(this_entry, Section): - this_entry = this_entry.dict() - elif isinstance(this_entry, list): - # create a copy rather than a reference - this_entry = list(this_entry) - elif isinstance(this_entry, tuple): - # create a copy rather than a reference - this_entry = tuple(this_entry) - newdict[entry] = this_entry - return newdict - - - def merge(self, indict): - """ - A recursive update - useful for merging config files. - - >>> a = '''[section1] - ... option1 = True - ... [[subsection]] - ... more_options = False - ... # end of file'''.splitlines() - >>> b = '''# File is user.ini - ... [section1] - ... option1 = False - ... # end of file'''.splitlines() - >>> c1 = ConfigObj(b) - >>> c2 = ConfigObj(a) - >>> c2.merge(c1) - >>> c2 - ConfigObj({'section1': {'option1': 'False', 'subsection': {'more_options': 'False'}}}) - """ - for key, val in indict.items(): - if (key in self and isinstance(self[key], dict) and - isinstance(val, dict)): - self[key].merge(val) - else: - self[key] = val - - - def rename(self, oldkey, newkey): - """ - Change a keyname to another, without changing position in sequence. - - Implemented so that transformations can be made on keys, - as well as on values. (used by encode and decode) - - Also renames comments. - """ - if oldkey in self.scalars: - the_list = self.scalars - elif oldkey in self.sections: - the_list = self.sections - else: - raise KeyError('Key "%s" not found.' % oldkey) - pos = the_list.index(oldkey) - # - val = self[oldkey] - dict.__delitem__(self, oldkey) - dict.__setitem__(self, newkey, val) - the_list.remove(oldkey) - the_list.insert(pos, newkey) - comm = self.comments[oldkey] - inline_comment = self.inline_comments[oldkey] - del self.comments[oldkey] - del self.inline_comments[oldkey] - self.comments[newkey] = comm - self.inline_comments[newkey] = inline_comment - - - def walk(self, function, raise_errors=True, - call_on_sections=False, **keywargs): - """ - Walk every member and call a function on the keyword and value. - - Return a dictionary of the return values - - If the function raises an exception, raise the errror - unless ``raise_errors=False``, in which case set the return value to - ``False``. - - Any unrecognised keyword arguments you pass to walk, will be pased on - to the function you pass in. - - Note: if ``call_on_sections`` is ``True`` then - on encountering a - subsection, *first* the function is called for the *whole* subsection, - and then recurses into it's members. This means your function must be - able to handle strings, dictionaries and lists. This allows you - to change the key of subsections as well as for ordinary members. The - return value when called on the whole subsection has to be discarded. - - See the encode and decode methods for examples, including functions. - - .. admonition:: caution - - You can use ``walk`` to transform the names of members of a section - but you mustn't add or delete members. - - >>> config = '''[XXXXsection] - ... XXXXkey = XXXXvalue'''.splitlines() - >>> cfg = ConfigObj(config) - >>> cfg - ConfigObj({'XXXXsection': {'XXXXkey': 'XXXXvalue'}}) - >>> def transform(section, key): - ... val = section[key] - ... newkey = key.replace('XXXX', 'CLIENT1') - ... section.rename(key, newkey) - ... if isinstance(val, (tuple, list, dict)): - ... pass - ... else: - ... val = val.replace('XXXX', 'CLIENT1') - ... section[newkey] = val - >>> cfg.walk(transform, call_on_sections=True) - {'CLIENT1section': {'CLIENT1key': None}} - >>> cfg - ConfigObj({'CLIENT1section': {'CLIENT1key': 'CLIENT1value'}}) - """ - out = {} - # scalars first - for i in range(len(self.scalars)): - entry = self.scalars[i] - try: - val = function(self, entry, **keywargs) - # bound again in case name has changed - entry = self.scalars[i] - out[entry] = val - except Exception: - if raise_errors: - raise - else: - entry = self.scalars[i] - out[entry] = False - # then sections - for i in range(len(self.sections)): - entry = self.sections[i] - if call_on_sections: - try: - function(self, entry, **keywargs) - except Exception: - if raise_errors: - raise - else: - entry = self.sections[i] - out[entry] = False - # bound again in case name has changed - entry = self.sections[i] - # previous result is discarded - out[entry] = self[entry].walk( - function, - raise_errors=raise_errors, - call_on_sections=call_on_sections, - **keywargs) - return out - - - def as_bool(self, key): - """ - Accepts a key as input. The corresponding value must be a string or - the objects (``True`` or 1) or (``False`` or 0). We allow 0 and 1 to - retain compatibility with Python 2.2. - - If the string is one of ``True``, ``On``, ``Yes``, or ``1`` it returns - ``True``. - - If the string is one of ``False``, ``Off``, ``No``, or ``0`` it returns - ``False``. - - ``as_bool`` is not case sensitive. - - Any other input will raise a ``ValueError``. - - >>> a = ConfigObj() - >>> a['a'] = 'fish' - >>> a.as_bool('a') - Traceback (most recent call last): - ValueError: Value "fish" is neither True nor False - >>> a['b'] = 'True' - >>> a.as_bool('b') - 1 - >>> a['b'] = 'off' - >>> a.as_bool('b') - 0 - """ - val = self[key] - if val == True: - return True - elif val == False: - return False - else: - try: - if not isinstance(val, basestring): - # TODO: Why do we raise a KeyError here? - raise KeyError() - else: - return self.main._bools[val.lower()] - except KeyError: - raise ValueError('Value "%s" is neither True nor False' % val) - - - def as_int(self, key): - """ - A convenience method which coerces the specified value to an integer. - - If the value is an invalid literal for ``int``, a ``ValueError`` will - be raised. - - >>> a = ConfigObj() - >>> a['a'] = 'fish' - >>> a.as_int('a') - Traceback (most recent call last): - ValueError: invalid literal for int() with base 10: 'fish' - >>> a['b'] = '1' - >>> a.as_int('b') - 1 - >>> a['b'] = '3.2' - >>> a.as_int('b') - Traceback (most recent call last): - ValueError: invalid literal for int() with base 10: '3.2' - """ - return int(self[key]) - - - def as_float(self, key): - """ - A convenience method which coerces the specified value to a float. - - If the value is an invalid literal for ``float``, a ``ValueError`` will - be raised. - - >>> a = ConfigObj() - >>> a['a'] = 'fish' - >>> a.as_float('a') - Traceback (most recent call last): - ValueError: invalid literal for float(): fish - >>> a['b'] = '1' - >>> a.as_float('b') - 1.0 - >>> a['b'] = '3.2' - >>> a.as_float('b') - 3.2000000000000002 - """ - return float(self[key]) - - - def as_list(self, key): - """ - A convenience method which fetches the specified value, guaranteeing - that it is a list. - - >>> a = ConfigObj() - >>> a['a'] = 1 - >>> a.as_list('a') - [1] - >>> a['a'] = (1,) - >>> a.as_list('a') - [1] - >>> a['a'] = [1] - >>> a.as_list('a') - [1] - """ - result = self[key] - if isinstance(result, (tuple, list)): - return list(result) - return [result] - - - def restore_default(self, key): - """ - Restore (and return) default value for the specified key. - - This method will only work for a ConfigObj that was created - with a configspec and has been validated. - - If there is no default value for this key, ``KeyError`` is raised. - """ - default = self.default_values[key] - dict.__setitem__(self, key, default) - if key not in self.defaults: - self.defaults.append(key) - return default - - - def restore_defaults(self): - """ - Recursively restore default values to all members - that have them. - - This method will only work for a ConfigObj that was created - with a configspec and has been validated. - - It doesn't delete or modify entries without default values. - """ - for key in self.default_values: - self.restore_default(key) - - for section in self.sections: - self[section].restore_defaults() - - -class ConfigObj(Section): - """An object to read, create, and write config files.""" - - _keyword = re.compile(r'''^ # line start - (\s*) # indentation - ( # keyword - (?:".*?")| # double quotes - (?:'.*?')| # single quotes - (?:[^'"=].*?) # no quotes - ) - \s*=\s* # divider - (.*) # value (including list values and comments) - $ # line end - ''', - re.VERBOSE) - - _sectionmarker = re.compile(r'''^ - (\s*) # 1: indentation - ((?:\[\s*)+) # 2: section marker open - ( # 3: section name open - (?:"\s*\S.*?\s*")| # at least one non-space with double quotes - (?:'\s*\S.*?\s*')| # at least one non-space with single quotes - (?:[^'"\s].*?) # at least one non-space unquoted - ) # section name close - ((?:\s*\])+) # 4: section marker close - \s*(\#.*)? # 5: optional comment - $''', - re.VERBOSE) - - # this regexp pulls list values out as a single string - # or single values and comments - # FIXME: this regex adds a '' to the end of comma terminated lists - # workaround in ``_handle_value`` - _valueexp = re.compile(r'''^ - (?: - (?: - ( - (?: - (?: - (?:".*?")| # double quotes - (?:'.*?')| # single quotes - (?:[^'",\#][^,\#]*?) # unquoted - ) - \s*,\s* # comma - )* # match all list items ending in a comma (if any) - ) - ( - (?:".*?")| # double quotes - (?:'.*?')| # single quotes - (?:[^'",\#\s][^,]*?)| # unquoted - (?:(? 1: - msg = "Parsing failed with several errors.\nFirst error %s" % info - error = ConfigObjError(msg) - else: - error = self._errors[0] - # set the errors attribute; it's a list of tuples: - # (error_type, message, line_number) - error.errors = self._errors - # set the config attribute - error.config = self - raise error - # delete private attributes - del self._errors - - if configspec is None: - self.configspec = None - else: - self._handle_configspec(configspec) - - - def _initialise(self, options=None): - if options is None: - options = OPTION_DEFAULTS - - # initialise a few variables - self.filename = None - self._errors = [] - self.raise_errors = options['raise_errors'] - self.interpolation = options['interpolation'] - self.list_values = options['list_values'] - self.create_empty = options['create_empty'] - self.file_error = options['file_error'] - self.stringify = options['stringify'] - self.indent_type = options['indent_type'] - self.encoding = options['encoding'] - self.default_encoding = options['default_encoding'] - self.BOM = False - self.newlines = None - self.write_empty_values = options['write_empty_values'] - self.unrepr = options['unrepr'] - - self.initial_comment = [] - self.final_comment = [] - self.configspec = None - - if self._inspec: - self.list_values = False - - # Clear section attributes as well - Section._initialise(self) - - - def __repr__(self): - return ('ConfigObj({%s})' % - ', '.join([('%s: %s' % (repr(key), repr(self[key]))) - for key in (self.scalars + self.sections)])) - - - def _handle_bom(self, infile): - """ - Handle any BOM, and decode if necessary. - - If an encoding is specified, that *must* be used - but the BOM should - still be removed (and the BOM attribute set). - - (If the encoding is wrongly specified, then a BOM for an alternative - encoding won't be discovered or removed.) - - If an encoding is not specified, UTF8 or UTF16 BOM will be detected and - removed. The BOM attribute will be set. UTF16 will be decoded to - unicode. - - NOTE: This method must not be called with an empty ``infile``. - - Specifying the *wrong* encoding is likely to cause a - ``UnicodeDecodeError``. - - ``infile`` must always be returned as a list of lines, but may be - passed in as a single string. - """ - if ((self.encoding is not None) and - (self.encoding.lower() not in BOM_LIST)): - # No need to check for a BOM - # the encoding specified doesn't have one - # just decode - return self._decode(infile, self.encoding) - - if isinstance(infile, (list, tuple)): - line = infile[0] - else: - line = infile - if self.encoding is not None: - # encoding explicitly supplied - # And it could have an associated BOM - # TODO: if encoding is just UTF16 - we ought to check for both - # TODO: big endian and little endian versions. - enc = BOM_LIST[self.encoding.lower()] - if enc == 'utf_16': - # For UTF16 we try big endian and little endian - for BOM, (encoding, final_encoding) in BOMS.items(): - if not final_encoding: - # skip UTF8 - continue - if infile.startswith(BOM): - ### BOM discovered - ##self.BOM = True - # Don't need to remove BOM - return self._decode(infile, encoding) - - # If we get this far, will *probably* raise a DecodeError - # As it doesn't appear to start with a BOM - return self._decode(infile, self.encoding) - - # Must be UTF8 - BOM = BOM_SET[enc] - if not line.startswith(BOM): - return self._decode(infile, self.encoding) - - newline = line[len(BOM):] - - # BOM removed - if isinstance(infile, (list, tuple)): - infile[0] = newline - else: - infile = newline - self.BOM = True - return self._decode(infile, self.encoding) - - # No encoding specified - so we need to check for UTF8/UTF16 - for BOM, (encoding, final_encoding) in BOMS.items(): - if not line.startswith(BOM): - continue - else: - # BOM discovered - self.encoding = final_encoding - if not final_encoding: - self.BOM = True - # UTF8 - # remove BOM - newline = line[len(BOM):] - if isinstance(infile, (list, tuple)): - infile[0] = newline - else: - infile = newline - # UTF8 - don't decode - if isinstance(infile, basestring): - return infile.splitlines(True) - else: - return infile - # UTF16 - have to decode - return self._decode(infile, encoding) - - # No BOM discovered and no encoding specified, just return - if isinstance(infile, basestring): - # infile read from a file will be a single string - return infile.splitlines(True) - return infile - - - def _a_to_u(self, aString): - """Decode ASCII strings to unicode if a self.encoding is specified.""" - if self.encoding: - return aString.decode('ascii') - else: - return aString - - - def _decode(self, infile, encoding): - """ - Decode infile to unicode. Using the specified encoding. - - if is a string, it also needs converting to a list. - """ - if isinstance(infile, basestring): - # can't be unicode - # NOTE: Could raise a ``UnicodeDecodeError`` - return infile.decode(encoding).splitlines(True) - for i, line in enumerate(infile): - if not isinstance(line, unicode): - # NOTE: The isinstance test here handles mixed lists of unicode/string - # NOTE: But the decode will break on any non-string values - # NOTE: Or could raise a ``UnicodeDecodeError`` - infile[i] = line.decode(encoding) - return infile - - - def _decode_element(self, line): - """Decode element to unicode if necessary.""" - if not self.encoding: - return line - if isinstance(line, str) and self.default_encoding: - return line.decode(self.default_encoding) - return line - - - def _str(self, value): - """ - Used by ``stringify`` within validate, to turn non-string values - into strings. - """ - if not isinstance(value, basestring): - return str(value) - else: - return value - - - def _parse(self, infile): - """Actually parse the config file.""" - temp_list_values = self.list_values - if self.unrepr: - self.list_values = False - - comment_list = [] - done_start = False - this_section = self - maxline = len(infile) - 1 - cur_index = -1 - reset_comment = False - - while cur_index < maxline: - if reset_comment: - comment_list = [] - cur_index += 1 - line = infile[cur_index] - sline = line.strip() - # do we have anything on the line ? - if not sline or sline.startswith('#'): - reset_comment = False - comment_list.append(line) - continue - - if not done_start: - # preserve initial comment - self.initial_comment = comment_list - comment_list = [] - done_start = True - - reset_comment = True - # first we check if it's a section marker - mat = self._sectionmarker.match(line) - if mat is not None: - # is a section line - (indent, sect_open, sect_name, sect_close, comment) = mat.groups() - if indent and (self.indent_type is None): - self.indent_type = indent - cur_depth = sect_open.count('[') - if cur_depth != sect_close.count(']'): - self._handle_error("Cannot compute the section depth at line %s.", - NestingError, infile, cur_index) - continue - - if cur_depth < this_section.depth: - # the new section is dropping back to a previous level - try: - parent = self._match_depth(this_section, - cur_depth).parent - except SyntaxError: - self._handle_error("Cannot compute nesting level at line %s.", - NestingError, infile, cur_index) - continue - elif cur_depth == this_section.depth: - # the new section is a sibling of the current section - parent = this_section.parent - elif cur_depth == this_section.depth + 1: - # the new section is a child the current section - parent = this_section - else: - self._handle_error("Section too nested at line %s.", - NestingError, infile, cur_index) - - sect_name = self._unquote(sect_name) - if sect_name in parent: - self._handle_error('Duplicate section name at line %s.', - DuplicateError, infile, cur_index) - continue - - # create the new section - this_section = Section( - parent, - cur_depth, - self, - name=sect_name) - parent[sect_name] = this_section - parent.inline_comments[sect_name] = comment - parent.comments[sect_name] = comment_list - continue - # - # it's not a section marker, - # so it should be a valid ``key = value`` line - mat = self._keyword.match(line) - if mat is None: - # it neither matched as a keyword - # or a section marker - self._handle_error( - 'Invalid line at line "%s".', - ParseError, infile, cur_index) - else: - # is a keyword value - # value will include any inline comment - (indent, key, value) = mat.groups() - if indent and (self.indent_type is None): - self.indent_type = indent - # check for a multiline value - if value[:3] in ['"""', "'''"]: - try: - (value, comment, cur_index) = self._multiline( - value, infile, cur_index, maxline) - except SyntaxError: - self._handle_error( - 'Parse error in value at line %s.', - ParseError, infile, cur_index) - continue - else: - if self.unrepr: - comment = '' - try: - value = unrepr(value) - except Exception, e: - if type(e) == UnknownType: - msg = 'Unknown name or type in value at line %s.' - else: - msg = 'Parse error in value at line %s.' - self._handle_error(msg, UnreprError, infile, - cur_index) - continue - else: - if self.unrepr: - comment = '' - try: - value = unrepr(value) - except Exception, e: - if isinstance(e, UnknownType): - msg = 'Unknown name or type in value at line %s.' - else: - msg = 'Parse error in value at line %s.' - self._handle_error(msg, UnreprError, infile, - cur_index) - continue - else: - # extract comment and lists - try: - (value, comment) = self._handle_value(value) - except SyntaxError: - self._handle_error( - 'Parse error in value at line %s.', - ParseError, infile, cur_index) - continue - # - key = self._unquote(key) - if key in this_section: - self._handle_error( - 'Duplicate keyword name at line %s.', - DuplicateError, infile, cur_index) - continue - # add the key. - # we set unrepr because if we have got this far we will never - # be creating a new section - this_section.__setitem__(key, value, unrepr=True) - this_section.inline_comments[key] = comment - this_section.comments[key] = comment_list - continue - # - if self.indent_type is None: - # no indentation used, set the type accordingly - self.indent_type = '' - - # preserve the final comment - if not self and not self.initial_comment: - self.initial_comment = comment_list - elif not reset_comment: - self.final_comment = comment_list - self.list_values = temp_list_values - - - def _match_depth(self, sect, depth): - """ - Given a section and a depth level, walk back through the sections - parents to see if the depth level matches a previous section. - - Return a reference to the right section, - or raise a SyntaxError. - """ - while depth < sect.depth: - if sect is sect.parent: - # we've reached the top level already - raise SyntaxError() - sect = sect.parent - if sect.depth == depth: - return sect - # shouldn't get here - raise SyntaxError() - - - def _handle_error(self, text, ErrorClass, infile, cur_index): - """ - Handle an error according to the error settings. - - Either raise the error or store it. - The error will have occured at ``cur_index`` - """ - line = infile[cur_index] - cur_index += 1 - message = text % cur_index - error = ErrorClass(message, cur_index, line) - if self.raise_errors: - # raise the error - parsing stops here - raise error - # store the error - # reraise when parsing has finished - self._errors.append(error) - - - def _unquote(self, value): - """Return an unquoted version of a value""" - if (value[0] == value[-1]) and (value[0] in ('"', "'")): - value = value[1:-1] - return value - - - def _quote(self, value, multiline=True): - """ - Return a safely quoted version of a value. - - Raise a ConfigObjError if the value cannot be safely quoted. - If multiline is ``True`` (default) then use triple quotes - if necessary. - - * Don't quote values that don't need it. - * Recursively quote members of a list and return a comma joined list. - * Multiline is ``False`` for lists. - * Obey list syntax for empty and single member lists. - - If ``list_values=False`` then the value is only quoted if it contains - a ``\\n`` (is multiline) or '#'. - - If ``write_empty_values`` is set, and the value is an empty string, it - won't be quoted. - """ - if multiline and self.write_empty_values and value == '': - # Only if multiline is set, so that it is used for values not - # keys, and not values that are part of a list - return '' - - if multiline and isinstance(value, (list, tuple)): - if not value: - return ',' - elif len(value) == 1: - return self._quote(value[0], multiline=False) + ',' - return ', '.join([self._quote(val, multiline=False) - for val in value]) - if not isinstance(value, basestring): - if self.stringify: - value = str(value) - else: - raise TypeError('Value "%s" is not a string.' % value) - - if not value: - return '""' - - no_lists_no_quotes = not self.list_values and '\n' not in value and '#' not in value - need_triple = multiline and ((("'" in value) and ('"' in value)) or ('\n' in value )) - hash_triple_quote = multiline and not need_triple and ("'" in value) and ('"' in value) and ('#' in value) - check_for_single = (no_lists_no_quotes or not need_triple) and not hash_triple_quote - - if check_for_single: - if not self.list_values: - # we don't quote if ``list_values=False`` - quot = noquot - # for normal values either single or double quotes will do - elif '\n' in value: - # will only happen if multiline is off - e.g. '\n' in key - raise ConfigObjError('Value "%s" cannot be safely quoted.' % value) - elif ((value[0] not in wspace_plus) and - (value[-1] not in wspace_plus) and - (',' not in value)): - quot = noquot - else: - quot = self._get_single_quote(value) - else: - # if value has '\n' or "'" *and* '"', it will need triple quotes - quot = self._get_triple_quote(value) - - if quot == noquot and '#' in value and self.list_values: - quot = self._get_single_quote(value) - - return quot % value - - - def _get_single_quote(self, value): - if ("'" in value) and ('"' in value): - raise ConfigObjError('Value "%s" cannot be safely quoted.' % value) - elif '"' in value: - quot = squot - else: - quot = dquot - return quot - - - def _get_triple_quote(self, value): - if (value.find('"""') != -1) and (value.find("'''") != -1): - raise ConfigObjError('Value "%s" cannot be safely quoted.' % value) - # upstream version (up to version 4.7.2) has the bug with incorrect quoting; - # fixed in our copy based on the suggestion of ConfigObj's author - if value.find('"""') == -1: - quot = tsquot - else: - quot = tdquot - return quot - - - def _handle_value(self, value): - """ - Given a value string, unquote, remove comment, - handle lists. (including empty and single member lists) - """ - if self._inspec: - # Parsing a configspec so don't handle comments - return (value, '') - # do we look for lists in values ? - if not self.list_values: - mat = self._nolistvalue.match(value) - if mat is None: - raise SyntaxError() - # NOTE: we don't unquote here - return mat.groups() - # - mat = self._valueexp.match(value) - if mat is None: - # the value is badly constructed, probably badly quoted, - # or an invalid list - raise SyntaxError() - (list_values, single, empty_list, comment) = mat.groups() - if (list_values == '') and (single is None): - # change this if you want to accept empty values - raise SyntaxError() - # NOTE: note there is no error handling from here if the regex - # is wrong: then incorrect values will slip through - if empty_list is not None: - # the single comma - meaning an empty list - return ([], comment) - if single is not None: - # handle empty values - if list_values and not single: - # FIXME: the '' is a workaround because our regex now matches - # '' at the end of a list if it has a trailing comma - single = None - else: - single = single or '""' - single = self._unquote(single) - if list_values == '': - # not a list value - return (single, comment) - the_list = self._listvalueexp.findall(list_values) - the_list = [self._unquote(val) for val in the_list] - if single is not None: - the_list += [single] - return (the_list, comment) - - - def _multiline(self, value, infile, cur_index, maxline): - """Extract the value, where we are in a multiline situation.""" - quot = value[:3] - newvalue = value[3:] - single_line = self._triple_quote[quot][0] - multi_line = self._triple_quote[quot][1] - mat = single_line.match(value) - if mat is not None: - retval = list(mat.groups()) - retval.append(cur_index) - return retval - elif newvalue.find(quot) != -1: - # somehow the triple quote is missing - raise SyntaxError() - # - while cur_index < maxline: - cur_index += 1 - newvalue += '\n' - line = infile[cur_index] - if line.find(quot) == -1: - newvalue += line - else: - # end of multiline, process it - break - else: - # we've got to the end of the config, oops... - raise SyntaxError() - mat = multi_line.match(line) - if mat is None: - # a badly formed line - raise SyntaxError() - (value, comment) = mat.groups() - return (newvalue + value, comment, cur_index) - - - def _handle_configspec(self, configspec): - """Parse the configspec.""" - # FIXME: Should we check that the configspec was created with the - # correct settings ? (i.e. ``list_values=False``) - if not isinstance(configspec, ConfigObj): - try: - configspec = ConfigObj(configspec, - raise_errors=True, - file_error=True, - _inspec=True) - except ConfigObjError, e: - # FIXME: Should these errors have a reference - # to the already parsed ConfigObj ? - raise ConfigspecError('Parsing configspec failed: %s' % e) - except IOError, e: - raise IOError('Reading configspec failed: %s' % e) - - self.configspec = configspec - - - - def _set_configspec(self, section, copy): - """ - Called by validate. Handles setting the configspec on subsections - including sections to be validated by __many__ - """ - configspec = section.configspec - many = configspec.get('__many__') - if isinstance(many, dict): - for entry in section.sections: - if entry not in configspec: - section[entry].configspec = many - - for entry in configspec.sections: - if entry == '__many__': - continue - if entry not in section: - section[entry] = {} - if copy: - # copy comments - section.comments[entry] = configspec.comments.get(entry, []) - section.inline_comments[entry] = configspec.inline_comments.get(entry, '') - - # Could be a scalar when we expect a section - if isinstance(section[entry], Section): - section[entry].configspec = configspec[entry] - - - def _write_line(self, indent_string, entry, this_entry, comment): - """Write an individual line, for the write method""" - # NOTE: the calls to self._quote here handles non-StringType values. - if not self.unrepr: - val = self._decode_element(self._quote(this_entry)) - else: - val = repr(this_entry) - return '%s%s%s%s%s' % (indent_string, - self._decode_element(self._quote(entry, multiline=False)), - self._a_to_u(' = '), - val, - self._decode_element(comment)) - - - def _write_marker(self, indent_string, depth, entry, comment): - """Write a section marker line""" - return '%s%s%s%s%s' % (indent_string, - self._a_to_u('[' * depth), - self._quote(self._decode_element(entry), multiline=False), - self._a_to_u(']' * depth), - self._decode_element(comment)) - - - def _handle_comment(self, comment): - """Deal with a comment.""" - if not comment: - return '' - start = self.indent_type - if not comment.startswith('#'): - start += self._a_to_u(' # ') - return (start + comment) - - - # Public methods - - def write(self, outfile=None, section=None): - """ - Write the current ConfigObj as a file - - tekNico: FIXME: use StringIO instead of real files - - >>> filename = a.filename - >>> a.filename = 'test.ini' - >>> a.write() - >>> a.filename = filename - >>> a == ConfigObj('test.ini', raise_errors=True) - 1 - """ - if self.indent_type is None: - # this can be true if initialised from a dictionary - self.indent_type = DEFAULT_INDENT_TYPE - - out = [] - cs = self._a_to_u('#') - csp = self._a_to_u('# ') - if section is None: - int_val = self.interpolation - self.interpolation = False - section = self - for line in self.initial_comment: - line = self._decode_element(line) - stripped_line = line.strip() - if stripped_line and not stripped_line.startswith(cs): - line = csp + line - out.append(line) - - indent_string = self.indent_type * section.depth - for entry in (section.scalars + section.sections): - if entry in section.defaults: - # don't write out default values - continue - for comment_line in section.comments[entry]: - comment_line = self._decode_element(comment_line.lstrip()) - if comment_line and not comment_line.startswith(cs): - comment_line = csp + comment_line - out.append(indent_string + comment_line) - this_entry = section[entry] - comment = self._handle_comment(section.inline_comments[entry]) - - if isinstance(this_entry, dict): - # a section - out.append(self._write_marker( - indent_string, - this_entry.depth, - entry, - comment)) - out.extend(self.write(section=this_entry)) - else: - out.append(self._write_line( - indent_string, - entry, - this_entry, - comment)) - - if section is self: - for line in self.final_comment: - line = self._decode_element(line) - stripped_line = line.strip() - if stripped_line and not stripped_line.startswith(cs): - line = csp + line - out.append(line) - self.interpolation = int_val - - if section is not self: - return out - - if (self.filename is None) and (outfile is None): - # output a list of lines - # might need to encode - # NOTE: This will *screw* UTF16, each line will start with the BOM - if self.encoding: - out = [l.encode(self.encoding) for l in out] - if (self.BOM and ((self.encoding is None) or - (BOM_LIST.get(self.encoding.lower()) == 'utf_8'))): - # Add the UTF8 BOM - if not out: - out.append('') - out[0] = BOM_UTF8 + out[0] - return out - - # Turn the list to a string, joined with correct newlines - newline = self.newlines or os.linesep - output = self._a_to_u(newline).join(out) - if self.encoding: - output = output.encode(self.encoding) - if self.BOM and ((self.encoding is None) or match_utf8(self.encoding)): - # Add the UTF8 BOM - output = BOM_UTF8 + output - - if not output.endswith(newline): - output += newline - if outfile is not None: - outfile.write(output) - else: - h = open(self.filename, 'wb') - h.write(output) - h.close() - - - def validate(self, validator, preserve_errors=False, copy=False, - section=None): - """ - Test the ConfigObj against a configspec. - - It uses the ``validator`` object from *validate.py*. - - To run ``validate`` on the current ConfigObj, call: :: - - test = config.validate(validator) - - (Normally having previously passed in the configspec when the ConfigObj - was created - you can dynamically assign a dictionary of checks to the - ``configspec`` attribute of a section though). - - It returns ``True`` if everything passes, or a dictionary of - pass/fails (True/False). If every member of a subsection passes, it - will just have the value ``True``. (It also returns ``False`` if all - members fail). - - In addition, it converts the values from strings to their native - types if their checks pass (and ``stringify`` is set). - - If ``preserve_errors`` is ``True`` (``False`` is default) then instead - of a marking a fail with a ``False``, it will preserve the actual - exception object. This can contain info about the reason for failure. - For example the ``VdtValueTooSmallError`` indicates that the value - supplied was too small. If a value (or section) is missing it will - still be marked as ``False``. - - You must have the validate module to use ``preserve_errors=True``. - - You can then use the ``flatten_errors`` function to turn your nested - results dictionary into a flattened list of failures - useful for - displaying meaningful error messages. - """ - if section is None: - if self.configspec is None: - raise ValueError('No configspec supplied.') - if preserve_errors: - # We do this once to remove a top level dependency on the validate module - # Which makes importing configobj faster - from validate import VdtMissingValue - self._vdtMissingValue = VdtMissingValue - - section = self - - if copy: - section.initial_comment = section.configspec.initial_comment - section.final_comment = section.configspec.final_comment - section.encoding = section.configspec.encoding - section.BOM = section.configspec.BOM - section.newlines = section.configspec.newlines - section.indent_type = section.configspec.indent_type - - # - configspec = section.configspec - self._set_configspec(section, copy) - - def validate_entry(entry, spec, val, missing, ret_true, ret_false): - try: - check = validator.check(spec, - val, - missing=missing - ) - except validator.baseErrorClass, e: - if not preserve_errors or isinstance(e, self._vdtMissingValue): - out[entry] = False - else: - # preserve the error - out[entry] = e - ret_false = False - ret_true = False - else: - try: - section.default_values.pop(entry, None) - except AttributeError: - # For Python 2.2 compatibility - try: - del section.default_values[entry] - except KeyError: - pass - - try: - section.default_values[entry] = validator.get_default_value(configspec[entry]) - except (KeyError, AttributeError): - # No default or validator has no 'get_default_value' (e.g. SimpleVal) - pass - - ret_false = False - out[entry] = True - if self.stringify or missing: - # if we are doing type conversion - # or the value is a supplied default - if not self.stringify: - if isinstance(check, (list, tuple)): - # preserve lists - check = [self._str(item) for item in check] - elif missing and check is None: - # convert the None from a default to a '' - check = '' - else: - check = self._str(check) - if (check != val) or missing: - section[entry] = check - if not copy and missing and entry not in section.defaults: - section.defaults.append(entry) - return ret_true, ret_false - - # - out = {} - ret_true = True - ret_false = True - - unvalidated = [k for k in section.scalars if k not in configspec] - incorrect_sections = [k for k in configspec.sections if k in section.scalars] - incorrect_scalars = [k for k in configspec.scalars if k in section.sections] - - for entry in configspec.scalars: - if entry in ('__many__', '___many___'): - # reserved names - continue - - if (not entry in section.scalars) or (entry in section.defaults): - # missing entries - # or entries from defaults - missing = True - val = None - if copy and not entry in section.scalars: - # copy comments - section.comments[entry] = ( - configspec.comments.get(entry, [])) - section.inline_comments[entry] = ( - configspec.inline_comments.get(entry, '')) - # - else: - missing = False - val = section[entry] - - ret_true, ret_false = validate_entry(entry, configspec[entry], val, - missing, ret_true, ret_false) - - many = None - if '__many__' in configspec.scalars: - many = configspec['__many__'] - elif '___many___' in configspec.scalars: - many = configspec['___many___'] - - if many is not None: - for entry in unvalidated: - val = section[entry] - ret_true, ret_false = validate_entry(entry, many, val, False, - ret_true, ret_false) - - for entry in incorrect_scalars: - ret_true = False - if not preserve_errors: - out[entry] = False - else: - ret_false = False - msg = 'Value %r was provided as a section' % entry - out[entry] = validator.baseErrorClass(msg) - for entry in incorrect_sections: - ret_true = False - if not preserve_errors: - out[entry] = False - else: - ret_false = False - msg = 'Section %r was provided as a single value' % entry - out[entry] = validator.baseErrorClass(msg) - - # Missing sections will have been created as empty ones when the - # configspec was read. - for entry in section.sections: - # FIXME: this means DEFAULT is not copied in copy mode - if section is self and entry == 'DEFAULT': - continue - if section[entry].configspec is None: - continue - if copy: - section.comments[entry] = configspec.comments.get(entry, []) - section.inline_comments[entry] = configspec.inline_comments.get(entry, '') - check = self.validate(validator, preserve_errors=preserve_errors, copy=copy, section=section[entry]) - out[entry] = check - if check == False: - ret_true = False - elif check == True: - ret_false = False - else: - ret_true = False - ret_false = False - # - if ret_true: - return True - elif ret_false: - return False - return out - - - def reset(self): - """Clear ConfigObj instance and restore to 'freshly created' state.""" - self.clear() - self._initialise() - # FIXME: Should be done by '_initialise', but ConfigObj constructor (and reload) - # requires an empty dictionary - self.configspec = None - # Just to be sure ;-) - self._original_configspec = None - - - def reload(self): - """ - Reload a ConfigObj from file. - - This method raises a ``ReloadError`` if the ConfigObj doesn't have - a filename attribute pointing to a file. - """ - if not isinstance(self.filename, basestring): - raise ReloadError() - - filename = self.filename - current_options = {} - for entry in OPTION_DEFAULTS: - if entry == 'configspec': - continue - current_options[entry] = getattr(self, entry) - - configspec = self._original_configspec - current_options['configspec'] = configspec - - self.clear() - self._initialise(current_options) - self._load(filename, configspec) - - - -class SimpleVal(object): - """ - A simple validator. - Can be used to check that all members expected are present. - - To use it, provide a configspec with all your members in (the value given - will be ignored). Pass an instance of ``SimpleVal`` to the ``validate`` - method of your ``ConfigObj``. ``validate`` will return ``True`` if all - members are present, or a dictionary with True/False meaning - present/missing. (Whole missing sections will be replaced with ``False``) - """ - - def __init__(self): - self.baseErrorClass = ConfigObjError - - def check(self, check, member, missing=False): - """A dummy check method, always returns the value unchanged.""" - if missing: - raise self.baseErrorClass() - return member - - -# Check / processing functions for options -def flatten_errors(cfg, res, levels=None, results=None): - """ - An example function that will turn a nested dictionary of results - (as returned by ``ConfigObj.validate``) into a flat list. - - ``cfg`` is the ConfigObj instance being checked, ``res`` is the results - dictionary returned by ``validate``. - - (This is a recursive function, so you shouldn't use the ``levels`` or - ``results`` arguments - they are used by the function.) - - Returns a list of keys that failed. Each member of the list is a tuple : - - :: - - ([list of sections...], key, result) - - If ``validate`` was called with ``preserve_errors=False`` (the default) - then ``result`` will always be ``False``. - - *list of sections* is a flattened list of sections that the key was found - in. - - If the section was missing (or a section was expected and a scalar provided - - or vice-versa) then key will be ``None``. - - If the value (or section) was missing then ``result`` will be ``False``. - - If ``validate`` was called with ``preserve_errors=True`` and a value - was present, but failed the check, then ``result`` will be the exception - object returned. You can use this as a string that describes the failure. - - For example *The value "3" is of the wrong type*. - - >>> import validate - >>> vtor = validate.Validator() - >>> my_ini = ''' - ... option1 = True - ... [section1] - ... option1 = True - ... [section2] - ... another_option = Probably - ... [section3] - ... another_option = True - ... [[section3b]] - ... value = 3 - ... value2 = a - ... value3 = 11 - ... ''' - >>> my_cfg = ''' - ... option1 = boolean() - ... option2 = boolean() - ... option3 = boolean(default=Bad_value) - ... [section1] - ... option1 = boolean() - ... option2 = boolean() - ... option3 = boolean(default=Bad_value) - ... [section2] - ... another_option = boolean() - ... [section3] - ... another_option = boolean() - ... [[section3b]] - ... value = integer - ... value2 = integer - ... value3 = integer(0, 10) - ... [[[section3b-sub]]] - ... value = string - ... [section4] - ... another_option = boolean() - ... ''' - >>> cs = my_cfg.split('\\n') - >>> ini = my_ini.split('\\n') - >>> cfg = ConfigObj(ini, configspec=cs) - >>> res = cfg.validate(vtor, preserve_errors=True) - >>> errors = [] - >>> for entry in flatten_errors(cfg, res): - ... section_list, key, error = entry - ... section_list.insert(0, '[root]') - ... if key is not None: - ... section_list.append(key) - ... else: - ... section_list.append('[missing]') - ... section_string = ', '.join(section_list) - ... errors.append((section_string, ' = ', error)) - >>> errors.sort() - >>> for entry in errors: - ... print entry[0], entry[1], (entry[2] or 0) - [root], option2 = 0 - [root], option3 = the value "Bad_value" is of the wrong type. - [root], section1, option2 = 0 - [root], section1, option3 = the value "Bad_value" is of the wrong type. - [root], section2, another_option = the value "Probably" is of the wrong type. - [root], section3, section3b, section3b-sub, [missing] = 0 - [root], section3, section3b, value2 = the value "a" is of the wrong type. - [root], section3, section3b, value3 = the value "11" is too big. - [root], section4, [missing] = 0 - """ - if levels is None: - # first time called - levels = [] - results = [] - if res is True: - return results - if res is False or isinstance(res, Exception): - results.append((levels[:], None, res)) - if levels: - levels.pop() - return results - for (key, val) in res.items(): - if val == True: - continue - if isinstance(cfg.get(key), dict): - # Go down one level - levels.append(key) - flatten_errors(cfg[key], val, levels, results) - continue - results.append((levels[:], key, val)) - # - # Go up one level - if levels: - levels.pop() - # - return results - - -"""*A programming language is a medium of expression.* - Paul Graham""" debian/patches/05_remove_gzip_test0000664000000000000000000000141612276770570014452 0ustar Description: Fix some spurious failure. Origin: Ubuntu Author: Matthias Klose Status: Not forwarded upstream (workaround) LP-Bug: https://bugs.launchpad.net/ubuntu/+source/bzr/+bug/1116079 Index: b/bzrlib/tests/test_tuned_gzip.py =================================================================== --- a/bzrlib/tests/test_tuned_gzip.py 2011-05-13 12:51:05.000000000 +0000 +++ b/bzrlib/tests/test_tuned_gzip.py 2013-04-02 10:09:19.622871879 +0000 @@ -124,7 +124,3 @@ def test_large_chunks(self): self.assertToGzip(['a large string\n'*1024]) self.assertToGzip(['a large string\n']*1024) - - def test_enormous_chunks(self): - self.assertToGzip(['a large string\n'*1024*256]) - self.assertToGzip(['a large string\n']*1024*256) debian/patches/series0000664000000000000000000000012712276770570012051 0ustar 01_selftest_package 02_external_configobj 03_spurious_test_failure 05_remove_gzip_test debian/tests/0000775000000000000000000000000012277041027010334 5ustar debian/tests/testsuite0000775000000000000000000000006712277041004012311 0ustar #!/bin/sh bzr selftest -v --parallel=fork --no-plugins debian/tests/control0000664000000000000000000000013512276770570011751 0ustar Tests: testsuite Depends: bzr, python-bzrlib.tests, python-subunit Features: no-build-needed debian/control0000664000000000000000000001444212321373021010572 0ustar Source: bzr Section: vcs Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian Bazaar Maintainers Uploaders: Wouter van Heyst , Andrew Starr-Bochicchio Build-Depends: ca-certificates, cython-dbg | python-pyrex, debhelper (>= 9), fdupes, python (>= 2.6.6-3), python-all-dbg (>= 2.6.6-3), python-all-dev (>= 2.6.6-3), python-configobj (>= 4.7.2+ds-2), python-docutils, python-paramiko, python-pycurl-dbg, python-sphinx (>= 1.0.7+dfsg), python-subunit, python-testtools (>= 0.9.5~) Standards-Version: 3.9.5 X-Python-Version: >= 2.6 Vcs-Bzr: http://bzr.debian.org/bzr/pkg-bazaar/bzr/2.6 Vcs-Browser: http://bzr.debian.org/loggerhead/pkg-bazaar/bzr/2.6 Homepage: http://bazaar-vcs.org XS-Testsuite: autopkgtest Package: bzr Recommends: python-gpgme Architecture: all Depends: python-bzrlib (<= ${source:Version}.1~), python-bzrlib (>= ${source:Version}), ${misc:Depends}, ${python:Depends} Breaks: bzr-pqm (<< 1.4.0~bzr80), bzr-xmloutput (<< 0.8.8+bzr160), python-bzrlib (<< 2.4.0~beta3~) Suggests: bzr-doc, bzrtools, python-bzrlib.tests Description: easy to use distributed version control system Bazaar is a distributed version control system designed to be easy to use and intuitive, able to adapt to many workflows, reliable, and easily extendable. . Publishing of branches can be done over plain HTTP, that is, no special software is needed on the server to host Bazaar branches. Branches can be pushed to the server via sftp (which most SSH installations come with), FTP, or over a custom and faster protocol if bzr is installed in the remote end. . Merging in Bazaar is easy, as the implementation is able to avoid many spurious conflicts, deals well with repeated merges between branches, and is able to handle modifications to renamed files correctly. . Bazaar is written in Python, and has a flexible plugin interface which can be used to extend its functionality. Many plugins exist, providing useful commands (bzrtools), graphical interfaces (qbzr), or native interaction with Subversion branches (bzr-svn). . Install python-paramiko if you are going to push branches to remote hosts with sftp, and python-pycurl if you'd like for SSL certificates always to be verified. Package: python-bzrlib Architecture: any Section: python Depends: python-configobj, ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} Recommends: ca-certificates, python-launchpadlib, python-paramiko Suggests: python-bzrlib-dbg, python-bzrlib.tests, python-gpgme, python-kerberos (>= 1.0+svn2455-1), python-pycurl, xdg-utils Breaks: bzr (<< 2.3.0-2), bzr-grep Provides: bzr-grep, ${python:Provides} Replaces: bzr (<< 2.3.0-2), bzr-grep Description: distributed version control system - python library Bazaar is a distributed version control system designed to be easy to use and intuitive, able to adapt to many workflows, reliable, and easily extendable. . This package contains the Bazaar Python library. . Install python-paramiko if you are going to push branches to remote hosts with sftp, and python-pycurl if you'd like for SSL certificates always to be verified. Package: python-bzrlib-dbg Architecture: any Priority: extra Section: debug Depends: python-bzrlib (= ${binary:Version}), ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} Provides: ${python:Provides} Recommends: python-dbg Suggests: python-gpgme-dbg, python-lzma-dbg, python-meliae-dbg Description: distributed version control system - debug extension Bazaar is a distributed version control system designed to be easy to use and intuitive, able to adapt to many workflows, reliable, and easily extendable. . This package contains the debug extension for the Bazaar Python library. Package: python-bzrlib.tests Architecture: all Section: python Depends: python-bzrlib (<= ${source:Version}.1~), python-bzrlib (>= ${source:Version}), python-testtools (>= 0.9.5~), ${misc:Depends}, ${python:Depends} Suggests: python-subunit Breaks: python-bzrlib (<< 2.4.0~beta1-2) Provides: ${python:Provides} Replaces: python-bzrlib (<< 2.4.0~beta1-2) Description: distributed version control system - testsuite Bazaar is a distributed version control system designed to be easy to use and intuitive, able to adapt to many workflows, reliable, and easily extendable. . This package contains the bzrlib test infrastructure and testsuite, which is required to run the 'bzr selftest' command and to run plugin tests. Package: bzr-doc Architecture: all Section: doc Depends: ${misc:Depends}, ${sphinxdoc:Depends} Suggests: bzr Replaces: bzr (<< 2.0.1) Breaks: bzr (<< 2.0.1) Description: easy to use distributed version control system (documentation) Bazaar is a distributed version control system designed to be easy to use and intuitive, able to adapt to many workflows, reliable, and easily extendable. . Publishing of branches can be done over plain HTTP, that is, no special software is needed on the server to host Bazaar branches. Branches can be pushed to the server via sftp (which most SSH installations come with), FTP, or over a custom and faster protocol if bzr is installed in the remote end. . Merging in Bazaar is easy, as the implementation is able to avoid many spurious conflicts, deals well with repeated merges between branches, and is able to handle modifications to renamed files correctly. . Bazaar is written in Python, and has a flexible plugin interface which can be used to extend its functionality. Many plugins exist, providing useful commands (bzrtools), graphical interfaces (qbzr), or native interaction with Subversion branches (bzr-svn). . Install python-paramiko if you are going to push branches to remote hosts with sftp, and python-pycurl if you'd like for SSL certificates always to be verified. . This package provides the documentation. debian/bzr.install0000664000000000000000000000017112276770570011371 0ustar contrib/bash/bzr etc/bash_completion.d/ debian/tmp/usr/bin/bzr usr/bin debian/tmp/usr/man/man1/bzr.1 usr/share/man/man1/ debian/source/0000775000000000000000000000000012276770571010506 5ustar debian/source/format0000664000000000000000000000001412276770570011713 0ustar 3.0 (quilt) debian/python-bzrlib.install0000664000000000000000000000062012276770570013376 0ustar usr/lib/python*/*-packages/*/*[!_][!_].so usr/lib/python*/*-packages/bzrlib/*.py usr/lib/python*/*-packages/bzrlib/*/*.py usr/lib/python*/*-packages/bzrlib/*/*/*.py usr/lib/python*/*-packages/bzrlib/*/*/*/*.py usr/lib/python*/*-packages/bzrlib/_*_c.so usr/lib/python*/*-packages/bzrlib/doc/api/*.txt usr/lib/python*/*-packages/bzrlib/help_topics/en/*.txt usr/lib/python*/dist-packages/bzr-*.egg-info debian/bzr-doc.doc-base0000664000000000000000000000047612276770570012153 0ustar Document: bzr Title: Bazaar documentation Abstract: Documentation for Bazaar in text and HTML form. Section: Programming Format: Text Files: /usr/share/doc/bzr/txt/index.txt Format: HTML Index: /usr/share/doc/bzr/html/en/index.html Files: /usr/share/doc/bzr/html/en/*.html /usr/share/doc/bzr/html/en/*/*.html