diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -561,7 +561,7 @@ def overridefilemerge(origfn, premerge, (lfutil.splitstandin(orig), ahash, dhash, ohash), 0) == 1)): repo.wwrite(fcd.path(), fco.data(), fco.flags()) - return True, 0 + return True, 0, False def copiespathcopies(orig, ctx1, ctx2, match=None): copies = orig(ctx1, ctx2, match=match) diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -497,8 +497,8 @@ def _filemerge(premerge, repo, mynode, o 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. - """ + Returns whether the merge is complete, the return value of the merge, and + a boolean indicating whether the file was deleted from disk.""" def temp(prefix, ctx): pre = "%s~%s." % (os.path.basename(ctx.path()), prefix) @@ -510,7 +510,7 @@ def _filemerge(premerge, repo, mynode, o return name if not fco.cmp(fcd): # files identical? - return True, None + return True, None, False ui = repo.ui fd = fcd.path() @@ -538,7 +538,7 @@ def _filemerge(premerge, repo, mynode, o if mergetype == nomerge: r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf) - return True, r + return True, r, deleted if premerge: if orig != fco.path(): @@ -552,7 +552,7 @@ def _filemerge(premerge, repo, mynode, o toolconf): if onfailure: ui.warn(onfailure % fd) - return True, 1 + return True, 1, False a = repo.wjoin(fd) b = temp("base", fca) @@ -573,7 +573,7 @@ def _filemerge(premerge, repo, mynode, o if premerge and mergetype == fullmerge: r = _premerge(repo, toolconf, files, labels=labels) # complete if premerge successful (r is 0) - return not r, r + return not r, r, False needcheck, r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=labels) @@ -585,7 +585,7 @@ def _filemerge(premerge, repo, mynode, o if onfailure: ui.warn(onfailure % fd) - return True, r + return True, r, deleted finally: if not r: util.unlink(back) diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -432,11 +432,13 @@ class mergestate(object): f = self._repo.vfs('merge/' + hash) self._repo.wwrite(dfile, f.read(), flags) f.close() - complete, r = filemerge.premerge(self._repo, self._local, lfile, - fcd, fco, fca, labels=labels) + complete, r, deleted = filemerge.premerge(self._repo, self._local, + lfile, fcd, fco, fca, + labels=labels) else: - complete, r = filemerge.filemerge(self._repo, self._local, lfile, - fcd, fco, fca, labels=labels) + complete, r, deleted = filemerge.filemerge(self._repo, self._local, + lfile, fcd, fco, fca, + labels=labels) if r is None: # no real conflict del self._state[dfile]