Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv6769/src
Modified Files:
basic_cmds.py cvs_shell.py
Log Message:
* fixed bug with global options accepting arguments
* improved documentation
Index: basic_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** basic_cmds.py 21 Apr 2003 08:02:24 -0000 1.29
--- basic_cmds.py 21 Apr 2003 17:58:07 -0000 1.30
***************
*** 29,36 ****
_helpShell = """
-
All non-cvsshell commands are passed to the underlying shell. If you
want to use a cvsshell command as a shell command, you must prefix it
! with a `!'/
You can use IDs from the current listing as arguments to shell
--- 29,35 ----
_helpShell = """
All non-cvsshell commands are passed to the underlying shell. If you
want to use a cvsshell command as a shell command, you must prefix it
! with a `!'.
You can use IDs from the current listing as arguments to shell
***************
*** 100,107 ****
`help list'.
All commands not listed here are passed to the underlying shell. Type
`help shell' to get more help on invoking shell commands.
! You can get more help for a specific command by typing
`help <name-of-command>'.
"""
--- 99,118 ----
`help list'.
+ Besides options specific to cvsshell, all commands which have a CVS
+ counterpart (like update, status, ...) accepts the same options as
+ the corresponding CVS command. However, options that are global to all
+ CVS commands must be written as `-gx', where `x' is the name of the
+ global option.
+
+ Example:
+
+ commit -ge nano 0,1,3
+ commits the files with IDs 0,1,3 and edits the log message with the
+ editor `nano'.
+
All commands not listed here are passed to the underlying shell. Type
`help shell' to get more help on invoking shell commands.
! You can get help for a specific command by typing
`help <name-of-command>'.
"""
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** cvs_shell.py 21 Apr 2003 08:02:26 -0000 1.45
--- cvs_shell.py 21 Apr 2003 17:58:07 -0000 1.46
***************
*** 432,447 ****
A GetoptError is raised if there are unknown options.
"""
!
globArgs = locArgs = ''
for arg in utils.splitquoted(args):
if len(arg) == 3 and arg.startswith('-g'):
globArgs += '-' + arg[2] + ' '
else:
locArgs += arg + ' '
- cvsGlobOpts = 'HQqrwlntvb:T:e:d:fz:as:'
(globOpts, rest) = getopt.getopt(utils.splitquoted(globArgs), cvsGlobOpts)
if rest:
! raise getopt.GetoptError, 'Unkown global option(s): ' + rest
cvsGlobOptstr = ''
for x in globOpts:
--- 432,452 ----
A GetoptError is raised if there are unknown options.
"""
! cvsGlobOpts = 'HQqrwlntvb:T:e:d:fz:as:'
globArgs = locArgs = ''
+ argRequired = 0
for arg in utils.splitquoted(args):
if len(arg) == 3 and arg.startswith('-g'):
globArgs += '-' + arg[2] + ' '
+ argRequired = (cvsGlobOpts.find(arg[2] + ':') >= 0)
+ elif argRequired:
+ globArgs += arg + ' '
+ argRequired = 0
else:
locArgs += arg + ' '
(globOpts, rest) = getopt.getopt(utils.splitquoted(globArgs), cvsGlobOpts)
if rest:
! s = str(rest)
! raise getopt.GetoptError('Unkown global option(s): ' + s, s)
cvsGlobOptstr = ''
for x in globOpts:
|