Staging
v0.5.1
https://foss.heptapod.net/mercurial/hgview
Revision 973da7d85f0a737e61107e7b684d7b9622c07ad9 authored by David Douard on 30 November 2009, 20:22:08 UTC, committed by David Douard on 30 November 2009, 20:22:08 UTC
Make sure we do font substitutions only after QApplication has been instanciated.
1 parent 76b3fa7
Raw File
Tip revision: 973da7d85f0a737e61107e7b684d7b9622c07ad9 authored by David Douard on 30 November 2009, 20:22:08 UTC
Fix segfault on some platforms.
Tip revision: 973da7d
hgview.bat
@echo off
rem = """-*-Python-*- script
rem -------------------- DOS section --------------------
rem You could set PYTHONPATH
python -x %~f0 %*
goto exit
 
"""
# -------------------- Python section --------------------
from PyQt4 import QtCore, QtGui
import os
import sys
import os.path as pos

try:
    import hgviewlib
except ImportError:
    import stat
    execpath = pos.abspath(__file__)
    # resolve symbolic links
    statinfo = os.lstat(execpath)
    if stat.S_ISLNK(statinfo.st_mode):
        execpath = pos.abspath(pos.join(pos.dirname(execpath),
                                        os.readlink(execpath)))
    sys.path.append(pos.abspath(pos.join(pos.dirname(execpath), "..")))

from hgviewlib.qt4.hgrepoviewer import main 
main()

DosExitLabel = """
:exit
rem """
back to top