Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 3467:2b3b703b3a2b
Add --rev option to status
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 18 Oct 2006 14:24:38 -0700 |
parents | 2d35a8d2b32d |
children | be2bf7263276 |
comparison
equal
deleted
inserted
replaced
3466:8b55c0ba8048 | 3467:2b3b703b3a2b |
---|---|
2548 | 2548 |
2549 Show status of files in the repository. If names are given, only | 2549 Show status of files in the repository. If names are given, only |
2550 files that match are shown. Files that are clean or ignored, are | 2550 files that match are shown. Files that are clean or ignored, are |
2551 not listed unless -c (clean), -i (ignored) or -A is given. | 2551 not listed unless -c (clean), -i (ignored) or -A is given. |
2552 | 2552 |
2553 If one revision is given, it is used as the base revision. | |
2554 If two revisions are given, the difference between them is shown. | |
2555 | |
2553 The codes used to show the status of files are: | 2556 The codes used to show the status of files are: |
2554 M = modified | 2557 M = modified |
2555 A = added | 2558 A = added |
2556 R = removed | 2559 R = removed |
2557 C = clean | 2560 C = clean |
2560 I = ignored (not shown by default) | 2563 I = ignored (not shown by default) |
2561 = the previous added file was copied from here | 2564 = the previous added file was copied from here |
2562 """ | 2565 """ |
2563 | 2566 |
2564 all = opts['all'] | 2567 all = opts['all'] |
2568 node1, node2 = cmdutil.revpair(ui, repo, opts.get('rev')) | |
2565 | 2569 |
2566 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) | 2570 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) |
2567 cwd = (pats and repo.getcwd()) or '' | 2571 cwd = (pats and repo.getcwd()) or '' |
2568 modified, added, removed, deleted, unknown, ignored, clean = [ | 2572 modified, added, removed, deleted, unknown, ignored, clean = [ |
2569 [util.pathto(cwd, x) for x in n] | 2573 [util.pathto(cwd, x) for x in n] |
2570 for n in repo.status(files=files, match=matchfn, | 2574 for n in repo.status(node1=node1, node2=node2, files=files, |
2575 match=matchfn, | |
2571 list_ignored=all or opts['ignored'], | 2576 list_ignored=all or opts['ignored'], |
2572 list_clean=all or opts['clean'])] | 2577 list_clean=all or opts['clean'])] |
2573 | 2578 |
2574 changetypes = (('modified', 'M', modified), | 2579 changetypes = (('modified', 'M', modified), |
2575 ('added', 'A', added), | 2580 ('added', 'A', added), |
3111 ('i', 'ignored', None, _('show ignored files')), | 3116 ('i', 'ignored', None, _('show ignored files')), |
3112 ('n', 'no-status', None, _('hide status prefix')), | 3117 ('n', 'no-status', None, _('hide status prefix')), |
3113 ('C', 'copies', None, _('show source of copied files')), | 3118 ('C', 'copies', None, _('show source of copied files')), |
3114 ('0', 'print0', None, | 3119 ('0', 'print0', None, |
3115 _('end filenames with NUL, for use with xargs')), | 3120 _('end filenames with NUL, for use with xargs')), |
3121 ('', 'rev', [], _('show difference from revision')), | |
3116 ] + walkopts, | 3122 ] + walkopts, |
3117 _('hg status [OPTION]... [FILE]...')), | 3123 _('hg status [OPTION]... [FILE]...')), |
3118 "tag": | 3124 "tag": |
3119 (tag, | 3125 (tag, |
3120 [('l', 'local', None, _('make the tag local')), | 3126 [('l', 'local', None, _('make the tag local')), |