Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 2955:9d1c3529ebbc
addremove: do not deprecate.
command is too useful to drop.
is also best place to try autodetect of rename/copy by content similarity.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Sun, 23 Jul 2006 09:04:14 -0700 |
parents | 001703ec311d |
children | 6dddcba7596a |
comparison
equal
deleted
inserted
replaced
2640:02b6fa7bbfbf | 2955:9d1c3529ebbc |
---|---|
708 repo.add(names) | 708 repo.add(names) |
709 | 709 |
710 def addremove(ui, repo, *pats, **opts): | 710 def addremove(ui, repo, *pats, **opts): |
711 """add all new files, delete all missing files (DEPRECATED) | 711 """add all new files, delete all missing files (DEPRECATED) |
712 | 712 |
713 (DEPRECATED) | |
714 Add all new files and remove all missing files from the repository. | 713 Add all new files and remove all missing files from the repository. |
715 | 714 |
716 New files are ignored if they match any of the patterns in .hgignore. As | 715 New files are ignored if they match any of the patterns in .hgignore. As |
717 with add, these changes take effect at the next commit. | 716 with add, these changes take effect at the next commit. |
718 | 717 """ |
719 This command is now deprecated and will be removed in a future | |
720 release. Please use add and remove --after instead. | |
721 """ | |
722 ui.warn(_('(the addremove command is deprecated; use add and remove ' | |
723 '--after instead)\n')) | |
724 return addremove_lock(ui, repo, pats, opts) | 718 return addremove_lock(ui, repo, pats, opts) |
725 | 719 |
726 def addremove_lock(ui, repo, pats, opts, wlock=None): | 720 def addremove_lock(ui, repo, pats, opts, wlock=None): |
727 add, remove = [], [] | 721 add, remove = [], [] |
728 for src, abs, rel, exact in walk(repo, pats, opts): | 722 for src, abs, rel, exact in walk(repo, pats, opts): |
2813 (add, | 2807 (add, |
2814 [('I', 'include', [], _('include names matching the given patterns')), | 2808 [('I', 'include', [], _('include names matching the given patterns')), |
2815 ('X', 'exclude', [], _('exclude names matching the given patterns')), | 2809 ('X', 'exclude', [], _('exclude names matching the given patterns')), |
2816 ('n', 'dry-run', None, _('do not perform actions, just print output'))], | 2810 ('n', 'dry-run', None, _('do not perform actions, just print output'))], |
2817 _('hg add [OPTION]... [FILE]...')), | 2811 _('hg add [OPTION]... [FILE]...')), |
2818 "debugaddremove|addremove": | 2812 "addremove": |
2819 (addremove, | 2813 (addremove, |
2820 [('I', 'include', [], _('include names matching the given patterns')), | 2814 [('I', 'include', [], _('include names matching the given patterns')), |
2821 ('X', 'exclude', [], _('exclude names matching the given patterns')), | 2815 ('X', 'exclude', [], _('exclude names matching the given patterns')), |
2822 ('n', 'dry-run', None, _('do not perform actions, just print output'))], | 2816 ('n', 'dry-run', None, _('do not perform actions, just print output'))], |
2823 _('hg addremove [OPTION]... [FILE]...')), | 2817 _('hg addremove [OPTION]... [FILE]...')), |