diff -r acd03a6e2426 -r eb7b247a98ea mercurial/patch.py --- a/mercurial/patch.py Fri Jun 19 13:44:23 2009 +0200 +++ b/mercurial/patch.py Fri Jun 19 13:47:50 2009 +0200 @@ -972,7 +972,7 @@ def applydiff(ui, fp, changed, strip=1, sourcefile=None, reverse=False, eol=None): """ - Reads a patch from fp and tries to apply it. + Reads a patch from fp and tries to apply it. The dict 'changed' is filled in with all of the filenames changed by the patch. Returns 0 for a clean patch, -1 if any rejects were @@ -1137,7 +1137,7 @@ eol = {'strict': None, 'crlf': '\r\n', 'lf': '\n'}[eolmode.lower()] except KeyError: raise util.Abort(_('Unsupported line endings type: %s') % eolmode) - + try: fp = file(patchobj, 'rb') except TypeError: