~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Robert Collins
  • Date: 2005-10-17 23:13:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1462.
  • Revision ID: robertc@robertcollins.net-20051017231300-e1c9e931bcfacd6a
Branch.open_containing now returns a tuple (Branch, relative-path).

This allows direct access to the common case of 'get me this file
from its branch'. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)