diff mercurial/merge.py @ 27654:95dc67f10239

_checkunknownfiles: turn 'conflicts' into a set We'll check for membership in this set in an upcoming patch.
author Siddharth Agarwal <sid0@fb.com>
date Sat, 02 Jan 2016 03:02:57 -0800
parents 198d291e9ffa
children af13eaf9ab8c
line wrap: on
line diff
--- a/mercurial/merge.py	Sat Jan 02 03:02:57 2016 -0800
+++ b/mercurial/merge.py	Sat Jan 02 03:02:57 2016 -0800
@@ -570,15 +570,15 @@
     files. For some actions, the result is to abort; for others, it is to
     choose a different action.
     """
-    conflicts = []
+    conflicts = set()
     if not force:
         for f, (m, args, msg) in actions.iteritems():
             if m in ('c', 'dc'):
                 if _checkunknownfile(repo, wctx, mctx, f):
-                    conflicts.append(f)
+                    conflicts.add(f)
             elif m == 'dg':
                 if _checkunknownfile(repo, wctx, mctx, f, args[0]):
-                    conflicts.append(f)
+                    conflicts.add(f)
 
         for f in sorted(conflicts):
             repo.ui.warn(_("%s: untracked file differs\n") % f)