456 Creates three versions of the files to merge, containing the |
456 Creates three versions of the files to merge, containing the |
457 contents of local, other and base. These files can then be used to |
457 contents of local, other and base. These files can then be used to |
458 perform a merge manually. If the file to be merged is named |
458 perform a merge manually. If the file to be merged is named |
459 ``a.txt``, these files will accordingly be named ``a.txt.local``, |
459 ``a.txt``, these files will accordingly be named ``a.txt.local``, |
460 ``a.txt.other`` and ``a.txt.base`` and they will be placed in the |
460 ``a.txt.other`` and ``a.txt.base`` and they will be placed in the |
461 same directory as ``a.txt``.""" |
461 same directory as ``a.txt``. |
|
462 |
|
463 This implies permerge. Therefore, files aren't dumped, if premerge |
|
464 runs successfully. Use :forcedump to forcibly write files out. |
|
465 """ |
462 a, b, c, back = files |
466 a, b, c, back = files |
463 |
467 |
464 fd = fcd.path() |
468 fd = fcd.path() |
465 |
469 |
466 util.copyfile(a, a + ".local") |
470 util.copyfile(a, a + ".local") |
467 repo.wwrite(fd + ".other", fco.data(), fco.flags()) |
471 repo.wwrite(fd + ".other", fco.data(), fco.flags()) |
468 repo.wwrite(fd + ".base", fca.data(), fca.flags()) |
472 repo.wwrite(fd + ".base", fca.data(), fca.flags()) |
469 return False, 1, False |
473 return False, 1, False |
|
474 |
|
475 @internaltool('forcedump', mergeonly) |
|
476 def _forcedump(repo, mynode, orig, fcd, fco, fca, toolconf, files, |
|
477 labels=None): |
|
478 """ |
|
479 Creates three versions of the files as same as :dump, but omits premerge. |
|
480 """ |
|
481 return _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, |
|
482 labels=labels) |
470 |
483 |
471 def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
484 def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
472 tool, toolpath, binary, symlink = toolconf |
485 tool, toolpath, binary, symlink = toolconf |
473 if fcd.isabsent() or fco.isabsent(): |
486 if fcd.isabsent() or fco.isabsent(): |
474 repo.ui.warn(_('warning: %s cannot merge change/delete conflict ' |
487 repo.ui.warn(_('warning: %s cannot merge change/delete conflict ' |