copies: move early return for "no copies" case a little earlier
We can return before the block that prints debug messages. That block
will not be run anyway when there are no copies.
Differential Revision: https://phab.mercurial-scm.org/D6248
--- a/mercurial/copies.py Mon Apr 15 16:46:41 2019 -0700
+++ b/mercurial/copies.py Mon Apr 15 22:58:10 2019 -0700
@@ -696,7 +696,11 @@
for src, dsts in diverge.items():
for dst in dsts:
fullcopy[dst] = src
- if fullcopy and repo.ui.debugflag:
+
+ if not fullcopy:
+ return copy, {}, diverge, renamedelete, {}
+
+ if repo.ui.debugflag:
repo.ui.debug(" all copies found (* = to merge, ! = divergent, "
"% = renamed and deleted):\n")
for f in sorted(fullcopy):
@@ -711,9 +715,6 @@
note))
del divergeset
- if not fullcopy:
- return copy, {}, diverge, renamedelete, {}
-
repo.ui.debug(" checking for directory renames\n")
# generate a directory move map