mercurial/copies.py
changeset 46011 b9588ff9b66a
parent 45986 f9f8d8aa9a92
child 46036 8d54944eaeb0
--- a/mercurial/copies.py	Wed Dec 02 15:39:01 2020 -0800
+++ b/mercurial/copies.py	Wed Dec 02 11:05:53 2020 -0800
@@ -930,7 +930,6 @@
     addedfiles: added files on the other side (compared to ctx)
     """
     # generate a directory move map
-    d = ctx.dirs()
     invalid = set()
     dirmove = {}
 
@@ -941,7 +940,7 @@
         if dsrc in invalid:
             # already seen to be uninteresting
             continue
-        elif dsrc in d and ddst in d:
+        elif ctx.hasdir(dsrc) and ctx.hasdir(ddst):
             # directory wasn't entirely moved locally
             invalid.add(dsrc)
         elif dsrc in dirmove and dirmove[dsrc] != ddst:
@@ -954,7 +953,7 @@
     for i in invalid:
         if i in dirmove:
             del dirmove[i]
-    del d, invalid
+    del invalid
 
     if not dirmove:
         return {}, {}