copies: delete debug message about changes since common ancestor
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 12 Apr 2019 21:41:51 -0700
changeset 42168 341bddf88ac5
parent 42167 91a0bc50b288
child 42169 a68036b849b0
copies: delete debug message about changes since common ancestor Same reasoning as previous patch. Differential Revision: https://phab.mercurial-scm.org/D6250
mercurial/copies.py
tests/test-graft.t
tests/test-rebase-conflicts.t
tests/test-up-local-change.t
--- a/mercurial/copies.py	Thu Apr 11 23:28:38 2019 -0700
+++ b/mercurial/copies.py	Fri Apr 12 21:41:51 2019 -0700
@@ -353,27 +353,23 @@
     return _chain(x, y, _backwardrenames(x, a, match=match),
                   _forwardcopies(a, y, match=match))
 
-def _computenonoverlap(repo, c1, c2, addedinm1, addedinm2, baselabel=''):
+def _computenonoverlap(repo, c1, c2, addedinm1, addedinm2, debug=True):
     """Computes, based on addedinm1 and addedinm2, the files exclusive to c1
     and c2. This is its own function so extensions can easily wrap this call
     to see what files mergecopies is about to process.
 
     Even though c1 and c2 are not used in this function, they are useful in
     other extensions for being able to read the file nodes of the changed files.
-
-    "baselabel" can be passed to help distinguish the multiple computations
-    done in the graft case.
     """
     u1 = sorted(addedinm1 - addedinm2)
     u2 = sorted(addedinm2 - addedinm1)
 
-    header = "  unmatched files in %s"
-    if baselabel:
-        header += ' (from %s)' % baselabel
-    if u1:
-        repo.ui.debug("%s:\n   %s\n" % (header % 'local', "\n   ".join(u1)))
-    if u2:
-        repo.ui.debug("%s:\n   %s\n" % (header % 'other', "\n   ".join(u2)))
+    if debug:
+        header = "  unmatched files in %s"
+        if u1:
+            repo.ui.debug("%s:\n   %s\n" % (header % 'local', "\n   ".join(u1)))
+        if u2:
+            repo.ui.debug("%s:\n   %s\n" % (header % 'other', "\n   ".join(u2)))
 
     return u1, u2
 
@@ -588,15 +584,14 @@
         u1u, u2u = u1r, u2r
     else:
         # unmatched file from base (DAG rotation in the graft case)
-        u1r, u2r = _computenonoverlap(repo, c1, c2, addedinm1, addedinm2,
-                                      baselabel='base')
+        u1r, u2r = _computenonoverlap(repo, c1, c2, addedinm1, addedinm2)
         # unmatched file from topological common ancestors (no DAG rotation)
         # need to recompute this for directory move handling when grafting
         mta = tca.manifest()
         u1u, u2u = _computenonoverlap(repo, c1, c2,
                                       m1.filesnotin(mta, repo.narrowmatch()),
                                       m2.filesnotin(mta, repo.narrowmatch()),
-                                      baselabel='topological common ancestor')
+                                      debug=False)
 
     for f in u1u:
         _checkcopies(c1, c2, f, base, tca, dirtyc1, limit, data1)
--- a/tests/test-graft.t	Thu Apr 11 23:28:38 2019 -0700
+++ b/tests/test-graft.t	Fri Apr 12 21:41:51 2019 -0700
@@ -220,8 +220,6 @@
   committing changelog
   updating the branch cache
   grafting 5:97f8bfe72746 "5"
-    unmatched files in other (from topological common ancestor):
-     c
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746
@@ -235,8 +233,6 @@
   $ HGEDITOR=cat hg graft 4 3 --log --debug
   scanning for duplicate grafts
   grafting 4:9c233e8e184d "4"
-    unmatched files in other (from topological common ancestor):
-     c
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d
@@ -741,8 +737,6 @@
   $ hg graft -q 13 --debug
   scanning for duplicate grafts
   grafting 13:7a4785234d87 "2"
-    unmatched files in other (from topological common ancestor):
-     g
     unmatched files new in both:
      b
     all copies found (* = to merge, ! = divergent, % = renamed and deleted):
--- a/tests/test-rebase-conflicts.t	Thu Apr 11 23:28:38 2019 -0700
+++ b/tests/test-rebase-conflicts.t	Fri Apr 12 21:41:51 2019 -0700
@@ -248,8 +248,6 @@
   getting f1.txt
    merge against 9:e31216eec445
      detach base 8:8e4e2c1a07ae
-    unmatched files in other (from topological common ancestor):
-     f2.txt
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: 8e4e2c1a07ae, local: 4bc80088dc6b+, remote: e31216eec445
@@ -267,8 +265,6 @@
    already in destination
    merge against 10:2f2496ddf49d
      detach base 9:e31216eec445
-    unmatched files in other (from topological common ancestor):
-     f2.txt
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: e31216eec445, local: 19c888675e13+, remote: 2f2496ddf49d
--- a/tests/test-up-local-change.t	Thu Apr 11 23:28:38 2019 -0700
+++ b/tests/test-up-local-change.t	Fri Apr 12 21:41:51 2019 -0700
@@ -67,8 +67,6 @@
   
   $ hg --debug up 0
   starting 4 threads for background file closing (?)
-    unmatched files in local (from topological common ancestor):
-     b
   resolving manifests
    branchmerge: False, force: False, partial: False
    ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a