Staging
v0.5.1
https://foss.heptapod.net/mercurial/hgview
Revision 7140c4aaf1c1ff27be1ecf325cf5d2fd8aab66db authored by Mads Kiilerich on 17 November 2019, 16:46:40 UTC, committed by Mads Kiilerich on 17 November 2019, 16:46:40 UTC
https://www.riverbankcomputing.com/static/Docs/PyQt4/incompatibilities.html#pyqt-v4-12-2 :

In previous versions PyQt4 used the copy of the sip module usually installed in
the site-packages directory and applications accessed it using as follows:

  import sip

This version includes a private copy of the module. Applications should access
it as follows:

  from PyQt4 import sip
1 parent 9944923
Raw File
Tip revision: 7140c4aaf1c1ff27be1ecf325cf5d2fd8aab66db authored by Mads Kiilerich on 17 November 2019, 16:46:40 UTC
qt4: support PyQt4 v4.12.2 where sip became a sub module
Tip revision: 7140c4a
hgview
#!/usr/bin/env python3
# hgview: visual mercurial graphlog browser in PyQt4
#
# Copyright 2008-2010 Logilab
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.

"""
Hg repository log browser.

This may be used as a standalone application or as a hg extension. See
README file included.
"""

import sys
from os import readlink, lstat
from os.path import join, dirname, abspath, pardir, exists
from imp import load_package
import stat


execpath = abspath(__file__)
#   resolve symbolic links
statinfo = lstat(execpath)
if stat.S_ISLNK(statinfo.st_mode):
    execpath = join(dirname(execpath), readlink(execpath))
    execpath = abspath(execpath)
# if standalone, import manually
setuppath = join(dirname(dirname(execpath)), 'setup.py')
if exists(setuppath): # standalone if setup.py found in src dir
    hgviewlibpath = join(dirname(dirname(execpath)), 'hgviewlib')
    hgviewlibpath = abspath(hgviewlibpath)
    load_package('hgviewlib', hgviewlibpath)

from hgviewlib.application import main

main()
back to top