Compare changes only with the first parent

It's not necessary to check both parents.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras
2023-03-13 22:51:05 -06:00
parent 0ae0d20496
commit 3582221efd

View File

@@ -111,9 +111,8 @@ def get_filechanges(repo,revision,parents,files,mleft):
# for many files comparing checksums is expensive so only do it for
# merges where we really need it due to hg's revlog logic
modified,removed=[],[]
for p in parents:
mright=repo[p].manifest()
modified,removed=split_dict(mleft,mright,modified,removed)
mright=repo[parents[0]].manifest()
modified,removed=split_dict(mleft,mright,modified,removed)
modified.sort()
removed.sort()
return modified,removed