Staging
v0.5.0
https://foss.heptapod.net/mercurial/hgview
Raw File
Tip revision: 29a1252da2706adad5b0f7707f2b200d4dad20d7 authored by Alain Leufroy on 29 September 2011, 09:00:11 UTC
prepare version 1.4.0
Tip revision: 29a1252
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.application import main
main()

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