[Cvsshell-devel] CVS: cvsshell/src basic_cmds.py,1.2,1.3
Status: Beta
Brought to you by:
stefanheimann
From: Stefan H. <ste...@us...> - 2002-03-07 10:44:21
|
Update of /cvsroot/cvsshell/cvsshell/src In directory usw-pr-cvs1:/tmp/cvs-serv29390 Modified Files: basic_cmds.py Log Message: Index: basic_cmds.py =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** basic_cmds.py 7 Mar 2002 10:37:35 -0000 1.2 --- basic_cmds.py 7 Mar 2002 10:44:18 -0000 1.3 *************** *** 62,66 **** os.path.expanduser(opts) try: ! _cd(opts) except OSError, msg: app.printErr(msg) --- 62,66 ---- os.path.expanduser(opts) try: ! _cd(app,opts) except OSError, msg: app.printErr(msg) *************** *** 159,164 **** _runCvsCmd(context, 'add', rootDir=rootDir, args=utils.list2string(filenames)) except CvsError: pass - try: os.chdir(oldDir) - except OSError, msg: app.printErr(msg) def commit(name, args, context): --- 159,162 ---- *************** *** 178,190 **** (rootDir, filenames) = _applyOnEntryList(args, context, __doIt) if filenames: - try: oldDir = os.chdir(rootDir) - except OSError,msg: - app.printErr("Could not change to the root directory of the current listing: %s" % str(msg)) - return try: _runCvsCmd(context, 'commit', rootDir=rootDir, args=utils.list2string(filenames), fork=1) except CvsError: pass - try: os.chdir(oldDir) - except OSError, msg: app.printErr(msg) def remove(name, args, context): --- 176,182 ---- *************** *** 323,327 **** if rootDir is not None: try: ! oldDir = os.chdir(rootDir) except OSError,msg: app.printErr("Could not change to the root directory of the current listing: %s" % str(msg)) --- 315,319 ---- if rootDir is not None: try: ! oldDir = _cd(app,rootDir) except OSError,msg: app.printErr("Could not change to the root directory of the current listing: %s" % str(msg)) *************** *** 356,360 **** if oldDir is not None: try: ! os.chdir(oldDir) except OSError,msg: app.printErr(msg) --- 348,352 ---- if oldDir is not None: try: ! _cd(app,oldDir) except OSError,msg: app.printErr(msg) *************** *** 429,435 **** ############################## ! def _cd(dir): """Changes the current working directory. Returns the old directory.""" oldDir = os.getcwd() os.chdir(dir) return oldDir --- 421,428 ---- ############################## ! def _cd(app, dir): """Changes the current working directory. Returns the old directory.""" oldDir = os.getcwd() + app.printVMsg('cd ' + dir) os.chdir(dir) return oldDir |