hgext/largefiles/lfcommands.py
changeset 27774 8ceaaf63ca80
parent 27651 07fc2f2134ba
child 27820 d2e9cc9edc08
--- 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):