mercurial/commands.py
changeset 4063 96863fc3036a
parent 4056 f1622b4f467d
child 4064 5d9ede002453
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2491,7 +2491,7 @@ def unbundle(ui, repo, fname, **opts):
     command.
     """
     if os.path.exists(fname):
-        f = open(fname)
+        f = open(fname, "rb")
     else:
         f = urllib.urlopen(fname)
     gen = changegroup.readbundle(f, fname)