diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -611,13 +611,6 @@ src, dsts2, m2, m1, mb, c1, base, copy, renamedelete ) - renamedeleteset = set() - divergeset = set() - for dsts in diverge.values(): - divergeset.update(dsts) - for dsts in renamedelete.values(): - renamedeleteset.update(dsts) - # find interesting file sets from manifests addedinm1 = m1.filesnotin(mb, repo.narrowmatch()) addedinm2 = m2.filesnotin(mb, repo.narrowmatch()) @@ -634,6 +627,13 @@ fullcopy.update(copies2) if repo.ui.debugflag: + renamedeleteset = set() + divergeset = set() + for dsts in diverge.values(): + divergeset.update(dsts) + for dsts in renamedelete.values(): + renamedeleteset.update(dsts) + repo.ui.debug( b" all copies found (* = to merge, ! = divergent, " b"% = renamed and deleted):\n" @@ -649,7 +649,8 @@ repo.ui.debug( b" src: '%s' -> dst: '%s' %s\n" % (fullcopy[f], f, note) ) - del divergeset + del renamedeleteset + del divergeset repo.ui.debug(b" checking for directory renames\n")