D6250: copies: delete debug message about changes since common ancestor
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Apr 16 17:18:47 UTC 2019
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Same reasoning as previous patch.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6250
AFFECTED FILES
mercurial/copies.py
tests/test-graft.t
tests/test-rebase-conflicts.t
tests/test-up-local-change.t
CHANGE DETAILS
diff --git a/tests/test-up-local-change.t b/tests/test-up-local-change.t
--- a/tests/test-up-local-change.t
+++ b/tests/test-up-local-change.t
@@ -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
diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -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
diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -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):
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -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)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list