Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/commands.py @ 2639:001703ec311d
Add an option '-C|--copies' to hg status to show the source of copied files.
Copied files are displayed in the form:
A newname
oldname
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 19 Jul 2006 07:52:16 -0700 |
parents | 837119f1bf4d |
children | 46182568b4ce ddf404954092 5c10b7ed3411 9d1c3529ebbc |
comparison
equal
deleted
inserted
replaced
2638:8dadff054acf | 2639:001703ec311d |
---|---|
2607 A = added | 2607 A = added |
2608 R = removed | 2608 R = removed |
2609 ! = deleted, but still tracked | 2609 ! = deleted, but still tracked |
2610 ? = not tracked | 2610 ? = not tracked |
2611 I = ignored (not shown by default) | 2611 I = ignored (not shown by default) |
2612 = the previous added file was copied from here | |
2612 """ | 2613 """ |
2613 | 2614 |
2614 show_ignored = opts['ignored'] and True or False | 2615 show_ignored = opts['ignored'] and True or False |
2615 files, matchfn, anypats = matchpats(repo, pats, opts) | 2616 files, matchfn, anypats = matchpats(repo, pats, opts) |
2616 cwd = (pats and repo.getcwd()) or '' | 2617 cwd = (pats and repo.getcwd()) or '' |
2635 else: | 2636 else: |
2636 format = "%s %%s%s" % (char, end) | 2637 format = "%s %%s%s" % (char, end) |
2637 | 2638 |
2638 for f in changes: | 2639 for f in changes: |
2639 ui.write(format % f) | 2640 ui.write(format % f) |
2641 if (opts.get('copies') and not opts.get('no_status') | |
2642 and opt == 'added' and repo.dirstate.copies.has_key(f)): | |
2643 ui.write(' %s%s' % (repo.dirstate.copies[f], end)) | |
2640 | 2644 |
2641 def tag(ui, repo, name, rev_=None, **opts): | 2645 def tag(ui, repo, name, rev_=None, **opts): |
2642 """add a tag for the current tip or a given revision | 2646 """add a tag for the current tip or a given revision |
2643 | 2647 |
2644 Name a particular revision using <name>. | 2648 Name a particular revision using <name>. |
3124 ('r', 'removed', None, _('show only removed files')), | 3128 ('r', 'removed', None, _('show only removed files')), |
3125 ('d', 'deleted', None, _('show only deleted (but tracked) files')), | 3129 ('d', 'deleted', None, _('show only deleted (but tracked) files')), |
3126 ('u', 'unknown', None, _('show only unknown (not tracked) files')), | 3130 ('u', 'unknown', None, _('show only unknown (not tracked) files')), |
3127 ('i', 'ignored', None, _('show ignored files')), | 3131 ('i', 'ignored', None, _('show ignored files')), |
3128 ('n', 'no-status', None, _('hide status prefix')), | 3132 ('n', 'no-status', None, _('hide status prefix')), |
3133 ('C', 'copies', None, _('show source of copied files')), | |
3129 ('0', 'print0', None, | 3134 ('0', 'print0', None, |
3130 _('end filenames with NUL, for use with xargs')), | 3135 _('end filenames with NUL, for use with xargs')), |
3131 ('I', 'include', [], _('include names matching the given patterns')), | 3136 ('I', 'include', [], _('include names matching the given patterns')), |
3132 ('X', 'exclude', [], _('exclude names matching the given patterns'))], | 3137 ('X', 'exclude', [], _('exclude names matching the given patterns'))], |
3133 _('hg status [OPTION]... [FILE]...')), | 3138 _('hg status [OPTION]... [FILE]...')), |