# HG changeset patch # User Adrian Buehlmann # Date 2011-01-07 09:48:30 # Node ID 57d433f632b7f76dea25cd38d0a8f4028d4dd1b8 # Parent 764441ecbf2ecd9d7479494ba70afbc6985acbfd bundlerepo: use less intrusive util.posixfile to open bundle diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -174,7 +174,7 @@ class bundlerepository(localrepo.localre 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 @@ class bundlerepository(localrepo.localre 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