~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2005-10-06 06:31:33 UTC
  • Revision ID: robertc@robertcollins.net-20051006063133-5e9bf4c7570cae6c
remove the ancestry weave file

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
                           DivergedBranches, LockError, UnlistableStore,
35
35
                           UnlistableBranch, NoSuchFile)
36
36
from bzrlib.textui import show_status
37
 
from bzrlib.revision import Revision, is_ancestor
 
37
from bzrlib.revision import Revision
38
38
from bzrlib.delta import compare_trees
39
39
from bzrlib.tree import EmptyTree, RevisionTree
40
40
from bzrlib.inventory import Inventory
780
780
        # But for now, just hash the contents.
781
781
        return bzrlib.osutils.sha_file(self.get_revision_xml_file(revision_id))
782
782
 
783
 
    def _get_ancestry_weave(self):
784
 
        return self.control_weaves.get_weave('ancestry')
785
 
 
786
783
    def get_ancestry(self, revision_id):
787
 
        """Return a list of revision-ids integrated by a revision."""
 
784
        """Return a list of revision-ids integrated by a revision.
 
785
        
 
786
        This currently returns a list, but the ordering is not guaranteed:
 
787
        treat it as a set.
 
788
        """
788
789
        if revision_id is None:
789
790
            return [None]
790
 
        w = self._get_ancestry_weave()
791
 
        return [None] + [l[:-1] for l in w.get_iter(w.lookup(revision_id))]
 
791
        w = self.control_weaves.get_weave('inventory')
 
792
        return [None] + map(w.idx_to_name,
 
793
                            w.inclusions([w.lookup(revision_id)]))
792
794
 
793
795
    def get_inventory_weave(self):
794
796
        return self.control_weaves.get_weave('inventory')