Mercurial > hg
changeset 27033:089dab8794dc
filemerge: return whether the file is deleted from all other merge tools
This is required for change/delete conflicts -- see the previous patch for more
information.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 18 Nov 2015 13:55:31 -0800 |
parents | 28ee7af4b685 |
children | 86ede9eda252 |
files | mercurial/filemerge.py |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filemerge.py Wed Nov 18 13:52:28 2015 -0800 +++ b/mercurial/filemerge.py Wed Nov 18 13:55:31 2015 -0800 @@ -307,7 +307,7 @@ ui = repo.ui r = simplemerge.simplemerge(ui, a, b, c, label=labels, mode=mode) - return True, r + return True, r, False @internaltool('union', fullmerge, _("warning: conflicts while merging %s! " @@ -368,7 +368,7 @@ Like :merge, but resolve all conflicts non-interactively in favor of the local changes.""" success, status = _imergeauto(localorother='local', *args, **kwargs) - return success, status + return success, status, False @internaltool('merge-other', mergeonly, precheck=_mergecheck) def _imergeother(*args, **kwargs): @@ -376,7 +376,7 @@ Like :merge, but resolve all conflicts non-interactively in favor of the other changes.""" success, status = _imergeauto(localorother='other', *args, **kwargs) - return success, status + return success, status, False @internaltool('tagmerge', mergeonly, _("automatic tag merging of %s failed! " @@ -386,7 +386,8 @@ """ Uses the internal tag merge algorithm (experimental). """ - return tagmerge.merge(repo, fcd, fco, fca) + success, status = tagmerge.merge(repo, fcd, fco, fca) + return success, status, False @internaltool('dump', fullmerge) def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): @@ -404,7 +405,7 @@ util.copyfile(a, a + ".local") repo.wwrite(fd + ".other", fco.data(), fco.flags()) repo.wwrite(fd + ".base", fca.data(), fca.flags()) - return False, 1 + return False, 1, False def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): tool, toolpath, binary, symlink = toolconf @@ -431,7 +432,7 @@ repo.ui.debug('launching merge tool: %s\n' % cmd) r = ui.system(cmd, cwd=repo.root, environ=env) repo.ui.debug('merge tool returned: %s\n' % r) - return True, r + return True, r, False def _formatconflictmarker(repo, ctx, template, label, pad): """Applies the given template to the ctx, prefixed by the label. @@ -574,8 +575,9 @@ # complete if premerge successful (r is 0) return not r, r - needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf, files, - labels=labels) + needcheck, r, deleted = func(repo, mynode, orig, fcd, fco, fca, + toolconf, files, labels=labels) + if needcheck: r = _check(r, ui, tool, fcd, files)