Patchwork D6247: copies: fix up "fullcopy" with missing entries from "diverge"

login
register
mail settings
Submitter phabricator
Date April 16, 2019, 5:16 p.m.
Message ID <differential-rev-PHID-DREV-xxufoc462djsjshzvvmh-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39646/
State Superseded
Headers show

Comments

phabricator - April 16, 2019, 5:16 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Similar to the previous patch, but this doesn't even affect tests. It
  does affect tests if you change them to turn on debug logging. I'm
  fixing it here so reviewers of the later rewrite patch can hard-code
  debug logging to be on and more easily compare test results.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6247

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -691,6 +691,11 @@ 
     # that up here
     for dst, src in copy.items():
         fullcopy[dst] = src
+    # Sometimes we forget to add entries from "diverge" to "fullcopy", so fix
+    # that up here
+    for src, dsts in diverge.items():
+        for dst in dsts:
+            fullcopy[dst] = src
     if fullcopy and repo.ui.debugflag:
         repo.ui.debug("  all copies found (* = to merge, ! = divergent, "
                       "% = renamed and deleted):\n")