##// END OF EJS Templates
[PATCH 1/5]: cleaning the template parent management in hgweb...
mpm@selenic.com -
r569:3e347929 default
parent child Browse files
Show More
@@ -155,6 +155,12 b' class hgweb:'
155 if node != hex(nullid):
155 if node != hex(nullid):
156 yield self.t(t1, node = node, rev = rev, **args)
156 yield self.t(t1, node = node, rev = rev, **args)
157
157
158 def parents(self, t1, nodes=[], rev=None,**args):
159 if not rev: rev = lambda x: ""
160 for node in nodes:
161 if node != nullid:
162 yield self.t(t1, node = hex(node), rev = rev(node), **args)
163
158 def showtag(self, t1, node=nullid, **args):
164 def showtag(self, t1, node=nullid, **args):
159 for t in self.repo.nodetags(node):
165 for t in self.repo.nodetags(node):
160 yield self.t(t1, tag = t, **args)
166 yield self.t(t1, tag = t, **args)
@@ -259,10 +265,8 b' class hgweb:'
259 'changelogentry',
265 'changelogentry',
260 parity = parity,
266 parity = parity,
261 author = changes[1],
267 author = changes[1],
262 parent1 = self.parent("changelogparent",
268 parent1 = self.parents("changelogparent",
263 hex(p1), cl.rev(p1)),
269 cl.parents(n), cl.rev),
264 parent2 = self.parent("changelogparent",
265 hex(p2), cl.rev(p2)),
266 changelogtag = self.showtag("changelogtag",n),
270 changelogtag = self.showtag("changelogtag",n),
267 p1 = hex(p1), p2 = hex(p2),
271 p1 = hex(p1), p2 = hex(p2),
268 p1rev = cl.rev(p1), p2rev = cl.rev(p2),
272 p1rev = cl.rev(p1), p2rev = cl.rev(p2),
@@ -327,10 +331,8 b' class hgweb:'
327 'searchentry',
331 'searchentry',
328 parity = count & 1,
332 parity = count & 1,
329 author = changes[1],
333 author = changes[1],
330 parent1 = self.parent("changelogparent",
334 parent1 = self.parents("changelogparent",
331 hex(p1), cl.rev(p1)),
335 cl.parents(n), cl.rev),
332 parent2 = self.parent("changelogparent",
333 hex(p2), cl.rev(p2)),
334 changelogtag = self.showtag("changelogtag",n),
336 changelogtag = self.showtag("changelogtag",n),
335 p1 = hex(p1), p2 = hex(p2),
337 p1 = hex(p1), p2 = hex(p2),
336 p1rev = cl.rev(p1), p2rev = cl.rev(p2),
338 p1rev = cl.rev(p1), p2rev = cl.rev(p2),
@@ -378,10 +380,8 b' class hgweb:'
378 diff = diff,
380 diff = diff,
379 rev = cl.rev(n),
381 rev = cl.rev(n),
380 node = nodeid,
382 node = nodeid,
381 parent1 = self.parent("changesetparent",
383 parent1 = self.parents("changesetparent",
382 hex(p1), cl.rev(p1)),
384 cl.parents(n), cl.rev),
383 parent2 = self.parent("changesetparent",
384 hex(p2), cl.rev(p2)),
385 changesettag = self.showtag("changesettag",n),
385 changesettag = self.showtag("changesettag",n),
386 p1 = hex(p1), p2 = hex(p2),
386 p1 = hex(p1), p2 = hex(p2),
387 p1rev = cl.rev(p1), p2rev = cl.rev(p2),
387 p1rev = cl.rev(p1), p2rev = cl.rev(p2),
@@ -462,10 +462,8 b' class hgweb:'
462 manifest = hex(mfn),
462 manifest = hex(mfn),
463 author = cs[1],
463 author = cs[1],
464 date = t,
464 date = t,
465 parent1 = self.parent("filerevparent",
465 parent1 = self.parents("filerevparent",
466 hex(p1), fl.rev(p1), file=f),
466 fl.parents(n), fl.rev, file=f),
467 parent2 = self.parent("filerevparent",
468 hex(p2), fl.rev(p2), file=f),
469 p1 = hex(p1), p2 = hex(p2),
467 p1 = hex(p1), p2 = hex(p2),
470 permissions = self.repo.manifest.readflags(mfn)[f],
468 permissions = self.repo.manifest.readflags(mfn)[f],
471 p1rev = fl.rev(p1), p2rev = fl.rev(p2))
469 p1rev = fl.rev(p1), p2rev = fl.rev(p2))
@@ -531,10 +529,8 b' class hgweb:'
531 manifest = hex(mfn),
529 manifest = hex(mfn),
532 author = cs[1],
530 author = cs[1],
533 date = t,
531 date = t,
534 parent1 = self.parent("fileannotateparent",
532 parent1 = self.parents("fileannotateparent",
535 hex(p1), fl.rev(p1), file=f),
533 fl.parents(n), fl.rev, file=f),
536 parent2 = self.parent("fileannotateparent",
537 hex(p2), fl.rev(p2), file=f),
538 p1 = hex(p1), p2 = hex(p2),
534 p1 = hex(p1), p2 = hex(p2),
539 permissions = self.repo.manifest.readflags(mfn)[f],
535 permissions = self.repo.manifest.readflags(mfn)[f],
540 p1rev = fl.rev(p1), p2rev = fl.rev(p2))
536 p1rev = fl.rev(p1), p2rev = fl.rev(p2))
General Comments 0
You need to be logged in to leave comments. Login now