diff -r f4277a35c42c -r 183df3df6031 mercurial/commands.py --- a/mercurial/commands.py Fri Jan 04 16:04:48 2019 +0100 +++ b/mercurial/commands.py Wed Nov 07 15:45:09 2018 -0800 @@ -4935,8 +4935,7 @@ if mark: if markcheck: - with repo.wvfs(f) as fobj: - fdata = fobj.read() + fdata = repo.wvfs.tryread(f) if filemerge.hasconflictmarkers(fdata) and \ ms[f] != mergemod.MERGE_RECORD_RESOLVED: hasconflictmarkers.append(f)