~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisiontree.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-06 05:53:44 UTC
  • mfrom: (2063 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20061006055344-e73b97b7c6ca6e72
[merge] bzr.dev 2063

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
        A RevisionTree's parents match the revision graph.
50
50
        """
51
 
        parent_ids = self._repository.get_revision(self._revision_id).parent_ids
 
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 = []
52
56
        return parent_ids
53
57
        
54
58
    def get_revision_id(self):
93
97
    def has_filename(self, filename):
94
98
        return bool(self.inventory.path2id(filename))
95
99
 
96
 
    def list_files(self):
 
100
    def list_files(self, include_root=False):
97
101
        # The only files returned by this are those from the version
98
102
        entries = self.inventory.iter_entries()
99
 
        # skip the root for compatability with the current apis.
100
 
        entries.next()
 
103
        if not include_root:
 
104
            # skip the root for compatability with the current apis.
 
105
            entries.next()
101
106
        for path, entry in entries:
102
107
            yield path, 'V', entry.kind, entry.file_id, entry
103
108