From: Karl Hasselström Date: Wed, 19 Dec 2007 18:00:13 +0000 (+0000) Subject: Remove "stg cp" X-Git-Tag: v0.15-rc1~328 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/ba8021ffa93ee57b0e829a76f8fd426cf52da627?ds=inline Remove "stg cp" Plain old "cp" and git-add can do the job just as well. Signed-off-by: Karl Hasselström --- diff --git a/Documentation/stg-cp.txt b/Documentation/stg-cp.txt deleted file mode 100644 index 2314925..0000000 --- a/Documentation/stg-cp.txt +++ /dev/null @@ -1,63 +0,0 @@ -stg-cp(1) -========= -Yann Dirson -v0.13, March 2007 - -NAME ----- -stg-cp - stgdesc:cp[] - -SYNOPSIS --------- -[verse] -'stg' cp [OPTIONS] -'stg' cp [OPTIONS] - -DESCRIPTION ------------ - -Make git-controlled copies of git-controlled files. The copies are -added to the Git index, so you can add them to a patch with -stglink:refresh[]. - -In the first form, copy a single file or a single directory, with a -new name. The parent directory of must already exist; - itself must not already exist, or the command will be -interpreted as one of the second form. - -In the second form, copy one or several files and/or directories, into -an existing directory. - -Directories are copied recursively. Only the git-controlled files -under the named directories are copied and added to the index. Any -file not known to Git will not be copied. - -CAVEATS -------- - -This command does not allow yet to overwrite an existing file (whether -it could be recovered from Git or not). Further more, when copying a -directory, the second form does not allow to proceed if a directory by -that name already exists inside the target, even when no file inside -that directory would be overwritten. - -FUTURE OPTIONS --------------- - -No options are supported yet. The following options may be -implemented in the future. - ---all:: - Also copy files not known to Git when copying a directory. - ---force:: - Force overwriting of target files, even if overwritten files - have non-committed changes or are not known to Git. - ---dry-run:: - Show which files would be added, and which would be modified - if --force would be added. - -StGIT ------ -Part of the StGIT suite - see gitlink:stg[1]. diff --git a/stgit/commands/copy.py b/stgit/commands/copy.py deleted file mode 100644 index e94dd66..0000000 --- a/stgit/commands/copy.py +++ /dev/null @@ -1,45 +0,0 @@ - -__copyright__ = """ -Copyright (C) 2007, Yann Dirson - -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 = 'copy files inside the repository' -usage = """%prog [options] [ | ] - -Copy of the files and dirs passed as arguments under another name or -location inside the same repository.""" - -directory = DirectoryHasRepository() -options = [] - -def func(parser, options, args): - """Copy files inside the repository - """ - if len(args) < 1: - parser.error('incorrect number of arguments') - - if not crt_series.get_current(): - raise CmdException, 'No patches applied' - - git.copy(args[0:-1], args[-1]) diff --git a/stgit/main.py b/stgit/main.py index 7701546..d081c30 100644 --- a/stgit/main.py +++ b/stgit/main.py @@ -66,7 +66,6 @@ commands = Commands({ 'clean': 'clean', 'clone': 'clone', 'commit': 'commit', - 'cp': 'copy', 'edit': 'edit', 'export': 'export', 'files': 'files', @@ -145,7 +144,6 @@ patchcommands = ( 'sync', ) wccommands = ( - 'cp', 'diff', 'resolved', 'status',