changeset 19003:ad993cb7bbb1

largefiles: don't close the fd passed to store._getfile
author Mads Kiilerich <madski@unity3d.com>
date Mon, 15 Apr 2013 23:47:04 +0200
parents 5083baa6cbf8
children 6614e5e24e66
files hgext/largefiles/basestore.py hgext/largefiles/localstore.py hgext/largefiles/remotestore.py
diffstat 3 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/basestore.py	Mon Apr 15 23:43:50 2013 +0200
+++ b/hgext/largefiles/basestore.py	Mon Apr 15 23:47:04 2013 +0200
@@ -77,7 +77,7 @@
             except StoreError, err:
                 ui.warn(err.longmessage())
                 hhash = ""
-            tmpfile.close() # has probably already been closed!
+            tmpfile.close()
 
             if hhash != hash:
                 if hhash != "":
--- a/hgext/largefiles/localstore.py	Mon Apr 15 23:43:50 2013 +0200
+++ b/hgext/largefiles/localstore.py	Mon Apr 15 23:47:04 2013 +0200
@@ -45,7 +45,6 @@
             return lfutil.copyandhash(fd, tmpfile)
         finally:
             fd.close()
-            tmpfile.close()
 
     def _verifyfile(self, cctx, cset, contents, standin, verified):
         filename = lfutil.splitstandin(standin)
--- a/hgext/largefiles/remotestore.py	Mon Apr 15 23:43:50 2013 +0200
+++ b/hgext/largefiles/remotestore.py	Mon Apr 15 23:47:04 2013 +0200
@@ -79,7 +79,6 @@
                                       tmpfile)
         finally:
             infile.close()
-            tmpfile.close()
 
     def _verifyfile(self, cctx, cset, contents, standin, verified):
         filename = lfutil.splitstandin(standin)