mercurial/cmdutil.py
changeset 38541 475f5f86eaed
parent 38539 b1bbff1dd99a
child 38542 7ae0ea739770
equal deleted inserted replaced
38540:1e25782a7583 38541:475f5f86eaed
  2139     return bad, forgot
  2139     return bad, forgot
  2140 
  2140 
  2141 def files(ui, ctx, m, fm, fmt, subrepos):
  2141 def files(ui, ctx, m, fm, fmt, subrepos):
  2142     ret = 1
  2142     ret = 1
  2143 
  2143 
       
  2144     needsfctx = ui.verbose or {'size', 'flags'} & fm.datahint()
  2144     for f in ctx.matches(m):
  2145     for f in ctx.matches(m):
  2145         fm.startitem()
  2146         fm.startitem()
  2146         if ui.verbose:
  2147         if needsfctx:
  2147             fc = ctx[f]
  2148             fc = ctx[f]
  2148             fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags())
  2149             fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags())
  2149         fm.data(abspath=f)
  2150         fm.data(abspath=f)
  2150         fm.write('path', fmt, m.rel(f))
  2151         fm.write('path', fmt, m.rel(f))
  2151         ret = 0
  2152         ret = 0