merge with stable
authorMads Kiilerich <mads@kiilerich.com>
Fri, 25 Nov 2011 02:11:12 +0100
changeset 15577 ad686c818e1c
parent 15574 c9328c829cd9 (current diff)
parent 15576 e387e760b207 (diff)
child 15578 db0e277bdd37
merge with stable
tests/test-largefiles.t
--- a/hgext/largefiles/overrides.py	Thu Nov 24 18:22:45 2011 +0100
+++ b/hgext/largefiles/overrides.py	Fri Nov 25 02:11:12 2011 +0100
@@ -619,11 +619,13 @@
             f = lfutil.splitstandin(f)
 
             def getdatafn():
+                fd = None
                 try:
                     fd = open(path, 'rb')
                     return fd.read()
                 finally:
-                    fd.close()
+                    if fd:
+                        fd.close()
 
             getdata = getdatafn
         write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata)
--- a/tests/test-largefiles.t	Thu Nov 24 18:22:45 2011 +0100
+++ b/tests/test-largefiles.t	Fri Nov 25 02:11:12 2011 +0100
@@ -259,12 +259,6 @@
   5 files updated, 0 files merged, 0 files removed, 0 files unresolved
   getting changed largefiles
   3 largefiles updated, 0 removed
-  $ hg debugstate --nodates
-  n 644         41 .hglf/sub/large4
-  n   0         -1 .hglf/sub2/large6
-  n   0         -1 .hglf/sub2/large7
-  n 644          9 normal3
-  n 644          9 sub/normal4
   $ cd ../b
   $ hg log --template '{rev}:{node|short}  {desc|firstline}\n'
   7:daea875e9014  add/edit more largefiles