~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionspec.py

  • Committer: Samuel Bronson
  • Date: 2012-08-30 20:36:18 UTC
  • mto: (6015.57.3 2.4)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: naesten@gmail.com-20120830203618-y2dzw91nqpvpgxvx
Update INSTALL for switch to Python 2.6 and up.

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