Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/lfcommands.py @ 27774:8ceaaf63ca80
largefiles: use util.readfile in lfconvert
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Tue, 12 Jan 2016 14:31:02 -0800 |
parents | 07fc2f2134ba |
children | d2e9cc9edc08 |
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py Tue Jan 12 14:29:57 2016 -0800 +++ b/hgext/largefiles/lfcommands.py Tue Jan 12 14:31:02 2016 -0800 @@ -141,12 +141,7 @@ if path is None: raise error.Abort(_("missing largefile for '%s' in %s") % (realname, realrev)) - fp = open(path, 'rb') - - try: - return (fp.read(), f[1]) - finally: - fp.close() + return util.readfile(path), f[1] class converter(convcmd.converter): def __init__(self, ui, source, dest, revmapfile, opts):