Staging
v0.8.1
v0.8.1
https://foss.heptapod.net/mercurial/hgview
Revision 31532688a3478a1dbe7c64d3cebc26e59a91eb35 authored by Mads Kiilerich on 24 August 2019, 16:43:17 UTC, committed by Mads Kiilerich on 24 August 2019, 16:43:17 UTC
Apply most of: 2to3 -f xrange -w .
1 parent aa10132
Tip revision: 31532688a3478a1dbe7c64d3cebc26e59a91eb35 authored by Mads Kiilerich on 24 August 2019, 16:43:17 UTC
Use Python 3 compatible range function instead of xrange
Use Python 3 compatible range function instead of xrange
Tip revision: 3153268
hgview
#!/usr/bin/env python
# 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()
Computing file changes ...