~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Aaron Bentley
  • Date: 2006-08-16 21:10:33 UTC
  • mto: (1910.2.43 format-bumps)
  • mto: This revision was merged to the branch mainline in revision 1935.
  • Revision ID: abentley@panoramicfeedback.com-20060816211033-b0c9836dea8cca9b
Inroduce assertDeprecated, and use it to test old commitbuilder API

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import re
21
21
import time
22
22
from unittest import TestSuite
23
 
from warnings import warn
24
23
 
25
24
from bzrlib import bzrdir, check, delta, gpg, errors, xml5, ui, transactions, osutils
26
25
from bzrlib.decorators import needs_read_lock, needs_write_lock
37
36
from bzrlib.revisiontree import RevisionTree
38
37
from bzrlib.store.versioned import VersionedFileStore, WeaveStore
39
38
from bzrlib.store.text import TextStore
 
39
from bzrlib import symbol_versioning
40
40
from bzrlib.symbol_versioning import (deprecated_method,
41
41
        zero_nine, 
42
42
        )
2038
2038
    def finish_inventory(self):
2039
2039
        """Tell the builder that the inventory is finished."""
2040
2040
        if self.new_inventory.root is None:
2041
 
            warn('Root entry should be supplied to record_entry_contents, as'
2042
 
                 ' of bzr 0.10.',
 
2041
            symbol_versioning.warn('Root entry should be supplied to'
 
2042
                ' record_entry_contents, as of bzr 0.10.',
2043
2043
                 DeprecationWarning, stacklevel=2)
2044
2044
            self.new_inventory.add(InventoryDirectory(ROOT_ID, '', None))
2045
2045
        self.new_inventory.revision_id = self._new_revision_id
2081
2081
        obtain content.
2082
2082
        """
2083
2083
        if self.new_inventory.root is None and ie.parent_id is not None:
2084
 
            warn('Root entry should be supplied to record_entry_contents, as'
2085
 
                 ' of bzr 0.10.',
 
2084
            symbol_versioning.warn('Root entry should be supplied to'
 
2085
                ' record_entry_contents, as of bzr 0.10.',
2086
2086
                 DeprecationWarning, stacklevel=2)
2087
2087
            self.record_entry_contents(tree.inventory.root.copy(), parent_invs,
2088
2088
                                       '', tree)