# HG changeset patch # User Pierre-Yves David # Date 2020-11-20 09:49:32 # Node ID cf04af3a5ef178e484b7d2ae58684e4f62c770c4 # Parent 2367937982ba4e49ea147302cb46269b6a60be77 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 diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -366,6 +366,9 @@ def _combine_changeset_copies( 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.