~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionspec.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-27 17:42:25 UTC
  • mto: This revision was merged to the branch mainline in revision 6311.
  • Revision ID: jelmer@samba.org-20111127174225-tspfeewl0gwxxumt
Add possible_transports in a couple more places.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bzrlib import (
21
21
    errors,
22
22
    revision as _mod_revision,
23
 
    symbol_versioning,
24
23
    )
25
24
from bzrlib.tests import TestCaseWithTransport
26
25
from bzrlib.revisionspec import (
119
118
        # If wants_revision_history = True, then _match_on should get the
120
119
        # branch revision history
121
120
        spec = RevisionSpecMatchOnTrap('foo', _internal=True)
122
 
        spec.wants_revision_history = True
123
 
        self.callDeprecated(['RevisionSpec.wants_revision_history was '
124
 
            'deprecated in 2.5 (RevisionSpecMatchOnTrap).'],
125
 
            spec.in_history, self.tree.branch)
 
121
        spec.in_history(self.tree.branch)
126
122
 
127
123
        self.assertEqual((self.tree.branch, ['r1' ,'r2']),
128
124
                         spec.last_call)
131
127
        # If wants_revision_history = False, then _match_on should get None for
132
128
        # the branch revision history
133
129
        spec = RevisionSpecMatchOnTrap('foo', _internal=True)
 
130
        spec.wants_revision_history = False
134
131
        spec.in_history(self.tree.branch)
135
132
 
136
133
        self.assertEqual((self.tree.branch, None), spec.last_call)
153
150
 
154
151
    def _match_on(self, branch, revs):
155
152
        if self.spec == "bork":
156
 
            return RevisionInfo.from_revision_id(branch, "r1")
 
153
            return RevisionInfo.from_revision_id(branch, "r1", revs)
157
154
        else:
158
155
            raise errors.InvalidRevisionSpec(self.spec, branch)
159
156