##// END OF EJS Templates
merge: determine what untracked conflicts cause warns and aborts separately...
Siddharth Agarwal -
r27741:3951f132 default
parent child Browse files
Show More
@@ -583,6 +583,14 b' def _checkunknownfiles(repo, wctx, mctx,'
583 """
583 """
584 conflicts = set()
584 conflicts = set()
585 if not force:
585 if not force:
586 abortconflicts = set()
587 warnconflicts = set()
588 def collectconflicts(conflicts, config):
589 if config == 'abort':
590 abortconflicts.update(conflicts)
591 elif config == 'warn':
592 warnconflicts.update(conflicts)
593
586 config = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
594 config = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
587 for f, (m, args, msg) in actions.iteritems():
595 for f, (m, args, msg) in actions.iteritems():
588 if m in ('c', 'dc'):
596 if m in ('c', 'dc'):
@@ -592,15 +600,15 b' def _checkunknownfiles(repo, wctx, mctx,'
592 if _checkunknownfile(repo, wctx, mctx, f, args[0]):
600 if _checkunknownfile(repo, wctx, mctx, f, args[0]):
593 conflicts.add(f)
601 conflicts.add(f)
594
602
595 if config == 'abort':
603 collectconflicts(conflicts, config)
596 for f in sorted(conflicts):
604 for f in sorted(abortconflicts):
597 repo.ui.warn(_("%s: untracked file differs\n") % f)
605 repo.ui.warn(_("%s: untracked file differs\n") % f)
598 if conflicts:
606 if abortconflicts:
599 raise error.Abort(_("untracked files in working directory "
607 raise error.Abort(_("untracked files in working directory "
600 "differ from files in requested revision"))
608 "differ from files in requested revision"))
601 elif config == 'warn':
609
602 for f in sorted(conflicts):
610 for f in sorted(warnconflicts):
603 repo.ui.warn(_("%s: replacing untracked file\n") % f)
611 repo.ui.warn(_("%s: replacing untracked file\n") % f)
604
612
605 for f, (m, args, msg) in actions.iteritems():
613 for f, (m, args, msg) in actions.iteritems():
606 backup = f in conflicts
614 backup = f in conflicts
General Comments 0
You need to be logged in to leave comments. Login now