mercurial/merge.py
changeset 34551 1609a5afc4f5
parent 34550 53e4bcab346b
child 34552 33c8a6837181
equal deleted inserted replaced
34550:53e4bcab346b 34551:1609a5afc4f5
   673     """
   673     """
   674     Considers any actions that care about the presence of conflicting unknown
   674     Considers any actions that care about the presence of conflicting unknown
   675     files. For some actions, the result is to abort; for others, it is to
   675     files. For some actions, the result is to abort; for others, it is to
   676     choose a different action.
   676     choose a different action.
   677     """
   677     """
   678     conflicts = set()
   678     fileconflicts = set()
   679     warnconflicts = set()
   679     warnconflicts = set()
   680     abortconflicts = set()
   680     abortconflicts = set()
   681     unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
   681     unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
   682     ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored')
   682     ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored')
   683     if not force:
   683     if not force:
   688                 warnconflicts.update(conflicts)
   688                 warnconflicts.update(conflicts)
   689 
   689 
   690         for f, (m, args, msg) in actions.iteritems():
   690         for f, (m, args, msg) in actions.iteritems():
   691             if m in ('c', 'dc'):
   691             if m in ('c', 'dc'):
   692                 if _checkunknownfile(repo, wctx, mctx, f):
   692                 if _checkunknownfile(repo, wctx, mctx, f):
   693                     conflicts.add(f)
   693                     fileconflicts.add(f)
   694             elif m == 'dg':
   694             elif m == 'dg':
   695                 if _checkunknownfile(repo, wctx, mctx, f, args[0]):
   695                 if _checkunknownfile(repo, wctx, mctx, f, args[0]):
   696                     conflicts.add(f)
   696                     fileconflicts.add(f)
   697 
   697 
   698         ignoredconflicts = set([c for c in conflicts
   698         allconflicts = fileconflicts
       
   699         ignoredconflicts = set([c for c in allconflicts
   699                                 if repo.dirstate._ignore(c)])
   700                                 if repo.dirstate._ignore(c)])
   700         unknownconflicts = conflicts - ignoredconflicts
   701         unknownconflicts = allconflicts - ignoredconflicts
   701         collectconflicts(ignoredconflicts, ignoredconfig)
   702         collectconflicts(ignoredconflicts, ignoredconfig)
   702         collectconflicts(unknownconflicts, unknownconfig)
   703         collectconflicts(unknownconflicts, unknownconfig)
   703     else:
   704     else:
   704         for f, (m, args, msg) in actions.iteritems():
   705         for f, (m, args, msg) in actions.iteritems():
   705             if m == 'cm':
   706             if m == 'cm':
   742 
   743 
   743     for f in sorted(warnconflicts):
   744     for f in sorted(warnconflicts):
   744         repo.ui.warn(_("%s: replacing untracked file\n") % f)
   745         repo.ui.warn(_("%s: replacing untracked file\n") % f)
   745 
   746 
   746     for f, (m, args, msg) in actions.iteritems():
   747     for f, (m, args, msg) in actions.iteritems():
   747         backup = f in conflicts
   748         backup = f in fileconflicts
   748         if m == 'c':
   749         if m == 'c':
   749             flags, = args
   750             flags, = args
   750             actions[f] = ('g', (flags, backup), msg)
   751             actions[f] = ('g', (flags, backup), msg)
   751 
   752 
   752 def _forgetremoved(wctx, mctx, branchmerge):
   753 def _forgetremoved(wctx, mctx, branchmerge):