Mercurial > public > mercurial-scm > hg-stable
diff mercurial/filemerge.py @ 26606:2a405d307f8c
filemerge: also return whether the merge is complete
In future patches, we'll pause merges after the premerge step. After the
premerge step we'll return complete = False.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sun, 11 Oct 2015 12:56:21 -0700 |
parents | ef21a2c41629 |
children | 45a6233d5f50 |
line wrap: on
line diff
--- a/mercurial/filemerge.py Sun Oct 11 12:31:08 2015 -0700 +++ b/mercurial/filemerge.py Sun Oct 11 12:56:21 2015 -0700 @@ -443,6 +443,8 @@ fco = other file context fca = ancestor file context fcd = local file context for current/destination file + + Returns whether the merge is complete, and the return value of the merge. """ if True: @@ -456,7 +458,7 @@ return name if not fco.cmp(fcd): # files identical? - return None + return True, None ui = repo.ui fd = fcd.path() @@ -483,7 +485,7 @@ toolconf = tool, toolpath, binary, symlink if mergetype == nomerge: - return func(repo, mynode, orig, fcd, fco, fca, toolconf) + return True, func(repo, mynode, orig, fcd, fco, fca, toolconf) if orig != fco.path(): ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd)) @@ -496,7 +498,7 @@ toolconf): if onfailure: ui.warn(onfailure % fd) - return 1 + return True, 1 a = repo.wjoin(fd) b = temp("base", fca) @@ -529,7 +531,7 @@ if onfailure: ui.warn(onfailure % fd) - return r + return True, r finally: if not r: util.unlink(back)