Rev 5871: (gz) Make the plugins command work again on ckj terminals (Martin [gz]) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon May 16 19:04:30 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5871 [merge]
revision-id: pqm at pqm.ubuntu.com-20110516190406-a8h88o7llo5dnw9q
parent: pqm at pqm.ubuntu.com-20110516173327-5ehst0ttceohsf5w
parent: gzlist at googlemail.com-20110516131231-1ppkztps4tr256th
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-05-16 19:04:06 +0000
message:
  (gz) Make the plugins command work again on ckj terminals (Martin [gz])
modified:
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/tests/blackbox/test_locale.py test_lang.py-20060824204205-80v50j25qkuop7yn-1
  doc/en/release-notes/bzr-2.4.txt bzr2.4.txt-20110114053217-k7ym9jfz243fddjm-1
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2011-05-03 13:53:46 +0000
+++ b/bzrlib/builtins.py	2011-05-16 13:12:26 +0000
@@ -4633,8 +4633,9 @@
     @display_command
     def run(self, verbose=False):
         from bzrlib import plugin
+        # Don't give writelines a generator as some codecs don't like that
         self.outf.writelines(
-            plugin.describe_plugins(show_paths=verbose))
+            list(plugin.describe_plugins(show_paths=verbose)))
 
 
 class cmd_testament(Command):

=== modified file 'bzrlib/tests/blackbox/test_locale.py'
--- a/bzrlib/tests/blackbox/test_locale.py	2011-01-21 18:19:41 +0000
+++ b/bzrlib/tests/blackbox/test_locale.py	2011-05-15 14:35:24 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Canonical Ltd
+# Copyright (C) 2006, 2011 Canonical Ltd
 #
 # 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
@@ -76,3 +76,14 @@
 message:
   Unicode ? commit
 """, out)
+
+
+class TestMultibyteCodecs(tests.TestCaseWithTransport):
+    """Tests for quirks of multibyte encodings and their python codecs"""
+
+    def test_plugins_mbcs(self):
+        """Ensure the plugins command works with cjkcodecs, see lp:754082"""
+        self.disable_missing_extensions_warning()
+        out, err = self.run_bzr(["plugins"], encoding="EUC-JP")
+        # The output is tested in bt.test_plugins rather than here
+        self.assertEqual("", err)

=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt	2011-05-16 17:33:27 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt	2011-05-16 19:04:06 +0000
@@ -73,6 +73,9 @@
 * Correct parent is now set when using 'switch -b' with bound branches.
   (A. S. Budden, #513709)
 
+* Fix `bzr plugins` regression in bzr 2.4 which resulted in a traceback
+  from writelines on ckj terminals. (Martin [GZ], #754082)
+
 * ``WT.inventory`` and ``WT.iter_entries_by_dir()`` was not correctly
   reporting subdirectories that were tree references (in formats that
   supported them). (John Arbash Meinel, #764677)




More information about the bazaar-commits mailing list