bundlerepo: use less intrusive util.posixfile to open bundle
authorAdrian Buehlmann <adrian@cadifra.com>
Fri, 07 Jan 2011 10:48:30 +0100
changeset 13274 57d433f632b7
parent 13273 764441ecbf2e
child 13275 68da048b4c88
child 13278 e9a52ed28157
bundlerepo: use less intrusive util.posixfile to open bundle
mercurial/bundlerepo.py
--- 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