packages: check-unused-files.py - old change: check files from CVS
glen
glen at pld-linux.org
Tue Jul 10 10:31:18 CEST 2012
Author: glen Date: Tue Jul 10 08:31:18 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- old change: check files from CVS
---- Files affected:
packages:
check-unused-files.py (1.14 -> 1.15)
---- Diffs:
================================================================
Index: packages/check-unused-files.py
diff -u packages/check-unused-files.py:1.14 packages/check-unused-files.py:1.15
--- packages/check-unused-files.py:1.14 Sun Nov 6 11:52:53 2011
+++ packages/check-unused-files.py Tue Jul 10 10:31:13 2012
@@ -46,6 +46,17 @@
for l in f.readlines():
exclude.append(l.rstrip())
+def cvs_entries(file):
+ f = open('%s/CVS/Entries' % dir , 'r')
+ files = []
+ for l in f.readlines():
+ if l[0] != '/':
+ continue
+ parts = l.split('/')
+ files.append(parts[1])
+ return files
+cvsfiles = cvs_entries(dir)
+
def blacklisted(file):
if file == os.path.basename(spec):
return True
@@ -62,10 +73,13 @@
return False
-
for file in os.listdir(dir):
file = os.path.basename(file)
if blacklisted(file):
+ continue
+
+ if not file in cvsfiles:
+ print "Not in cvs: %s" % file
continue
if file not in files:
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/check-unused-files.py?r1=1.14&r2=1.15
More information about the pld-cvs-commit
mailing list