diff -r 10aea25fb519 -r 8796fb6af67e mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sat Mar 26 17:12:02 2011 -0500 +++ b/mercurial/cmdutil.py Wed Feb 23 23:30:48 2011 +0100 @@ -230,7 +230,7 @@ def make_file(repo, pat, node=None, total=None, seqno=None, revwidth=None, mode='wb', pathname=None): - writable = 'w' in mode or 'a' in mode + writable = mode not in ('r', 'rb') if not pat or pat == '-': fp = writable and sys.stdout or sys.stdin