670
670
return self.CANNOT_DIFF
671
671
from_label = '%s%s\t%s' % (self.old_label, old_path, old_date)
672
672
to_label = '%s%s\t%s' % (self.new_label, new_path, new_date)
673
return self.diff_text(from_file_id, to_file_id, from_label, to_label,
673
return self.diff_text(old_path, new_path, from_label, to_label,
674
from_file_id, to_file_id)
676
def diff_text(self, from_file_id, to_file_id, from_label, to_label,
677
from_path=None, to_path=None):
676
def diff_text(self, from_path, to_path, from_label, to_label,
677
from_file_id=None, to_file_id=None):
678
678
"""Diff the content of given files in two trees
680
:param from_file_id: The id of the file in the from tree. If None,
680
:param from_path: The path in the from tree. If None,
681
681
the file is not present in the from tree.
682
:param to_file_id: The id of the file in the to tree. This may refer
683
to a different file from from_file_id. If None,
682
:param to_path: The path in the to tree. This may refer
683
to a different file from from_path. If None,
684
684
the file is not present in the to tree.
685
:param from_path: The path in the from tree or None if unknown.
686
:param to_path: The path in the to tree or None if unknown.
685
:param from_file_id: The id of the file in the from tree or None if
687
:param to_file_id: The id of the file in the to tree or None if
688
690
def _get_text(tree, file_id, path):
689
691
if file_id is None: