Mercurial and Git clients can push and pull from this alias URL to interact with this repository. You can change to which repository an alias points by going to the Aliases link on the project page.
''' Mercurial revision DAG visualization library Implements a gtk.TreeModel which visualizes a Mercurial repository revision history.Portions of this code stolen mercilessly from bzr-gtk visualizationdialog. Other portions stolen from graphlog extension.'''importgtkimportgobjectimportrefromtimeimport(strftime,gmtime)frommercurialimportutilfrommercurial.nodeimportshortfrommercurial.hgwebimportwebutil# FIXME: dirty hack to import toutf() from hggtk.hglib.## Python 2.5's relative imports doesn't seem to work either,# when running history.py directly.## Besides, we want to be compatible older Python versions.try:# when history.py is invoked directlyfromhglibimporttoutfexceptImportError:# when history.py is imported and called from hgproc.pyfromhggtk.hglibimporttoutf# treemodel row enumerated attributesLINES=0NODE=1REVID=2LAST_LINES=3MESSAGE=4COMMITER=5TIMESTAMP=6REVISION=7PARENTS=8WCPARENT=9HEAD=10TAGS=11MARKED=12FGCOLOR=13HEXID=14classTreeModel(gtk.GenericTreeModel):def__init__(self,repo,graphdata,color_func):gtk.GenericTreeModel.__init__(self)self.revisions={}self.repo=repoself.parents=[x.rev()forxinrepo.changectx(None).parents()]self.heads=[repo.changelog.rev(x)forxinrepo.heads()]self.line_graph_data=graphdataself.author_re=re.compile('<.*@.*>',0)self.color_func=color_funcdefon_get_flags(self):returngtk.TREE_MODEL_LIST_ONLYdefon_get_n_columns(self):return14defon_get_column_type(self,index):ifindex==NODE:returngobject.TYPE_PYOBJECTifindex==LINES:returngobject.TYPE_PYOBJECTifindex==REVID:returngobject.TYPE_STRINGifindex==LAST_LINES:returngobject.TYPE_PYOBJECTifindex==MESSAGE:returngobject.TYPE_STRINGifindex==COMMITER:returngobject.TYPE_STRINGifindex==TIMESTAMP:returngobject.TYPE_STRINGifindex==REVISION:returngobject.TYPE_PYOBJECTifindex==PARENTS:returngobject.TYPE_PYOBJECTifindex==WCPARENT:returngobject.TYPE_BOOLEANifindex==HEAD:returngobject.TYPE_BOOLEANifindex==TAGS:returngobject.TYPE_STRINGifindex==MARKED:returngobject.TYPE_BOOLEANifindex==FGCOLOR:returngobject.TYPE_STRINGifindex==HEXID:returngobject.TYPE_STRINGdefon_get_iter(self,path):returnpath[0]defon_get_path(self,rowref):returnrowrefdefon_get_value(self,rowref,column):(revid,node,lines,parents)=self.line_graph_data[rowref]ifcolumn==REVID:returnrevidifcolumn==NODE:returnnodeifcolumn==LINES:returnlinesifcolumn==PARENTS:returnparentsifcolumn==LAST_LINES:ifrowref>0:returnself.line_graph_data[rowref-1][2]return[]ifrevidnotinself.revisions:ctx=self.repo.changectx(revid)summary=ctx.description().replace('\0','')summary=summary.split('\n')[0]summary=gobject.markup_escape_text(toutf(summary)) node = self.repo.lookup(revid)
tags = self.repo.nodetags(node)
taglist = toutf(', '.join(tags))
+ tstr = '' for tag in tags:
-summary = '<span background="#ffffaa"> %s </span> %s' % (- tag, summary)+tstr+= '<span background="#ffffaa"> %s </span> ' % tag # show branch names per hgweb's logic
branches = webutil.nodebranchdict(self.repo, ctx)
inbranches = webutil.nodeinbranch(self.repo, ctx)
+ bstr = '' for branch in branches:
-summary = '<span background="#aaffaa"> %s </span> %s' % (- branch['name'], summary)+bstr+= '<span background="#aaffaa"> %s </span> ' % \+ branch['name']
for branch in inbranches:
-summary = '<span background="#d5dde6"> %s </span> %s' % (- branch['name'], summary)+bstr+= '<span background="#d5dde6"> %s </span> ' % \+ branch['name']
if '<' in ctx.user():
author=toutf(self.author_re.sub('',ctx.user()).strip(' '))else:author=toutf(util.shortuser(ctx.user()))date=strftime("%Y-%m-%d %H:%M:%S",gmtime(ctx.date()[0])) wc_parent = revid in self.parents
head = revid in self.heads
color = self.color_func(parents, revid, author)
-- revision = (None, node, revid, None, summary,
+ sumstr = bstr + tstr + summary++ revision = (None, node, revid, None, sumstr,
author, date, None, parents, wc_parent, head, taglist,
None, color, short(node))
self.revisions[revid] = revision
else:revision=self.revisions[revid]ifcolumn==REVISION:returnrevisionifcolumn==MARKED:returnrevid==self.marked_revreturnrevision[column]defon_iter_next(self,rowref):ifrowref<len(self.line_graph_data)-1:returnrowref+1returnNonedefon_iter_children(self,parent):ifparentisNone:return0returnNonedefon_iter_has_child(self,rowref):returnFalsedefon_iter_n_children(self,rowref):ifrowrefisNone:returnlen(self.line_graph_data)return0defon_iter_nth_child(self,parent,n):ifparentisNone:returnnreturnNonedefon_iter_parent(self,child):returnNone
Attach a Trello Card
Add a tag
Your session has expired
You are no longer logged in. Please log in and try your request again.
Filter RSS Feed
This RSS feed URL allows you to see the contents of your current filter using any feed reader.
This link includes a special authentication token. If you share the URL with anyone else, they can see this RSS feed's activity. You can disable these tokens when needed.
Your current filter is unsaved; changing it won't affect this RSS feed.