diff --git a/contrib/hgk b/contrib/hgk --- a/contrib/hgk +++ b/contrib/hgk @@ -337,7 +337,7 @@ proc readcommit {id} { proc parsecommit {id contents listed olds} { global commitinfo children nchildren parents nparents cdate ncleft - global firstparents + global firstparents obsolete set inhdr 1 set comment {} @@ -389,6 +389,8 @@ proc parsecommit {id contents listed old set branch [join [lrange $line 1 end]] } elseif {$tag == "bookmark"} { set bookmark [join [lrange $line 1 end]] + } elseif {$tag == "obsolete"} { + set obsolete($id) "" } } } else { @@ -1139,7 +1141,7 @@ proc drawcommitline {level} { global lineno lthickness mainline mainlinearrow sidelines global commitlisted rowtextx idpos lastuse displist global oldnlines olddlevel olddisplist - global aucolormap curid curidfont + global aucolormap curid curidfont obsolete incr numcommits incr lineno @@ -1155,6 +1157,9 @@ proc drawcommitline {level} { set nparents($id) 0 } } + if {[info exists obsolete($id)]} { + set ofill darkgrey + } assigncolor $id set currentparents {} set dupparents {} diff --git a/hgext/hgk.py b/hgext/hgk.py --- a/hgext/hgk.py +++ b/hgext/hgk.py @@ -35,7 +35,7 @@ vdiff on hovered and selected revisions. ''' import os -from mercurial import cmdutil, commands, patch, revlog, scmutil +from mercurial import cmdutil, commands, patch, revlog, scmutil, obsolete from mercurial.node import nullid, nullrev, short from mercurial.i18n import _ @@ -128,6 +128,9 @@ def catcommit(ui, repo, n, prefix, ctx=N ui.write(("committer %s %s %s\n" % (committer, int(date[0]), date[1]))) ui.write(("revision %d\n" % ctx.rev())) ui.write(("branch %s\n" % ctx.branch())) + if obsolete.isenabled(repo, obsolete.createmarkersopt): + if ctx.obsolete(): + ui.write(("obsolete\n")) ui.write(("phase %s\n\n" % ctx.phasestr())) if prefix != "":