Show More
@@ -2219,6 +2219,24 b' def forget(ui, repo, match, prefix, expl' | |||
|
2219 | 2219 | forgot.extend(f for f in forget if f not in rejected) |
|
2220 | 2220 | return bad, forgot |
|
2221 | 2221 | |
|
2222 | def files(ui, ctx, m, fm, fmt): | |
|
2223 | rev = ctx.rev() | |
|
2224 | ret = 1 | |
|
2225 | ds = ctx._repo.dirstate | |
|
2226 | ||
|
2227 | for f in ctx.matches(m): | |
|
2228 | if rev is None and ds[f] == 'r': | |
|
2229 | continue | |
|
2230 | fm.startitem() | |
|
2231 | if ui.verbose: | |
|
2232 | fc = ctx[f] | |
|
2233 | fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags()) | |
|
2234 | fm.data(abspath=f) | |
|
2235 | fm.write('path', fmt, m.rel(f)) | |
|
2236 | ret = 0 | |
|
2237 | ||
|
2238 | return ret | |
|
2239 | ||
|
2222 | 2240 | def remove(ui, repo, m, prefix, after, force, subrepos): |
|
2223 | 2241 | join = lambda f: os.path.join(prefix, f) |
|
2224 | 2242 | ret = 0 |
@@ -3258,8 +3258,6 b' def files(ui, repo, *pats, **opts):' | |||
|
3258 | 3258 | |
|
3259 | 3259 | """ |
|
3260 | 3260 | ctx = scmutil.revsingle(repo, opts.get('rev'), None) |
|
3261 | rev = ctx.rev() | |
|
3262 | ret = 1 | |
|
3263 | 3261 | |
|
3264 | 3262 | end = '\n' |
|
3265 | 3263 | if opts.get('print0'): |
@@ -3268,17 +3266,7 b' def files(ui, repo, *pats, **opts):' | |||
|
3268 | 3266 | fmt = '%s' + end |
|
3269 | 3267 | |
|
3270 | 3268 | m = scmutil.match(ctx, pats, opts) |
|
3271 | ds = ctx._repo.dirstate | |
|
3272 | for f in ctx.matches(m): | |
|
3273 | if rev is None and ds[f] == 'r': | |
|
3274 | continue | |
|
3275 | fm.startitem() | |
|
3276 | if ui.verbose: | |
|
3277 | fc = ctx[f] | |
|
3278 | fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags()) | |
|
3279 | fm.data(abspath=f) | |
|
3280 | fm.write('path', fmt, m.rel(f)) | |
|
3281 | ret = 0 | |
|
3269 | ret = cmdutil.files(ui, ctx, m, fm, fmt) | |
|
3282 | 3270 | |
|
3283 | 3271 | fm.end() |
|
3284 | 3272 |
General Comments 0
You need to be logged in to leave comments.
Login now