Mercurial > hg
comparison mercurial/cmdutil.py @ 38278:0c7970d4e6b4
files: drop now-unnecessary filtering of removed dirstate files
workingctx.matches() now filters out removed files.
Differential Revision: https://phab.mercurial-scm.org/D3712
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 11 Jun 2018 10:09:35 -0700 |
parents | ead71b15efd5 |
children | 2ec44160165d |
comparison
equal
deleted
inserted
replaced
38277:aaed058a0390 | 38278:0c7970d4e6b4 |
---|---|
2132 bad.extend(f for f in rejected if f in match.files()) | 2132 bad.extend(f for f in rejected if f in match.files()) |
2133 forgot.extend(f for f in forget if f not in rejected) | 2133 forgot.extend(f for f in forget if f not in rejected) |
2134 return bad, forgot | 2134 return bad, forgot |
2135 | 2135 |
2136 def files(ui, ctx, m, fm, fmt, subrepos): | 2136 def files(ui, ctx, m, fm, fmt, subrepos): |
2137 rev = ctx.rev() | |
2138 ret = 1 | 2137 ret = 1 |
2139 ds = ctx.repo().dirstate | |
2140 | 2138 |
2141 for f in ctx.matches(m): | 2139 for f in ctx.matches(m): |
2142 if rev is None and ds[f] == 'r': | |
2143 continue | |
2144 fm.startitem() | 2140 fm.startitem() |
2145 if ui.verbose: | 2141 if ui.verbose: |
2146 fc = ctx[f] | 2142 fc = ctx[f] |
2147 fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags()) | 2143 fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags()) |
2148 fm.data(abspath=f) | 2144 fm.data(abspath=f) |