[patch] **cmdargs doesn't work when the keys are unicode

Magnus Therning magnus at therning.org
Wed Apr 13 17:58:25 BST 2005


I noticed yesterday that 'bzr status --all' does the expected thing,
despite the comment in the code. Today, after rsync, I wanted to remove
the comment, but things failed on the command-line parsing. Apparently
it isn't possible to make the call

 cmd_handler(**cmdargs)

when the keys in cmdargs are unicode strings.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://magnus.therning.org/

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

It doesn't matter who you are. Most of the smartest people work for
somebody else.
     -- Bill Joy
-------------- next part --------------
Index: bazaar-ng/my.dev/bzrlib/commands.py
===================================================================
--- bazaar-ng.orig/my.dev/bzrlib/commands.py	2005-04-13 17:52:16.463487172 +0100
+++ bazaar-ng/my.dev/bzrlib/commands.py	2005-04-13 17:51:12.485507072 +0100
@@ -123,8 +123,6 @@
     For each file there is a single line giving its file state and name.
     The name is that in the current revision unless it is deleted or
     missing, in which case the old name is shown.
-
-    TODO: Don't show unchanged files unless ``--all`` is given?
     """
     #import bzrlib.status
     #bzrlib.status.tree_status(Branch('.'))
@@ -987,7 +985,7 @@
     # mix arguments and options into one dictionary
     cmdargs = _match_args(cmd, args)
     for k, v in opts.items():
-        cmdargs[k.replace('-', '_')] = v
+        cmdargs[str(k.replace('-', '_'))] = v
 
     if profile:
         import hotshot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050413/42dbdb46/attachment.pgp 


More information about the bazaar mailing list