diff --git a/hgext/largefiles/basestore.py b/hgext/largefiles/basestore.py --- a/hgext/largefiles/basestore.py +++ b/hgext/largefiles/basestore.py @@ -77,7 +77,7 @@ class basestore(object): except StoreError, err: ui.warn(err.longmessage()) hhash = "" - tmpfile.close() # has probably already been closed! + tmpfile.close() if hhash != hash: if hhash != "": diff --git a/hgext/largefiles/localstore.py b/hgext/largefiles/localstore.py --- a/hgext/largefiles/localstore.py +++ b/hgext/largefiles/localstore.py @@ -45,7 +45,6 @@ class localstore(basestore.basestore): return lfutil.copyandhash(fd, tmpfile) finally: fd.close() - tmpfile.close() def _verifyfile(self, cctx, cset, contents, standin, verified): filename = lfutil.splitstandin(standin) diff --git a/hgext/largefiles/remotestore.py b/hgext/largefiles/remotestore.py --- a/hgext/largefiles/remotestore.py +++ b/hgext/largefiles/remotestore.py @@ -79,7 +79,6 @@ class remotestore(basestore.basestore): tmpfile) finally: infile.close() - tmpfile.close() def _verifyfile(self, cctx, cset, contents, standin, verified): filename = lfutil.splitstandin(standin)