cvsshell-devel Mailing List for CvsShell (Page 2)
Status: Beta
Brought to you by:
stefanheimann
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
(82) |
Apr
|
May
(14) |
Jun
(3) |
Jul
(27) |
Aug
(18) |
Sep
(10) |
Oct
(1) |
Nov
(8) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(63) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
| 2004 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Stefan H. <ste...@us...> - 2003-04-21 20:08:57
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv10619/src
Modified Files:
cvs_cmds.py utils.py
Log Message:
implemented log command
Index: cvs_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_cmds.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** cvs_cmds.py 21 Apr 2003 08:02:26 -0000 1.23
--- cvs_cmds.py 21 Apr 2003 20:08:51 -0000 1.24
***************
*** 788,792 ****
app.printErr(msg)
return
- print opts, rest
try:
filenames = ' '.join(app.applyOnEntryList(rest, lambda e, fname: fname))
--- 788,791 ----
***************
*** 799,802 ****
--- 798,823 ----
try:
app.more(app.runCvsCmd('diff', globOpts=globOpts, args=args))
+ except CvsError:
+ return
+
+ def log(app, name, args):
+ try:
+ (globOpts, opts,
+ myOpts, rest) = app.parseArgs(args,
+ app.getCmdToAllowedOpts().get(name, ''))
+ except getopt.GetoptError, msg:
+ app.printErr(msg)
+ return
+ opts = utils.mergeOptionAndArg(opts, 'rw')
+ try:
+ filenames = ' '.join(app.applyOnEntryList(rest, lambda e, fname: fname))
+ except utils.ParseError: # args do not spefiy ids in the current listing
+ filenames = rest
+ except AppError, msg:
+ app.printErr(msg)
+ return
+ args = opts + ' ' + filenames
+ try:
+ app.more(app.runCvsCmd('log', globOpts=globOpts, args=args))
except CvsError:
return
Index: utils.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/utils.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** utils.py 15 Apr 2003 13:40:10 -0000 1.16
--- utils.py 21 Apr 2003 20:08:52 -0000 1.17
***************
*** 184,188 ****
notEnclosed.append(current)
return (notEnclosed, enclosed)
!
##############################
--- 184,227 ----
notEnclosed.append(current)
return (notEnclosed, enclosed)
!
!
! def mergeOptionAndArg(opts, optsToMerge):
! """
!
! Some CVS options require the name of the option and the argument
! not to be separated by whitespace. This function takes an option
! string ('opts') and a string containing the names of the options
! ('optsToMerge') which should not be separated from their
! arguments. It returns the option string with whitespaces deleted
! between the options specified and their arguments.
!
! Example:
!
! mergeOptionAndArg('-r 1.2 -f xxx.py -D 2003-04-02', 'rD')
! =>
! '-r1.2 -f xxx.py -D2003-04-02'
!
! """
! res = ''
! i = 0
! l = opts.split()
! n = len(l)
! while 1:
! if i == n: break
! o = l[i]
! if len(o) == 2 and o[0] == '-' and optsToMerge.find(o[1]) >= 0:
! res += o
! i += 1
! if i < n and not l[i].startswith('-'):
! res += l[i]
! else:
! i -= 1
! else:
! res += o
! res += ' '
! i += 1
! return res.strip()
!
!
##############################
***************
*** 261,263 ****
--- 300,322 ----
self.assertEqual(split('\`foo\` `bar \`foo\`` steven', '`'),
(['`foo` ', None, ' steven'], ['bar `foo`']))
+
+
+ class MergeOptionAndArgTestCase(unittest.TestCase):
+ def setUp(self):
+ self.opts = '-r 1.2 -f xxx.py -D 2003-04-02'
+ def tearDown(self):
+ pass
+ def testEmpty(self):
+ self.assertEqual(mergeOptionAndArg('', ''), '')
+ self.assertEqual(mergeOptionAndArg('', string.lowercase), '')
+ self.assertEqual(mergeOptionAndArg(self.opts, ''), self.opts)
+ def testNoMatch(self):
+ self.assertEqual(mergeOptionAndArg(self.opts, 'abcXZk'), self.opts)
+ def testMatch(self):
+ self.assertEqual(mergeOptionAndArg(self.opts, 'rD'), '-r1.2 -f xxx.py -D2003-04-02')
+ def testNoArg(self):
+ s = '-r -D 2003-04-02'
+ self.assertEqual(mergeOptionAndArg(s, 'rD'), '-r -D2003-04-02')
+
+
unittest.main()
|
|
From: Stefan H. <ste...@us...> - 2003-04-21 20:08:57
|
Update of /cvsroot/cvsshell/cvsshell/etc
In directory sc8-pr-cvs1:/tmp/cvs-serv10619/etc
Modified Files:
cvsshell.ini
Log Message:
implemented log command
Index: cvsshell.ini
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/etc/cvsshell.ini,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** cvsshell.ini 21 Apr 2003 08:02:24 -0000 1.16
--- cvsshell.ini 21 Apr 2003 20:08:50 -0000 1.17
***************
*** 25,28 ****
--- 25,29 ----
show-unmodified = basic_cmds.showUnmodified
diff = cvs_cmds.diff
+ log = cvs_cmds.log
end
***************
*** 36,39 ****
--- 37,41 ----
st, stat, status = lrv
diff = r:r:D:D:lNR
+ log = bd:hNr:Rs:tw:r
end
|
|
From: Stefan H. <ste...@us...> - 2003-04-21 17:58:14
|
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:
|
|
From: Stefan H. <ste...@us...> - 2003-04-21 08:02:58
|
Update of /cvsroot/cvsshell/cvsshell/etc
In directory sc8-pr-cvs1:/tmp/cvs-serv1295/etc
Modified Files:
cvsshell.ini
Log Message:
* improved diff command
* improved documentation
Index: cvsshell.ini
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/etc/cvsshell.ini,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** cvsshell.ini 20 Apr 2003 20:52:04 -0000 1.15
--- cvsshell.ini 21 Apr 2003 08:02:24 -0000 1.16
***************
*** 35,39 ****
co, get, checkout = Acsd:ND:r:fj:k:lRnpP
st, stat, status = lrv
! diff = D:D:lNR
end
--- 35,39 ----
co, get, checkout = Acsd:ND:r:fj:k:lRnpP
st, stat, status = lrv
! diff = r:r:D:D:lNR
end
|
|
From: Stefan H. <ste...@us...> - 2003-04-21 08:02:31
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv1295/src
Modified Files:
basic_cmds.py cvs_cmds.py cvs_shell.py
Log Message:
* improved diff command
* improved documentation
Index: basic_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** basic_cmds.py 20 Apr 2003 21:35:26 -0000 1.28
--- basic_cmds.py 21 Apr 2003 08:02:24 -0000 1.29
***************
*** 28,31 ****
--- 28,63 ----
#####################################
+ _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
+ commands. If the IDs are the only arguments to the command you can
+ use them directly. If the IDs should be embedded into other command
+ options, you should enclose them with `[[' and `]]'.
+
+ Examples:
+
+ rm -f [[1,2]]
+ remove the files with ID 1 and 2
+
+ vim 12
+ edit the file with ID 12 using vim
+
+ More information on the format of the ID-string is available by typing
+ `help list'.
+
+ To use the result of a shell command as an argument to a cvsshell
+ command you have to quote the shell command using the backquote
+ character.
+
+ Example:
+
+ commit `find . -name '*.py'`
+ commits all .py files
+ """
+
def cmdHelp(app, name, opts):
"""Print this help message.
***************
*** 38,42 ****
try:
cmd = so[0]
! doc = app.cmdToDoc[cmd]
help = doc.strip() + '\n'
app.more(help)
--- 70,77 ----
try:
cmd = so[0]
! if cmd == 'shell':
! doc = _helpShell
! else:
! doc = app.cmdToDoc[cmd]
help = doc.strip() + '\n'
app.more(help)
***************
*** 61,78 ****
help += "%s%s %s\n" % (name,space,doc)
help += """
! All commands not listed here are passed to the underlying shell. You
! can also use IDs from the current listing as arguments to these
! commands. If the IDs should be embedded into other command options,
! you can enclose them with `[[' and `]]'.
!
! Example:
! rm -f [[1,2]]
! removes the files with ID 1 and 2
!
! More information on the format of the ID-string is available by typing
`help list'.
! You can get more help for a specific command by typing `help
! <name-of-command>'.
"""
app.more(help)
--- 96,108 ----
help += "%s%s %s\n" % (name,space,doc)
help += """
! Many commands accepts IDs from the current listing as arguments. More
! information on the format of the ID-string is available by typing
`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>'.
"""
app.more(help)
Index: cvs_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_cmds.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** cvs_cmds.py 20 Apr 2003 21:35:27 -0000 1.22
--- cvs_cmds.py 21 Apr 2003 08:02:26 -0000 1.23
***************
*** 38,42 ****
If you want to display the status only for certain files, you can
specify these files as arguments to the `status' command (either via
! filenames of ids in the listing).
"""
import stat
--- 38,42 ----
If you want to display the status only for certain files, you can
specify these files as arguments to the `status' command (either via
! filenames of IDs in the listing).
"""
import stat
***************
*** 60,63 ****
--- 60,66 ----
# args do not spefiy ids in the current listing
except utils.ParseError: pass
+ except AppError, msg:
+ app.printErr(msg)
+ return
try:
lines = app.runCvsCmd('status', globOpts=globOpts, args=opts+' '+rest, getStderr=1)
***************
*** 117,122 ****
If you want to update only some files, you can specify these files as
! arguments to the `update' command (either via filenames of ids in the
! listing).
For every file a letter denoting its status is displayed (the
--- 120,127 ----
If you want to update only some files, you can specify these files as
! arguments to the `update' command (either via filenames or an
! ID-string). More information on the format of the ID-string is
! available by typing `help list'.
!
For every file a letter denoting its status is displayed (the
***************
*** 498,502 ****
You must specify the file to rename (the `source file') and the new
name of the file (the `target file'). The source file can be a
! filename or an id in the listing. The filename of the target file may
include the special variable $OLD_DIR. This variable is replaced by
the directory the source file resides in.
--- 503,507 ----
You must specify the file to rename (the `source file') and the new
name of the file (the `target file'). The source file can be a
! filename or an ID in the listing. The filename of the target file may
include the special variable $OLD_DIR. This variable is replaced by
the directory the source file resides in.
***************
*** 597,601 ****
Example:
! 3, 4, 7-10, !8, 12-19, !13-18
selects the files with the ids 3, 4, 7, 9, 10, 12, 19
--- 602,607 ----
Example:
!
! 3, 4, 7-10, !8, 12-19, !13-18
selects the files with the ids 3, 4, 7, 9, 10, 12, 19
***************
*** 669,673 ****
* the revision to replace the file with
! * the file to replace
"""
try:
--- 675,679 ----
* the revision to replace the file with
! * the file to replace (a filename or an ID in the listing)
"""
try:
***************
*** 750,766 ****
"""Prints a diff of two revisions of a file.
! There are 4 ways of invoking the diff command:
! (1) diff <filename or id>
Prints a diff between the latest repository revion and the local version.
! (2) diff <revision> <filename or id>
Prints a diff between the given repository revision and the local version.
! (3) diff <revision 1> <revsion 2> <filename or id>
Prints a diff between the two given repository revisions.
!
! (4) diff
! Prompts you for all arguments needed.
"""
try:
--- 756,783 ----
"""Prints a diff of two revisions of a file.
! There are 3 ways of invoking the diff command:
! (1) diff <filenames or ID-string>
Prints a diff between the latest repository revion and the local version.
! (2) diff <revision> <filenames or ID-string>
Prints a diff between the given repository revision and the local version.
! (3) diff <revision> <revsion> <filenames or ID-string>
Prints a diff between the two given repository revisions.
!
! `<revion>' is a revision number or a date. In the latter case, the
! most recent revision no later than date is used. If `<revision>' is a
! revision number you must prepend the `-r' commandline option to the
! revision number, if it's a date you must use the `-D' option.
!
! More information on the format of the ID-string is available by typing
! `help list'.
!
! Example:
!
! diff -r 1.2 -D 2002-05-25 0
! Prints a diff of the file with ID 0 between revision 1.2 and the most
! recent revision no later than 2002-05-25.
"""
try:
***************
*** 771,816 ****
app.printErr(msg)
return
! rest = rest.split()
! rev1 = ''
! rev2 = ''
! fileOrId = ''
! n = len(rest)
! if n == 0:
! rev1 = app.prompt('Revision 1 of the file (leave blank if you want to compare the '\
! 'working\ndirectory version with the latest revision in the repository): ')
! if rev1 is None: return
! elif rev1 != '':
! rev2 = app.prompt('Revision 2 of the file (leave blank if you want to compare the '\
! 'working\ndirectory version with revision 1): ')
! if rev2 is None: return
! if rev1: rev1 = '-r ' + rev1
! if rev2: rev2 = ' -r ' + rev2
! fileOrId = app.prompt('Filename(s) or ID(s): ')
! if fileOrId is None: return
! elif n == 1:
! fileOrId = rest[0]
! elif n == 2:
! if os.path.exists(rest[0]):
! fileOrId = rest[0] + ' ' + rest[1]
! else:
! rev1 = '-r ' + rest[0]
! fileOrId = rest[1]
! else:
! if os.path.exists(rest[0]):
! fileOrId = ' '.join(rest)
! elif os.path.exists(rest[1]):
! rev1 = '-r ' + rest[0]
! fileOrId = ' '.join(rest[1:])
! else:
! rev1 = '-r ' + rest[0]
! rev2 = ' -r ' + rest[1]
! fileOrId = ' '.join(rest[2:])
try:
! filenames = ' '.join(app.applyOnEntryList(fileOrId, lambda e, fname: fname))
except utils.ParseError: # args do not spefiy ids in the current listing
! filenames = fileOrId
! args = opts + ' ' + rev1 + rev2 + ' ' + filenames
try:
app.more(app.runCvsCmd('diff', globOpts=globOpts, args=args))
except CvsError:
return
--- 788,803 ----
app.printErr(msg)
return
! print opts, rest
try:
! filenames = ' '.join(app.applyOnEntryList(rest, lambda e, fname: fname))
except utils.ParseError: # args do not spefiy ids in the current listing
! filenames = rest
! except AppError, msg:
! app.printErr(msg)
! return
! args = opts + ' ' + filenames
try:
app.more(app.runCvsCmd('diff', globOpts=globOpts, args=args))
except CvsError:
return
+
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** cvs_shell.py 20 Apr 2003 21:35:27 -0000 1.44
--- cvs_shell.py 21 Apr 2003 08:02:26 -0000 1.45
***************
*** 318,322 ****
# on windows, cvs seems to output all information on stdout
if getStderr and not self.onWindows: cmd += ' 2>&1'
! self.printVMsg(cmd)
if fork:
f = os.popen(cmd)
--- 318,322 ----
# on windows, cvs seems to output all information on stdout
if getStderr and not self.onWindows: cmd += ' 2>&1'
! if self.isVerbose(): self.printVMsg(' '.join(cmd.split()))
if fork:
f = os.popen(cmd)
|
|
From: Stefan H. <ste...@us...> - 2003-04-20 21:35:30
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv2864/src
Modified Files:
basic_cmds.py cvs_cmds.py cvs_shell.py
Log Message:
* updated documentation
Index: basic_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** basic_cmds.py 20 Apr 2003 20:52:38 -0000 1.27
--- basic_cmds.py 20 Apr 2003 21:35:26 -0000 1.28
***************
*** 30,35 ****
def cmdHelp(app, name, opts):
"""Print this help message.
! If the name of a command is given, a detailed help for this command
! is printed."""
so = string.split(opts)
if len(so) > 0:
--- 30,37 ----
def cmdHelp(app, name, opts):
"""Print this help message.
!
! If the name of a command is given, a detailed help for this command is
! printed.
! """
so = string.split(opts)
if len(so) > 0:
***************
*** 37,41 ****
cmd = so[0]
doc = app.cmdToDoc[cmd]
! help = doc
app.more(help)
return
--- 39,43 ----
cmd = so[0]
doc = app.cmdToDoc[cmd]
! help = doc.strip() + '\n'
app.more(help)
return
***************
*** 59,66 ****
help += "%s%s %s\n" % (name,space,doc)
help += """
! All commands not listed here are passed to the underlying shell.
! You can also use IDs from the current listing as arguments to these commands.
! If the IDs should be embedded into other command options, you can enclose
! them with `[[' and `]]'.
Example:
--- 61,68 ----
help += "%s%s %s\n" % (name,space,doc)
help += """
! All commands not listed here are passed to the underlying shell. You
! can also use IDs from the current listing as arguments to these
! commands. If the IDs should be embedded into other command options,
! you can enclose them with `[[' and `]]'.
Example:
***************
*** 71,76 ****
`help list'.
! You can get more help for a specific command by typing
! `help <name-of-command>'."""
app.more(help)
--- 73,79 ----
`help list'.
! You can get more help for a specific command by typing `help
! <name-of-command>'.
! """
app.more(help)
***************
*** 115,121 ****
def setAutoRefresh(app, name, args):
"""Enable or disable automatic refresh of the local listing.
! If this option is set to `on', the local listing is refreshed
! after a command that changed some information on the CVS server but not
! in the local listing."""
app.autoRefresh = app.toggle(app.autoRefresh, args)
--- 118,126 ----
def setAutoRefresh(app, name, args):
"""Enable or disable automatic refresh of the local listing.
!
! If this option is set to `on', the local listing is refreshed after a
! command that changed some information on the CVS server but not in the
! local listing.
! """
app.autoRefresh = app.toggle(app.autoRefresh, args)
***************
*** 123,128 ****
def showUnmodified(app, name, args):
"""Specifies if unmodified files are included in the listing.
! If this option is set to `on', unmodified files are included in the listing.
! Otherwise, unmodified files are hidden."""
oldVal = app.showUnmodified
app.showUnmodified = app.toggle(oldVal, args)
--- 128,135 ----
def showUnmodified(app, name, args):
"""Specifies if unmodified files are included in the listing.
!
! If this option is set to `on', unmodified files are included in the
! listing. Otherwise, unmodified files are hidden.
! """
oldVal = app.showUnmodified
app.showUnmodified = app.toggle(oldVal, args)
***************
*** 134,147 ****
"""Refresh the current listing.
! The command scans the given directory and creates a listing based on the
! information contained in the file CVS/Entries. If no directory is given,
! the current working directory is assumed. You can use the `-r' option
! to apply the command recursivly to all subdirectories.
Note: The 'refresh' command works only on local files. This means that
changes committed to the respository after the last synchronization of
! your local working copy are not seen in the listing produced by 'refresh'.
! The abbreviation `rd' means `repository date', `wd' means `working date'."""
from time import strftime, localtime
def isCvsInfoDir(path):
--- 141,157 ----
"""Refresh the current listing.
! The command scans the given directory and creates a listing based on
! the information contained in the file CVS/Entries. If no directory is
! given, the current working directory is assumed. You can use the `-r'
! option to apply the command recursivly to all subdirectories.
Note: The 'refresh' command works only on local files. This means that
changes committed to the respository after the last synchronization of
! your local working copy are not seen in the listing produced by
! 'refresh'.
! The abbreviation `rd' means `repository date', `wd' means `working
! date'.
! """
from time import strftime, localtime
def isCvsInfoDir(path):
Index: cvs_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_cmds.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** cvs_cmds.py 20 Apr 2003 20:52:04 -0000 1.21
--- cvs_cmds.py 20 Apr 2003 21:35:27 -0000 1.22
***************
*** 31,40 ****
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 abbreviation `rr' stands for `repository revision',
! `wr' means `working revision'.
! The listing can be filtered by setting the variable
! `filter' in the CONFIG section of ~/.cvsshellrc."""
import stat
from time import gmtime,strftime
--- 31,43 ----
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 abbreviation `rr' stands for `repository revision', `wr'
! means `working revision'.
! If you want to display the status only for certain files, you can
! specify these files as arguments to the `status' command (either via
! filenames of ids in the listing).
! """
import stat
from time import gmtime,strftime
***************
*** 51,59 ****
app.printErr(msg)
return
! try:
! l = app.applyOnEntryList(rest, lambda e, name: (e, name))
! rest = ' '.join(map(lambda t: t[1], l))
! # args do not spefiy ids in the current listing
! except utils.ParseError: pass
try:
lines = app.runCvsCmd('status', globOpts=globOpts, args=opts+' '+rest, getStderr=1)
--- 54,63 ----
app.printErr(msg)
return
! if rest:
! try:
! l = app.applyOnEntryList(rest, lambda e, name: (e, name))
! rest = ' '.join(map(lambda t: t[1], l))
! # args do not spefiy ids in the current listing
! except utils.ParseError: pass
try:
lines = app.runCvsCmd('status', globOpts=globOpts, args=opts+' '+rest, getStderr=1)
***************
*** 103,111 ****
def update(app, name, args, 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."""
try:
(globOpts, opts,
--- 107,163 ----
+ _updateStatusCodes = ['U', 'P', 'A', 'R', 'M', 'C', '?']
+
def update(app, name, args, 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.
!
! If you want to update only some files, you can specify these files as
! arguments to the `update' command (either via filenames of ids in the
! listing).
!
! For every file a letter denoting its status is displayed (the
! description are taken from the CVS manual, see
! http://www.cvshome.org/docs/manual/):
!
! U: The file was brought up to date with respect to the repository.
! This is done for any file that exists in the repository but not in
! your source, and for files that you haven't changed but are not the
! most recent versions available in the repository.
!
! P: Like `U', but the CVS server sends a patch instead of an entire
! file. This accomplishes the same thing as `U' using less bandwidth.
!
! A: The file has been added to your private copy of the sources, and
! will be added to the source repository when you run commit on the
! file. This is a reminder to you that the file needs to be
! committed.
!
! R: The file has been removed from your private copy of the sources,
! and will be removed from the source repository when you run commit
! on the file. This is a reminder to you that the file needs to be
! committed.
!
! M: The file is modified in your working directory. `M' can indicate
! one of two states for a file you're working on: either there were
! no modifications to the same file in the repository, so that your
! file remains as you last saw it; or there were modifications in the
! repository as well as in your copy, but they were merged
! successfully, without conflict, in your working directory.
!
! C: A conflict was detected while trying to merge your changes to file
! with changes from the source repository. The copy in your working
! directory is now the result of attempting to merge the two
! revisions; an unmodified copy of your file is also in your working
! directory, with the name `.#file.revision' where revision is the
! revision that your modified file started from.
!
! ?: The file is in your working directory, but does not correspond to
! anything in the source repository, and is not in the list of files
! for CVS to ignore.
! """
try:
(globOpts, opts,
***************
*** 133,136 ****
--- 185,189 ----
if len(x) < 2 or x[0] == 'cvs': continue
status = x[0]
+ if status not in _updateStatusCodes: continue
name = os.path.basename(x[1])
dir = os.path.dirname(x[1])
***************
*** 156,161 ****
def simulateUpdate(app, name, args):
"""Refresh the current listing by simulating an update.
! This command runs update without really downloading the
! changes. See `help update' for details."""
update(app, name, args, simulate=1)
--- 209,216 ----
def simulateUpdate(app, name, args):
"""Refresh the current listing by simulating an update.
!
! This command runs update without really downloading the changes. See
! `help update' for details.
! """
update(app, name, args, simulate=1)
***************
*** 163,173 ****
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 if needed."""
try:
(globOpts, opts,
--- 218,232 ----
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 if
! needed.
! """
try:
(globOpts, opts,
***************
*** 206,216 ****
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.
* an ID-string
More information on the format of the ID-string is available by typing
`help list'.
! You can invoke the command without any arguments as it prompts
! you if needed."""
try:
(globOpts, opts,
--- 265,280 ----
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.
* an ID-string
+
More information on the format of the ID-string is available by typing
`help list'.
!
! You can invoke the command without any arguments as it prompts you if
! needed.
! """
try:
(globOpts, opts,
***************
*** 276,280 ****
def addBinary(app, name, args):
"""Add a new binary file to the repository.
! See the help section of the add command for more information."""
app.printMsg('The file will be added in binary mode.')
add(app, name, args, isBinary=1)
--- 340,346 ----
def addBinary(app, name, args):
"""Add a new binary file to the repository.
!
! See the help section of the add command for more information.
! """
app.printMsg('The file will be added in binary mode.')
add(app, name, args, isBinary=1)
***************
*** 283,293 ****
def commit(app, name, args):
"""Check files into the repository.
! This command accepts three kind of arguments which cannot be intermixed:
* list of files/directories.
* an ID-string
! * an empty argument list: All modified file in the current directory and all
! it's subdirectories are commited.
More information on the format of the ID-string is available by typing
! `help list'."""
try:
(globOpts, opts,
--- 349,364 ----
def commit(app, name, args):
"""Check files into the repository.
!
! This command accepts three kind of arguments which cannot be
! intermixed:
!
* list of files/directories.
* an ID-string
! * an empty argument list: All modified file in the current directory
! and all it's subdirectories are commited.
!
More information on the format of the ID-string is available by typing
! `help list'.
! """
try:
(globOpts, opts,
***************
*** 343,353 ****
def remove(app, name, args):
"""Remove an entry (some entries) from the repository.
This command accepts two kind of arguments which cannot be intermixed:
* list of files/directories.
* an ID-string
More information on the format of the ID-string is available by typing
`help list'.
! You can invoke the command without any arguments as it prompts
! you if needed."""
try:
(globOpts, opts,
--- 414,429 ----
def remove(app, name, args):
"""Remove an entry (some entries) from the repository.
+
This command accepts two kind of arguments which cannot be intermixed:
+
* list of files/directories.
* an ID-string
+
More information on the format of the ID-string is available by typing
`help list'.
!
! You can invoke the command without any arguments as it prompts you if
! needed.
! """
try:
(globOpts, opts,
***************
*** 419,429 ****
def rename(app, name, args):
"""Renames a file in the repository.
! You must specify the file to rename (the `source file') and the new name of
! the file (the `target file'). The source file can be a filename or an id in
! the listing. The filename of the target file may include the special variable
! $OLD_DIR. This variable is replaced by the directory the source file resides
! in.
! You can invoke the command without any arguments as it prompts
! you if needed."""
specialVar = '$OLD_DIR'
srcText = 'enter filenumber/filename to rename: '
--- 495,508 ----
def rename(app, name, args):
"""Renames a file in the repository.
!
! You must specify the file to rename (the `source file') and the new
! name of the file (the `target file'). The source file can be a
! filename or an id in the listing. The filename of the target file may
! include the special variable $OLD_DIR. This variable is replaced by
! the directory the source file resides in.
!
! You can invoke the command without any arguments as it prompts you if
! needed.
! """
specialVar = '$OLD_DIR'
srcText = 'enter filenumber/filename to rename: '
***************
*** 502,516 ****
def printListing(app, name, args):
"""Print out the current listing.
The numbers on the left side of the listing are the IDs of the files.
! Many commands accept an ID-string, that is string that specifies some IDs.
! These IDs are replaced by the corresponding filenames.
The ID-string 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-string is evaluated from left to right.
Example:
--- 581,598 ----
def printListing(app, name, args):
"""Print out the current listing.
+
The numbers on the left side of the listing are the IDs of the files.
! Many commands accept an ID-string, that is string that specifies some
! IDs. These IDs are replaced by the corresponding filenames.
The ID-string 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-string is evaluated
! from left to right.
Example:
***************
*** 518,527 ****
selects the files with the ids 3, 4, 7, 9, 10, 12, 19
! The listing can be filtered by setting the variable
! `filter' in the CONFIG section of ~/.cvsshellrc. If the listing
! was produced by a cvs command like ``update'', the CVS filtering rules
! apply. If the listing was produced by a non-CVS command (for example
! with the builtin ``refresh'' command), only the filters in $CVSIGNORE,
! ~/.cvsignore and ./.cvsignore are considered."""
app.printListing()
--- 600,610 ----
selects the files with the ids 3, 4, 7, 9, 10, 12, 19
! The listing can be filtered by setting the variable `filter' in the
! CONFIG section of ~/.cvsshellrc. If the listing was produced by a cvs
! command like ``update'', the CVS filtering rules apply. If the listing
! was produced by a non-CVS command (for example with the builtin
! ``refresh'' command), only the filters in $CVSIGNORE, ~/.cvsignore and
! ./.cvsignore are considered.
! """
app.printListing()
***************
*** 569,575 ****
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
! option to a new value with `on' or `off' as argument."""
app.cvsRootAutoUpdate = app.toggle(app.cvsRootAutoUpdate, args)
if app.cvsRootAutoUpdate:
--- 652,661 ----
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 option to a new value with `on' or `off' as
! argument.
! """
app.cvsRootAutoUpdate = app.toggle(app.cvsRootAutoUpdate, args)
if app.cvsRootAutoUpdate:
***************
*** 580,587 ****
"""Replaces a file with a given revision.
! replace rev file
! rev : the revision to replace the file with
! file: the file to replace"""
try:
(globOpts, opts,
--- 666,674 ----
"""Replaces a file with a given revision.
! This command takes two arguments:
! * the revision to replace the file with
! * the file to replace
! """
try:
(globOpts, opts,
***************
*** 624,629 ****
def login(app, name, args):
"""Log in to a remote repository.
Normally, it's not necessary to use this command explicitely because
! cvsshell logs in automatically when needed."""
try:
(globOpts, opts,
--- 711,718 ----
def login(app, name, args):
"""Log in to a remote repository.
+
Normally, it's not necessary to use this command explicitely because
! cvsshell logs in automatically when needed.
! """
try:
(globOpts, opts,
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** cvs_shell.py 20 Apr 2003 20:54:38 -0000 1.43
--- cvs_shell.py 20 Apr 2003 21:35:27 -0000 1.44
***************
*** 257,268 ****
! def more(self, lines=None, s=None, numlines=22):
! if lines is not None:
s = string.join(lines, '')
- elif s is not None:
- lines = s.split('\n')
else:
! raise AppError, \
! "Illegal argument: One of lines or s must be given"
if len(lines) <= numlines or not self.configMap.has_key('pager') or self.batchMode:
self.printMsg(s, nonl=1)
--- 257,267 ----
! def more(self, lines, numlines=22):
! from types import ListType
! if type(lines) == ListType:
s = string.join(lines, '')
else:
! s = lines
! lines = s.split('\n')
if len(lines) <= numlines or not self.configMap.has_key('pager') or self.batchMode:
self.printMsg(s, nonl=1)
|
|
From: SourceForge.net <no...@so...> - 2003-04-20 20:59:39
|
Bugs item #724296, was opened at 2003-04-19 19:54 Message generated for change (Comment added) made by stefanheimann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=724296&group_id=48175 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: diff command is missing Initial Comment: diff command is missing ---------------------------------------------------------------------- >Comment By: Stefan Heimann (stefanheimann) Date: 2003-04-20 22:59 Message: Logged In: YES user_id=327401 fixed in 0.5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=724296&group_id=48175 |
|
From: Stefan H. <ste...@us...> - 2003-04-20 20:54:42
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv23205/src
Modified Files:
cvs_shell.py
Log Message:
the status of 'show-unmodified' is now displayed in the prompt
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** cvs_shell.py 20 Apr 2003 20:52:05 -0000 1.42
--- cvs_shell.py 20 Apr 2003 20:54:38 -0000 1.43
***************
*** 137,140 ****
--- 137,142 ----
if self.autoRefresh: status += 'r'
else: status += 'R'
+ if self.showUnmodified: status += 'u'
+ else: status += 'U'
root = self.getCvsRoot() or '--'
try:
|
|
From: Stefan H. <ste...@us...> - 2003-04-20 20:52:41
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv22684/src
Modified Files:
basic_cmds.py
Log Message:
improved doc of refresh command
Index: basic_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** basic_cmds.py 19 Apr 2003 18:07:12 -0000 1.26
--- basic_cmds.py 20 Apr 2003 20:52:38 -0000 1.27
***************
*** 133,140 ****
--- 133,145 ----
def refresh(app, name, args):
"""Refresh the current listing.
+
The command scans the given directory and creates a listing based on the
information contained in the file CVS/Entries. If no directory is given,
the current working directory is assumed. You can use the `-r' option
to apply the command recursivly to all subdirectories.
+
+ Note: The 'refresh' command works only on local files. This means that
+ changes committed to the respository after the last synchronization of
+ your local working copy are not seen in the listing produced by 'refresh'.
The abbreviation `rd' means `repository date', `wd' means `working date'."""
|
|
From: Stefan H. <ste...@us...> - 2003-04-20 20:52:11
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv22538/src
Modified Files:
cvs_cmds.py cvs_shell.py
Log Message:
implemented diff command
Index: cvs_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_cmds.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** cvs_cmds.py 19 Apr 2003 18:19:10 -0000 1.20
--- cvs_cmds.py 20 Apr 2003 20:52:04 -0000 1.21
***************
*** 675,681 ****
Prompts you for all arguments needed.
"""
! print 'Not yet implemented'
! # try:
! # (globOpts, opts,
! # myOpts, rest) = app.parseArgs(args,
! # app.getCmdToAllowedOpts().get(name, ''))
--- 675,727 ----
Prompts you for all arguments needed.
"""
! try:
! (globOpts, opts,
! myOpts, rest) = app.parseArgs(args,
! app.getCmdToAllowedOpts().get(name, ''))
! except getopt.GetoptError, msg:
! app.printErr(msg)
! return
! rest = rest.split()
! rev1 = ''
! rev2 = ''
! fileOrId = ''
! n = len(rest)
! if n == 0:
! rev1 = app.prompt('Revision 1 of the file (leave blank if you want to compare the '\
! 'working\ndirectory version with the latest revision in the repository): ')
! if rev1 is None: return
! elif rev1 != '':
! rev2 = app.prompt('Revision 2 of the file (leave blank if you want to compare the '\
! 'working\ndirectory version with revision 1): ')
! if rev2 is None: return
! if rev1: rev1 = '-r ' + rev1
! if rev2: rev2 = ' -r ' + rev2
! fileOrId = app.prompt('Filename(s) or ID(s): ')
! if fileOrId is None: return
! elif n == 1:
! fileOrId = rest[0]
! elif n == 2:
! if os.path.exists(rest[0]):
! fileOrId = rest[0] + ' ' + rest[1]
! else:
! rev1 = '-r ' + rest[0]
! fileOrId = rest[1]
! else:
! if os.path.exists(rest[0]):
! fileOrId = ' '.join(rest)
! elif os.path.exists(rest[1]):
! rev1 = '-r ' + rest[0]
! fileOrId = ' '.join(rest[1:])
! else:
! rev1 = '-r ' + rest[0]
! rev2 = ' -r ' + rest[1]
! fileOrId = ' '.join(rest[2:])
! try:
! filenames = ' '.join(app.applyOnEntryList(fileOrId, lambda e, fname: fname))
! except utils.ParseError: # args do not spefiy ids in the current listing
! filenames = fileOrId
! args = opts + ' ' + rev1 + rev2 + ' ' + filenames
! try:
! app.more(app.runCvsCmd('diff', globOpts=globOpts, args=args))
! except CvsError:
! return
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** cvs_shell.py 19 Apr 2003 18:20:27 -0000 1.41
--- cvs_shell.py 20 Apr 2003 20:52:05 -0000 1.42
***************
*** 292,295 ****
--- 292,298 ----
override the default global options
* args are the arguments that should be passed to the cvs command
+ * fork: if fork == 1, a the output of the command is read and returned
+ to the caller, otherwise the command is executed using os.system.
+ Note: the name of the parameter is not well choosen.
"""
***************
*** 320,332 ****
lines = f.readlines()
except KeyboardInterrupt:
! raise CvsError
! if f.close() is not None: # cvs command caused an error
! raise CvsError
! else:
! return lines
else:
r = os.system(cmd)
if r != 0:
! raise CvsError
if oldDir is not None:
try:
--- 323,333 ----
lines = f.readlines()
except KeyboardInterrupt:
! raise CvsError, "Keyboard interrupt"
! f.close()
! return lines
else:
r = os.system(cmd)
if r != 0:
! raise CvsError, "exit code != 0"
if oldDir is not None:
try:
|
|
From: Stefan H. <ste...@us...> - 2003-04-20 20:52:11
|
Update of /cvsroot/cvsshell/cvsshell/etc
In directory sc8-pr-cvs1:/tmp/cvs-serv22538/etc
Modified Files:
cvsshell.ini
Log Message:
implemented diff command
Index: cvsshell.ini
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/etc/cvsshell.ini,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** cvsshell.ini 15 Apr 2003 13:40:08 -0000 1.14
--- cvsshell.ini 20 Apr 2003 20:52:04 -0000 1.15
***************
*** 24,27 ****
--- 24,28 ----
refresh = basic_cmds.refresh
show-unmodified = basic_cmds.showUnmodified
+ diff = cvs_cmds.diff
end
***************
*** 34,37 ****
--- 35,39 ----
co, get, checkout = Acsd:ND:r:fj:k:lRnpP
st, stat, status = lrv
+ diff = D:D:lNR
end
|
|
From: Stefan H. <ste...@us...> - 2003-04-19 18:20:31
|
Update of /cvsroot/cvsshell/cvsshell/src In directory sc8-pr-cvs1:/tmp/cvs-serv17564 Modified Files: cvs_shell.py Log Message: changed version to 0.5 beta 1 Index: cvs_shell.py =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** cvs_shell.py 19 Apr 2003 18:08:19 -0000 1.40 --- cvs_shell.py 19 Apr 2003 18:20:27 -0000 1.41 *************** *** 36,40 **** from plugable_app import PlugableApp ! VERSION = '0.5.0rc4' NAME ='CvsShell' COPYRIGHT = 'Copyright 2002, 2003 Stefan Heimann (ma...@st...).\n' \ --- 36,40 ---- from plugable_app import PlugableApp ! VERSION = '0.5 beta 1' NAME ='CvsShell' COPYRIGHT = 'Copyright 2002, 2003 Stefan Heimann (ma...@st...).\n' \ |
|
From: Stefan H. <ste...@us...> - 2003-04-19 18:19:15
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv17151/src
Modified Files:
cvs_cmds.py
Log Message:
started with diff command
Index: cvs_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_cmds.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** cvs_cmds.py 15 Apr 2003 13:40:10 -0000 1.19
--- cvs_cmds.py 19 Apr 2003 18:19:10 -0000 1.20
***************
*** 656,657 ****
--- 656,681 ----
app.runCvsCmd('logout', globOpts=globOpts, args=opts, checkLogin=0)
except CvsError: return
+
+
+ def diff(app, name, args):
+ """Prints a diff of two revisions of a file.
+
+ There are 4 ways of invoking the diff command:
+
+ (1) diff <filename or id>
+ Prints a diff between the latest repository revion and the local version.
+
+ (2) diff <revision> <filename or id>
+ Prints a diff between the given repository revision and the local version.
+
+ (3) diff <revision 1> <revsion 2> <filename or id>
+ Prints a diff between the two given repository revisions.
+
+ (4) diff
+ Prompts you for all arguments needed.
+ """
+ print 'Not yet implemented'
+ # try:
+ # (globOpts, opts,
+ # myOpts, rest) = app.parseArgs(args,
+ # app.getCmdToAllowedOpts().get(name, ''))
|
|
From: Stefan H. <ste...@us...> - 2003-04-19 18:08:22
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv13540/src
Modified Files:
cvs_shell.py
Log Message:
The listing is no longer marked dirty when some arbitrary shell command contains
ids from the listing
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** cvs_shell.py 16 Apr 2003 22:06:58 -0000 1.39
--- cvs_shell.py 19 Apr 2003 18:08:19 -0000 1.40
***************
*** 216,219 ****
--- 216,220 ----
def execShellCmd(self, name, args):
if name == 'cvs' and self.cvsChangeCmdRE.search(args):
+ print "May change"
# command may change the status
self.setDirtyListing(1)
***************
*** 224,228 ****
l = self.applyOnEntryList(args, doIt)
args = string.join(l)
- self.setDirtyListing(1)
except utils.ParseError: pass
except AppError, msg: pass
--- 225,228 ----
***************
*** 600,605 ****
def getEntry(self, filename):
for e in self.entries:
! if os.path.samefile(filename, os.path.join(e.dir, e.name)):
! return e
return None
--- 600,607 ----
def getEntry(self, filename):
for e in self.entries:
! try:
! if os.path.samefile(filename, os.path.join(e.dir, e.name)):
! return e
! except OSError: pass
return None
|
|
From: Stefan H. <ste...@us...> - 2003-04-19 18:07:15
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv13267/src
Modified Files:
basic_cmds.py
Log Message:
added expansion of '~' and support for '-' to the cd command
Index: basic_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** basic_cmds.py 15 Apr 2003 13:40:09 -0000 1.25
--- basic_cmds.py 19 Apr 2003 18:07:12 -0000 1.26
***************
*** 80,94 ****
return app.BREAK_REPL
!
def changeDir(app, name, opts):
"Change the current working directory."
if len(opts) == 0:
opts = app.HOME
else:
! os.path.expanduser(opts)
try:
app.cd(opts)
except OSError, msg:
app.printErr(msg)
if app.cvsRootAutoUpdate:
root = app.readCvsRootFromFile()
--- 80,107 ----
return app.BREAK_REPL
! _oldDir = None
def changeDir(app, name, opts):
"Change the current working directory."
+ global _oldDir
+ try:
+ cur = os.getcwd()
+ except OSError, msg:
+ app.printErr(msg)
+ cur = None
if len(opts) == 0:
opts = app.HOME
+ elif opts == '-':
+ if _oldDir is not None:
+ opts = _oldDir
+ else:
+ return
else:
! opts = os.path.expanduser(opts)
try:
app.cd(opts)
except OSError, msg:
app.printErr(msg)
+ return
+ _oldDir = cur
if app.cvsRootAutoUpdate:
root = app.readCvsRootFromFile()
|
|
From: Stefan H. <ste...@us...> - 2003-04-19 18:06:38
|
Update of /cvsroot/cvsshell/cvsshell/etc
In directory sc8-pr-cvs1:/tmp/cvs-serv13023/etc
Modified Files:
default-cvsshellrc
Log Message:
removed 'auto-refresh on' and 'refresh' from the list of init commands
Index: default-cvsshellrc
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/etc/default-cvsshellrc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** default-cvsshellrc 15 Apr 2003 13:40:09 -0000 1.13
--- default-cvsshellrc 19 Apr 2003 18:06:35 -0000 1.14
***************
*** 41,46 ****
section INIT_CMDS:
auto-root on
! auto-refresh on
! refresh
end
--- 41,47 ----
section INIT_CMDS:
auto-root on
!
! # uncomment the next line if the listing should be refreshed automatically
! # auto-refresh on
end
|
|
From: SourceForge.net <no...@so...> - 2003-04-19 17:56:11
|
Bugs item #724298, was opened at 2003-04-19 10:56 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=724298&group_id=48175 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: auto-refresh of listing Initial Comment: If the listing is refreshed automatically, the command that was used to build the listing should be used to refresh the listing. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=724298&group_id=48175 |
|
From: SourceForge.net <no...@so...> - 2003-04-19 17:55:18
|
Bugs item #724297, was opened at 2003-04-19 10:55 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=724297&group_id=48175 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: log command is missing Initial Comment: log command is missing ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=724297&group_id=48175 |
|
From: SourceForge.net <no...@so...> - 2003-04-19 17:54:40
|
Bugs item #724296, was opened at 2003-04-19 10:54 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=724296&group_id=48175 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: diff command is missing Initial Comment: diff command is missing ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=724296&group_id=48175 |
|
From: Stefan H. <ste...@us...> - 2003-04-16 22:07:01
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv21364/src
Modified Files:
cvs_shell.py
Log Message:
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** cvs_shell.py 15 Apr 2003 13:40:10 -0000 1.38
--- cvs_shell.py 16 Apr 2003 22:06:58 -0000 1.39
***************
*** 36,40 ****
from plugable_app import PlugableApp
! VERSION = '0.5.0rc3'
NAME ='CvsShell'
COPYRIGHT = 'Copyright 2002, 2003 Stefan Heimann (ma...@st...).\n' \
--- 36,40 ----
from plugable_app import PlugableApp
! VERSION = '0.5.0rc4'
NAME ='CvsShell'
COPYRIGHT = 'Copyright 2002, 2003 Stefan Heimann (ma...@st...).\n' \
***************
*** 497,503 ****
return ' -m ' + msg + ' '
! def getCvsIgnoreFilter(self, dirname):
! """Returns a filter that contains the patterns in the .cvsignore file of
! the given directory."""
def readFromFile(path):
l = []
--- 497,506 ----
return ' -m ' + msg + ' '
! def getCvsIgnoreFilter(self, dirname=None):
! """
! Returns a filter that contains the patterns in the ~/.cvsignore file, the
! $CVSIGNORE environment variable and the .cvsignore file found in directory
! dirname (this file is ignored if dirname is None).
! """
def readFromFile(path):
l = []
***************
*** 516,521 ****
# filter in ~/.cvsshellrc
filter.addPatterns(string.split(self.configMap.get('filter','')))
! # ./.cvsignore
! filter.addPatterns(readFromFile(os.path.join(dirname, '.cvsignore')))
# now we have all patterns. The CVS manual says:
# "a single exclamation mark (`!') clears the ignore list"
--- 519,525 ----
# filter in ~/.cvsshellrc
filter.addPatterns(string.split(self.configMap.get('filter','')))
! # ./.cvsignore
! if dirname is not None:
! filter.addPatterns(readFromFile(os.path.join(dirname, '.cvsignore')))
# now we have all patterns. The CVS manual says:
# "a single exclamation mark (`!') clears the ignore list"
***************
*** 568,572 ****
self.rootDir = rootDir
self.sortOrder = ['dir', 'status', 'name']
! self.entries = entries
def sortEntries(self):
--- 572,586 ----
self.rootDir = rootDir
self.sortOrder = ['dir', 'status', 'name']
! # .cvsignore filter
! filters = {}
! self.entries = []
! for e in entries:
! if filters.has_key(e.dir):
! filter = filters[e.dir]
! else:
! filter = app.getCvsIgnoreFilter(e.dir)
! filters[e.dir] = filter
! if not filter.filter(e.name):
! self.entries.append(e)
def sortEntries(self):
|
|
From: Stefan H. <ste...@us...> - 2003-04-15 13:40:42
|
Update of /cvsroot/cvsshell/cvsshell In directory sc8-pr-cvs1:/tmp/cvs-serv12778 Modified Files: ChangeLog README ReleaseNotes build.py index.html install.py Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ChangeLog 29 Nov 2002 18:34:03 -0000 1.12 --- ChangeLog 15 Apr 2003 13:40:06 -0000 1.13 *************** *** 1,4 **** --- 1,24 ---- CvsShell Version History + * Version 0.5.0 + + + Enhancements: + - improved filtering of files listed in ~/.cvsignore, $CVSIGNORE, + ./.cvsignore a lot. + - cvsshell now inserts logmessages for initial commits, remove operations and + rename operations automatically. Have a look at the 'initial-commit-message' + and 'delete-message' configuration options. + - new commands: login, logout. cvsshell tries to log in automatically when + needed (bug #718035) + + + Bugfixes: + - ID #721222 (update does not except the filename(s) to update as arg) + - ID #717409 (update command should be invoked with the -d option) + - ID #717407 (refresh command ignores directories) + - ID #721315 (refresh command traverses directories listed in .cvsignore) + - ID #711610 (Crash) + - ID #694298 (CVS directory is not recognized on case-insensitve fs) + + * Version 0.4.0 Index: README =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/README,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** README 14 Apr 2003 19:44:36 -0000 1.10 --- README 15 Apr 2003 13:40:06 -0000 1.11 *************** *** 1,3 **** ! Welcome to CvsShell 0.4.1 ========================= --- 1,3 ---- ! dfa sadfa Welcome to CvsShell 0.4.1 ========================= Index: ReleaseNotes =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/ReleaseNotes,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ReleaseNotes 29 Nov 2002 18:34:03 -0000 1.4 --- ReleaseNotes 15 Apr 2003 13:40:07 -0000 1.5 *************** *** 1,3 **** ! CvsShell 0.4 released! http://cvsshell.sourceforge.net --- 1,3 ---- ! CvsShell 0.4.1 released! http://cvsshell.sourceforge.net Index: build.py =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/build.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.py 16 Mar 2002 13:26:06 -0000 1.1 --- build.py 15 Apr 2003 13:40:07 -0000 1.2 *************** *** 32,37 **** # all files in these directories will be included in the distribution # Note: subdirectories are NOT included. ! DIST_DIRS = ['', 'src', 'images', 'etc'] ! ############################## --- 32,36 ---- # all files in these directories will be included in the distribution # Note: subdirectories are NOT included. ! DIST_DIRS = ['', 'src' , 'images', 'etc'] ############################## *************** *** 76,82 **** self.printMsg(cmd) os.system(cmd) ! def pack(self): self.clean() distname = NAME.lower() + '-' + VERSION destdir = os.path.join('build', distname) --- 75,97 ---- self.printMsg(cmd) os.system(cmd) ! ! def _substituteVersion(self): ! import time ! files = ['README', 'ReleaseNotes', 'index.html'] ! vars = {'@@version@@': VERSION, '@@date@@': time.strftime('%Y-%m-%d')} ! files = map(lambda d: os.path.join(thisDir, d), files) ! for fn in files: ! f = open(fn, 'r') ! s = f.read() ! f.close() ! for key, value in vars.items(): ! s = s.replace(key, value) ! f = open(fn, 'w') ! f.write(s) ! f.close() ! def pack(self): self.clean() + self._substituteVersion() distname = NAME.lower() + '-' + VERSION destdir = os.path.join('build', distname) *************** *** 92,95 **** --- 107,111 ---- for name in filenames: if os.path.isdir(name): continue + if name == 'build.py' and dirname == '': continue src = os.path.join(dirname, name) dest = os.path.join(destdir, dirname, name) Index: index.html =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/index.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.html 29 Nov 2002 18:34:03 -0000 1.8 --- index.html 15 Apr 2003 13:40:07 -0000 1.9 *************** *** 10,14 **** <p> CvsShell is a console-based cvs-client written in <a href="http://www.python.org">Python</a>. ! The current version is 0.4.0 (2002-11-29). Read the <a href="ChangeLog">change log</a> and the <a href="ReleaseNotes">release notes</a>. </p> --- 10,14 ---- <p> CvsShell is a console-based cvs-client written in <a href="http://www.python.org">Python</a>. ! The current version is 0.4.1 (2003-04-11). Read the <a href="ChangeLog">change log</a> and the <a href="ReleaseNotes">release notes</a>. </p> *************** *** 64,68 **** <!-- Created: Fri Mar 15 20:53:58 CET 2002 --> <!-- hhmts start --> ! Last modified: Fri Aug 16 14:14:39 CEST 2002 <!-- hhmts end --> <br> --- 64,68 ---- <!-- Created: Fri Mar 15 20:53:58 CET 2002 --> <!-- hhmts start --> ! Last modified: Fri Apr 11 08:34:39 CEST 2003 <!-- hhmts end --> <br> Index: install.py =================================================================== RCS file: /cvsroot/cvsshell/cvsshell/install.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** install.py 29 Nov 2002 18:34:03 -0000 1.8 --- install.py 15 Apr 2003 13:40:07 -0000 1.9 *************** *** 1,3 **** ! #!/usr/bin/env python ############################################################################### --- 1,3 ---- ! #!/usr/bin/python ############################################################################### *************** *** 22,26 **** ############################################################################### ! import sys, os, time thisDir = os.path.join(os.getcwd(), sys.path[0]) --- 22,33 ---- ############################################################################### ! import sys ! major = int(sys.version[0]) ! minor = int(sys.version[2]) ! if major < 2 or minor < 1: ! sys.stderr.write('Python 2.1 or higher is required to run this application.\n') ! sys.exit(1) ! ! import os, time thisDir = os.path.join(os.getcwd(), sys.path[0]) *************** *** 81,85 **** self.printMsg(failureMsg) return ! # self.migrateRCFile() startup, content = self.createStartScript() try: --- 88,92 ---- self.printMsg(failureMsg) return ! self.migrateRCFile() startup, content = self.createStartScript() try: *************** *** 148,153 **** # automatically generated on %s ! /usr/bin/env python %s "$@" ! """ % (time.ctime(time.time()), os.path.join(thisDir, 'src', 'cvs_shell.py'))) --- 155,160 ---- # automatically generated on %s ! exec %s %s "$@" ! """ % (time.ctime(time.time()), sys.executable, os.path.join(thisDir, 'src', 'cvs_shell.py'))) |
|
From: Stefan H. <ste...@us...> - 2003-04-15 13:40:19
|
Update of /cvsroot/cvsshell/cvsshell/src
In directory sc8-pr-cvs1:/tmp/cvs-serv12778/src
Modified Files:
app.py basic_cmds.py cvs_cmds.py cvs_shell.py
interactive_app.py parsing.py utils.py
Log Message:
Index: app.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/app.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** app.py 18 Sep 2002 19:07:56 -0000 1.17
--- app.py 15 Apr 2003 13:40:09 -0000 1.18
***************
*** 26,31 ****
_thisdir = os.path.join(os.getcwd(), sys.path[0])
AppError = 'AppError'
!
!
class App(GetSetProvider):
--- 26,30 ----
_thisdir = os.path.join(os.getcwd(), sys.path[0])
AppError = 'AppError'
!
class App(GetSetProvider):
***************
*** 57,65 ****
def closeApp(self):
! for x, y in [(sys.stdin, sys.__stdin__),
! (sys.stdout, sys.__stdout__),
! (sys.stderr, sys.__stderr__)]:
try:
! if x is not y:
x.close()
except: pass
--- 56,63 ----
def closeApp(self):
! stdstreams = [sys.__stdin__, sys.__stdout__, sys.__stderr__]
! for x in [sys.stdin, sys.stdout, sys.stderr]:
try:
! if x not in stdstreams:
x.close()
except: pass
***************
*** 74,84 ****
--- 72,93 ----
print
max = 0
+ s = self.getExecutableName() + ' '
for x in self._docs:
+ s += x[0] + ' '
l = len(x[0])
if l > max: max = l
+ s += self.getRestargSpezification()
+ print s
+ print
for x in self._docs:
spaces = (max - len(x[0])) * ' '
print " %s%s %s" % (x[0],spaces,x[1])
print
+ s = self.getRestargDocumentation()
+ if s:
+ lines = s.split('\n')
+ for l in lines:
+ print ' ' + l
+ print
***************
*** 224,228 ****
pipe = os.popen(command, 'r')
res = pipe.read()
! exitCode = pipe.close()
else:
exitCode = os.system(command)
--- 233,238 ----
pipe = os.popen(command, 'r')
res = pipe.read()
! # pipe.close() returns None if command succeeded
! exitCode = pipe.close() or 0
else:
exitCode = os.system(command)
***************
*** 279,282 ****
--- 289,296 ----
def postStart(self): pass
def preStop(self): pass
+ def getRestargSpezification(self): return ''
+ def getRestargDocumentation(self): return ''
+ def getExecutableName(self): return sys.argv[0]
+
class ShellException(GetSetProvider):
Index: basic_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/basic_cmds.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** basic_cmds.py 16 Sep 2002 06:49:32 -0000 1.24
--- basic_cmds.py 15 Apr 2003 13:40:09 -0000 1.25
***************
*** 127,158 ****
The abbreviation `rd' means `repository date', `wd' means `working date'."""
from time import strftime, localtime
def visit(myEntries, dirname, names):
namesToProcess = [x for x in names]
! if dirname.find('CVS') >= 0: return
! if 'CVS' in names: # directory under CVS control
! cvsEntries = utils.parseCvsEntries(dirname)
! for name, (revision, rtstamp) in cvsEntries[0].items():
! fullname = os.path.join(dirname, name)
! if not os.path.exists(fullname):
! myEntries.append(Entry(dirname, name, 'locally-deleted'))
else:
namesToProcess.remove(name)
! ltstamp = os.path.getmtime(fullname)
! info = '%s (rd: %s, wd: %s)' % (revision, strftime(app.dateFormat, localtime(rtstamp)),
! strftime(app.dateFormat, localtime(ltstamp)))
! if ltstamp == rtstamp:
! myEntries.append(Entry(dirname, name, Entry.S_OK, info))
! else:
! myEntries.append(Entry(dirname, name, Entry.S_MODIFIED, info))
! for name in cvsEntries[1].keys():
namesToProcess.remove(name)
! fullname = os.path.join(dirname, name)
! if not os.path.exists(fullname):
! myEntries.append(Entry(dirname, name, Entry.S_DELETED))
! else:
! myEntries.append(Entry(dirname, name, Entry.S_OK))
! # only files not under CVS control are contained in names.
for name in namesToProcess:
! if name.find('CVS') < 0:
myEntries.append(Entry(dirname, name, Entry.S_UNKNOWN))
#
--- 127,208 ----
The abbreviation `rd' means `repository date', `wd' means `working date'."""
from time import strftime, localtime
+ def isCvsInfoDir(path):
+ """
+ Checks if path denotes the name of a directory where CVS stores the information
+ about the files under version control. This directory is usually named 'CVS', but
+ on a case-insensitive filesystem the name could also be cvs, Cvs, ...
+ """
+ prefix, suffix = os.path.split(path)
+ if len(suffix) != 3: return 0
+ elif suffix.upper() == 'CVS': return 1
+ else: return 0
def visit(myEntries, dirname, names):
namesToProcess = [x for x in names]
! isCvsInfoDir(dirname)
! if isCvsInfoDir(dirname): return
! if not 'CVS' in map(string.upper, names): # directory not under CVS control
! names = []
! return
!
! cvsEntries = utils.parseCvsEntries(dirname)
! ignoreFilter = app.getCvsIgnoreFilter(dirname)
!
! # process files found in CVS/Entries
! for name, (revision, rtstamp) in cvsEntries[0].items():
! if ignoreFilter.filter(name):
! try: namesToProcess.remove(name)
! except ValueError: pass
! continue
! fullname = os.path.join(dirname, name)
! if not os.path.exists(fullname):
! # name is not in namesToProcess!
! myEntries.append(Entry(dirname, name, 'locally-deleted'))
! else:
! namesToProcess.remove(name)
! ltstamp = os.path.getmtime(fullname)
! maxRevWidth = 8
! info = revision
! info += (maxRevWidth -len(revision)) * ' '
! info += '(rd: %s, wd: %s)' % (strftime(app.dateFormat, localtime(rtstamp)),
! strftime(app.dateFormat, localtime(ltstamp)))
! if ltstamp == rtstamp:
! myEntries.append(Entry(dirname, name, Entry.S_OK, info))
else:
+ myEntries.append(Entry(dirname, name, Entry.S_MODIFIED, info))
+
+ # process directories found in CVS/Entries
+ for name in cvsEntries[1].keys():
+ if ignoreFilter.filter(name):
+ try:
+ names.remove(name) # do not descend into dir!
namesToProcess.remove(name)
! except ValueError: pass
! continue
! fullname = os.path.join(dirname, name)
! if not os.path.exists(fullname):
! myEntries.append(Entry(dirname, name, Entry.S_DELETED))
! else:
namesToProcess.remove(name)
! myEntries.append(Entry(dirname, name, Entry.S_OK))
!
! # only files not under CVS control are contained in namesToProcess.
for name in namesToProcess:
! if ignoreFilter.filter(name):
! try:
! names.remove(name) # do not descend into dir!
! except ValueError: pass
! continue
! if name == 'classes':
! raise 'XXX'
! if isCvsInfoDir(name):
! try: names.remove(name)
! except ValueError: pass
! continue
! path = os.path.join(dirname, name, 'CVS')
! if os.path.isdir(path):
! myEntries.append(Entry(dirname, name, Entry.S_OK))
! else:
! if os.path.isdir(os.path.join(dirname, name)):
! names.remove(name)
myEntries.append(Entry(dirname, name, Entry.S_UNKNOWN))
#
Index: cvs_cmds.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_cmds.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** cvs_cmds.py 29 Nov 2002 18:35:26 -0000 1.18
--- cvs_cmds.py 15 Apr 2003 13:40:10 -0000 1.19
***************
*** 51,57 ****
app.printErr(msg)
return
! rootDir = utils.getAbsDir(rest)
! if rootDir is None:
! return
try:
lines = app.runCvsCmd('status', globOpts=globOpts, args=opts+' '+rest, getStderr=1)
--- 51,59 ----
app.printErr(msg)
return
! try:
! l = app.applyOnEntryList(rest, lambda e, name: (e, name))
! rest = ' '.join(map(lambda t: t[1], l))
! # args do not spefiy ids in the current listing
! except utils.ParseError: pass
try:
lines = app.runCvsCmd('status', globOpts=globOpts, args=opts+' '+rest, getStderr=1)
***************
*** 94,97 ****
--- 96,100 ----
dir = dirRes.group('dir')
if dir == '.': dir = ''
+ rootDir = utils.getAbsDir(rest)
app.setListing(Listing(app, rootDir, entries))
app.setDirtyListing(0)
***************
*** 113,119 ****
return
if simulate: globOpts += '-n'
! rootDir = utils.getAbsDir(rest)
! if rootDir is None:
! return
try:
lines = app.runCvsCmd('update', globOpts=globOpts, args=opts+' '+rest)
--- 116,128 ----
return
if simulate: globOpts += '-n'
! rest = rest.strip()
! if rest:
! try:
! l = app.applyOnEntryList(rest, lambda e, name: (e, name))
! rest = ' '.join(map(lambda t: t[1], l))
! except utils.ParseError: pass # args do not spefiy ids in the current listing
! except AppError, msg:
! app.printErr(msg)
! return
try:
lines = app.runCvsCmd('update', globOpts=globOpts, args=opts+' '+rest)
***************
*** 127,133 ****
dir = os.path.dirname(x[1])
entries.append(Entry(dir, name, status))
! app.setListing(Listing(app, rootDir, entries))
! app.setDirtyListing(0)
! app.getListing().sortEntries()
app.printListing()
--- 136,154 ----
dir = os.path.dirname(x[1])
entries.append(Entry(dir, name, status))
! if not entries:
! return
! elif rest and app.getListing():
! # we have updated only some specific files
! listing = app.getListing()
! for filename in utils.splitquoted(rest, stripQuotes=1):
! e = listing.getEntry(filename)
! if e:
! e.status = Entry.S_OK
! else:
! # we have update all files
! rootDir = utils.getAbsDir('.')
! app.setListing(Listing(app, rootDir, entries))
! app.setDirtyListing(0)
! app.getListing().sortEntries()
app.printListing()
***************
*** 210,213 ****
--- 231,237 ----
try:
l = app.applyOnEntryList(rest, __doIt)
+ if not l:
+ app.printMsg('No files given.')
+ return
entries = []
for x in l:
***************
*** 240,248 ****
"to the repository (yes|no)? ")
if answ == 'yes':
! for e in toAddListing.entries:
! e.status = Entry.S_OK
! app.runCvsCmd('commit', rootDir=toAddListing.getRootDir(),
! fork=0, args=filenames)
def addBinary(app, name, args):
"""Add a new binary file to the repository.
--- 264,277 ----
"to the repository (yes|no)? ")
if answ == 'yes':
! try:
! args = app.getInitialLogmessageOption() + filenames
! app.runCvsCmd('commit', rootDir=toAddListing.getRootDir(),
! fork=0, args=args)
! for e in toAddListing.entries:
! e.status = Entry.S_OK
! except CvsError:
! pass
+
def addBinary(app, name, args):
"""Add a new binary file to the repository.
***************
*** 382,385 ****
--- 411,415 ----
e.status = Entry.S_DELETED
try:
+ args = app.getDeleteLogmessageOption() + args
app.runCvsCmd('commit', rootDir=toDeleteListing.getRootDir(),
fork=0, args=args)
***************
*** 463,467 ****
if answ == 'yes':
try:
! args = dst + ' ' + src
app.runCvsCmd('commit', rootDir=rootDir,
fork=0, args=args)
--- 493,497 ----
if answ == 'yes':
try:
! args = ' -m "renamed %s => %s" %s %s' % (src, dst, dst, src)
app.runCvsCmd('commit', rootDir=rootDir,
fork=0, args=args)
***************
*** 591,592 ****
--- 621,657 ----
app.printErr(msg)
+
+ def login(app, name, args):
+ """Log in to a remote repository.
+ Normally, it's not necessary to use this command explicitely because
+ cvsshell logs in automatically when needed."""
+ try:
+ (globOpts, opts,
+ myOpts, rest) = app.parseArgs(args,
+ app.getCmdToAllowedOpts().get(name, ''))
+ except getopt.GetoptError, msg:
+ app.printErr(msg)
+ return
+ if rest or myOpts:
+ app.printErr("Illegal arguments.")
+ return
+ try:
+ app.runCvsCmd('login', globOpts=globOpts, args=opts, checkLogin=0)
+ except CvsError: return
+
+
+ def logout(app, name, args):
+ """Log out of a remote repository."""
+ try:
+ (globOpts, opts,
+ myOpts, rest) = app.parseArgs(args,
+ app.getCmdToAllowedOpts().get(name, ''))
+ except getopt.GetoptError, msg:
+ app.printErr(msg)
+ return
+ if rest or myOpts:
+ app.printErr("Illegal arguments.")
+ return
+ try:
+ app.runCvsCmd('logout', globOpts=globOpts, args=opts, checkLogin=0)
+ except CvsError: return
Index: cvs_shell.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/cvs_shell.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** cvs_shell.py 29 Nov 2002 18:46:31 -0000 1.37
--- cvs_shell.py 15 Apr 2003 13:40:10 -0000 1.38
***************
*** 1,3 ****
! #!/usr/bin/env python
###############################################################################
--- 1,3 ----
! #!/usr/bin/python
###############################################################################
***************
*** 22,26 ****
###############################################################################
! import os, sys, re, string, types, getopt, fnmatch, utils
from oo_tools import GetSetProvider
from app import AppError, ShellException
--- 22,34 ----
###############################################################################
! import sys
! major = int(sys.version[0])
! minor = int(sys.version[2])
! if major < 2 or minor < 1:
! sys.stderr.write('Python 2.1 or higher is required to run this application.\n')
! sys.exit(1)
!
!
! import os, re, string, types, getopt, fnmatch, utils
from oo_tools import GetSetProvider
from app import AppError, ShellException
***************
*** 28,34 ****
from plugable_app import PlugableApp
! VERSION = '0.4'
NAME ='CvsShell'
! COPYRIGHT = 'Copyright 2002 Stefan Heimann (ma...@st...).\n' \
'This software is released under the GPL.'
BUG_ADDRESS = 'http://sourceforge.net/tracker/?group_id=48175&atid=452212'
--- 36,42 ----
from plugable_app import PlugableApp
! VERSION = '0.5.0rc3'
NAME ='CvsShell'
! COPYRIGHT = 'Copyright 2002, 2003 Stefan Heimann (ma...@st...).\n' \
'This software is released under the GPL.'
BUG_ADDRESS = 'http://sourceforge.net/tracker/?group_id=48175&atid=452212'
***************
*** 86,95 ****
self.readCommandFile()
self.readConfigFile()
- filter = utils.getCvsIgnoreFilter(self.getenv('HOME'))
- filter.addPatterns(utils.splitquoted(self.configMap.get('filter','')))
- cvsignore = self.getenv("CVSIGNORE")
- if cvsignore:
- filter.addPatterns(utils.splitquoted(cvsignore))
- self.listingFilter = filter
self.enableColor = self.configMap.get('colors', 'off') == 'on' and not self.onWindows
self.batchMode = 0
--- 94,97 ----
***************
*** 98,104 ****
self.showUnmodified = 0
def postStart(self):
! for cmd in self.initCommands:
! self.evalCommand(cmd)
def readCvsRootFromFile(self):
--- 100,126 ----
self.showUnmodified = 0
+
+ def getRestargSpezification(self):
+ return '[command_1 ... command_n]'
+
+ def getRestargDocumentation(self):
+ return 'command_1 ... command_n are executed at startup (after the initial commands\nfrom the ~/.cvsshellrc file).'
+
+ def getExecutableName(self):
+ return 'cvsshell'
+
+
def postStart(self):
! if self.initCommands:
! self.printVMsg('executing initial commands:')
! for cmd in self.initCommands:
! self.evalCommand(cmd)
! commandlineCmds = self.restargs()
! if commandlineCmds:
! self.printVMsg('executing commandline commands:')
! for cmd in commandlineCmds:
! self.evalCommand(cmd)
!
!
def readCvsRootFromFile(self):
***************
*** 180,184 ****
cmdOpts = ''
cmdOpts = cmdOpts.strip()
! fun = self.getCmdFun(cmdName, CvsShell.execShellCmd)
return fun(self, cmdName, cmdOpts)
--- 202,210 ----
cmdOpts = ''
cmdOpts = cmdOpts.strip()
! fun = self.getCmdFun(cmdName, None)
! if fun is None:
! fun = CvsShell.execShellCmd
! else:
! self.printVMsg(cmdName + ' ' + cmdOpts)
return fun(self, cmdName, cmdOpts)
***************
*** 259,263 ****
def runCvsCmd(self, cmd, rootDir=None, cvsRoot=None, globOpts = '',
! args='', fork=1, getStderr=0):
"""
* cmd is the command to execute
--- 285,289 ----
def runCvsCmd(self, cmd, rootDir=None, cvsRoot=None, globOpts = '',
! args='', fork=1, getStderr=0, checkLogin=1):
"""
* cmd is the command to execute
***************
*** 267,270 ****
--- 293,297 ----
* args are the arguments that should be passed to the cvs command
"""
+
oldDir = None
if rootDir is not None:
***************
*** 280,283 ****
--- 307,311 ----
if cvsRoot != None: cvsRootOpt = "-d %s" % cvsRoot
else: cvsRootOpt = ''
+ if checkLogin: self.doLoginCheck(cvsRoot)
#
globOpts = "%s %s %s" % (defGlobOpts, cvsRootOpt, globOpts)
***************
*** 309,312 ****
--- 337,368 ----
+ # regular expression for matching an cvsroot entry in the .cvspass
+ # file. The following simplifying assumptions were made:
+ # (1) username does not contain an '@'
+ # (2) path does not contain blanks
+ cvspassRe = re.compile(':pserver:(?P<username>[^@]+)@(?P<hostname>[^:/]+):(?P<port>\d+)?(?P<path>\S*)')
+
+ def doLoginCheck(self, cvsroot):
+ if not cvsroot: return
+ m = CvsShell.cvspassRe.match(cvsroot)
+ if not m: return
+ username = m.group('username')
+ hostname = m.group('hostname')
+ path = m.group('path')
+ if path and path[-1] == '/':
+ path = path[:-1]
+ passfile = os.path.join(self.HOME, '.cvspass')
+ if os.path.isfile(passfile):
+ for line in open(passfile).readlines():
+ m = CvsShell.cvspassRe.search(line)
+ if m and m.group('username') == username and \
+ m.group('hostname') == hostname and m.group('path') == path:
+ return
+ self.printMsg('No matching entry found in %s, login required.' % passfile)
+ r = os.system('cvs login')
+ if r != 0:
+ raise CvsError
+
+
def applyOnEntryList(self, opts, fun):
"""Applies fun to the entries of the current listing selected by opts.
***************
*** 326,330 ****
max = len(self.listing.entries)
for x in nums:
! if x < 0 or x > max: continue
e = self.listing.entries[x]
name = os.path.join(e.dir, e.name)
--- 382,387 ----
max = len(self.listing.entries)
for x in nums:
! if x < 0 or x >= max:
! continue
e = self.listing.entries[x]
name = os.path.join(e.dir, e.name)
***************
*** 334,345 ****
def printListing(self, footer=None):
! if not self.listing:
! self.printErr(self.noListingErrMsg)
! return
! if self.autoRefresh and self.dirtyListing and self.cvsRoot:
! self.printMsg('getting listing from ' + self.cvsRoot +
! ". To disable this feature execute `auto-root off'.")
self.evalCommand('refresh')
self.dirtyListing = 0
else:
self.listing.printEntries(footer=footer)
--- 391,407 ----
def printListing(self, footer=None):
! def refresh():
! self.printMsg('getting listing from `' + self.cvsRoot +
! "'.\nTo disable this feature execute `auto-root off'.")
self.evalCommand('refresh')
self.dirtyListing = 0
+ if not self.listing:
+ if self.autoRefresh:
+ refresh()
+ else:
+ self.printErr(self.noListingErrMsg)
+ return
+ elif self.autoRefresh and self.dirtyListing and self.cvsRoot:
+ refresh()
else:
self.listing.printEntries(footer=footer)
***************
*** 350,357 ****
def parseArgs(self, args, cvsCmdOpts='', cmdOpts=''):
! """Parse args and separates it like that:
! cvsCmdOpts are the options that are allowed for the cvs command
! cmdOpts are additional options (provided by cvsshell)
! global options are handled automatically
* global cvs options (as string)
* command specific cvs options (as string)
--- 412,418 ----
def parseArgs(self, args, cvsCmdOpts='', cmdOpts=''):
! """
! Parse args and separates it like that:
!
* global cvs options (as string)
* command specific cvs options (as string)
***************
*** 359,386 ****
* other args (as string)
These values are returned as a 4-tupel.
! A GetoptError is raised if there are unknown options."""
cvsGlobOpts = 'HQqrwlntvb:T:e:d:fz:as:'
! s = cvsGlobOpts+cvsCmdOpts+cmdOpts
! (opts, rest) = getopt.getopt(utils.splitquoted(args), s)
! cvsGlobOptstr = cvsCmdOptstr = ''
cmdOptDict = {}
for x in opts:
name, value = x
# getopt prepends '-' to every option
! if name[1] in cvsGlobOpts:
! cvsGlobOptstr += ' ' + name
! if value: cvsGlobOptstr += ' ' + value
! elif name[1] in cvsCmdOpts:
cvsCmdOptstr += ' ' + name
if value: cvsCmdOptstr += ' ' + value
else:
cmdOptDict[name] = value
! if cvsGlobOptstr: cvsGlobOptstr = cvsGlobOptstr[1:] # remove trailing ' '
! if cvsCmdOptstr: cvsCmdOptstr = cvsCmdOptstr[1:] # remove trailing ' '
reststr = ''
for x in rest:
reststr += x + ' '
! if reststr: reststr = reststr[:-1]
! return (cvsGlobOptstr, cvsCmdOptstr, cmdOptDict, reststr)
--- 420,470 ----
* other args (as string)
These values are returned as a 4-tupel.
!
! cvsCmdOpts are the options that are allowed for the cvs command
! cmdOpts are additional options (provided by cvsshell)
! global options are handled automatically
! If an option in 'args' is meant to be an global cvs option, it
! must be prefix with a 'g' (do not write '-q' but '-gq' for
! the quiet option.
!
! 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:
! name, value = x
! # getopt prepends '-' to every option
! cvsGlobOptstr += ' ' + name
! if value: cvsGlobOptstr += ' ' + value
!
! s = cvsCmdOpts+cmdOpts
! (opts, rest) = getopt.getopt(utils.splitquoted(locArgs), s)
! cvsCmdOptstr = ''
cmdOptDict = {}
for x in opts:
name, value = x
# getopt prepends '-' to every option
! if name[1] in cvsCmdOpts:
cvsCmdOptstr += ' ' + name
if value: cvsCmdOptstr += ' ' + value
else:
cmdOptDict[name] = value
!
reststr = ''
for x in rest:
reststr += x + ' '
!
! return (cvsGlobOptstr.strip(), cvsCmdOptstr.strip(), cmdOptDict, reststr.strip())
***************
*** 394,404 ****
return defGlobOpts,defOpts
##############################
! # Listing
##############################
class Listing(GetSetProvider):
--- 478,564 ----
return defGlobOpts,defOpts
+ def getInitialLogmessageOption(self):
+ """
+ Returns the cvs option suitable for setting the initial log message.
+ """
+ return self._getMessageOption(self.getConfigMap().get('initial-commit-message', None))
+
+ def getDeleteLogmessageOption(self):
+ """
+ Returns the cvs option suitable for setting the log message when a file is deleted
+ """
+ return self._getMessageOption(self.getConfigMap().get('delete-message', None))
+
+ def _getMessageOption(self, msg):
+ if msg is None:
+ return ''
+ else:
+ msg = '"' + msg.replace('"', '\\"') + '"'
+ return ' -m ' + msg + ' '
+
+ def getCvsIgnoreFilter(self, dirname):
+ """Returns a filter that contains the patterns in the .cvsignore file of
+ the given directory."""
+ def readFromFile(path):
+ l = []
+ if os.path.exists(path):
+ f = open(path)
+ for line in f.readlines():
+ l += string.split(line)
+ f.close()
+ return l
+ # ~/.cvsignore
+ filter = Filter(readFromFile(os.path.join(self.HOME, '.cvsignore')))
+ # $CVSIGNORE
+ try:
+ filter.addPatterns(string.split(self.getenv('CVSIGNORE')))
+ except KeyError: pass
+ # filter in ~/.cvsshellrc
+ filter.addPatterns(string.split(self.configMap.get('filter','')))
+ # ./.cvsignore
+ filter.addPatterns(readFromFile(os.path.join(dirname, '.cvsignore')))
+ # now we have all patterns. The CVS manual says:
+ # "a single exclamation mark (`!') clears the ignore list"
+ i = 0
+ for p in filter.patterns:
+ if p == '!':
+ filter.patterns = filter.patterns[i+1:]
+ i += 1
+ self.printVMsg('filter: ' + `filter.patterns`)
+ return filter
+
+
+
##############################
! # Filter
##############################
+
+ class Filter:
+ """This class represents a filter based on filename patterns.
+ The list with patterns is given in the constructor"""
+
+ def __init__(self, patterns):
+ self.patterns = patterns
+
+ def filter(self, name):
+ for p in self.patterns:
+ if fnmatch.fnmatch(name, p):
+ return 1
+ return 0
+
+ def addPattern(self, p):
+ self.patterns.append(p)
+
+ def addPatterns(self, ps):
+ self.patterns += ps
+
+ ##############################
+ # Listing
+ ##############################
+
class Listing(GetSetProvider):
***************
*** 408,432 ****
self.rootDir = rootDir
self.sortOrder = ['dir', 'status', 'name']
! # global filter
! filter = app.getListingFilter()
! if not filter:
! tmpEntries = entries
! else:
! tmpEntries = []
! for e in entries:
! if not filter.filter(e.name):
! tmpEntries.append(e)
! # .cvsignore filter
! filters = {}
! self.entries = []
! for e in tmpEntries:
! if filters.has_key(e.dir):
! filter = filters[e.dir]
! else:
! filter = utils.getCvsIgnoreFilter(e.dir)
! filters[e.dir] = filter
! if not filter.filter(e.name):
! self.entries.append(e)
!
def sortEntries(self):
--- 568,572 ----
self.rootDir = rootDir
self.sortOrder = ['dir', 'status', 'name']
! self.entries = entries
def sortEntries(self):
***************
*** 444,447 ****
--- 584,593 ----
self.entries.sort(__EntrySorter(self.sortOrder).cmp)
+ def getEntry(self, filename):
+ for e in self.entries:
+ if os.path.samefile(filename, os.path.join(e.dir, e.name)):
+ return e
+ return None
+
def printEntries(self, verbose=1, footer=None):
if not self.entries:
Index: interactive_app.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/interactive_app.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** interactive_app.py 16 Sep 2002 06:49:32 -0000 1.14
--- interactive_app.py 15 Apr 2003 13:40:10 -0000 1.15
***************
*** 99,104 ****
msg = msg[:i] + '[' + default + ']'+ msg[i+len(self.DEF_PATTERN):]
else:
! msg += '[%s] ' % default
! a = raw_input(msg)
a = os.path.expandvars(a)
a = os.path.expanduser(a)
--- 99,111 ----
msg = msg[:i] + '[' + default + ']'+ msg[i+len(self.DEF_PATTERN):]
else:
! msg += '[%s] ' % default
! try:
! a = raw_input(msg)
! except EOFError:
! print
! return None
! except KeyboardInterrupt:
! print
! return None
a = os.path.expandvars(a)
a = os.path.expanduser(a)
Index: parsing.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/parsing.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** parsing.py 29 Jul 2002 17:29:10 -0000 1.4
--- parsing.py 15 Apr 2003 13:40:10 -0000 1.5
***************
*** 64,69 ****
app.defGlobOpts = globOpt
except getopt.GetoptError, msg:
! app.printErr("Bad format for default options for command "\
! "`%s': %s: %s" % (y, value, str(msg)))
app.printVMsg("Default global options:\n" \
+ `app.cmdToDefGlobOpts` + \
--- 64,69 ----
app.defGlobOpts = globOpt
except getopt.GetoptError, msg:
! app.printErr("Bad format for default option for command "\
! "`%s': %s: %s" % (y, value, str(msg)))
app.printVMsg("Default global options:\n" \
+ `app.cmdToDefGlobOpts` + \
Index: utils.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/utils.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** utils.py 29 Nov 2002 18:35:26 -0000 1.15
--- utils.py 15 Apr 2003 13:40:10 -0000 1.16
***************
*** 25,29 ****
def getAbsDir(str):
! """Returns the absolute directory str denotes. If str does not denote a directory, None is returned.
"""
import os
--- 25,32 ----
def getAbsDir(str):
! """
! Returns the absolute directory the filename 'str' denotes.
! If 'str' does not denote a file, None is returned.
! This function also resolves embedded environment variables.
"""
import os
***************
*** 36,40 ****
if not os.path.isabs(str):
str = os.path.join(os.getcwd(), str)
! return os.path.dirname(str)
except OSError, msg:
print msg
--- 39,43 ----
if not os.path.isabs(str):
str = os.path.join(os.getcwd(), str)
! return os.path.normpath(os.path.dirname(str))
except OSError, msg:
print msg
***************
*** 107,111 ****
else:
revision = result.group('revision')
! repTime = timegm(strptime(result.group('mtime')))
files[name] = (revision, repTime)
return files, dirs
--- 110,117 ----
else:
revision = result.group('revision')
! try:
! repTime = timegm(strptime(result.group('mtime')))
! except ValueError:
! repTime = 0
files[name] = (revision, repTime)
return files, dirs
***************
*** 179,214 ****
return (notEnclosed, enclosed)
-
- class Filter:
- """This class represents a filter based on filename patterns.
- The list with patterns is given in the constructor"""
-
- def __init__(self, patterns):
- self.patterns = patterns
-
- def filter(self, name):
- for p in self.patterns:
- if fnmatch.fnmatch(name, p):
- return 1
- return 0
-
- def addPattern(self, p):
- self.patterns.append(p)
-
- def addPatterns(self, ps):
- self.patterns += ps
-
- def getCvsIgnoreFilter(dirname):
- """Returns a filter that contains the patterns in the .cvsignore file of
- the given directory."""
- cvsignore = os.path.join(dirname, '.cvsignore')
- if os.path.exists(cvsignore):
- f = open(cvsignore)
- filter = Filter(map(string.strip, f.readlines()))
- f.close()
- else:
- filter = Filter([])
- return filter
-
##############################
--- 185,188 ----
|
|
From: Stefan H. <ste...@us...> - 2003-04-15 13:40:15
|
Update of /cvsroot/cvsshell/cvsshell/etc
In directory sc8-pr-cvs1:/tmp/cvs-serv12778/etc
Modified Files:
cvsshell.ini default-cvsshellrc
Log Message:
Index: cvsshell.ini
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/etc/cvsshell.ini,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** cvsshell.ini 15 Aug 2002 21:42:17 -0000 1.13
--- cvsshell.ini 15 Apr 2003 13:40:08 -0000 1.14
***************
*** 13,16 ****
--- 13,18 ----
ci, com, commit = cvs_cmds.commit
delete, remove = cvs_cmds.remove
+ login = cvs_cmds.login
+ logout = cvs_cmds.logout
rename = cvs_cmds.rename
co, get, checkout = cvs_cmds.checkout
Index: default-cvsshellrc
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/etc/default-cvsshellrc,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** default-cvsshellrc 16 Sep 2002 06:49:32 -0000 1.12
--- default-cvsshellrc 15 Apr 2003 13:40:09 -0000 1.13
***************
*** 11,14 ****
--- 11,15 ----
filter = *.pyc *~
+
# Switch colors on or off
# this option is ignored on windows (except with cygwin)
***************
*** 25,28 ****
--- 26,39 ----
# color-ok
# color-deleted
+
+ # 'initial-commit-message' is the log message that cvsshell automatically
+ # inserts for newly commited files.
+ # To turn this feature off just comment out the next line
+ initial-commit-message=initial commit
+
+ # 'delete-message' is the log message that cvsshell automatically inserts
+ # for deleted files.
+ # To turn this feature off just comment out the next line
+ delete-message=file(s) removed
end
***************
*** 35,46 ****
# options for cvs commands
! # Format: option1, option2 = options
! # You can use the keyword `ALL' to apply options to all commands
! # You can specify different options for synonyms of a command.
# Note: DON'T specify the option `-q' or `-Q' for the commands `st',
# `stat', `status' or `ALL'. The options suppress information that are
# needed by these commands.
section DEFAULT_CMD_OPTIONS:
! up, upd, update = -q -P
end
--- 46,64 ----
# options for cvs commands
! # Format: option1, option2, ... = options
! #
! # You can use the keyword `ALL' to apply options to all commands. You
! # can specify different options for synonyms of a command.
! #
# Note: DON'T specify the option `-q' or `-Q' for the commands `st',
# `stat', `status' or `ALL'. The options suppress information that are
# needed by these commands.
+ #
+ # An global option must be prefixed with the letter `g' (`g' stands
+ # for `global'). For example to cause CVS to be quiet, you can use the
+ # option `-q'. But because this option is global is must be written as
+ # `-gq'.
section DEFAULT_CMD_OPTIONS:
! up, upd, update = -gq -P -d
end
|
|
From: SourceForge.net <no...@so...> - 2003-04-14 21:17:00
|
Bugs item #721226, was opened at 2003-04-14 18:36 Message generated for change (Settings changed) made by stefanheimann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=721226&group_id=48175 Category: None Group: None >Status: Deleted >Resolution: Duplicate Priority: 5 Submitted By: Stefan Heimann (stefanheimann) Assigned to: Nobody/Anonymous (nobody) Summary: refresh command traverses directories listed in .cvsignore Initial Comment: The 'refresh -r' command descends into a directory even if this directory is listed in the .cvsignore file. ---------------------------------------------------------------------- Comment By: Stefan Heimann (stefanheimann) Date: 2003-04-14 20:20 Message: Logged In: YES user_id=327401 fixed in 0.5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=721226&group_id=48175 |
|
From: SourceForge.net <no...@so...> - 2003-04-14 21:15:15
|
Bugs item #721222, was opened at 2003-04-14 18:33 Message generated for change (Comment added) made by stefanheimann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=721222&group_id=48175 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Stefan Heimann (stefanheimann) Assigned to: Nobody/Anonymous (nobody) Summary: update does not except the filename(s) to update as arg Initial Comment: dito ---------------------------------------------------------------------- >Comment By: Stefan Heimann (stefanheimann) Date: 2003-04-14 23:32 Message: Logged In: YES user_id=327401 fixed in 0.5. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=452212&aid=721222&group_id=48175 |