From 3582221efda99b65b7c42ba99c7ec20bc8389bf8 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Mon, 13 Mar 2023 22:51:05 -0600 Subject: [PATCH] Compare changes only with the first parent It's not necessary to check both parents. Signed-off-by: Felipe Contreras --- hg-fast-export.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hg-fast-export.py b/hg-fast-export.py index dd94d3a..fe72846 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -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