changeset 4646:196d90bf5c15

Fix read mode when importing patch.
author Patrick Mezard <pmezard@gmail.com>
date Tue, 19 Jun 2007 17:03:31 +0200
parents 0de7e6e27fe4
children 7c80e3e6f030
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1482,7 +1482,7 @@ def import_(ui, repo, patch1, *patches, 
             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'))