Staging
v0.5.1
https://foss.heptapod.net/mercurial/hgview
Revision 139c44f1521981689d26ab39f15aa7a763ec368c authored by Pierre-Yves David on 16 April 2014, 18:40:27 UTC, committed by Pierre-Yves David on 16 April 2014, 18:40:27 UTC
The new revset code in Mercurial 3.0 return smartset instead of list. They
cannot be sorted by key, and you cannot add the `None` entry for the working
directory.

This patch is a simple straightforward fix that turn the variable into a list
again.  Making it lazy in a future goal.
1 parent 804a2c6
Raw File
Tip revision: 139c44f1521981689d26ab39f15aa7a763ec368c authored by Pierre-Yves David on 16 April 2014, 18:40:27 UTC
graph: work around the new smartset class used for revset (compat hg 3.0)
Tip revision: 139c44f
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()
back to top