230 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) |
230 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) |
231 else: |
231 else: |
232 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) |
232 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) |
233 except error.ResponseExpected: |
233 except error.ResponseExpected: |
234 ui.write("\n") |
234 ui.write("\n") |
235 return 1 |
235 return 1, False |
236 |
236 |
237 @internaltool('local', nomerge) |
237 @internaltool('local', nomerge) |
238 def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf): |
238 def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf): |
239 """Uses the local version of files as the merged version.""" |
239 """Uses the local version of files as the merged version.""" |
240 return 0 |
240 return 0, False |
241 |
241 |
242 @internaltool('other', nomerge) |
242 @internaltool('other', nomerge) |
243 def _iother(repo, mynode, orig, fcd, fco, fca, toolconf): |
243 def _iother(repo, mynode, orig, fcd, fco, fca, toolconf): |
244 """Uses the other version of files as the merged version.""" |
244 """Uses the other version of files as the merged version.""" |
245 repo.wwrite(fcd.path(), fco.data(), fco.flags()) |
245 repo.wwrite(fcd.path(), fco.data(), fco.flags()) |
246 return 0 |
246 return 0, False |
247 |
247 |
248 @internaltool('fail', nomerge) |
248 @internaltool('fail', nomerge) |
249 def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf): |
249 def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf): |
250 """ |
250 """ |
251 Rather than attempting to merge files that were modified on both |
251 Rather than attempting to merge files that were modified on both |
252 branches, it marks them as unresolved. The resolve command must be |
252 branches, it marks them as unresolved. The resolve command must be |
253 used to resolve these conflicts.""" |
253 used to resolve these conflicts.""" |
254 return 1 |
254 return 1, False |
255 |
255 |
256 def _premerge(repo, toolconf, files, labels=None): |
256 def _premerge(repo, toolconf, files, labels=None): |
257 tool, toolpath, binary, symlink = toolconf |
257 tool, toolpath, binary, symlink = toolconf |
258 if symlink: |
258 if symlink: |
259 return 1 |
259 return 1 |
534 precheck = None |
534 precheck = None |
535 |
535 |
536 toolconf = tool, toolpath, binary, symlink |
536 toolconf = tool, toolpath, binary, symlink |
537 |
537 |
538 if mergetype == nomerge: |
538 if mergetype == nomerge: |
539 return True, func(repo, mynode, orig, fcd, fco, fca, toolconf) |
539 r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf) |
|
540 return True, r |
540 |
541 |
541 if premerge: |
542 if premerge: |
542 if orig != fco.path(): |
543 if orig != fco.path(): |
543 ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd)) |
544 ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd)) |
544 else: |
545 else: |