/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Martin Pool
  • Date: 2009-01-23 17:25:52 UTC
  • mfrom: (3955 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3956.
  • Revision ID: mbp@sourcefrog.net-20090123172552-uu2eh59t0azzvcq9
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
352
352
            revs_or_none = None
353
353
 
354
354
        if dotted:
355
 
            branch.lock_read()
356
355
            try:
357
 
                revision_id_to_revno = branch.get_revision_id_to_revno_map()
358
 
                revisions = [revision_id for revision_id, revno
359
 
                             in revision_id_to_revno.iteritems()
360
 
                             if revno == match_revno]
361
 
            finally:
362
 
                branch.unlock()
363
 
            if len(revisions) != 1:
 
356
                revision_id = branch.dotted_revno_to_revision_id(match_revno,
 
357
                    _cache_reverse=True)
 
358
            except errors.NoSuchRevision:
364
359
                raise errors.InvalidRevisionSpec(self.user_spec, branch)
365
360
            else:
366
361
                # there is no traditional 'revno' for dotted-decimal revnos.
367
362
                # so for  API compatability we return None.
368
 
                return branch, None, revisions[0]
 
363
                return branch, None, revision_id
369
364
        else:
370
365
            last_revno, last_revision_id = branch.last_revision_info()
371
366
            if revno < 0: