mark forget command as deprecated.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Wed, 26 Apr 2006 12:05:16 -0700
changeset 2135 11ad47f22023
parent 2134 ef81e34ad674
child 2136 3335564f2518
mark forget command as deprecated. will be removed after 0.9 released.
mercurial/commands.py
tests/test-help.out
tests/test-nested-repo.out
--- a/mercurial/commands.py	Wed Apr 26 10:57:40 2006 -0700
+++ b/mercurial/commands.py	Wed Apr 26 12:05:16 2006 -0700
@@ -1572,10 +1572,15 @@
         doexport(ui, repo, cset, seqno, total, revwidth, opts)
 
 def forget(ui, repo, *pats, **opts):
-    """don't add the specified files on the next commit
-
+    """don't add the specified files on the next commit (DEPRECATED)
+
+    (DEPRECATED)
     Undo an 'hg add' scheduled for the next commit.
+
+    This command is now deprecated and will be removed in a future
+    release. Please use revert instead.
     """
+    ui.warn(_("(the forget command is deprecated; use revert instead)\n"))
     forget = []
     for src, abs, rel, exact in walk(repo, pats, opts):
         if repo.dirstate.state(abs) == 'a':
--- a/tests/test-help.out	Wed Apr 26 10:57:40 2006 -0700
+++ b/tests/test-help.out	Wed Apr 26 12:05:16 2006 -0700
@@ -49,7 +49,7 @@
  copy        mark files as copied for the next commit
  diff        diff repository (or selected files)
  export      dump the header and diffs for one or more changesets
- forget      don't add the specified files on the next commit
+ forget      don't add the specified files on the next commit (DEPRECATED)
  grep        search for a pattern in specified files and revisions
  heads       show current repository heads
  help        show help for a given command or all commands
@@ -92,7 +92,7 @@
  copy        mark files as copied for the next commit
  diff        diff repository (or selected files)
  export      dump the header and diffs for one or more changesets
- forget      don't add the specified files on the next commit
+ forget      don't add the specified files on the next commit (DEPRECATED)
  grep        search for a pattern in specified files and revisions
  heads       show current repository heads
  help        show help for a given command or all commands
--- a/tests/test-nested-repo.out	Wed Apr 26 10:57:40 2006 -0700
+++ b/tests/test-nested-repo.out	Wed Apr 26 12:05:16 2006 -0700
@@ -4,5 +4,6 @@
 # should print A b/x
 A b/x
 # should forget b/x
+(the forget command is deprecated; use revert instead)
 forgetting b/x
 # should print nothing