D476: util: add an mmapread method

mbthomas (Mark Thomas) phabricator at mercurial-scm.org
Thu Sep 21 08:57:31 EDT 2017


mbthomas added a comment.


  As it stands, `mmap.mmap` only raises `ValueError` if the arguments are incorrect or if the file is zero-length.  But since that's not guaranteed, I've added a check that the reason for the exception is that the file is zero length before returning the empty string.

REPOSITORY
  rHG Mercurial

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

To: mbthomas, #fbhgext, #hg-reviewers, quark, durin42
Cc: durin42, quark, indygreg, simonfar, mercurial-devel


More information about the Mercurial-devel mailing list