Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 34137:a8994d08e4a2
doctest: use print_function and convert bytes to unicode where needed
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 14:56:31 +0900 |
parents | 0fa781320203 |
children | 0f9936d80e01 |
line wrap: on
line diff
--- a/hgext/mq.py Sun Sep 03 15:47:17 2017 +0900 +++ b/hgext/mq.py Sun Sep 03 14:56:31 2017 +0900 @@ -62,7 +62,7 @@ in the strip extension. ''' -from __future__ import absolute_import +from __future__ import absolute_import, print_function import errno import os @@ -155,7 +155,7 @@ def inserthgheader(lines, header, value): """Assuming lines contains a HG patch header, add a header line with value. >>> try: inserthgheader([], b'# Date ', b'z') - ... except ValueError, inst: print "oops" + ... except ValueError, inst: print("oops") oops >>> inserthgheader([b'# HG changeset patch'], b'# Date ', b'z') ['# HG changeset patch', '# Date z']