Rev 4005: (Jelmer) Avoid unnecessarily resolving lazy objects in in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Feb 12 15:49:16 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4005
revision-id: pqm at pqm.ubuntu.com-20090212154913-cleqwmh36ss3gswk
parent: pqm at pqm.ubuntu.com-20090212062408-yq0glwncmdzo5uzm
parent: jelmer at samba.org-20090212134921-jgaorl4jw1z3h0xa
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-02-12 15:49:13 +0000
message:
(Jelmer) Avoid unnecessarily resolving lazy objects in
Registry.get_prefix().
modified:
bzrlib/registry.py lazy_factory.py-20060809213415-2gfvqadtvdn0phtg-1
------------------------------------------------------------
revno: 4000.3.1
revision-id: jelmer at samba.org-20090212134921-jgaorl4jw1z3h0xa
parent: pqm at pqm.ubuntu.com-20090211011240-gv0zdxmwomt3ndtn
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: bzr.dev
timestamp: Thu 2009-02-12 14:49:21 +0100
message:
Avoid unnecessarily resolving lazy objects in Registry.get_prefix().
modified:
bzrlib/registry.py lazy_factory.py-20060809213415-2gfvqadtvdn0phtg-1
=== modified file 'bzrlib/registry.py'
--- a/bzrlib/registry.py 2008-12-09 01:49:56 +0000
+++ b/bzrlib/registry.py 2009-02-12 13:49:21 +0000
@@ -174,9 +174,9 @@
:return: a tuple of (object, remainder), where the remainder is the
portion of the name that did not match the key.
"""
- for key, value in self.iteritems():
+ for key in self.keys():
if fullname.startswith(key):
- return value, fullname[len(key):]
+ return self.get(key), fullname[len(key):]
def _get_key_or_default(self, key=None):
"""Return either 'key' or the default key if key is None"""
More information about the bazaar-commits
mailing list