changeset 13274:57d433f632b7

bundlerepo: use less intrusive util.posixfile to open bundle
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 07 Jan 2011 10:48:30 +0100
parents 764441ecbf2e
children 68da048b4c88 e9a52ed28157
files mercurial/bundlerepo.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Sat Jan 15 23:54:01 2011 +0100
+++ b/mercurial/bundlerepo.py	Fri Jan 07 10:48:30 2011 +0100
@@ -174,7 +174,7 @@
             self._url = 'bundle:' + bundlename
 
         self.tempfile = None
-        f = open(bundlename, "rb")
+        f = util.posixfile(bundlename, "rb")
         self.bundle = changegroup.readbundle(f, bundlename)
         if self.bundle.compressed():
             fdtemp, temp = tempfile.mkstemp(prefix="hg-bundle-",
@@ -192,7 +192,7 @@
             finally:
                 fptemp.close()
 
-            f = open(self.tempfile, "rb")
+            f = util.posixfile(self.tempfile, "rb")
             self.bundle = changegroup.readbundle(f, bundlename)
 
         # dict with the mapping 'filename' -> position in the bundle