691 pathconflicts = set() |
691 pathconflicts = set() |
692 warnconflicts = set() |
692 warnconflicts = set() |
693 abortconflicts = set() |
693 abortconflicts = set() |
694 unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown') |
694 unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown') |
695 ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored') |
695 ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored') |
|
696 pathconfig = repo.ui.configbool('experimental', 'merge.checkpathconflicts') |
696 if not force: |
697 if not force: |
697 def collectconflicts(conflicts, config): |
698 def collectconflicts(conflicts, config): |
698 if config == 'abort': |
699 if config == 'abort': |
699 abortconflicts.update(conflicts) |
700 abortconflicts.update(conflicts) |
700 elif config == 'warn': |
701 elif config == 'warn': |
702 |
703 |
703 for f, (m, args, msg) in actions.iteritems(): |
704 for f, (m, args, msg) in actions.iteritems(): |
704 if m in ('c', 'dc'): |
705 if m in ('c', 'dc'): |
705 if _checkunknownfile(repo, wctx, mctx, f): |
706 if _checkunknownfile(repo, wctx, mctx, f): |
706 fileconflicts.add(f) |
707 fileconflicts.add(f) |
707 elif f not in wctx: |
708 elif pathconfig and f not in wctx: |
708 path = _checkunknowndirs(repo, f) |
709 path = _checkunknowndirs(repo, f) |
709 if path is not None: |
710 if path is not None: |
710 pathconflicts.add(path) |
711 pathconflicts.add(path) |
711 elif m == 'dg': |
712 elif m == 'dg': |
712 if _checkunknownfile(repo, wctx, mctx, f, args[0]): |
713 if _checkunknownfile(repo, wctx, mctx, f, args[0]): |
1137 actions[f] = ('c', (fl2,), "remote recreating") |
1138 actions[f] = ('c', (fl2,), "remote recreating") |
1138 else: |
1139 else: |
1139 actions[f] = ('dc', (None, f, f, False, pa.node()), |
1140 actions[f] = ('dc', (None, f, f, False, pa.node()), |
1140 "prompt deleted/changed") |
1141 "prompt deleted/changed") |
1141 |
1142 |
1142 # If we are merging, look for path conflicts. |
1143 if repo.ui.configbool('experimental', 'merge.checkpathconflicts'): |
1143 checkpathconflicts(repo, wctx, p2, actions) |
1144 # If we are merging, look for path conflicts. |
|
1145 checkpathconflicts(repo, wctx, p2, actions) |
1144 |
1146 |
1145 return actions, diverge, renamedelete |
1147 return actions, diverge, renamedelete |
1146 |
1148 |
1147 def _resolvetrivial(repo, wctx, mctx, ancestor, actions): |
1149 def _resolvetrivial(repo, wctx, mctx, ancestor, actions): |
1148 """Resolves false conflicts where the nodeid changed but the content |
1150 """Resolves false conflicts where the nodeid changed but the content |