/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:07:54 UTC
  • mto: This revision was merged to the branch mainline in revision 1979.
  • Revision ID: john@arbash-meinel.com-20060823190754-428ec4668c32ad62
Move the tests into the associated tester, remove redundant tests, some small PEP8 changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    )
25
25
from bzrlib.errors import BzrError, NoSuchRevision, NoCommits
26
26
 
 
27
 
27
28
_marker = []
28
29
 
 
30
 
29
31
class RevisionInfo(object):
30
32
    """The results of applying a revision specification to a branch.
31
33
 
86
88
        return '<bzrlib.revisionspec.RevisionInfo object %s, %s for %r>' % (
87
89
            self.revno, self.rev_id, self.branch)
88
90
 
 
91
 
89
92
# classes in this list should have a "prefix" attribute, against which
90
93
# string specs are matched
91
94
SPEC_TYPES = []
92
95
 
 
96
 
93
97
class RevisionSpec(object):
94
98
    """A parsed revision specification.
95
99
 
425
429
    prefix = 'ancestor:'
426
430
 
427
431
    def _match_on(self, branch, revs):
428
 
        from branch import Branch
429
 
        from revision import common_ancestor, MultipleRevisionSources
 
432
        from bzrlib.branch import Branch
 
433
        from bzrlib.revision import common_ancestor, MultipleRevisionSources
430
434
        other_branch = Branch.open_containing(self.spec)[0]
431
435
        revision_a = branch.last_revision()
432
436
        revision_b = other_branch.last_revision()
444
448
        
445
449
SPEC_TYPES.append(RevisionSpec_ancestor)
446
450
 
 
451
 
447
452
class RevisionSpec_branch(RevisionSpec):
448
453
    """A branch: revision specifier.
449
454