D5243: resolve: fix mark-check when a file was deleted on one side (issue6020)

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Thu Nov 8 06:45:21 EST 2018


yuja added a comment.


  > - 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)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5243

To: spectral, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list