[Cvsshell-devel] CVS: cvsshell/src basic_cmds.py,1.14,1.15 cvs_cmds.py,1.3,1.4
Status: Beta
Brought to you by:
stefanheimann
From: Stefan H. <ste...@us...> - 2002-03-15 00:31:39
|
Update of /cvsroot/cvsshell/cvsshell/src In directory usw-pr-cvs1:/tmp/cvs-serv25276 Modified Files: basic_cmds.py cvs_cmds.py Log Message: added documentation Index: basic_cmds.py =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** basic_cmds.py 10 Mar 2002 23:13:59 -0000 1.14 --- basic_cmds.py 15 Mar 2002 00:31:36 -0000 1.15 *************** *** 27,31 **** def cmdHelp(app, name, opts): ! """Prints this help message. If the name of a command is given as a option, a detailed help for this command is printed.""" --- 27,31 ---- def cmdHelp(app, name, opts): ! """Print this help message. If the name of a command is given as a option, a detailed help for this command is printed.""" *************** *** 61,70 **** def exitProgram(app, name, opts): ! "Terminates the program." return app.BREAK_REPL def changeDir(app, name, opts): ! "Changes the current working directory." if len(opts) == 0: opts = app.HOME --- 61,70 ---- def exitProgram(app, name, opts): ! "Terminate the program." return app.BREAK_REPL def changeDir(app, name, opts): ! "Change the current working directory." if len(opts) == 0: opts = app.HOME Index: cvs_cmds.py =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_cmds.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cvs_cmds.py 14 Mar 2002 18:45:46 -0000 1.3 --- cvs_cmds.py 15 Mar 2002 00:31:36 -0000 1.4 *************** *** 30,33 **** --- 30,37 ---- def status(app, name, args): + """Display status information on checked out files. + This command creates a listing with all checked out files and + their status. The listing can be filtered by setting the variable + `filter' in the CONFIG section of ~/.cvsshellrc.""" entries = [] regexHead = re.compile(r'File: (?P<name>\S+)\s+Status: (?P<status>.+)') *************** *** 72,75 **** --- 76,84 ---- def update(app, args, name, simulate=0): + """Bring work tree in sync with repository. + This command donwloads new files and changes to already + checked out files from the server. It also brings the + listing in sync with the repository. The listing can be filtered by setting the variable + `filter' in the CONFIG section of ~/.cvsshellrc.""" try: (globOpts, opts, *************** *** 98,105 **** --- 107,125 ---- def simulateUpdate(app, name, args): + """Refresh the current listing by simulating an update. + This command runs update without really downloading the + changes. See help on update for details.""" update(app, name, args, simulate=1) def checkout(app, name, args): + """Checkout sources for editing. + This command checks out sources from the repository into the + current working directory. It takes two arguments: + * the cvsroot to use. This option is ignored and must not be given + if the cvsroot is already set. + * the module to checkout. + You can invoke the command without any arguments, as it prompts + you for if needed.""" try: (globOpts, opts, *************** *** 137,140 **** --- 157,175 ---- def add(app, name, args, isBinary=0): + """Add a new file/directory to the repository. + This command accepts two kind of arguments which cannot be intermixed: + * list of files/directories to add. + * some ids from the current listing (these are the numbers on the + left side of the listing). + The id-argument must have the following format: #, #, #, ... , # + - where # is either !% or % + - where % is either a digit or a range of digits + (written k-n if k,n are digits) + All numbers given with % are added to the list of ids, + all numbers given with !% are removed from this list. + The id-argument is evaluated from left to right. + Example: + 3, 4, 7-10, !8, 12-19, !13-18 + selects the files with the ids 3, 4, 7, 9, 10, 12, 19""" try: (globOpts, opts, *************** *** 191,194 **** --- 226,231 ---- def addBinary(app, name, args): + """Add a new binary file to the repository. + """ app.printMsg('The file will be added in binary mode.') add(app, name, args, isBinary=1) *************** *** 196,199 **** --- 233,238 ---- def commit(app, name, args): + """Check files into the repository. + """ try: (globOpts, opts, *************** *** 239,242 **** --- 278,283 ---- def remove(app, name, args): + """Remove an entry (some entries) from the repository. + """ try: (globOpts, opts, *************** *** 302,310 **** def printListing(app, name, args): app.printListing() def setCvsRoot(app, name, args): ! "Sets the cvsroot variable manually." roots = app.getCvsRootAliases() if len(args) != 0: --- 343,353 ---- def printListing(app, name, args): + """Print out the current listing. + """ app.printListing() def setCvsRoot(app, name, args): ! "Set the cvsroot variable manually." roots = app.getCvsRootAliases() if len(args) != 0: *************** *** 332,336 **** def readCvsRoot(app, name, args): ! "Reads the cvsroot variable from CVS/Root." newRoot = app.readCvsRootFromFile() if newRoot == None: --- 375,379 ---- def readCvsRoot(app, name, args): ! """Read the cvsroot variable from the file CVS/Root.""" newRoot = app.readCvsRootFromFile() if newRoot == None: *************** *** 341,350 **** def clearCvsRoot(app, name, args): ! "Unsets the cvsroot variable." app.setCvsRoot(None) def toggleCvsRootAutoUpdate(app, name, args): ! """Toggles the auto-update feature for the CVSROOT var. If this option is set, the CVSROOT variable is automatically updated when a new directory is entered. Without a argument the option is toggled. You can set the --- 384,393 ---- def clearCvsRoot(app, name, args): ! "Unset the cvsroot variable." app.setCvsRoot(None) def toggleCvsRootAutoUpdate(app, name, args): ! """Toggle the auto-update feature for the CVSROOT var. If this option is set, the CVSROOT variable is automatically updated when a new directory is entered. Without a argument the option is toggled. You can set the *************** *** 357,359 **** --- 400,403 ---- def toggleFullPrompt(app, name, args): + """Toggle between full and abbreviated status line.""" app.showFullPrompt = app.toggle(app.showFullPrompt, args) |