##// END OF EJS Templates
py3: fix doctests in patch.py to be compatible with Python 3...
Yuya Nishihara -
r34254:5ce32fe7 default
parent child Browse files
Show More
@@ -1490,7 +1490,7 b' def reversehunks(hunks):'
1490 ... 5
1490 ... 5
1491 ... d
1491 ... d
1492 ... +lastline"""
1492 ... +lastline"""
1493 >>> hunks = parsepatch(rawpatch)
1493 >>> hunks = parsepatch([rawpatch])
1494 >>> hunkscomingfromfilterpatch = []
1494 >>> hunkscomingfromfilterpatch = []
1495 >>> for h in hunks:
1495 >>> for h in hunks:
1496 ... hunkscomingfromfilterpatch.append(h)
1496 ... hunkscomingfromfilterpatch.append(h)
@@ -1501,7 +1501,7 b' def reversehunks(hunks):'
1501 >>> fp = util.stringio()
1501 >>> fp = util.stringio()
1502 >>> for c in reversedhunks:
1502 >>> for c in reversedhunks:
1503 ... c.write(fp)
1503 ... c.write(fp)
1504 >>> fp.seek(0)
1504 >>> fp.seek(0) or None
1505 >>> reversedpatch = fp.read()
1505 >>> reversedpatch = fp.read()
1506 >>> print(pycompat.sysstr(reversedpatch))
1506 >>> print(pycompat.sysstr(reversedpatch))
1507 diff --git a/folder1/g b/folder1/g
1507 diff --git a/folder1/g b/folder1/g
@@ -57,7 +57,7 b" testmod('mercurial.hgweb.hgwebdir_mod', "
57 testmod('mercurial.match')
57 testmod('mercurial.match')
58 testmod('mercurial.mdiff')
58 testmod('mercurial.mdiff')
59 testmod('mercurial.minirst')
59 testmod('mercurial.minirst')
60 testmod('mercurial.patch', py3=False) # py3: bytes[n], etc. ?
60 testmod('mercurial.patch')
61 testmod('mercurial.pathutil', py3=False) # py3: os.sep
61 testmod('mercurial.pathutil', py3=False) # py3: os.sep
62 testmod('mercurial.parser')
62 testmod('mercurial.parser')
63 testmod('mercurial.pycompat')
63 testmod('mercurial.pycompat')
General Comments 0
You need to be logged in to leave comments. Login now