mtd/scripts creatediffs.py,1.4,1.5

gleixner at infradead.org gleixner at infradead.org
Tue Nov 29 14:17:01 EST 2005


Update of /home/cvs/mtd/scripts
In directory phoenix.infradead.org:/tmp/cvs-serv13488

Modified Files:
	creatediffs.py 
Log Message:
Add skip unknown option

Index: creatediffs.py
===================================================================
RCS file: /home/cvs/mtd/scripts/creatediffs.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- creatediffs.py	7 Nov 2005 10:19:18 -0000	1.4
+++ creatediffs.py	29 Nov 2005 19:16:58 -0000	1.5
@@ -35,6 +35,9 @@
 includepaths = ["drivers", "fs", "include"]
 excludepatterns = ["jffs3","ecos"]
 
+# Skip unknown (new) files
+skipunknown = 0
+
 # Regex to retrieve real author from signed off line
 re_author = re.compile(r"""^Signed-.ff-.y: (.*) <(.*)>""")
 
@@ -202,7 +205,15 @@
             # Skip Makefile magic files
             if fname == "Makefile" or fname == "Makefile.inc":
                 continue
-            
+            # Skip unknown (new) files ?
+            if skipunknown:
+                if not os.path.isdir("%s/%s" %(mtdrepo, self.patchpath)):
+                    continue
+                if fname != "Makefile.common":
+                    if not os.path.isfile("%s/%s/%s" %(mtdrepo,
+                                                       self.patchpath, fname)):
+                        continue
+
             if frev1 == "NONE":
                 fd.write("pushd %s\n" %(os.getcwd()))
                 if fname == "Makefile.common":
@@ -290,7 +301,7 @@
 # Here we go
 # Parse the commandline
 try:
-    (options, arguments) = getopt.getopt(sys.argv[1:],'m:r:')
+    (options, arguments) = getopt.getopt(sys.argv[1:],'m:r:s')
 except getopt.GetoptError, ex:
     print
     print "ERROR:"
@@ -300,8 +311,10 @@
 for option, value in options:
     if option == "-m":
         mtdusers = value
-    if option == "-r":
+    elif option == "-r":
         mtdrepo = value
+    elif option == "-s":
+        skipunknown = 1
     elif option == '-h':
         usage(0)
 





More information about the linux-mtd-cvs mailing list