##// END OF EJS Templates
Add an option '-C|--copies' to hg status to show the source of copied files....
Brendan Cully -
r2639:001703ec default
parent child Browse files
Show More
@@ -2609,6 +2609,7 b' def status(ui, repo, *pats, **opts):'
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
@@ -2637,6 +2638,9 b' def status(ui, repo, *pats, **opts):'
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
@@ -3126,6 +3130,7 b' table = {'
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')),
@@ -32,3 +32,6 b' echo "hg status:"'
32 hg status
32 hg status
33 echo "hg status modified added removed deleted unknown never-existed ignored:"
33 echo "hg status modified added removed deleted unknown never-existed ignored:"
34 hg status modified added removed deleted unknown never-existed ignored
34 hg status modified added removed deleted unknown never-existed ignored
35 hg copy modified copied
36 echo "hg status -C:"
37 hg status -C
@@ -101,3 +101,10 b' R removed'
101 ! deleted
101 ! deleted
102 ? ignored
102 ? ignored
103 ? unknown
103 ? unknown
104 hg status -C:
105 A added
106 A copied
107 modified
108 R removed
109 ! deleted
110 ? unknown
General Comments 0
You need to be logged in to leave comments. Login now