mercurial/commands.py
changeset 36985 66e64681e0a8
parent 36960 66651ec259ea
child 36996 1bf555cb680e
equal deleted inserted replaced
36984:939e0983c1d9 36985:66e64681e0a8
   403                 formats.append([sep + ' ' * (ml - w) + '%s' for w in sizes])
   403                 formats.append([sep + ' ' * (ml - w) + '%s' for w in sizes])
   404             else:
   404             else:
   405                 formats.append(['%s' for x in l])
   405                 formats.append(['%s' for x in l])
   406             pieces.append(l)
   406             pieces.append(l)
   407 
   407 
   408         for f, p, l in zip(zip(*formats), zip(*pieces), lines):
   408         for f, p, (n, l) in zip(zip(*formats), zip(*pieces), lines):
   409             fm.startitem()
   409             fm.startitem()
       
   410             fm.context(fctx=n.fctx)
   410             fm.write(fields, "".join(f), *p)
   411             fm.write(fields, "".join(f), *p)
   411             if l[0].skip:
   412             if n.skip:
   412                 fmt = "* %s"
   413                 fmt = "* %s"
   413             else:
   414             else:
   414                 fmt = ": %s"
   415                 fmt = ": %s"
   415             fm.write('line', fmt, l[1])
   416             fm.write('line', fmt, l)
   416 
   417 
   417         if not lines[-1][1].endswith('\n'):
   418         if not lines[-1][1].endswith('\n'):
   418             fm.plain('\n')
   419             fm.plain('\n')
   419         fm.end()
   420         fm.end()
   420 
   421