# HG changeset patch # User Yuya Nishihara <y...@tcha.org> # Date 1521869554 -32400 # Sat Mar 24 14:32:34 2018 +0900 # Node ID dd177967cc70361c854ac5b59672c1c903a11c7c # Parent 4bd2d19ecff7aa5ce3ce695427a478b9d3be9ff1 util: stop using readfile() in tempfilter()
To unblock code move to utils.*. It's merely two lines of very Pythonic code. No helper function should be needed. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1528,7 +1528,8 @@ def tempfilter(s, cmd): if code: raise error.Abort(_("command '%s' failed: %s") % (cmd, explainexit(code))) - return readfile(outname) + with open(outname, 'rb') as fp: + return fp.read() finally: try: if inname: _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel