##// END OF EJS Templates
hgweb: add a status property to file list context...
Jordi Gutiérrez Hermoso -
r44115:33cff871 default
parent child Browse files
Show More
@@ -541,8 +541,15 b' def symrevorshortnode(req, ctx):'
541
541
542 def _listfilesgen(context, ctx, stripecount):
542 def _listfilesgen(context, ctx, stripecount):
543 parity = paritygen(stripecount)
543 parity = paritygen(stripecount)
544 filesadded = ctx.filesadded()
544 for blockno, f in enumerate(ctx.files()):
545 for blockno, f in enumerate(ctx.files()):
545 template = b'filenodelink' if f in ctx else b'filenolink'
546 if f not in ctx:
547 status = b'removed'
548 elif f in filesadded:
549 status = b'added'
550 else:
551 status = b'modified'
552 template = b'filenolink' if status == b'removed' else b'filenodelink'
546 yield context.process(
553 yield context.process(
547 template,
554 template,
548 {
555 {
@@ -550,6 +557,7 b' def _listfilesgen(context, ctx, stripeco'
550 b'file': f,
557 b'file': f,
551 b'blockno': blockno + 1,
558 b'blockno': blockno + 1,
552 b'parity': next(parity),
559 b'parity': next(parity),
560 b'status': status,
553 },
561 },
554 )
562 )
555
563
General Comments 0
You need to be logged in to leave comments. Login now