# HG changeset patch # User Vadim Gelfer # Date 1146631853 25200 # Node ID 690da72b0b166da016448cf329e29530ab94204e # Parent 82385773df6c93cbe4eb34da880b21c2c16b0c59 deprecate addremove command. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -809,13 +809,19 @@ def add(ui, repo, *pats, **opts): repo.add(names) def addremove(ui, repo, *pats, **opts): - """add all new files, delete all missing files - + """add all new files, delete all missing files (DEPRECATED) + + (DEPRECATED) Add all new files and remove all missing files from the repository. New files are ignored if they match any of the patterns in .hgignore. As with add, these changes take effect at the next commit. + + This command is now deprecated and will be removed in a future + release. Please use add and remove --after instead. """ + ui.warn(_('(the addremove command is deprecated; use add and remove ' + '--after instead)\n')) return addremove_lock(ui, repo, pats, opts) def addremove_lock(ui, repo, pats, opts, wlock=None): @@ -1153,7 +1159,7 @@ def commit(ui, repo, *pats, **opts): (logfile, inst.strerror)) if opts['addremove']: - addremove(ui, repo, *pats, **opts) + addremove_lock(ui, repo, pats, opts) fns, match, anypats = matchpats(repo, pats, opts) if pats: modified, added, removed, deleted, unknown = ( @@ -1894,7 +1900,7 @@ def import_(ui, repo, patch1, *patches, files = util.patch(strip, pf, ui) if len(files) > 0: - addremove(ui, repo, *files) + addremove_lock(ui, repo, files, {}) repo.commit(files, message, user) def incoming(ui, repo, source="default", **opts): diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -39,7 +39,7 @@ Mercurial Distributed SCM list of commands (use "hg help -v" to show aliases and global options): add add the specified files on the next commit - addremove add all new files, delete all missing files + addremove add all new files, delete all missing files (DEPRECATED) annotate show changeset information per file line archive create unversioned archive of a repository revision backout reverse effect of earlier changeset @@ -82,7 +82,7 @@ list of commands (use "hg help -v" to sh verify verify the integrity of the repository version output version and copyright information add add the specified files on the next commit - addremove add all new files, delete all missing files + addremove add all new files, delete all missing files (DEPRECATED) annotate show changeset information per file line archive create unversioned archive of a repository revision backout reverse effect of earlier changeset