comparison mercurial/util.py @ 34152: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 d4d4d11bac77
children be00af4a1ac5
comparison
equal deleted inserted replaced
34151:414a3513c2bd 34152:a8994d08e4a2
11 11
12 This contains helper routines that are independent of the SCM core and 12 This contains helper routines that are independent of the SCM core and
13 hide platform-specific details from the core. 13 hide platform-specific details from the core.
14 """ 14 """
15 15
16 from __future__ import absolute_import 16 from __future__ import absolute_import, print_function
17 17
18 import abc 18 import abc
19 import bz2 19 import bz2
20 import calendar 20 import calendar
21 import codecs 21 import codecs
2834 'path' 2834 'path'
2835 >>> bytes(url(b'file:///tmp/foo/bar')) 2835 >>> bytes(url(b'file:///tmp/foo/bar'))
2836 'file:///tmp/foo/bar' 2836 'file:///tmp/foo/bar'
2837 >>> bytes(url(b'file:///c:/tmp/foo/bar')) 2837 >>> bytes(url(b'file:///c:/tmp/foo/bar'))
2838 'file:///c:/tmp/foo/bar' 2838 'file:///c:/tmp/foo/bar'
2839 >>> print url(br'bundle:foo\bar') 2839 >>> print(url(br'bundle:foo\bar'))
2840 bundle:foo\bar 2840 bundle:foo\bar
2841 >>> print url(br'file:///D:\data\hg') 2841 >>> print(url(br'file:///D:\data\hg'))
2842 file:///D:\data\hg 2842 file:///D:\data\hg
2843 """ 2843 """
2844 if self._localpath: 2844 if self._localpath:
2845 s = self.path 2845 s = self.path
2846 if self.scheme == 'bundle': 2846 if self.scheme == 'bundle':