Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/commands.py @ 3522:fb031f47890f
Remove forget command, deprecated pre-0.9
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 25 Oct 2006 17:47:53 -0500 |
parents | 467d923e4e3d |
children | 2fb30a9d2b3b |
comparison
equal
deleted
inserted
replaced
3521:467d923e4e3d | 3522:fb031f47890f |
---|---|
1388 else: | 1388 else: |
1389 ui.note(_('exporting patch:\n')) | 1389 ui.note(_('exporting patch:\n')) |
1390 patch.export(repo, map(repo.lookup, revs), template=opts['output'], | 1390 patch.export(repo, map(repo.lookup, revs), template=opts['output'], |
1391 switch_parent=opts['switch_parent'], | 1391 switch_parent=opts['switch_parent'], |
1392 opts=patch.diffopts(ui, opts)) | 1392 opts=patch.diffopts(ui, opts)) |
1393 | |
1394 def forget(ui, repo, *pats, **opts): | |
1395 """don't add the specified files on the next commit (DEPRECATED) | |
1396 | |
1397 (DEPRECATED) | |
1398 Undo an 'hg add' scheduled for the next commit. | |
1399 | |
1400 This command is now deprecated and will be removed in a future | |
1401 release. Please use revert instead. | |
1402 """ | |
1403 ui.warn(_("(the forget command is deprecated; use revert instead)\n")) | |
1404 forget = [] | |
1405 for src, abs, rel, exact in cmdutil.walk(repo, pats, opts): | |
1406 if repo.dirstate.state(abs) == 'a': | |
1407 forget.append(abs) | |
1408 if ui.verbose or not exact: | |
1409 ui.status(_('forgetting %s\n') % ((pats and rel) or abs)) | |
1410 repo.forget(forget) | |
1411 | 1393 |
1412 def grep(ui, repo, pattern, *pats, **opts): | 1394 def grep(ui, repo, pattern, *pats, **opts): |
1413 """search for a pattern in specified files and revisions | 1395 """search for a pattern in specified files and revisions |
1414 | 1396 |
1415 Search revisions of files for a regular expression. | 1397 Search revisions of files for a regular expression. |
2980 ('a', 'text', None, _('treat all files as text')), | 2962 ('a', 'text', None, _('treat all files as text')), |
2981 ('g', 'git', None, _('use git extended diff format')), | 2963 ('g', 'git', None, _('use git extended diff format')), |
2982 ('', 'nodates', None, _("don't include dates in diff headers")), | 2964 ('', 'nodates', None, _("don't include dates in diff headers")), |
2983 ('', 'switch-parent', None, _('diff against the second parent'))], | 2965 ('', 'switch-parent', None, _('diff against the second parent'))], |
2984 _('hg export [-a] [-o OUTFILESPEC] REV...')), | 2966 _('hg export [-a] [-o OUTFILESPEC] REV...')), |
2985 "debugforget|forget": | |
2986 (forget, walkopts, _('hg forget [OPTION]... FILE...')), | |
2987 "grep": | 2967 "grep": |
2988 (grep, | 2968 (grep, |
2989 [('0', 'print0', None, _('end fields with NUL')), | 2969 [('0', 'print0', None, _('end fields with NUL')), |
2990 ('', 'all', None, _('print all revisions that match')), | 2970 ('', 'all', None, _('print all revisions that match')), |
2991 ('f', 'follow', None, | 2971 ('f', 'follow', None, |