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.'''importgtkimportgobjectimportrefrommercurialimportutilfrommercurial.hgwebimportwebutilfromthgutilimporthglib# treemodel row enumerated attributesLINES=0NODE=1REVID=2LAST_LINES=3MESSAGE=4COMMITER=5TIMESTAMP=6REVISION=7PARENTS=8WCPARENT=9HEAD=10TAGS=11FGCOLOR=12HEXID=13UTC=14BRANCHES=15classTreeModel(gtk.GenericTreeModel):def__init__(self,repo,graphdata,color_func):gtk.GenericTreeModel.__init__(self)self.revisions={}self.branch_names={}self.repo=repoself.line_graph_data=graphdataself.author_re=re.compile('<.*@.*>',0)self.color_func=color_funcself.parents=[x.rev()forxinrepo.parents()]self.heads=[repo[x].rev()forxinrepo.heads()]self.tagrevs=[repo[r].rev()fort,rinrepo.tagslist()]defrefresh(self):repo=self.repooldtags,oldheads,oldparents=self.tagrevs,self.heads,self.parentsrepo.invalidate()repo.dirstate.invalidate()self.parents=[x.rev()forxinrepo.parents()]self.heads=[repo[x].rev()forxinrepo.heads()]self.tagrevs=[repo[r].rev()fort,rinrepo.tagslist()]allrevs=set(oldtags+oldheads+oldparents+self.parents+self.heads+self.tagrevs)forrevinallrevs:ifrevinself.revisions:delself.revisions[rev]defon_get_flags(self):returngtk.TREE_MODEL_LIST_ONLYdefon_get_n_columns(self):return15defon_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==FGCOLOR:returngobject.TYPE_STRINGifindex==HEXID:returngobject.TYPE_STRINGifindex==BRANCHES:returngobject.TYPE_STRINGifindex==UTC: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[revid]summary=ctx.description().replace('\0','')ifself.repo.ui.configbool('tortoisehg','longsummary'):lines=summary.split('\n')summary=lines.pop(0)whilelen(summary)<80andlines:summary+=' '+lines.pop(0)summary=summary[0:80]else:summary=summary.split('\n')[0]summary=gobject.markup_escape_text(hglib.toutf(summary))node=self.repo.lookup(revid)tags=self.repo.nodetags(node) taglist = hglib.toutf(', '.join(tags))
tstr = ''
for tag in tags:
- tstr += '<span background="#ffffaa"> %s </span> ' % tag
+ tstr += '<span color="%s" background="%s"> %s </span> ' % \+ ('black', '#ffffaa', tag) # show branch names per hgweb's logic
branches = webutil.nodebranchdict(self.repo, ctx)
inbranches=webutil.nodeinbranch(self.repo,ctx)bstr='' branchstr = ''
for branch in branches:
branchstr += branch['name']
- bstr += '<span background="#aaffaa"> %s </span> ' % \
- branch['name']
+ bstr += '<span color="%s" background="%s"> %s </span> ' % \
+('black', '#aaffaa', branch['name']) for branch in inbranches:
branchstr += branch['name']
if'<'inctx.user():author=self.author_re.sub('',ctx.user()).strip(' ')else:author=util.shortuser(ctx.user())author=hglib.toutf(author)date=hglib.displaytime(ctx.date())utc=hglib.utctime(ctx.date())wc_parent=revidinself.parentshead=revidinself.headscolor=self.color_func(parents,revid,author)ifwc_parent:sumstr=bstr+tstr+'<b><u>'+summary+'</u></b>'else:sumstr=bstr+tstr+summaryrevision=(None,node,revid,None,sumstr,author,date,None,parents,wc_parent,head,taglist,color,str(ctx),utc)self.revisions[revid]=revisionself.branch_names[revid]=branchstrelse:revision=self.revisions[revid]branchstr=self.branch_names[revid]ifcolumn==REVISION:returnrevisionifcolumn==BRANCHES:returnbranchstrreturnrevision[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.