# HG changeset patch # User Simon Heimberg <sim...@besonet.ch> # Date 1383675098 -3600 # Node ID 6196dddb51b87dbfd1b1213ed05a59a6b52623ba # Parent 469859aa8e16a5f8d379cd2dbe938d148e594310 graph: own style for line to obsolescence parents
diff -r 469859aa8e16 -r 6196dddb51b8 tortoisehg/hgqt/graph.py --- a/tortoisehg/hgqt/graph.py Die Nov 05 17:55:49 2013 +0100 +++ b/tortoisehg/hgqt/graph.py Die Nov 05 19:11:38 2013 +0100 @@ -34,6 +34,7 @@ LINE_TYPE_PARENT = 0 LINE_TYPE_GRAFT = 1 +LINE_TYPE_OBSOLETE = 2 def revision_grapher(repo, **opts): """incremental revision grapher @@ -143,7 +144,7 @@ for octx in obsoleteutil.first_known_precursors(ctx): src_rev = octx.rev() if stop_rev <= src_rev < curr_rev and not hidden(src_rev): - parents.append((src_rev, LINE_TYPE_GRAFT)) + parents.append((src_rev, LINE_TYPE_OBSOLETE)) parents_to_add = [] links_to_add = [] children_to_add = [] diff -r 469859aa8e16 -r 6196dddb51b8 tortoisehg/hgqt/repomodel.py --- a/tortoisehg/hgqt/repomodel.py Die Nov 05 17:55:49 2013 +0100 +++ b/tortoisehg/hgqt/repomodel.py Die Nov 05 19:11:38 2013 +0100 @@ -23,7 +23,7 @@ from tortoisehg.util import hglib from tortoisehg.hgqt.graph import Graph from tortoisehg.hgqt.graph import revision_grapher -from tortoisehg.hgqt.graph import LINE_TYPE_GRAFT +from tortoisehg.hgqt import graph from tortoisehg.hgqt import qtlib from tortoisehg.hgqt.i18n import _ @@ -75,12 +75,14 @@ return colors[n % len(colors)] def get_style(line_type, active): - if line_type == LINE_TYPE_GRAFT: + if line_type == graph.LINE_TYPE_GRAFT: return Qt.DashLine + if line_type == graph.LINE_TYPE_OBSOLETE: + return Qt.DotLine return Qt.SolidLine def get_width(line_type, active): - if line_type == LINE_TYPE_GRAFT or not active: + if line_type >= graph.LINE_TYPE_GRAFT or not active: return 1 return 2 ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop