D5243: resolve: fix mark-check when a file was deleted on one side (issue6020)
Yuya Nishihara
yuya at tcha.org
Thu Nov 8 06:44:33 EST 2018
> - with repo.wvfs(f) as fobj:
> - fdata = fobj.read()
> + try:
> + with repo.wvfs(f) as fobj:
> + fdata = fobj.read()
> + except (IOError, OSError) as inst:
> + if inst.errno != errno.ENOENT:
> + raise
'fdata' can be undefined here. Appears that the test doesn't go through this
case.
Perhaps, `wvfs.tryread()` can be used instead.
> if filemerge.hasconflictmarkers(fdata) and \
> ms[f] != mergemod.MERGE_RECORD_RESOLVED:
> hasconflictmarkers.append(f)
More information about the Mercurial-devel
mailing list