Fix read mode when importing patch.
authorPatrick Mezard <pmezard@gmail.com>
Tue, 19 Jun 2007 17:03:31 +0200
changeset 4646 196d90bf5c15
parent 4645 0de7e6e27fe4
child 4647 7c80e3e6f030
Fix read mode when importing patch.
mercurial/commands.py
--- a/mercurial/commands.py	Wed Jun 20 23:32:31 2007 +0200
+++ b/mercurial/commands.py	Tue Jun 19 17:03:31 2007 +0200
@@ -1482,7 +1482,7 @@
             tmpname, message, user, date, branch, nodeid, p1, p2 = patch.extract(ui, sys.stdin)
         else:
             ui.status(_("applying %s\n") % p)
-            tmpname, message, user, date, branch, nodeid, p1, p2 = patch.extract(ui, file(pf))
+            tmpname, message, user, date, branch, nodeid, p1, p2 = patch.extract(ui, file(pf, 'rb'))
 
         if tmpname is None:
             raise util.Abort(_('no diffs found'))