~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

[merge] from robert and fix up tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        # TODO: otherwise, it should depend on how I was built -
58
58
        # if it's in_history(branch), then check revision_history(),
59
59
        # if it's in_store(branch), do the check below
60
 
        return self.rev_id in self.branch.revision_store
 
60
        return self.branch.revision_store.has_id(self.rev_id)
61
61
 
62
62
    def __len__(self):
63
63
        return 2
313
313
    def _match_on(self, branch, revs):
314
314
        from branch import Branch
315
315
        from revision import common_ancestor, MultipleRevisionSources
316
 
        other_branch = Branch.open_containing(self.spec)
 
316
        other_branch = Branch.open_containing(self.spec)[0]
317
317
        revision_a = branch.last_revision()
318
318
        revision_b = other_branch.last_revision()
319
319
        for r, b in ((revision_a, branch), (revision_b, other_branch)):
339
339
    def _match_on(self, branch, revs):
340
340
        from branch import Branch
341
341
        from fetch import greedy_fetch
342
 
        other_branch = Branch.open_containing(self.spec)
 
342
        other_branch = Branch.open_containing(self.spec)[0]
343
343
        revision_b = other_branch.last_revision()
344
344
        if revision_b is None:
345
345
            raise NoCommits(other_branch)