mercurial/cmdutil.py
changeset 38542 475f5f86eaed
parent 38540 b1bbff1dd99a
child 38543 7ae0ea739770
--- a/mercurial/cmdutil.py	Sun Jul 01 22:02:53 2018 +0900
+++ b/mercurial/cmdutil.py	Sun Jul 01 21:55:37 2018 +0900
@@ -2141,9 +2141,10 @@
 def files(ui, ctx, m, fm, fmt, subrepos):
     ret = 1
 
+    needsfctx = ui.verbose or {'size', 'flags'} & fm.datahint()
     for f in ctx.matches(m):
         fm.startitem()
-        if ui.verbose:
+        if needsfctx:
             fc = ctx[f]
             fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags())
         fm.data(abspath=f)