copies: fast path no-op merge
If the two sides of the merge are the same (they come an unaltered common
ancestors) we don't need any merging.
Differential Revision: https://phab.mercurial-scm.org/D9415
--- a/mercurial/copies.py Mon Oct 05 01:49:04 2020 +0200
+++ b/mercurial/copies.py Fri Nov 20 10:49:32 2020 +0100
@@ -366,6 +366,9 @@
othercopies = all_copies.get(c)
if othercopies is None:
all_copies[c] = newcopies
+ elif newcopies is othercopies:
+ # nothing to merge:
+ pass
else:
# we are the second parent to work on c, we need to merge our
# work with the other.