Remove "stg rm"
authorKarl Hasselström <kha@treskal.com>
Wed, 19 Dec 2007 18:00:13 +0000 (18:00 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 19 Dec 2007 23:13:31 +0000 (23:13 +0000)
git-rm can do the same job just as well. Besides, since StGit notices
when a file disappears, just "rm" can also do the job.

Signed-off-by: Karl Hasselström <kha@treskal.com>
Documentation/tutorial.txt
stgit/commands/rm.py [deleted file]
stgit/main.py

index 43b6409..6eaa623 100644 (file)
@@ -123,18 +123,22 @@ You can view modified files that have already been saved into a patch:
   stg files
 
 The 'stg refresh' command automatically notes changes to files that
-already exist in the working directory, but you have to tell StGIT
-explicitly if you add, remove, or rename files.
-To record the addition or deletion of files in your new patch:
+already exist in the working directory (it also notices if you remove
+them), but you have to tell StGIT explicitly if you add or rename a
+file:
 
-  git add [<file>*]
-  stg rm [<file>*]
+  git add new-file
 
-To record the renaming of a file in your new patch, issue both of these
-commands:
+to add a file, and
+
+  mv old-file new-file
+  git add new-file
+
+or simply
+
+  git mv old-file new-file
 
-  stg rm <oldfilename>
-  git add <newfilename>
+to move a file.
 
 
 Stack manipulation: managing multiple patches
diff --git a/stgit/commands/rm.py b/stgit/commands/rm.py
deleted file mode 100644 (file)
index 59d098b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-
-__copyright__ = """
-Copyright (C) 2005, Catalin Marinas <catalin.marinas@gmail.com>
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-"""
-
-import sys, os
-from optparse import OptionParser, make_option
-
-from stgit.commands.common import *
-from stgit.utils import *
-from stgit import stack, git
-
-
-help = 'remove files from the repository'
-usage = """%prog [options] <files...>
-
-Remove given files from the repository. The command doesn't remove the
-working copy of the file."""
-
-directory = DirectoryHasRepository()
-options = [make_option('-f', '--force',
-                       help = 'force removing even if the file exists',
-                       action = 'store_true')]
-
-
-def func(parser, options, args):
-    """Remove files from the repository
-    """
-    if len(args) < 1:
-        parser.error('incorrect number of arguments')
-
-    if not crt_series.get_current():
-        raise CmdException, 'No patches applied'
-
-    git.rm(args, options.force)
index 7f8f0c9..7701546 100644 (file)
@@ -90,7 +90,6 @@ commands = Commands({
     'rename':           'rename',
     'repair':           'repair',
     'resolved':         'resolved',
-    'rm':               'rm',
     'series':           'series',
     'show':             'show',
     'sink':             'sink',
@@ -149,7 +148,6 @@ wccommands = (
     'cp',
     'diff',
     'resolved',
-    'rm',
     'status',
     )