deprecate addremove command.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Tue, 02 May 2006 21:50:53 -0700
changeset 2181 690da72b0b16
parent 2180 82385773df6c
child 2182 4e35843b2683
deprecate addremove command.
mercurial/commands.py
tests/test-help.out
--- a/mercurial/commands.py	Tue May 02 21:45:53 2006 -0700
+++ b/mercurial/commands.py	Tue May 02 21:50:53 2006 -0700
@@ -809,13 +809,19 @@
     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 @@
                              (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 @@
         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):
--- a/tests/test-help.out	Tue May 02 21:45:53 2006 -0700
+++ b/tests/test-help.out	Tue May 02 21:50:53 2006 -0700
@@ -39,7 +39,7 @@
 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 @@
  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