comparison mercurial/subrepo.py @ 34146:0fa781320203

doctest: bulk-replace string literals with b'' for Python 3 Our code transformer can't rewrite string literals in docstrings, and I don't want to make the transformer more complex.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 03 Sep 2017 14:32:11 +0900
parents 6d21737c35bf
children 719a5c17e131
comparison
equal deleted inserted replaced
34145:ada8a19672ab 34146:0fa781320203
1386 @staticmethod 1386 @staticmethod
1387 def _checkversion(out): 1387 def _checkversion(out):
1388 '''ensure git version is new enough 1388 '''ensure git version is new enough
1389 1389
1390 >>> _checkversion = gitsubrepo._checkversion 1390 >>> _checkversion = gitsubrepo._checkversion
1391 >>> _checkversion('git version 1.6.0') 1391 >>> _checkversion(b'git version 1.6.0')
1392 'ok' 1392 'ok'
1393 >>> _checkversion('git version 1.8.5') 1393 >>> _checkversion(b'git version 1.8.5')
1394 'ok' 1394 'ok'
1395 >>> _checkversion('git version 1.4.0') 1395 >>> _checkversion(b'git version 1.4.0')
1396 'abort' 1396 'abort'
1397 >>> _checkversion('git version 1.5.0') 1397 >>> _checkversion(b'git version 1.5.0')
1398 'warning' 1398 'warning'
1399 >>> _checkversion('git version 1.9-rc0') 1399 >>> _checkversion(b'git version 1.9-rc0')
1400 'ok' 1400 'ok'
1401 >>> _checkversion('git version 1.9.0.265.g81cdec2') 1401 >>> _checkversion(b'git version 1.9.0.265.g81cdec2')
1402 'ok' 1402 'ok'
1403 >>> _checkversion('git version 1.9.0.GIT') 1403 >>> _checkversion(b'git version 1.9.0.GIT')
1404 'ok' 1404 'ok'
1405 >>> _checkversion('git version 12345') 1405 >>> _checkversion(b'git version 12345')
1406 'unknown' 1406 'unknown'
1407 >>> _checkversion('no') 1407 >>> _checkversion(b'no')
1408 'unknown' 1408 'unknown'
1409 ''' 1409 '''
1410 version = gitsubrepo._gitversion(out) 1410 version = gitsubrepo._gitversion(out)
1411 # git 1.4.0 can't work at all, but 1.5.X can in at least some cases, 1411 # git 1.4.0 can't work at all, but 1.5.X can in at least some cases,
1412 # despite the docstring comment. For now, error on 1.4.0, warn on 1412 # despite the docstring comment. For now, error on 1.4.0, warn on