1410
1410
self._transform = transform
1411
1411
self._final_paths = FinalPaths(transform)
1412
1412
self.__by_parent = None
1413
self._parent_ids = []
1414
1415
def _changes(self, file_id):
1415
1416
for changes in self._transform.iter_changes():
1423
1424
# InterTree.iter_changes.
1424
1425
return (changes is not None and changes[2])
1427
def _get_repository(self):
1428
repo = getattr(self._transform._tree, '_repository', None)
1430
repo = self._transform._tree.branch.repository
1433
def _iter_parent_trees(self):
1434
for revision_id in self.get_parent_ids():
1436
yield self.revision_tree(revision_id)
1437
except errors.NoSuchRevisionInTree:
1438
yield self._get_repository().revision_tree(revision_id)
1426
1440
def _get_file_revision(self, file_id, vf, tree_revision):
1427
return self._transform._tree._get_file_revision(file_id, vf,
1441
parent_keys = [(file_id, self._file_revision(t, file_id)) for t in
1442
self._iter_parent_trees()]
1443
vf.add_lines((file_id, tree_revision), parent_keys,
1444
self.get_file(file_id).readlines())
1445
repo = self._get_repository()
1446
base_vf = repo.texts
1447
if base_vf not in vf.fallback_versionedfiles:
1448
vf.fallback_versionedfiles.append(base_vf)
1449
return tree_revision
1430
1451
def _stat_limbo_file(self, file_id):
1431
1452
trans_id = self._transform.trans_id_file_id(file_id)
1682
1703
return self._transform._tree.walkdirs(prefix)
1684
1705
def get_parent_ids(self):
1685
return self._transform._tree.get_parent_ids()
1706
return self._parent_ids
1708
def set_parent_ids(self, parent_ids):
1709
self._parent_ids = parent_ids
1687
1711
def get_revision_tree(self, revision_id):
1688
1712
return self._transform._tree.get_revision_tree(revision_id)