~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Michael Hudson
  • Date: 2007-11-28 16:24:47 UTC
  • mfrom: (3008.2.1 transform_preview)
  • mto: This revision was merged to the branch mainline in revision 3189.
  • Revision ID: michael.hudson@canonical.com-20071128162447-t31sjntuc1uttzvo
merge aaron's conflict handling improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
1222
1222
 
1223
1223
    def tree_kind(self, trans_id):
1224
1224
        path = self._tree_id_paths.get(trans_id)
 
1225
        if path is None:
 
1226
            raise NoSuchFile(None)
1225
1227
        file_id = self._tree.path2id(path)
1226
1228
        return self._tree.kind(file_id)
1227
1229
 
1236
1238
 
1237
1239
    def iter_tree_children(self, parent_id):
1238
1240
        """Iterate through the entry's tree children, if any"""
1239
 
        # This can't possibly be right :) It's only called from
1240
 
        # _add_tree_children (where the comment is "") which is called
1241
 
        # from find_conflicts.  I don't understand the conflict
1242
 
        # resolution well enough yet to know what the right thing to
1243
 
        # do is, though in the simplest cases this seems to work.
1244
 
        return []
1245
 
 
 
1241
        try:
 
1242
            path = self._tree_id_paths[parent_id]
 
1243
        except KeyError:
 
1244
            return
 
1245
        file_id = self.tree_file_id(parent_id)
 
1246
        for child in self._tree.inventory[file_id].children.iterkeys():
 
1247
            childpath = joinpath(path, child)
 
1248
            yield self.trans_id_tree_path(childpath)
1246
1249
 
1247
1250
class PreviewTree(object):
1248
1251