Patchwork D6248: copies: move early return for "no copies" case a little earlier

login
register
mail settings
Submitter phabricator
Date April 17, 2019, 11:27 p.m.
Message ID <8a65f877509880ae8fb20deeaaf43fdc@localhost.localdomain>
Download mbox | patch
Permalink /patch/39731/
State Not Applicable
Headers show

Comments

phabricator - April 17, 2019, 11:27 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG85f5934016f9: copies: move early return for &quot;no copies&quot; case a little earlier (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6248?vs=14822&id=14831

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

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
@@ -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