diff -r f4ca33e33781 -r 9d04b4da6773 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sun Dec 13 19:32:01 2015 +0900 +++ b/mercurial/cmdutil.py Sun Dec 13 19:47:46 2015 +0900 @@ -1056,7 +1056,7 @@ modemap=filemode) if fp != template: shouldclose = True - if fp and fp != sys.stdout and util.safehasattr(fp, 'name'): + if fp and not getattr(fp, 'name', '').startswith('<'): repo.ui.note("%s\n" % fp.name) if not fp: