Rev 5149: (Martin von Gagern) List arguments of RegistryOption.from_kwargs in in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Apr 13 07:49:49 BST 2010


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

------------------------------------------------------------
revno: 5149 [merge]
revision-id: pqm at pqm.ubuntu.com-20100413064948-k2rocqzj4whtoze7
parent: pqm at pqm.ubuntu.com-20100413022341-6vqdyy17spwrhv94
parent: andrew.bennetts at canonical.com-20100413052159-tqdiq452cft059cc
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2010-04-13 07:49:48 +0100
message:
  (Martin von Gagern) List arguments of RegistryOption.from_kwargs in
  	alphabetical order (#559409)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/option.py               option.py-20051014052914-661fb36e76e7362f
=== modified file 'NEWS'
--- a/NEWS	2010-04-12 05:04:44 +0000
+++ b/NEWS	2010-04-13 05:21:59 +0000
@@ -25,6 +25,10 @@
 * ``bzrlib.mutabletree.MutableTree.commit`` will now support a passed in
   config as in previous versions of bzrlib. (Robert Collins)
 
+* Help messages generated by ``RegistryOption.from_kwargs`` list the
+  switches in alphabetical order, rather than in an undefined order.
+  (Martin von Gagern, #559409)
+
 * Make sure the ``ExecutablePath`` and ``InterpreterPath`` are set in
   Apport crash reports, to avoid "This problem report applies to a program
   which is not installed any more" error.

=== modified file 'bzrlib/option.py'
--- a/bzrlib/option.py	2010-02-23 07:43:11 +0000
+++ b/bzrlib/option.py	2010-04-13 04:33:55 +0000
@@ -364,7 +364,7 @@
         as values for the option, and their value is treated as the help.
         """
         reg = _mod_registry.Registry()
-        for name, switch_help in kwargs.iteritems():
+        for name, switch_help in sorted(kwargs.items()):
             name = name.replace('_', '-')
             reg.register(name, name, help=switch_help)
             if not value_switches:




More information about the bazaar-commits mailing list