mtd/scripts patchin.xml,1.4,1.5 treewalk.py,1.4,1.5

gleixner at infradead.org gleixner at infradead.org
Sun May 22 17:11:46 EDT 2005


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

Modified Files:
	patchin.xml treewalk.py 
Log Message:
Remove bk stuff and add some helpers for the gitify and patch monkey job

Index: patchin.xml
===================================================================
RCS file: /home/cvs/mtd/scripts/patchin.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- patchin.xml	14 Mar 2005 16:54:48 -0000	1.4
+++ patchin.xml	22 May 2005 21:11:43 -0000	1.5
@@ -99,25 +99,14 @@
 <PATCHROOT name="mtd">
 	<OPTION name="jffs2" help="Include JFFS2" />
 	<OPTION name="jffs3" help="Include JFFS3" />
-	<OPTION name="bk" help="Bitkeeper checkout" />
 	<OPTION name="cp" help="copy into target tree" />
 	<OPTION name="ln" help="link into target tree" />
 	<OPTION name="rm" help="remove the patched files" />
+	<OPTION name="diff" help="diff files against target tree" />
 
 	<CHECKTARGET file="Makefile" pattern="PATCHLEVEL.=.6" 
 		help="Linux-Kernel 2.6" />
 
-	<ACTION name="bk" depends="bk" except="rm">
-		cd $dstpath;
-		if [ -e "SCCS/s.$dstfiles" ];
-		then 
-			bk unedit -q $dstfiles; 
-			bk edit -q $dstfiles;
-		else
-			rm -f $dstfiles;
-		fi
-	</ACTION>
-
 	<ACTION name="cp" depends="cp" except="rm,ln">
 		rm -f $dstpath/$dstfiles;
 		cp -f $srcpath/$srcfiles $dstpath/$dstfiles
@@ -132,19 +121,27 @@
 		ln -s $srcpath/$srcfiles $dstpath/$dstfiles
 	</ACTION>
 
-	<ACTION name="mkdir" except="rm" mode="all">
+	<ACTION name="diff" depends="diff" except="rm,ln,cp">
+		diff -uN $dstpath/$dstfiles $srcpath/$srcfiles | sed -e s@$dstbase at linux@g -e s@$srcbase at linux@g >>$srcbase/mtd.diff;
+		if [ $? -eq 1 ];
+		then
+			exit 0;
+		fi
+	</ACTION>
+
+	<ACTION name="mkdir" except="rm,diff" mode="all">
 		mkdir -p $dstpath
 	</ACTION>
 
-	<ACTION name="modify" except="rm">
+	<ACTION name="modify" except="rm,diff">
 		scripts/modify.py -p $options $srcpath/$srcfiles $dstpath/$dstfiles
 	</ACTION>
 
-	<ACTION name="insert" except="rm">
+	<ACTION name="insert" except="rm,diff">
 		scripts/modify.py -i -p $options $srcpath/$srcfiles $dstpath/$dstfiles
 	</ACTION>
 
-	<ACTIONORDER order="bk,rm,cp,ln" />
+	<ACTIONORDER order="diff,rm,cp,ln" />
 
 	<SUBDIR name="Documentation/DocBook">
 		<UPDATE pattern=".*\.tmpl$" />
@@ -162,13 +159,13 @@
 	<SUBDIR name="include/linux/mtd">
 		<UPDATE pattern=".*\.h$" />
 	</SUBDIR>
-	<SUBDIR name="fs" actions="bk,modify">
+	<SUBDIR name="fs" actions="modify">
 		<UPDATE pattern="Kconfig" depends="jffs2" 
 			options="JFFS2,JFFS3,JFFS2,CRAMFS" />
 		<UPDATE pattern="Kconfig" depends="jffs3" 
 			options="JFFS3,CRAMFS,JFFS3,CRAMFS" />
 	</SUBDIR>
-	<SUBDIR name="fs" actions="bk,insert" depends="jffs3">
+	<SUBDIR name="fs" actions="insert" depends="jffs3">
 		<UPDATE pattern="Makefile.jffs3" target="Makefile"
 			depends="jffs3" options="JFFS3,JFFS3,JFFS2,JFFS2" />
 		<UPDATE pattern="Kconfig" depends="jffs3" 
@@ -192,6 +189,6 @@
 		<UPDATE pattern="Kconfig" />
 		<UPDATE pattern="Makefile.common" target="Makefile" />
 		<EXCLUDE pattern=".*24.c" />
-		<EXCLUDE pattern="ssfdc.c" depends="bk" />
+		<EXCLUDE pattern="ssfdc.c" depends="tolinus" />
 	</SUBDIR>
 </PATCHROOT>

Index: treewalk.py
===================================================================
RCS file: /home/cvs/mtd/scripts/treewalk.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- treewalk.py	15 Mar 2005 08:46:08 -0000	1.4
+++ treewalk.py	22 May 2005 21:11:43 -0000	1.5
@@ -141,6 +141,12 @@
 		cmd = "export srcpath=\'%s\';" %(srcpath)
 		cmd = cmd + "export dstpath=\'%s\';" %(dstpath)
 		cmd = cmd + "export options=\'%s\';" %(options)
+		cmd = cmd + "export srcbase=\'%s\';" %(srcbase)
+		cmd = cmd + "export dstbase=\'%s\';" %(dstbase)
+		relpath = os.path.join(srcpath.replace(srcbase,""))
+		cmd = cmd + "export srcrelpath=\'%s\';" %(relpath)
+		relpath = os.path.join(dstpath.replace(dstbase,""))
+		cmd = cmd + "export dstrelpath=\'%s\';" %(relpath)
 		# All files mode ?
 		if self.mode:
 			cmd = cmd + "export srcfiles=\'"





More information about the linux-mtd-cvs mailing list