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