Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

logview: performance improvements at large branch scales

Changeset f464a38ec059

Parent 3bf34d49a9a6

by Steve Borho

Changes to one file · Browse files at f464a38ec059 Showing diff from parent 3bf34d49a9a6 Diff from another changeset...

 
45
46
47
 
48
49
50
51
 
52
53
54
 
56
57
58
59
60
 
 
 
 
61
62
63
 
125
126
127
128
129
130
 
131
132
133
134
 
135
136
137
138
 
139
140
141
 
158
159
160
161
 
162
163
164
 
165
166
167
168
169
 
170
171
172
 
45
46
47
48
49
50
51
52
53
54
55
56
 
58
59
60
 
 
61
62
63
64
65
66
67
 
129
130
131
 
 
 
132
133
 
 
 
134
135
 
 
 
136
137
138
139
 
156
157
158
 
159
160
161
 
162
163
164
165
166
 
167
168
169
170
@@ -45,10 +45,12 @@
  self.parents = [x.rev() for x in repo.parents()]   self.heads = [repo[x].rev() for x in repo.heads()]   self.tagrevs = [repo[r].rev() for t, r in repo.tagslist()] + self.branchtags = repo.branchtags()     def refresh(self):   repo = self.repo   oldtags, oldheads, oldparents = self.tagrevs, self.heads, self.parents + oldbranches = [repo[n].rev() for n in self.branchtags.items()]     repo.invalidate()   repo.dirstate.invalidate() @@ -56,8 +58,10 @@
  self.parents = [x.rev() for x in repo.parents()]   self.heads = [repo[x].rev() for x in repo.heads()]   self.tagrevs = [repo[r].rev() for t, r in repo.tagslist()] - allrevs = set(oldtags + oldheads + oldparents + - self.parents + self.heads + self.tagrevs) + self.branchtags = repo.branchtags() + brevs = [repo[n].rev() for n in self.branchtags.items()] + allrevs = set(oldtags + oldheads + oldparents + oldbranches + + brevs + self.parents + self.heads + self.tagrevs)   for rev in allrevs:   if rev in self.revisions:   del self.revisions[rev] @@ -125,17 +129,11 @@
  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) + branch = ctx.branch()   bstr = '' - branchstr = '' - for branch in branches: - branchstr += branch['name'] + if self.branchtags.get(branch) == ctx.node():   bstr += '<span color="%s" background="%s"> %s </span> ' % \ - ('black', '#aaffaa', branch['name']) - for branch in inbranches: - branchstr += branch['name'] + ('black', '#aaffaa', branch)     if '<' in ctx.user():   author = self.author_re.sub('', ctx.user()).strip(' ') @@ -158,15 +156,15 @@
  author, date, None, parents, wc_parent, head, taglist,   color, str(ctx), utc)   self.revisions[revid] = revision - self.branch_names[revid] = branchstr + self.branch_names[revid] = branch   else:   revision = self.revisions[revid] - branchstr = self.branch_names[revid] + branch = self.branch_names[revid]     if column == REVISION:   return revision   if column == BRANCHES: - return branchstr + return branch   return revision[column]     def on_iter_next(self, rowref):