equal
deleted
inserted
replaced
2162 |
2162 |
2163 def files(ui, ctx, m, fm, fmt, subrepos): |
2163 def files(ui, ctx, m, fm, fmt, subrepos): |
2164 ret = 1 |
2164 ret = 1 |
2165 |
2165 |
2166 needsfctx = ui.verbose or {'size', 'flags'} & fm.datahint() |
2166 needsfctx = ui.verbose or {'size', 'flags'} & fm.datahint() |
|
2167 uipathfn = scmutil.getuipathfn(ctx.repo(), legacyrelativevalue=True) |
2167 for f in ctx.matches(m): |
2168 for f in ctx.matches(m): |
2168 fm.startitem() |
2169 fm.startitem() |
2169 fm.context(ctx=ctx) |
2170 fm.context(ctx=ctx) |
2170 if needsfctx: |
2171 if needsfctx: |
2171 fc = ctx[f] |
2172 fc = ctx[f] |
2172 fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags()) |
2173 fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags()) |
2173 fm.data(path=f) |
2174 fm.data(path=f) |
2174 fm.plain(fmt % m.rel(f)) |
2175 fm.plain(fmt % uipathfn(f)) |
2175 ret = 0 |
2176 ret = 0 |
2176 |
2177 |
2177 for subpath in sorted(ctx.substate): |
2178 for subpath in sorted(ctx.substate): |
2178 submatch = matchmod.subdirmatcher(subpath, m) |
2179 submatch = matchmod.subdirmatcher(subpath, m) |
2179 if (subrepos or m.exact(subpath) or any(submatch.files())): |
2180 if (subrepos or m.exact(subpath) or any(submatch.files())): |