~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2006-06-07 12:19:04 UTC
  • mto: This revision was merged to the branch mainline in revision 1753.
  • Revision ID: jelmer@samba.org-20060607121904-25ea202d89f1d17e
Move inventory to commit builder.
Add is_inside_or_parent_of_any()

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
import bzrlib.gpg as gpg
26
26
from bzrlib.graph import Graph
27
27
from bzrlib.inter import InterObject
 
28
from bzrlib.inventory import Inventory
28
29
from bzrlib.knit import KnitVersionedFile, KnitPlainFactory
29
30
from bzrlib.lockable_files import LockableFiles, TransportLock
30
31
from bzrlib.lockdir import LockDir
1849
1850
 
1850
1851
    def __init__(self, repository):
1851
1852
        self.repository = repository
 
1853
        self.new_inventory = Inventory()
1852
1854
 
1853
1855
    def set_revision_id(self, revision_id):
1854
1856
        """Set the revision id for this commit.
1860
1862
        :param revision_id: The revision id to use
1861
1863
        """
1862
1864
        self._new_revision_id = revision_id
 
1865
        self.new_inventory.revision_id = revision_id
1863
1866
 
1864
1867
    def record_entry_contents(self, ie, parent_invs, revision_id, path, tree):
1865
1868
        """Record the content of ie from tree into the commit if needed.
1879
1882
        # be made to force a revision, which will fail when they cannot be set
1880
1883
        # in this manner.
1881
1884
        self._new_revision_id = revision_id
 
1885
        # ie.revision is always None if the InventoryEntry is considered
 
1886
        # for committing. ie.snapshot will record the correct revision 
 
1887
        # which may be the sole parent if it is untouched.
1882
1888
        previous_entries = ie.find_previous_heads(
1883
1889
            parent_invs,
1884
1890
            self.repository.weave_store,