Show More
@@ -133,15 +133,15 b' class hgweb(object):' | |||
|
133 | 133 | return [dict(file=r[0], node=hex(r[1]))] |
|
134 | 134 | return [] |
|
135 | 135 | |
|
136 |
def tag |
|
|
137 | return [{"name":i} for i in self.repo.nodetags(node)] | |
|
136 | def nodetagsdict(self, node): | |
|
137 | return [{"name": i} for i in self.repo.nodetags(node)] | |
|
138 | 138 | |
|
139 |
def branch |
|
|
140 |
|
|
|
141 | for t, tn in self.repo.branchtags().items(): | |
|
142 | if tn == node: | |
|
143 |
|
|
|
144 |
return |
|
|
139 | def nodebranchdict(self, ctx): | |
|
140 | branches = [] | |
|
141 | branch = ctx.branch() | |
|
142 | if self.repo.branchtags()[branch] == ctx.node(): | |
|
143 | branches.append({"name": branch}) | |
|
144 | return branches | |
|
145 | 145 | |
|
146 | 146 | def showtag(self, t1, node=nullid, **args): |
|
147 | 147 | for t in self.repo.nodetags(node): |
@@ -222,8 +222,8 b' class hgweb(object):' | |||
|
222 | 222 | "files": self.listfilediffs(ctx.files(), n), |
|
223 | 223 | "rev": i, |
|
224 | 224 | "node": hex(n), |
|
225 |
"tags": self.tag |
|
|
226 |
"branches": self.branch |
|
|
225 | "tags": self.nodetagsdict(n), | |
|
226 | "branches": self.nodebranchdict(ctx)}) | |
|
227 | 227 | |
|
228 | 228 | for e in l: |
|
229 | 229 | yield e |
@@ -287,8 +287,8 b' class hgweb(object):' | |||
|
287 | 287 | files=self.listfilediffs(ctx.files(), n), |
|
288 | 288 | rev=ctx.rev(), |
|
289 | 289 | node=hex(n), |
|
290 |
tags=self.tag |
|
|
291 |
branches=self.branch |
|
|
290 | tags=self.nodetagsdict(n), | |
|
291 | branches=self.nodebranchdict(ctx)) | |
|
292 | 292 | |
|
293 | 293 | if count >= self.maxchanges: |
|
294 | 294 | break |
@@ -329,8 +329,8 b' class hgweb(object):' | |||
|
329 | 329 | date=ctx.date(), |
|
330 | 330 | files=files, |
|
331 | 331 | archives=self.archivelist(hex(n)), |
|
332 |
tags=self.tag |
|
|
333 |
branches=self.branch |
|
|
332 | tags=self.nodetagsdict(n), | |
|
333 | branches=self.nodebranchdict(ctx)) | |
|
334 | 334 | |
|
335 | 335 | def filelog(self, fctx): |
|
336 | 336 | f = fctx.path() |
@@ -499,8 +499,8 b' class hgweb(object):' | |||
|
499 | 499 | fentries=filelist, |
|
500 | 500 | dentries=dirlist, |
|
501 | 501 | archives=self.archivelist(hex(node)), |
|
502 |
tags=self.tag |
|
|
503 |
branches=self.branch |
|
|
502 | tags=self.nodetagsdict(node), | |
|
503 | branches=self.nodebranchdict(ctx)) | |
|
504 | 504 | |
|
505 | 505 | def tags(self): |
|
506 | 506 | i = self.repo.tagslist() |
@@ -574,8 +574,8 b' class hgweb(object):' | |||
|
574 | 574 | date=ctx.date(), |
|
575 | 575 | rev=i, |
|
576 | 576 | node=hn, |
|
577 |
tags=self.tag |
|
|
578 |
branches=self.branch |
|
|
577 | tags=self.nodetagsdict(n), | |
|
578 | branches=self.nodebranchdict(ctx))) | |
|
579 | 579 | |
|
580 | 580 | yield l |
|
581 | 581 |
General Comments 0
You need to be logged in to leave comments.
Login now