| Index: appengine/findit/libs/gitiles/change_log.py
|
| diff --git a/appengine/findit/libs/gitiles/change_log.py b/appengine/findit/libs/gitiles/change_log.py
|
| index 10d57741bd244a2073ecce18eea7c2bb8eeffdeb..bf8f266e67a7e7b6fe333f9f92233f7e502acd7e 100644
|
| --- a/appengine/findit/libs/gitiles/change_log.py
|
| +++ b/appengine/findit/libs/gitiles/change_log.py
|
| @@ -50,6 +50,20 @@ class FileChangeInfo(namedtuple('FileChangeInfo',
|
| 'new_path': self.new_path
|
| }
|
|
|
| + @property
|
| + def changed_path(self):
|
| + """Returns the changed path to check when analyzing component or project.
|
| +
|
| + Except for delete change type, the changed path means the new path after
|
| + change, for delete type, it is the old path.
|
| + """
|
| + # TODO(crbug.com/685884): use component of new path as default. RENAME might
|
| + # need to return two (old path new path may have different components)
|
| + if self.change_type == ChangeType.DELETE:
|
| + return self.old_path
|
| +
|
| + return self.new_path
|
| +
|
|
|
| class Contributor(namedtuple('Contributor', ['name', 'email', 'time'])):
|
| """A generalization of the "author" and "committer" in Git's terminology."""
|
|
|