changeset 24186:61aadba2396e

copies: calculate 'bothnew' from manifestdict.filesnotin() In the same spirit as the previous change, let's now calculate the 'bothnew' variable using manifestdict.filesnotin().5D
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 27 Feb 2015 14:03:01 -0800
parents 3a3806fe3ddf
children 30219bd46ed7
files mercurial/copies.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/copies.py	Fri Feb 27 14:02:30 2015 -0800
+++ b/mercurial/copies.py	Fri Feb 27 14:03:01 2015 -0800
@@ -302,7 +302,9 @@
         else:
             diverge2.update(fl) # reverse map for below
 
-    bothnew = sorted([d for d in m1 if d in m2 and d not in ma])
+    addedinm1 = m1.filesnotin(ma)
+    addedinm2 = m2.filesnotin(ma)
+    bothnew = sorted(addedinm1 & addedinm2)
     if bothnew:
         repo.ui.debug("  unmatched files new in both:\n   %s\n"
                       % "\n   ".join(bothnew))