diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1879,6 +1879,12 @@ class workingfilectx(committablefilectx) raise return (t, tz) + def exists(self): + return self._repo.wvfs.exists(self._path) + + def lexists(self): + return self._repo.wvfs.lexists(self._path) + def audit(self): return self._repo.wvfs.audit(self._path) diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -9,7 +9,6 @@ from __future__ import absolute_import import errno import hashlib -import os import shutil import struct @@ -1206,7 +1205,7 @@ def applyupdates(repo, actions, wctx, mc # remove renamed files after safely stored for f in moves: - if os.path.lexists(repo.wjoin(f)): + if wctx[f].lexists(): repo.ui.debug("removing %s\n" % f) wctx[f].audit() wctx[f].remove()