~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-17 13:53:36 UTC
  • mfrom: (1939 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1940.
  • Revision ID: john@arbash-meinel.com-20060817135336-100de82962355d3b
[merge] bzr.dev 1939

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
2080
2080
        :param tree: The tree which contains this entry and should be used to 
2081
2081
        obtain content.
2082
2082
        """
 
2083
        if self.new_inventory.root is None and ie.parent_id is not None:
 
2084
            symbol_versioning.warn('Root entry should be supplied to'
 
2085
                ' record_entry_contents, as of bzr 0.10.',
 
2086
                 DeprecationWarning, stacklevel=2)
 
2087
            self.record_entry_contents(tree.inventory.root.copy(), parent_invs,
 
2088
                                       '', tree)
2083
2089
        self.new_inventory.add(ie)
2084
2090
 
2085
2091
        # ie.revision is always None if the InventoryEntry is considered