~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

  • Committer: Vincent Ladeuil
  • Date: 2009-09-16 10:37:29 UTC
  • mto: (4695.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4696.
  • Revision ID: v.ladeuil+lp@free.fr-20090916103729-m6h1pyvjprm6puvm
Respect items() protocol for registry objects.

* bzrlib/tests/test_registry.py:
(TestRegistryIter): Test some corner cases where object are
registered while the registry is iterated.

* bzrlib/registry.py:
(Registry): iteritems() and items() have different intents, don't
mix them under the covers or devs get tricked (see bug #277048
which seemed to have fixed the issue).

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
from copy import copy
70
70
from cStringIO import StringIO
71
71
import os
 
72
import time
 
73
import warnings
72
74
 
73
75
from bzrlib.lazy_import import lazy_import
74
76
lazy_import(globals(), """
77
79
from bzrlib import (
78
80
    errors,
79
81
    osutils,
 
82
    progress,
80
83
    )
81
84
from bzrlib.errors import (WeaveError, WeaveFormatError, WeaveParentMismatch,
82
85
        RevisionAlreadyPresent,
83
86
        RevisionNotPresent,
84
87
        UnavailableRepresentation,
 
88
        WeaveRevisionAlreadyPresent,
 
89
        WeaveRevisionNotPresent,
85
90
        )
86
91
from bzrlib.osutils import dirname, sha, sha_strings, split_lines
87
92
import bzrlib.patiencediff