diff -Nru bzr-2.6.0~bzr6571/bzrlib/crash.py bzr-2.6.0~bzr6573/bzrlib/crash.py --- bzr-2.6.0~bzr6571/bzrlib/crash.py 2011-12-19 13:23:58.000000000 +0000 +++ bzr-2.6.0~bzr6573/bzrlib/crash.py 2013-01-30 05:55:38.000000000 +0000 @@ -170,7 +170,7 @@ pr['Platform'] = platform.platform(aliased=1) pr['UserEncoding'] = osutils.get_user_encoding() pr['FileSystemEncoding'] = sys.getfilesystemencoding() - pr['Locale'] = os.environ.get('LANG') + pr['Locale'] = os.environ.get('LANG', 'C') pr['BzrPlugins'] = _format_plugin_list() pr['PythonLoadedModules'] = _format_module_list() pr['BzrDebugFlags'] = pprint.pformat(debug.debug_flags) @@ -259,7 +259,7 @@ os.open(filename, os.O_WRONLY|os.O_CREAT|os.O_EXCL, 0600), - 'w') + 'wb') def _format_plugin_list(): diff -Nru bzr-2.6.0~bzr6571/bzrlib/tests/test_ui.py bzr-2.6.0~bzr6573/bzrlib/tests/test_ui.py --- bzr-2.6.0~bzr6571/bzrlib/tests/test_ui.py 2012-09-17 09:06:56.000000000 +0000 +++ bzr-2.6.0~bzr6573/bzrlib/tests/test_ui.py 2012-12-04 14:21:42.000000000 +0000 @@ -103,7 +103,6 @@ ui.stdout = tests.StringIOWrapper() ui.stderr = tests.StringIOWrapper() ui.stderr.encoding = ui.stdout.encoding = ui.stdin.encoding = 'utf8' - pb = ui.nested_progress_bar() password = ui.get_password(u'Hello \u1234 %(user)s', user=u'some\u1234') self.assertEqual(u'baz\u1234', password) self.assertEqual(u'Hello \u1234 some\u1234: ', diff -Nru bzr-2.6.0~bzr6571/bzrlib/ui/text.py bzr-2.6.0~bzr6573/bzrlib/ui/text.py --- bzr-2.6.0~bzr6571/bzrlib/ui/text.py 2012-10-10 18:45:21.000000000 +0000 +++ bzr-2.6.0~bzr6573/bzrlib/ui/text.py 2012-12-04 14:21:42.000000000 +0000 @@ -336,7 +336,13 @@ if kwargs: # See prompt = prompt % kwargs - prompt = prompt.encode(osutils.get_terminal_encoding(), 'replace') + try: + prompt = prompt.encode(self.stderr.encoding) + except (UnicodeError, AttributeError): + # If stderr has no encoding attribute or can't properly encode, + # fallback to terminal encoding for robustness (better display + # something to the user than aborting with a traceback). + prompt = prompt.encode(osutils.get_terminal_encoding(), 'replace') self.clear_term() self.stdout.flush() self.stderr.write(prompt) diff -Nru bzr-2.6.0~bzr6571/debian/changelog bzr-2.6.0~bzr6573/debian/changelog --- bzr-2.6.0~bzr6571/debian/changelog 2013-04-02 10:10:22.000000000 +0000 +++ bzr-2.6.0~bzr6573/debian/changelog 2013-05-11 17:25:07.000000000 +0000 @@ -1,20 +1,15 @@ -bzr (2.6.0~bzr6571-4ubuntu2) raring; urgency=low +bzr (2.6.0~bzr6573-0~ppa1+saucy) saucy; 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. + * 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 Mon, 07 Jan 2013 20:02:12 -0500 + -- Andrew Starr-Bochicchio Mon, 06 May 2013 17:49:07 -0400 bzr (2.6.0~bzr6571-4) experimental; urgency=low @@ -44,23 +39,6 @@ -- 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 ] @@ -122,66 +100,6 @@ -- 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 @@ -189,26 +107,6 @@ -- 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. @@ -219,16 +117,6 @@ -- 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. @@ -239,14 +127,6 @@ -- 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. @@ -271,14 +151,6 @@ -- 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 @@ -286,28 +158,12 @@ -- 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.. @@ -327,34 +183,12 @@ -- 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 @@ -365,15 +199,6 @@ -- 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. @@ -393,21 +218,6 @@ -- 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 @@ -436,15 +246,6 @@ -- 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. @@ -452,15 +253,6 @@ -- 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 @@ -484,40 +276,12 @@ -- 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. @@ -537,21 +301,6 @@ -- 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. @@ -574,12 +323,6 @@ -- 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. @@ -616,15 +359,6 @@ -- 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. @@ -683,13 +417,6 @@ -- 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. diff -Nru bzr-2.6.0~bzr6571/debian/control bzr-2.6.0~bzr6573/debian/control --- bzr-2.6.0~bzr6571/debian/control 2013-01-22 10:56:08.000000000 +0000 +++ bzr-2.6.0~bzr6573/debian/control 2013-05-06 21:25:35.000000000 +0000 @@ -1,11 +1,9 @@ Source: bzr Section: vcs Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Bazaar Maintainers +Maintainer: Debian Bazaar Maintainers Uploaders: Wouter van Heyst , Andrew Starr-Bochicchio -Build-Conflicts: python-gpgme Build-Depends: ca-certificates, cython-dbg | python-pyrex, debhelper (>= 9), @@ -15,16 +13,19 @@ python-all-dev (>= 2.6.6-3), python-configobj (>= 4.7.2+ds-2), python-docutils, + python-lzma-dbg, + python-medusa, + python-meliae-dbg, python-paramiko, python-pycurl-dbg, python-sphinx (>= 1.0.7+dfsg), python-subunit, python-testtools (>= 0.9.5~) -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 X-Python-Version: >= 2.6 -Vcs-Bzr: https://code.launchpad.net/ubuntu/+source/bzr +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 -Dm-Upload-Allowed: yes XS-Testsuite: autopkgtest Package: bzr diff -Nru bzr-2.6.0~bzr6571/debian/patches/04_revert_ui_changes bzr-2.6.0~bzr6573/debian/patches/04_revert_ui_changes --- bzr-2.6.0~bzr6571/debian/patches/04_revert_ui_changes 2012-12-19 23:21:28.000000000 +0000 +++ bzr-2.6.0~bzr6573/debian/patches/04_revert_ui_changes 1970-01-01 00:00:00.000000000 +0000 @@ -1,137 +0,0 @@ -Description: Revert UI changes that break tests with LC_ALL=C -Author: Jelmer Vernooij -Bug: https://bugs.launchpad.net/bzr/+bug/1086209 - -=== modified file 'bzrlib/tests/test_ui.py' ---- old/bzrlib/tests/test_ui.py 2012-09-17 09:06:56 +0000 -+++ new/bzrlib/tests/test_ui.py 2012-12-04 00:57:43 +0000 -@@ -97,20 +97,28 @@ - pb.finished() - - def test_text_factory_utf8_password(self): -- """Test an utf8 password.""" -- ui = _mod_ui_text.TextUIFactory(None, None, None) -- ui.stdin = tests.StringIOWrapper(u'baz\u1234'.encode('utf8')) -- ui.stdout = tests.StringIOWrapper() -- ui.stderr = tests.StringIOWrapper() -+ """Test an utf8 password. -+ -+ We can't predict what encoding users will have for stdin, so we force -+ it to utf8 to test that we transport the password correctly. -+ """ -+ ui = self.make_test_ui_factory(u'baz\u1234'.encode('utf8')) - ui.stderr.encoding = ui.stdout.encoding = ui.stdin.encoding = 'utf8' - pb = ui.nested_progress_bar() -- password = ui.get_password(u'Hello \u1234 %(user)s', user=u'some\u1234') -- self.assertEqual(u'baz\u1234', password) -- self.assertEqual(u'Hello \u1234 some\u1234: ', -- ui.stderr.getvalue().decode('utf8')) -- # stdin and stdout should be empty -- self.assertEqual('', ui.stdin.readline()) -- self.assertEqual('', ui.stdout.getvalue()) -+ try: -+ password = self.apply_redirected(ui.stdin, ui.stdout, ui.stderr, -+ ui.get_password, -+ u'Hello \u1234 %(user)s', -+ user=u'some\u1234') -+ # We use StringIO objects, we need to decode them -+ self.assertEqual(u'baz\u1234', password.decode('utf8')) -+ self.assertEqual(u'Hello \u1234 some\u1234: ', -+ ui.stderr.getvalue().decode('utf8')) -+ # stdin and stdout should be empty -+ self.assertEqual('', ui.stdin.readline()) -+ self.assertEqual('', ui.stdout.readline()) -+ finally: -+ pb.finished() - - def test_text_ui_get_boolean(self): - stdin = tests.StringIOWrapper("y\n" # True -@@ -262,30 +270,36 @@ - pb.finished() - - def test_text_ui_getusername(self): -- ui = _mod_ui_text.TextUIFactory(None, None, None) -- ui.stdin = tests.StringIOWrapper('someuser\n\n') -- ui.stdout = tests.StringIOWrapper() -- ui.stderr = tests.StringIOWrapper() -- ui.stdout.encoding = 'utf8' -- self.assertEqual('someuser', -- ui.get_username(u'Hello %(host)s', host='some')) -- self.assertEquals('Hello some: ', ui.stderr.getvalue()) -- self.assertEquals('', ui.stdout.getvalue()) -- self.assertEqual('', ui.get_username(u"Gebruiker")) -+ factory = _mod_ui_text.TextUIFactory(None, None, None) -+ factory.stdin = tests.StringIOWrapper("someuser\n\n") -+ factory.stdout = tests.StringIOWrapper() -+ factory.stderr = tests.StringIOWrapper() -+ factory.stdout.encoding = "utf8" -+ # there is no output from the base factory -+ self.assertEqual("someuser", -+ factory.get_username(u'Hello %(host)s', host='some')) -+ self.assertEquals("Hello some: ", factory.stderr.getvalue()) -+ self.assertEquals('', factory.stdout.getvalue()) -+ self.assertEqual("", factory.get_username(u"Gebruiker")) - # stdin should be empty -- self.assertEqual('', ui.stdin.readline()) -+ self.assertEqual('', factory.stdin.readline()) - - def test_text_ui_getusername_utf8(self): -- ui = _mod_ui_text.TextUIFactory(None, None, None) -- ui.stdin = tests.StringIOWrapper(u'someuser\u1234'.encode('utf8')) -- ui.stdout = tests.StringIOWrapper() -- ui.stderr = tests.StringIOWrapper() -+ ui = tests.TestUIFactory(stdin=u'someuser\u1234'.encode('utf8'), -+ stdout=tests.StringIOWrapper(), -+ stderr=tests.StringIOWrapper()) - ui.stderr.encoding = ui.stdout.encoding = ui.stdin.encoding = "utf8" -- username = ui.get_username(u'Hello %(host)s', host=u'some\u1234') -- self.assertEquals(u"someuser\u1234", username) -- self.assertEquals(u"Hello some\u1234: ", -- ui.stderr.getvalue().decode("utf8")) -- self.assertEquals('', ui.stdout.getvalue()) -+ pb = ui.nested_progress_bar() -+ try: -+ # there is no output from the base factory -+ username = self.apply_redirected(ui.stdin, ui.stdout, ui.stderr, -+ ui.get_username, u'Hello\u1234 %(host)s', host=u'some\u1234') -+ self.assertEquals(u"someuser\u1234", username.decode('utf8')) -+ self.assertEquals(u"Hello\u1234 some\u1234: ", -+ ui.stderr.getvalue().decode("utf8")) -+ self.assertEquals('', ui.stdout.getvalue()) -+ finally: -+ pb.finished() - - def test_quietness(self): - self.overrideEnv('BZR_PROGRESS_BAR', 'text') - -=== modified file 'bzrlib/ui/text.py' ---- old/bzrlib/ui/text.py 2012-10-13 15:18:13 +0000 -+++ new/bzrlib/ui/text.py 2012-12-04 00:57:43 +0000 -@@ -238,11 +238,8 @@ - password = self.stdin.readline() - if not password: - password = None -- else: -- password = password.decode(self.stdin.encoding) -- -- if password[-1] == '\n': -- password = password[:-1] -+ elif password[-1] == '\n': -+ password = password[:-1] - return password - - def get_password(self, prompt=u'', **kwargs): -@@ -276,10 +273,8 @@ - username = self.stdin.readline() - if not username: - username = None -- else: -- username = username.decode(self.stdin.encoding) -- if username[-1] == '\n': -- username = username[:-1] -+ elif username[-1] == '\n': -+ username = username[:-1] - return username - - def make_progress_view(self): - diff -Nru bzr-2.6.0~bzr6571/debian/patches/05_remove_gzip_test bzr-2.6.0~bzr6573/debian/patches/05_remove_gzip_test --- bzr-2.6.0~bzr6571/debian/patches/05_remove_gzip_test 2013-04-02 10:09:21.000000000 +0000 +++ bzr-2.6.0~bzr6573/debian/patches/05_remove_gzip_test 2013-05-06 21:19:07.000000000 +0000 @@ -1,3 +1,9 @@ +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 diff -Nru bzr-2.6.0~bzr6571/debian/patches/series bzr-2.6.0~bzr6573/debian/patches/series --- bzr-2.6.0~bzr6571/debian/patches/series 2013-04-02 10:09:03.000000000 +0000 +++ bzr-2.6.0~bzr6573/debian/patches/series 2013-05-06 21:15:15.000000000 +0000 @@ -1,5 +1,4 @@ 01_selftest_package 02_external_configobj 03_spurious_test_failure -04_revert_ui_changes 05_remove_gzip_test diff -Nru bzr-2.6.0~bzr6571/doc/en/release-notes/bzr-2.6.txt bzr-2.6.0~bzr6573/doc/en/release-notes/bzr-2.6.txt --- bzr-2.6.0~bzr6571/doc/en/release-notes/bzr-2.6.txt 2012-10-23 10:22:25.000000000 +0000 +++ bzr-2.6.0~bzr6573/doc/en/release-notes/bzr-2.6.txt 2012-12-04 16:36:55.000000000 +0000 @@ -104,9 +104,9 @@ Testing ******* -.. Fixes and changes that are only relevant to bzr's test framework and - suite. This can include new facilities for writing tests, fixes to - spurious test failures and changes to the way things should be tested. +* Fix test failures occurring only with LC_ALL=C, when prompting a user, + ``stderr`` encoding should be preferred over terminal encoding if + available. (Vincent Ladeuil, #1086209) bzr 2.6b2