add exception of parent_id
This commit is contained in:
parent
328b82c840
commit
d28f4cd845
|
@ -1,4 +1,4 @@
|
|||
[settings]
|
||||
line_length = 79
|
||||
multi_line_output = 3
|
||||
known_third_party =apscheduler,dulwich,numpy,pandas,pymysql,sqlalchemy,yaml
|
||||
known_third_party =dulwich,numpy,pandas,pymysql,sqlalchemy,yaml
|
||||
|
|
|
@ -72,10 +72,11 @@ class RiskEvaluator(object):
|
|||
for relation in commit_relation_results:
|
||||
commit_id = relation["id"]
|
||||
parent_id = relation["parent_id"]
|
||||
commit_children_dict.setdefault(parent_id, [])
|
||||
commit_children_dict[parent_id].append(commit_id)
|
||||
commit_parents_dict.setdefault(commit_id, [])
|
||||
commit_parents_dict[commit_id].append(parent_id)
|
||||
if parent_id is not None:
|
||||
commit_parents_dict[commit_id].append(parent_id)
|
||||
commit_children_dict.setdefault(parent_id, [])
|
||||
commit_children_dict[parent_id].append(commit_id)
|
||||
|
||||
# if the clone pair only live in one commit, this commit belongs to both start commit and end commit
|
||||
if len(candidate_commits) == 1:
|
||||
|
|
Loading…
Reference in New Issue