Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 24275:e1cb460a3524
files: split reusable implementation into cmdutil for subrepo support
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 08 Mar 2015 16:50:57 -0400 |
parents | 26a1c617e047 |
children | 18b5b2c9d921 |
comparison
equal
deleted
inserted
replaced
24274:9640820bc957 | 24275:e1cb460a3524 |
---|---|
2217 rejected = wctx.forget(forget, prefix) | 2217 rejected = wctx.forget(forget, prefix) |
2218 bad.extend(f for f in rejected if f in match.files()) | 2218 bad.extend(f for f in rejected if f in match.files()) |
2219 forgot.extend(f for f in forget if f not in rejected) | 2219 forgot.extend(f for f in forget if f not in rejected) |
2220 return bad, forgot | 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 def remove(ui, repo, m, prefix, after, force, subrepos): | 2240 def remove(ui, repo, m, prefix, after, force, subrepos): |
2223 join = lambda f: os.path.join(prefix, f) | 2241 join = lambda f: os.path.join(prefix, f) |
2224 ret = 0 | 2242 ret = 0 |
2225 s = repo.status(match=m, clean=True) | 2243 s = repo.status(match=m, clean=True) |
2226 modified, added, deleted, clean = s[0], s[1], s[3], s[6] | 2244 modified, added, deleted, clean = s[0], s[1], s[3], s[6] |