2423 cwd = (pats and repo.getcwd()) or '' |
2423 cwd = (pats and repo.getcwd()) or '' |
2424 modified, added, removed, deleted, unknown = [ |
2424 modified, added, removed, deleted, unknown = [ |
2425 [util.pathto(cwd, x) for x in n] |
2425 [util.pathto(cwd, x) for x in n] |
2426 for n in repo.changes(files=files, match=matchfn)] |
2426 for n in repo.changes(files=files, match=matchfn)] |
2427 |
2427 |
2428 changetypes = [(_('modified'), 'M', modified), |
2428 changetypes = [('modified', 'M', modified), |
2429 (_('added'), 'A', added), |
2429 ('added', 'A', added), |
2430 (_('removed'), 'R', removed), |
2430 ('removed', 'R', removed), |
2431 (_('deleted'), '!', deleted), |
2431 ('deleted', '!', deleted), |
2432 (_('unknown'), '?', unknown)] |
2432 ('unknown', '?', unknown)] |
2433 |
2433 |
2434 end = opts['print0'] and '\0' or '\n' |
2434 end = opts['print0'] and '\0' or '\n' |
2435 |
2435 |
2436 for opt, char, changes in ([ct for ct in changetypes if opts[ct[0]]] |
2436 for opt, char, changes in ([ct for ct in changetypes if opts[ct[0]]] |
2437 or changetypes): |
2437 or changetypes): |
2438 if opts['no_status']: |
2438 if opts['no_status']: |
2439 format = "%%s%s" % end |
2439 format = "%%s%s" % end |
2440 else: |
2440 else: |
2441 format = "%s %%s%s" % (char, end); |
2441 format = "%s %%s%s" % (char, end) |
2442 |
2442 |
2443 for f in changes: |
2443 for f in changes: |
2444 ui.write(format % f) |
2444 ui.write(format % f) |
2445 |
2445 |
2446 def tag(ui, repo, name, rev_=None, **opts): |
2446 def tag(ui, repo, name, rev_=None, **opts): |