/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

Added get_tree_parent

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
            self._tree_id_paths[self._tree_path_ids[path]] = path
74
74
        return self._tree_path_ids[path]
75
75
 
 
76
    def get_tree_parent(self, trans_id):
 
77
        """Determine id of the parent in the tree, or None for tree root."""
 
78
        path = self._tree_id_paths[trans_id]
 
79
        if path == "":
 
80
            return None
 
81
        return self.get_tree_path_id(os.path.dirname(path))
 
82
 
76
83
    def create_file(self, contents, trans_id):
77
84
        """Create a new, possibly versioned, file.
78
85