~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: John Arbash Meinel
  • Date: 2007-04-28 15:04:17 UTC
  • mfrom: (2466 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2566.
  • Revision ID: john@arbash-meinel.com-20070428150417-trp3pi0pzd411pu4
[merge] bzr.dev 2466

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
        if dotted:
322
322
            branch.lock_read()
323
323
            try:
324
 
                last_rev = branch.last_revision()
325
 
                merge_sorted_revisions = tsort.merge_sort(
326
 
                    branch.repository.get_revision_graph(last_rev),
327
 
                    last_rev,
328
 
                    generate_revno=True)
329
 
                def match(item):
330
 
                    return item[3] == match_revno
331
 
                revisions = filter(match, merge_sorted_revisions)
 
324
                revision_id_to_revno = branch.get_revision_id_to_revno_map()
 
325
                revisions = [revision_id for revision_id, revno
 
326
                             in revision_id_to_revno.iteritems()
 
327
                             if revno == match_revno]
332
328
            finally:
333
329
                branch.unlock()
334
330
            if len(revisions) != 1:
336
332
            else:
337
333
                # there is no traditional 'revno' for dotted-decimal revnos.
338
334
                # so for  API compatability we return None.
339
 
                return RevisionInfo(branch, None, revisions[0][1])
 
335
                return RevisionInfo(branch, None, revisions[0])
340
336
        else:
341
337
            if revno < 0:
342
338
                # if get_rev_id supported negative revnos, there would not be a