Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.6, 0.7, and 0.7.1

history: display branch names per hgweb's logic

Changeset 7c49f7c5c552

Parent 7355efe26eba

by TK Soh

Changes to one file · Browse files at 7c49f7c5c552 Showing diff from parent 7355efe26eba Diff from another changeset...

 
13
14
15
 
16
17
18
 
110
111
112
113
114
115
 
 
 
 
116
117
 
 
 
 
 
118
119
120
 
13
14
15
16
17
18
19
 
111
112
113
 
 
 
114
115
116
117
118
 
119
120
121
122
123
124
125
126
@@ -13,6 +13,7 @@
 from time import (strftime, gmtime)  from mercurial import util  from mercurial.node import short +from mercurial.hgweb import webutil    # FIXME: dirty hack to import toutf() from hggtk.hglib.  # @@ -110,11 +111,16 @@
  summary = '<span background="#ffffaa"> %s </span> %s' % (   tag, summary)   - # show no-default branch names in head changesets - branch = ctx.branch() - if revid in self.heads and branch != "default": + # show branch names per hgweb's logic + branches = webutil.nodebranchdict(self.repo, ctx) + inbranches = webutil.nodeinbranch(self.repo, ctx) + for branch in branches:   summary = '<span background="#aaffaa"> %s </span> %s' % ( - branch, summary) + branch['name'], summary) + for branch in inbranches: + summary = '<span background="#d5dde6"> %s </span> %s' % ( + branch['name'], summary) +     if '<' in ctx.user():   author = toutf(self.author_re.sub('', ctx.user()).strip(' '))