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,14 +600,14 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 |
|
|
604 | for f in sorted(abortconflicts): | |
597 |
|
|
605 | repo.ui.warn(_("%s: untracked file differs\n") % f) | |
598 |
|
|
606 | if abortconflicts: | |
599 |
|
|
607 | raise error.Abort(_("untracked files in working directory " | |
600 |
|
|
608 | "differ from files in requested revision")) | |
601 | elif config == 'warn': |
|
609 | ||
602 |
|
|
610 | for f in sorted(warnconflicts): | |
603 |
|
|
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(): |
General Comments 0
You need to be logged in to leave comments.
Login now