Show More
@@ -440,6 +440,22 b' def installhg(options):' | |||||
440 | f.write(line + '\n') |
|
440 | f.write(line + '\n') | |
441 | f.close() |
|
441 | f.close() | |
442 |
|
442 | |||
|
443 | hgbat = os.path.join(BINDIR, 'hg.bat') | |||
|
444 | if os.path.isfile(hgbat): | |||
|
445 | # hg.bat expects to be put in bin/scripts while run-tests.py | |||
|
446 | # installation layout put it in bin/ directly. Fix it | |||
|
447 | f = open(hgbat, 'rb') | |||
|
448 | data = f.read() | |||
|
449 | f.close() | |||
|
450 | if '"%~dp0..\python" "%~dp0hg" %*' in data: | |||
|
451 | data = data.replace('"%~dp0..\python" "%~dp0hg" %*', | |||
|
452 | '"%~dp0python" "%~dp0hg" %*') | |||
|
453 | f = open(hgbat, 'wb') | |||
|
454 | f.write(data) | |||
|
455 | f.close() | |||
|
456 | else: | |||
|
457 | print 'WARNING: cannot fix hg.bat reference to python.exe' | |||
|
458 | ||||
443 | if options.anycoverage: |
|
459 | if options.anycoverage: | |
444 | custom = os.path.join(TESTDIR, 'sitecustomize.py') |
|
460 | custom = os.path.join(TESTDIR, 'sitecustomize.py') | |
445 | target = os.path.join(PYTHONDIR, 'sitecustomize.py') |
|
461 | target = os.path.join(PYTHONDIR, 'sitecustomize.py') |
General Comments 0
You need to be logged in to leave comments.
Login now