Staging
v0.5.1
v0.5.1
https://foss.heptapod.net/mercurial/hgview
Revision 21f3a33885796857cd73779bf3a8ad129c300d1d authored by Graziella Toutoungis on 16 March 2009, 12:47:27 UTC, committed by Graziella Toutoungis on 16 March 2009, 12:47:27 UTC
1 parent ffb81b6
Tip revision: 21f3a33885796857cd73779bf3a8ad129c300d1d authored by Graziella Toutoungis on 16 March 2009, 12:47:27 UTC
forgrot import and clean code
forgrot import and clean code
Tip revision: 21f3a33
hgview.py
from mercurial import hg, commands, ui
import os, sys
import os.path as pos
def start_hgview(ui, repo, **opts):
## try to run hgview
try:
import hgview
from hgview.gtk import hgview_gtk
hgview_gtk.main()
except ImportError:
import stat
exec_path = pos.abspath(__file__)
# Resolve symbolic links
statinfo = os.lstat(exec_path)
if stat.S_ISLNK(statinfo.st_mode):
exec_path = pos.abspath(pos.join(pos.dirname(exec_path),
os.readlink(exec_path)))
py_path = pos.abspath(pos.join(pos.dirname(exec_path), ".."))
sys.path.append(py_path)
cmdtable = {
"hgview": (start_hgview,
[],
"hg hgview [opts]"),
}
Computing file changes ...