~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Martin Pool
  • Date: 2005-08-04 22:07:31 UTC
  • Revision ID: mbp@sourcefrog.net-20050804220731-c356ad273bd1cd37
- fix up imports

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
 
18
import bzrlib.errors
18
19
 
19
20
 
20
21
class RevisionReference(object):
113
114
def unpack_revision(elt):
114
115
    """Convert XML element into Revision object."""
115
116
    # <changeset> is deprecated...
116
 
    from bzrlib.errors import BzrError
117
 
    
118
117
    if elt.tag not in ('revision', 'changeset'):
119
 
        raise BzrError("unexpected tag in revision file: %r" % elt)
 
118
        raise bzrlib.errors.BzrError("unexpected tag in revision file: %r" % elt)
120
119
 
121
120
    rev = Revision(committer = elt.get('committer'),
122
121
                   timestamp = float(elt.get('timestamp')),
177
176
    behaves like Branch's.
178
177
    """
179
178
 
180
 
    from bzrlib.branch import NoSuchRevision
181
179
    ancestors = (revision_id,)
182
180
    while len(ancestors) > 0:
183
181
        new_ancestors = []
202
200
        self._revision_sources = args
203
201
 
204
202
    def get_revision(self, revision_id):
205
 
        from bzrlib.branch import NoSuchRevision
206
203
        for source in self._revision_sources:
207
204
            try:
208
205
                return source.get_revision(revision_id)
209
 
            except NoSuchRevision, e:
 
206
            except bzrlib.errors.NoSuchRevision, e:
210
207
                pass
211
208
        raise e