summaryrefslogtreecommitdiffstats
path: root/Demo/pdist/cvslib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-04-27 18:05:36 (GMT)
committerGuido van Rossum <guido@python.org>1995-04-27 18:05:36 (GMT)
commitc51237cd709eb613746b9b1cc92814973dbdddf2 (patch)
treeee92a2b82067bb21ab42ee51b22fc613ce07fd0c /Demo/pdist/cvslib.py
parentbec818a14f18cf3b5f4acf8291f59daea5185d77 (diff)
downloadcpython-c51237cd709eb613746b9b1cc92814973dbdddf2.zip
cpython-c51237cd709eb613746b9b1cc92814973dbdddf2.tar.gz
cpython-c51237cd709eb613746b9b1cc92814973dbdddf2.tar.bz2
dunno
Diffstat (limited to 'Demo/pdist/cvslib.py')
-rwxr-xr-xDemo/pdist/cvslib.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Demo/pdist/cvslib.py b/Demo/pdist/cvslib.py
index c98f0ba..61c7475 100755
--- a/Demo/pdist/cvslib.py
+++ b/Demo/pdist/cvslib.py
@@ -14,10 +14,10 @@ class Entry:
self.file = words[1]
self.rev = words[2]
dates = words[3] # ctime, mtime
- if dates[:7] == 'Initial':
+ if len(dates) != 49 or dates[:7] == 'Initial':
self.ctime = None
self.mtime = None
- self.new = 1
+ self.new = dates[:7] == 'Initial'
else:
self.ctime = unctime(dates[:24])
self.mtime = unctime(dates[25:])
@@ -79,6 +79,8 @@ class CVS:
if not line: break
words = string.split(line)
[file, rev, hexsum] = words
+ if not self.entries.has_key(file):
+ continue
e = self.entries[file]
if e.rev == rev:
e.sethexsum(hexsum)