/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: John Arbash Meinel
  • Date: 2006-08-23 19:35:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1979.
  • Revision ID: john@arbash-meinel.com-20060823193519-fdbbfb03a8399a67
Update branch: spec and tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from bzrlib import (
23
23
    errors,
 
24
    revision,
24
25
    )
25
26
from bzrlib.errors import BzrError, NoSuchRevision, NoCommits
26
27
 
430
431
 
431
432
    def _match_on(self, branch, revs):
432
433
        from bzrlib.branch import Branch
433
 
        from bzrlib.revision import common_ancestor, MultipleRevisionSources
 
434
 
434
435
        other_branch = Branch.open(self.spec)
435
436
        revision_a = branch.last_revision()
436
437
        revision_b = other_branch.last_revision()
437
438
        for r, b in ((revision_a, branch), (revision_b, other_branch)):
438
 
            if r is None:
 
439
            if r in (None, revision.NULL_REVISION):
439
440
                raise NoCommits(b)
440
 
        revision_source = MultipleRevisionSources(branch.repository,
441
 
                                                  other_branch.repository)
442
 
        rev_id = common_ancestor(revision_a, revision_b, revision_source)
 
441
        revision_source = revision.MultipleRevisionSources(
 
442
                branch.repository, other_branch.repository)
 
443
        rev_id = revision.common_ancestor(revision_a, revision_b,
 
444
                                          revision_source)
443
445
        try:
444
446
            revno = branch.revision_id_to_revno(rev_id)
445
447
        except NoSuchRevision:
457
459
    prefix = 'branch:'
458
460
 
459
461
    def _match_on(self, branch, revs):
460
 
        from branch import Branch
461
 
        other_branch = Branch.open_containing(self.spec)[0]
 
462
        from bzrlib.branch import Branch
 
463
        other_branch = Branch.open(self.spec)
462
464
        revision_b = other_branch.last_revision()
463
 
        if revision_b is None:
 
465
        if revision_b in (None, revision.NULL_REVISION):
464
466
            raise NoCommits(other_branch)
465
467
        # pull in the remote revisions so we can diff
466
468
        branch.fetch(other_branch, revision_b)