~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisiontree.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-31 16:12:57 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060731161257-91a231523255332c
new official bzr.ico

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        self._repository = branch
41
41
        self._weave_store = branch.weave_store
42
42
        self._inventory = inv
43
 
        assert inv.root is not None
44
43
        self._revision_id = revision_id
45
44
 
46
45
    def get_parent_ids(self):
48
47
 
49
48
        A RevisionTree's parents match the revision graph.
50
49
        """
51
 
        if self._revision_id not in (None, 'null:'):
52
 
            parent_ids = self._repository.get_revision(
53
 
                self._revision_id).parent_ids
54
 
        else:
55
 
            parent_ids = []
 
50
        parent_ids = self._repository.get_revision(self._revision_id).parent_ids
56
51
        return parent_ids
57
52
        
58
53
    def get_revision_id(self):
97
92
    def has_filename(self, filename):
98
93
        return bool(self.inventory.path2id(filename))
99
94
 
100
 
    def list_files(self, include_root=False):
 
95
    def list_files(self):
101
96
        # The only files returned by this are those from the version
102
97
        entries = self.inventory.iter_entries()
103
 
        if not include_root:
104
 
            # skip the root for compatability with the current apis.
105
 
            entries.next()
 
98
        # skip the root for compatability with the current apis.
 
99
        entries.next()
106
100
        for path, entry in entries:
107
101
            yield path, 'V', entry.kind, entry.file_id, entry
108
102