Update of /cvsroot/cvsshell/cvsshell/src
In directory usw-pr-cvs1:/tmp/cvs-serv6183/src
Modified Files:
cvs_shell.py
Log Message:
ids in the listing can now be used for arbitrary shell cmds
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** cvs_shell.py 15 Mar 2002 10:44:13 -0000 1.21
--- cvs_shell.py 15 Mar 2002 17:35:21 -0000 1.22
***************
*** 144,152 ****
! def execShellCmd(self, name, opts):
! if name == 'cvs' and self.cvsChangeCmdRE.search(opts):
# command may change the status
self.setDirtyListing(1)
! self.shell('%s %s' % (name, opts))
--- 144,174 ----
! def execShellCmd(self, name, args):
! if name == 'cvs' and self.cvsChangeCmdRE.search(args):
# command may change the status
self.setDirtyListing(1)
! # pare args as the could specify ids in the listing
! def __doIt(e, filename):
! return filename
! try:
! # ids only
! l = self.applyOnEntryList(args, __doIt)
! args = string.join(l)
! self.setDirtyListing(1)
! except utils.ParseError:
! # maybe ids mixed with other options (the ids are then enclosed in [[ ... ]]
! beg = args.find('[[')
! end = args.find(']]')
! if beg > 0 and end > beg:
! pre = args[:beg]
! post = args[end+2:]
! ids = args[beg+2 : end]
! try:
! l = self.applyOnEntryList(ids, __doIt)
! args = pre + string.join(l) + post
! self.setDirtyListing(1)
! except utilsParseError: pass
! except AppError, msg: pass
! self.shell('%s %s' % (name, args))
|