~mbp/bzr/progress

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_revision_history.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-19 21:34:24 UTC
  • mfrom: (5803.1.1 pre1.0-revhistory)
  • Revision ID: pqm@pqm.ubuntu.com-20110419213424-01noh6bpf72g1cn2
(jelmer) Raise InvalidRevisionId when None is specified to
 Branch.set_last_revision_info(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
            a_branch.unlock()
148
148
 
149
149
    def test_set_last_revision_info_none(self):
150
 
        """Passing None to revision_info to None sets it to NULL_REVISION."""
 
150
        """Passing None to set_last_revision_info raises an exception."""
151
151
        a_branch = self.get_branch()
152
152
        # Lock the branch, set the last revision info, then call
153
153
        # last_revision_info.
154
154
        a_branch.lock_write()
155
155
        self.addCleanup(a_branch.unlock)
156
 
        self.callDeprecated(['NULL_REVISION should be used for the null'
157
 
            ' revision instead of None, as of bzr 0.91.'],
 
156
        self.assertRaises(errors.InvalidRevisionId,
158
157
            a_branch.set_last_revision_info, 0, None)
159
 
        self.assertEqual((0, _mod_revision.NULL_REVISION),
160
 
                         a_branch.last_revision_info())
161
158
 
162
159
    def test_set_last_revision_info_uncaches_revision_history_for_format6(self):
163
160
        """On format 6 branches, set_last_revision_info invalidates the revision