[Cvsshell-devel] CVS: cvsshell/src basic_cmds.py,1.4,1.5
Status: Beta
Brought to you by:
stefanheimann
From: Stefan H. <ste...@us...> - 2002-03-07 12:21:01
|
Update of /cvsroot/cvsshell/cvsshell/src In directory usw-pr-cvs1:/tmp/cvs-serv17778 Modified Files: basic_cmds.py Log Message: * commit without args now works * fixed problem with _cd Index: basic_cmds.py =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** basic_cmds.py 7 Mar 2002 11:49:16 -0000 1.4 --- basic_cmds.py 7 Mar 2002 12:20:58 -0000 1.5 *************** *** 52,55 **** --- 52,56 ---- "to the underlying shell.") + def exitProgram(name, opts, context): "Terminates the program." *************** *** 57,60 **** --- 58,62 ---- return app.BREAK_REPL + def changeDir(name, opts, context): "Changes the current working directory." *************** *** 165,170 **** def commit(name, args, context): app = context['APP'] ! if args == '': try: _runCvsCmd(context, 'commit', rootDir=rootDir, fork=1) context['basic_cmds.dirty_listing'] = 1 --- 167,177 ---- def commit(name, args, context): app = context['APP'] ! if not args: try: + try: + listing = context['basic_cmds.listing'] + rootDir = listing.rootDir + except KeyError: + rootDir = '' _runCvsCmd(context, 'commit', rootDir=rootDir, fork=1) context['basic_cmds.dirty_listing'] = 1 *************** *** 426,429 **** --- 433,437 ---- def _cd(app, dir): """Changes the current working directory. Returns the old directory.""" + if not dir: return oldDir = os.getcwd() app.printVMsg('cd ' + dir) |