Patchwork D780: merge: rename conflicts to fileconflicts in _checkunknownfiles

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2017, 9:33 a.m.
Message ID <04f970f5a98c3994f16da3d3f49f5e39@localhost.localdomain>
Download mbox | patch
Permalink /patch/24289/
State Not Applicable
Headers show

Comments

phabricator - Oct. 1, 2017, 9:33 a.m.
mbthomas updated this revision to Diff 2216.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D780?vs=1998&id=2216

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

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




To: mbthomas, #hg-reviewers, ryanmce
Cc: mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -672,7 +672,7 @@ 
     files. For some actions, the result is to abort; for others, it is to
     choose a different action.
     """
-    conflicts = set()
+    fileconflicts = set()
     warnconflicts = set()
     abortconflicts = set()
     unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
@@ -687,14 +687,15 @@ 
         for f, (m, args, msg) in actions.iteritems():
             if m in ('c', 'dc'):
                 if _checkunknownfile(repo, wctx, mctx, f):
-                    conflicts.add(f)
+                    fileconflicts.add(f)
             elif m == 'dg':
                 if _checkunknownfile(repo, wctx, mctx, f, args[0]):
-                    conflicts.add(f)
+                    fileconflicts.add(f)
 
-        ignoredconflicts = set([c for c in conflicts
+        allconflicts = fileconflicts
+        ignoredconflicts = set([c for c in allconflicts
                                 if repo.dirstate._ignore(c)])
-        unknownconflicts = conflicts - ignoredconflicts
+        unknownconflicts = allconflicts - ignoredconflicts
         collectconflicts(ignoredconflicts, ignoredconfig)
         collectconflicts(unknownconflicts, unknownconfig)
     else:
@@ -741,7 +742,7 @@ 
         repo.ui.warn(_("%s: replacing untracked file\n") % f)
 
     for f, (m, args, msg) in actions.iteritems():
-        backup = f in conflicts
+        backup = f in fileconflicts
         if m == 'c':
             flags, = args
             actions[f] = ('g', (flags, backup), msg)