[Fusionforge-commits] r10799 - trunk/tools

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Sat Oct 2 17:31:56 CEST 2010


Author: aljeux
Date: 2010-10-02 17:31:56 +0200 (Sat, 02 Oct 2010)
New Revision: 10799

Removed:
   trunk/tools/language_file_merger.php
   trunk/tools/patchmaker.php
   trunk/tools/savannah_std.class
Log:
Removed obsolete files

Deleted: trunk/tools/language_file_merger.php
===================================================================
--- trunk/tools/language_file_merger.php	2010-10-02 15:31:50 UTC (rev 10798)
+++ trunk/tools/language_file_merger.php	2010-10-02 15:31:56 UTC (rev 10799)
@@ -1,120 +0,0 @@
-#!/usr/bin/php -q
-<?php
-#$argc=$ARGC;
-#$argv=$ARGV;
-
-define('TO_TRANSLATE', '#TO_TRANSLATE#');
-define('TO_REMOVE', '#TO_REMOVE#');
-
-if ($argc!=3 || ('-h'==$argv[1] || '--help'==$argv[1])) {
-	showHelp();
-	exit;
-}
-
-$languageDir = '/www/include/languages/';
-
-$baseFile = $argv[1].$languageDir.'Base.tab';
-if(!eregi('\.tab$', $argv[2])) {
-	$targetFile = $argv[1].$languageDir.$argv[2].'.tab';
-} else {
-	$targetFile = $argv[1].$languageDir.$argv[2];
-}
-
-if (!file_exists($baseFile) || !file_exists($targetFile)) {
-	echo "FATAL: Base.tab or $argv[2].tab may not exist.\n";
-	exit;
-}
-
-$baseContent =& getLanguageAsArray($baseFile);
-$targetContent =& getLanguageAsArray($targetFile);
-
-reset($baseContent);
-$resultContent = array();
-
-$stderr = fopen('php://stderr', 'w');
-foreach($baseContent AS $pageName=>$page) {
-	foreach($page AS $key => $value) {
-		if(!isset($targetContent[$pageName][$key])) {
-			fwrite($stderr, 'TO_TRANSLATE - added : '.$pageName.' '.$key."\n");
-			$resultContent[$pageName][$key] = array('value' => $value['value'], 'prefix' => TO_TRANSLATE);
-		} else {
-			if($targetContent[$pageName][$key]['prefix'] == TO_TRANSLATE) {
-				fwrite($stderr, 'TO_TRANSLATE - updated : '.$pageName.' '.$key."\n");
-				$resultContent[$pageName][$key] = array('value' => $value['value'], 'prefix' => TO_TRANSLATE);
-			} else {
-				$resultContent[$pageName][$key] = $targetContent[$pageName][$key];
-			}
-			unset($targetContent[$pageName][$key]);
-		}
-	}
-}
-
-reset($targetContent);
-foreach($targetContent AS $pageName => $page) {
-	foreach($page AS $key => $value) {
-		fwrite($stderr, 'TO_REMOVE - added : '.$pageName.' '.$key."\n");
-		$resultContent[$pageName][$key] = array('value' => $value['value'], 'prefix' => TO_REMOVE);
-	}
-}
-fclose($stderr);
-
-unset($targetContent);
-unset($baseContent);
-
-arraySort($resultContent);
-reset($resultContent);
-
-foreach($resultContent AS $pageName => $page) {
-	foreach($page AS $key => $value) {
-		echo $value['prefix'].$pageName."\t".$key."\t".$value['value']."\n";
-	}
-}
-
-function showHelp() {
-	global $argc, $argv;
-	$self = basename($argv[0]);
-?>
->> GForge language file merge utility, by Hunte Swee<hunte at users.sourceforge.net> and Guillaume Smet<guillaume-gforge at smet.org><<
-
-Usage:
-<?php echo $self?> <GForge root directory> <Target language> 1>merge.tab 2>merge.log
-Example:
-<?php echo $self?> /usr/share/gforge SimplifiedChinese 1>merge.tab 2>merge.log
-
-<?php
-}
-
-function &getLanguageAsArray($languageFile) {
-	$content = file($languageFile);
-	reset($content);
-	$result = array();
-	while(list(, $line)=each($content)) {
-		$line = trim($line);
-		if(!empty($line)) {
-			if(eregi('^'.TO_TRANSLATE, $line)) {
-				$line = substr($line, strlen(TO_TRANSLATE));
-				$prefix = TO_TRANSLATE;
-			} elseif(eregi('^'.TO_REMOVE, $line)) {
-				$line = substr($line, strlen(TO_REMOVE));
-				$prefix = TO_REMOVE;
-			} elseif(eregi('^#', $line)) {
-				continue;
-			} else {
-				$prefix = '';
-			}
-			list($pn, $key, $val) = explode("\t", $line, 3);
-			$result[$pn][$key] = array('value' => $val, 'prefix' => $prefix);
-		}
-	}
-	return $result;
-}
-
-function &arraySort(& $array) {
-	$keys = array_keys($array);
-	for($i = 0, $count = count($keys); $i < $count; $i++) {
-		ksort($array[$keys[$i]]);
-	}
-	ksort($array);
-}
-
-?>

Deleted: trunk/tools/patchmaker.php
===================================================================
--- trunk/tools/patchmaker.php	2010-10-02 15:31:50 UTC (rev 10798)
+++ trunk/tools/patchmaker.php	2010-10-02 15:31:56 UTC (rev 10799)
@@ -1,611 +0,0 @@
-<?php
-
-/*
-
-	Patch maker for Gforge.
-	by Daniel Pérez 2005
-
-*/
-
-/**** START PROGRAM ****/
-
-$STDIN = fopen('php://stdin','r');
-define ("RED", "\033[01;31m" );
-define ("NORMAL", "\033[00m" );
-define ("GREEN", "\033[01;32m" );
-define ("BLUE", "\033[00;36m" );
-define ("BLINK", "\033[05m" );
-define ("YELL", "\033[01;33m" );
-define('FILE_APPEND', 1);
-
-/* CONFIG VARS */
-
-$cvspath = "/cvsroot/gforge";
-$cvsmodule = "gforge"; //the name of the module from cvs repository
-$authentication = "pserver"; //ext for it to ask you for your password
-$cvsuser = "anonymous";
-$cvsserver = "cvs.gforge.org";
-$cvsroot = ":" . $authentication . ":" . $cvsuser . "@" . $cvsserver . ":" . $cvspath;
-//this is the branch config for GFORGE (not the plugins)
-$old_branch = "2005-11-08";
-$old_branch_is_date = true; // if the old_branch is a date instead of a branch or tag, the old_branch should be something like 2005-07-10
-$new_branch = "HEAD";
-$new_branch_is_date = false;
-
-$only_parse_diffs = false; // leave false to generate the diff first
-$only_test_patch = false; // only tests applyting the patch. the diffs must be generated and parsed already
-$debug_patch_output = true;
-
-$plugins = array();
-
-$plugins[0]['name'] = "scmcvs";
-$plugins[0]['old_branch'] = "upstream_version_4_5_2";
-$plugins[0]['new_branch'] = "HEAD";
-$plugins[0]['cvsmodule'] = "gforge-plugin-scmcvs";
-$plugins[0]['new_branch_is_date'] = false;
-$plugins[0]['old_branch_is_date'] = false;
-
-$plugins[1]['name'] = "scmsvn";
-$plugins[1]['old_branch'] = "2005-08-08";
-$plugins[1]['new_branch'] = "HEAD";
-$plugins[1]['cvsmodule'] = "gforge-plugin-scmsvn";
-$plugins[1]['new_branch_is_date'] = false;
-$plugins[1]['old_branch_is_date'] = true;
-
-$plugins[2]['name'] = "cvstracker";
-$plugins[2]['old_branch'] = "upstream_version_4_5_2";
-$plugins[2]['new_branch'] = "v4_5_3";
-$plugins[2]['cvsmodule'] = "gforge-plugin-cvstracker";
-$plugins[2]['new_branch_is_date'] = false;
-$plugins[2]['old_branch_is_date'] = false;
-
-// The next one is an example of a plugin that requires different cvspath and must be checked out and worked with ext auth
-/*
-$plugins[3]['name'] = "svntracker";
-$plugins[3]['old_branch'] = "Branch_4_5";
-$plugins[3]['new_branch'] = "HEAD";
-$plugins[3]['cvsmodule'] = "gforge-plugin-svntracker";
-$plugins[3]['new_branch_is_date'] = false;
-$plugins[3]['old_branch_is_date'] = false;
-$plugins[3]['cvspath'] =  "/cvsroot/scmplugins"; // only set this var if it´s different than the main one
-$plugins[3]['authentication'] =  "ext"; // only set this var if it´s different than the main one
-$plugins[3]['cvsuser'] =  "danper"; // only set this var if it´s different than the main one
-*/
-
-/* END OF CONFIG VARS */
-
-	// php.net function workaround because this is only on Php5
-	function file_put_contents($filename, $data, $flags = 0, $f = FALSE) {
-		if(($f===FALSE) && (($flags%2)==1)) $f=fopen($filename, 'a'); else if($f===FALSE) $f=fopen($filename, 'w');
-		if(round($flags/2)==1) while(!flock($f, LOCK_EX)) { /* lock */ }
-		if(is_array($data)) $data=implode('', $data);
-		fwrite($f, $data);
-		if(round($flags/2)==1) flock($f, LOCK_UN);
-		fclose($f);
-	}
-
-
-	/**
-	* searchNextIndex -> Searchs for the next "Index:" line
-	*
-	*	@param	&array The file lines array
-	*	@param  int position in the array where this index is found
-	*	@param  int position where to begin searching from
-	*	@param  boolean	Whether it´s a plugin diff or the main gforge plugin
-	*	@param  string	The module name
-	*	@param	boolean	true on success, false on EOF
-	*
-	*/
-	function searchNextIndex(&$lines,&$position,$beginfrom,$isplugin,$module) {
-		$i = $beginfrom;
-		while ( ($i <count($lines)) ) {
-			if (preg_match('/^Index:/',$lines[$i])) {
-				if ($isplugin) {
-					//if it´s a plugin, add the plugin relative path to the file path
-					$lines[$i] = "Index: " . "plugins/" . $module . "/" . substr($lines[$i],7);
-				}
-				$position = $i;
-				return true;
-			}
-			$i++;
-		}
-		return false;
-	}
-
-	/**
-	* searchFirstModification -> Searchs for the next "Index:" line
-	*
-	*	@param	&array The file lines array
-	*	@param  int position in the array where the first "@@" line is found
-	*	@param  int position where to begin searching from
-	*	@param  boolean	Whether it´s a plugin diff or the main gforge plugin
-	*	@param  string	The module name
-	*	@param  boolean whether EOF was found instead of "@@" or "Index:" lines
-	*	@param	boolean	true on success
-	*
-	*/	
-	
-	function searchFirstModification(&$lines,&$firstmodposition,$beginfrom,$isplugin,$module,&$foundEOF) {
-		$i = $beginfrom;
-		$foundEOF = false;
-		while ( ( $i < count($lines) ) ) {
-			
-			if ($isplugin) {
-				//if it´s a plugin, add the plugin relative path to the file path
-				if (preg_match('/^--- /',$lines[$i])) {
-					$lines[$i] = "--- " . "plugins/" . $module . "/" . substr($lines[$i],4);
-				}
-				if (preg_match('/^\+\+\+ /',$lines[$i])) {
-					$lines[$i] = "+++ " . "plugins/" . $module . "/" . substr($lines[$i],4);
-				}				
-			}
-			
-			if (preg_match('/^@@/',$lines[$i])) {
-				$firstmodposition = $i;
-				return true;
-			}
-			$i++;
-		}
-		$foundEOF = true;
-		return true;
-	}
-
-	/**
-	* searchSecondModification -> Searchs for the next "Index:" line
-	*
-	*	@param	&array The file lines array
-	*	@param  int position in the array where the second "@@" line is found (if it is)
-	*	@param  int position in the array where the first "@@" line was found
-	*	@param  boolean whether a new index was found instead of a second "@@" line
-	*	@param 	if $foundnewindex is true, this indicates the position where this new index has been found
-	*	@param  boolean whether EOF was found instead of "@@" or "Index:" lines
-	*	@param  boolean	whether a "version" line was found in the first "@@" section
-	*	@param  int position where to begin searching from
-	*	@param  boolean	Whether it´s a plugin diff or the main gforge plugin
-	*	@param  string	The module name
-	*	@param	boolean	true on success
-	*
-	*/		
-	function searchSecondModification(&$lines,&$secondmodposition,$firstmodposition,&$foundnewindex,&$new_indexposition,&$foundEOF,&$foundversion,$isplugin,$module) {
-		$i = $firstmodposition + 1;
-		$foundversion = false;
-		$foundEOF = false;
-		$foundnewindex = false;
-		while ( ($i <count($lines)) ) {
-			if (preg_match('/^@@/',$lines[$i])) {
-				$secondmodposition = $i;
-				return true;
-			}
-			$j = $i+1; //this doesn´t work... ->  $lines[($i+1)]
-			if ( (preg_match('/@version[\s|\t]+\$Id$lines[$i])) && (preg_match('/@version[\s|\t]+\$Id$lines[$j])) ) { // only if there´s a - version and a + version (changed version)
-				$foundversion = true;
-				echo "." ;
-			}
-			if (preg_match('/^Index:/',$lines[$i])) {
-				$new_indexposition = $i;
-				$foundnewindex = true;
-				if ($isplugin) {
-					//if it´s a plugin, add the plugin relative path to the file path
-					$lines[$i] = "Index: " . "plugins/" . $module . "/" . substr($lines[$i],7);
-				}				
-				return true;
-			}
-			$i++;
-		}
-		$foundEOF = true;
-		return true;
-	}
-	
-	/**
-	* parseDiffs -> read the files in the current dir and parse the .diff files
-	*
-	*/	
-	
-	function parseDiffs() {
-		$current=getcwd();
-		//open current directory for reading
-		$handle=opendir(".");
-		while ($filename = readdir($handle)) {
-			//Don't add special directories '..' or '.' to the list
-			if (($filename!='..') && ($filename!='.') && (strstr($filename,".diff") && (filesize($filename)>0))) { // only get the diff files
-				if (!strstr($filename,"gforge")) {
-					$isplugin = true;
-				} else {
-					$isplugin = false;
-				}
-				echo "Parsing file $filename ...\n";
-				parseDiff($filename,$isplugin);
-			}
-		}
-		closedir($handle);		
-	}
-
-	/**
-	* testPatch -> simulates a patching process
-	*
-	*	@param array the plugins info
-	*	@param boolean	Output the patching process?
-	*
-	*	@return boolean	true on success
-	*/
-	
-	function testPatch($plugins,$debug) {
-		global $old_branch_is_date,$old_branch,$cvsmodule;
-		
-		echo YELL . "Performing test of the created patch. Proceeding to update CVS to old versions...\n" . NORMAL;
-		//now we change the plugins to update to the old branch instead.
-		for ($i=0;$i<count($plugins);$i++) {
-			$plugins[$i]['new_branch'] = $plugins[$i]['old_branch'];
-			$plugins[$i]['new_branch_is_date'] = $plugins[$i]['old_branch_is_date'];
-		}
-		updateAll($old_branch,$old_branch_is_date,$plugins,1);
-		exec("patch --dry-run -p0 < ../GFORGEPATCH",$output,$return_value);
-		if ($debug) {
-			foreach ($output as $out) {
-				echo BLUE . $out  . "\n" . NORMAL;
-			}
-		}
-		if ($return_value!=0) {
-			return false;
-		} else {
-			return true;
-		}
-		
-	}
-	
-	/**
-	* joinDiffs -> just grabs the parsed diffs and joins them into 1 big file
-	*
-	*/	
-	
-	function joinDiffs() {
-		$current=getcwd();
-		//open current directory for reading
-		$handle=opendir(".");
-		echo "Creating joined file GFORGEPATCH ...\n";
-		while ($filename = readdir($handle)) {
-			//Don't add special directories '..' or '.' to the list
-			if (($filename!='..') && ($filename!='.') && (strstr($filename,".diff") && (strstr($filename,"parsed-")) && (filesize($filename)>0))) { // only get the diff files
-				file_put_contents("GFORGEPATCH",file_get_contents($filename),FILE_APPEND);
-			}
-		}
-		closedir($handle);
-		if (is_file("GFORGEPATCH")) {
-			echo GREEN . "File GFORGEPATCH created...\n" . NORMAL;
-		} else {
-			echo RED . "File GFORGEPATCH couldn´t be created successfully\n" . NORMAL;
-			exit();
-		}
-	}
-	
-	/**
-	* parseDiff -> update the plugins from cvs
-	*
-	*	@param	string	The file name
-	*	@param  boolean	Whether it´s a plugin diff or the main gforge plugin
-	*	@param	boolean	true on success, false on failure
-	*
-	*/
-	function parseDiff($filename,$isplugin) {
-		if (! ($vals = file_get_contents($filename)) ){
-			echo RED . "Failed to open file $filename \n" . NORMAL;
-			return false;
-		}
-		$lines = explode("\n",$vals); //now we have the lines in an array
-		for ($i=0;$i<count($lines);$i++) {
-			$linestowrite[$i] = 1; // write ALL lines first...
-		}
-		
-		$arr = explode(".diff",$filename);
-		$module = $arr[0]; // get the module name (in case it´s a plugin)
-
-		$exit = false;
-		$beginfrom = 0;
-		// we are going to suppose the files are WELL FORMED (not index without @@ lines, has at least 1 Index, etc)
-		searchNextIndex($lines,$indexposition,$beginfrom,$isplugin,$module);
-		if ($indexposition>0) {
-			//remove the " ? filename" lines
-			for ($i=0;$i<$indexposition;$i++) {
-				$linestowrite[$i] = 0;
-			}
-		}
-		do  {
-			searchFirstModification($lines,$firstmodposition,$indexposition,$isplugin,$module,$foundEOF); //search for first @@ line
-			//weird condition -> i found one diff that had an index and no @@... the file hadn´t been modified. the program crashed. this fixes it
-			if ($foundEOF) {
-				//ignore this last index and finish
-				for ($i=$indexposition;$i<count($lines);$i++) {
-					//mark this section as allowed
-					$linestowrite[$i] = 0;
-				}
-				break;
-			}
-			//echo $firstmodposition . " ";
-			searchSecondModification($lines,$secondmodposition,$firstmodposition,$foundnewindex,$new_indexposition,$foundEOF,$foundversion,$isplugin,$module); //search for next @@ line (maybe we just find the next index or EOF)
-			//echo $new_indexposition . " ";
-			$foundversion?$value=0:$value=1; // if we found the "version" CVS stuff change we set it at not to be written
-			if ($foundnewindex) {
-				for ($i=$indexposition;$i<$firstmodposition;$i++) {
-					//mark this section as allowed
-					$linestowrite[$i] = $value;
-				}
-				$indexposition = $new_indexposition;
-				for ($i=$firstmodposition;$i<$indexposition;$i++) {
-					//mark this section as allowed
-					$linestowrite[$i] = $value;
-				}
-			} else { //didn´t find new index
-				if ($foundEOF) { //we have reached EOF, write all from secondmodposition to the end
-					for ($i=$firstmodposition;$i<count($lines);$i++) {
-						//mark this section as allowed
-						$linestowrite[$i] = $value;
-					}
-					$exit = true;
-				} else { //found next set of @@
-					for ($i=$indexposition;$i<$firstmodposition;$i++) {
-						//mark this section as allowed
-						$linestowrite[$i] = 1;
-					}
-					for ($i=$firstmodposition;$i<$secondmodposition;$i++) {
-						//mark this section as forbidden or allowed
-						$linestowrite[$i] = $value;
-					}
-					$found = searchNextIndex($lines,$indexposition,$secondmodposition,$isplugin,$module); //search for the next index
-					if (!$found) {
-						//we have reached EOF, write all from secondmodposition to the end
-						for ($i=$secondmodposition;$i<count($lines);$i++) {
-							//mark this section as allowed
-							$linestowrite[$i] = 1;
-						}
-						$exit = true;
-					} else {
-						//we have reached the next "Index:" line, write all from secondmodposition to this point
-						for ($i=$secondmodposition;$i<$indexposition;$i++) {
-							//mark this section as allowed
-							$linestowrite[$i] = 1;
-						}
-					}
-				}
-			}
-			
-		} while (!$exit);
-		
-		// write to file
-		$fd = fopen("parsed-" . $filename,"w+");
-		if (! $fd ){
-			echo RED . "Failed to open file parsed-$filename \n" . NORMAL;
-			return false;
-		}
-		
-		for ($i=0;$i<count($lines);$i++) {
-			if ($linestowrite[$i] == 1) {
-				fwrite($fd,$lines[$i] . "\n");
-			}
-		}
-		fclose($fd);
-		echo "\n";
-		echo GREEN. "File parsed-" . $filename . " wrote successfully\n" . NORMAL;
-	}
-
-	/**
-	* updateAll -> updates gforge and the plugins from cvs
-	*
-	*	@param  string	Branch to update to
-	*	@param  boolean	Whether the branch is a date
-	*	@param  array of plugins
-	*	@param  boolean	is this a test?
-	*	@return	boolean	true on success, exits on failure
-	*
-	*/
-	function updateAll($branch,$branch_is_date,$plugins,$test) {
-		global $cvsmodule,$cvsroot;
-		
-		echo "Updating to " . $branch . " branch...\n";
-		
-		chdir ($cvsmodule);
-		
-		if ($branch_is_date) {
-			exec("cvs -Q -d " . $cvsroot . " update -dP -D $branch   2>>/tmp/patchmaker-errorlog",$out,$return_value); // returns 0 on success... that´s why the return_value var	
-		} else {
-			exec("cvs -Q -d " . $cvsroot . " update -dP -r $branch   2>>/tmp/patchmaker-errorlog",$out,$return_value); // returns 0 on success... that´s why the return_value var
-		}
-		
-		if ($return_value != 0) {
-			die(RED . "Could not update from cvs, exiting...\n" . NORMAL);
-		}
-		
-		echo GREEN . "Module " . $cvsmodule . " updated successfully.\n" . NORMAL;
-		
-		if (!empty($plugins)) {
-			if (!is_dir('plugins')) {
-				if (!mkdir('plugins')) {
-					die(RED . "Could not create dir plugins, exiting...\n" . NORMAL);
-				}
-				echo "Dir plugins Created.\n";
-			} else {
-				echo "Dir plugins already exists.\n";
-			}
-			
-			if (!updatePlugins($plugins,!$test)) {
-				exit();
-			}
-		}	
-		return true;	
-	}
-	
-	/**
-	* updatePlugins -> update the plugins from cvs
-	*
-	*	@param	array	Plugins that will be updated
-	*	@param  boolean	Whether to create the diffs or just update. True by default
-	*	@return	boolean	true on success, false on failure
-	*
-	*/
-	function updatePlugins($plugins,$creatediffs=true) {
-		global $authentication,$cvsuser,$cvsserver,$cvspath;
-		
-		chdir("plugins");
-		foreach ($plugins as $plugin) {
-			//if the plugin has different cvspath use it, else use the original one
-			($plugin['cvspath'])?$path=$plugin['cvspath']:$path=$cvspath; 
-			($plugin['authentication'])?$auth=$plugin['authentication']:$auth=$authentication;
-			($plugin['cvsuser'])?$user=$plugin['cvsuser']:$user=$cvsuser;
-			$cvsroot = ":" . $auth . ":" . $user . "@" . $cvsserver . ":" . $path;		
-			
-			if (!(is_dir($plugin['name']))) {
-				//only checkout if there´s nothing in here
-				echo "Checking out " . $plugin['cvsmodule'] . "...\n";
-				exec("cvs -Q -d " . $cvsroot . " checkout " . $plugin['cvsmodule'] . "    2>>/tmp/patchmaker-errorlog",$out,$return_value);
-				if ($return_value != 0) {
-					die(RED . "Could not checkout module " . $plugin['cvsmodule'] . " from cvs, exiting...\n" . NORMAL);
-				}
-				echo GREEN . "Module " . $plugin['cvsmodule'] . " checked out successfully.\n" . NORMAL;
-				//rename the dir
-				if (exec("mv " . $plugin['cvsmodule'] . " " . $plugin['name'])) { //mv returns 0 on succes...
-					die(RED . "Could not rename the dir " . $plugin['cvsmodule'] . ", exiting...\n");
-				}
-				echo "Dir " . $plugin['cvsmodule'] . " renamed to " . $plugin['name'] . "\n";
-			} else {
-				echo BLUE . "Module " . $plugin['cvsmodule'] . " has already been checked out before.\n" . NORMAL;
-			}
-			echo "Updating " . $plugin['name'] . " to " . $plugin['new_branch'] . " branch...\n";
-			chdir ($plugin['name']);
-			if ($plugin['new_branch_is_date']) {
-				exec("cvs -Q -d " . $cvsroot . " update -dP -D " . $plugin['new_branch'] . " 2>>/tmp/patchmaker-errorlog",$out,$return_value); // returns 0 on success... that´s why the return_value var	
-			} else {
-				exec("cvs -Q -d " . $cvsroot . " update -dP -r " . $plugin['new_branch'] . " 2>>/tmp/patchmaker-errorlog",$out,$return_value); // returns 0 on success... that´s why the return_value var
-			}
-			if ($return_value != 0) {
-				die("Could not update" . $plugin['name'] . "from cvs, exiting...\n");
-			}
-			echo GREEN . "Module " . $plugin['name'] . " updated successfully.\n" . NORMAL;
-			if ($creatediffs) {
-				echo "Creating the diff for module " . $plugin['name'] . "...\n";
-				if ($plugin['new_branch_is_date']) {
-					if ($plugin['old_branch_is_date']) {
-						exec("cvs -Q -d " . $cvsroot . " diff -BbuN -D " . $plugin['old_branch'] . " -D " . $plugin['new_branch'] . " > ../../../" . $plugin['name'] . ".diff    2>>/tmp/patchmaker-errorlog");
-					} else {
-						exec("cvs -Q -d " . $cvsroot . " diff -BbuNr " . $plugin['old_branch'] . " -D " . $plugin['new_branch'] . " > ../../../" . $plugin['name'] . ".diff    2>>/tmp/patchmaker-errorlog");
-					}
-				} else {
-					if ($plugin['old_branch_is_date']) {
-						exec("cvs -Q -d " . $cvsroot . " diff -BbuN -D " . $plugin['old_branch'] . " -r " . $plugin['new_branch'] . " > ../../../" . $plugin['name'] . ".diff    2>>/tmp/patchmaker-errorlog");
-					} else {
-						exec("cvs -Q -d " . $cvsroot . " diff -BbuNr " . $plugin['old_branch'] . " -r " . $plugin['new_branch'] . " > ../../../" . $plugin['name'] . ".diff    2>>/tmp/patchmaker-errorlog");
-					}
-				}
-				if ((!(file_exists("../../../".$plugin['name'].".diff"))) || ((filesize("../../../".$plugin['name'].".diff")) < 1)  ){
-					if ((filesize("../../../".$plugin['name'].".diff")) < 1) {
-						echo BLUE . "The diff for " . $plugin['name'] . " is empty...  ---> " . $plugin['name'] . ".diff" . "\n" . NORMAL;
-						unlink("../../../" . $plugin['name'] . ".diff");
-					} else {
-						die("Could not create the diff, exiting...\n");
-					}
-				} else {
-					echo GREEN . "Diff created successfully ---> " . $plugin['name'] . ".diff" . ".\n" . NORMAL;
-				}
-			}			
-			chdir (".."); // return to plugins dir
-		}
-		chdir (".."); //return to main module dir
-		return true;
-	}
-
-/* MAIN */	
-
-if ($only_parse_diffs) {
-	chdir($new_branch);
-	parseDiffs();
-	joinDiffs();
-	exit();
-}
-
-if ($only_test_patch) {
-	chdir($new_branch);
-	if (testPatch($plugins,$debug_patch_output)) {
-		echo GREEN . "GFORGEPATCH file applied successfully, you can distribute the file\n" . NORMAL ;
-	} else {
-		echo RED . "GFORGEPATCH file couldn´t be applied correctly, please check the errors and correct manually\n" . NORMAL ;
-	}
-	exit();
-}
-
-// get the cvs version of new branch
-
-echo "Creating Dir " . $new_branch . " ...\n";
-
-$makedir = true;
-if (is_dir(getcwd() . "/" . $new_branch)) {
-	echo BLUE . "Dir " . $new_branch . " already exists.\n" . NORMAL;
-	echo BLUE . "The files are going to be changed. Continue? (Y/N) :" . NORMAL;
-	$sure = fread($STDIN,1);
-	if ( ($sure!='y') && ($sure!='Y') ) {
-		die(RED . "Exiting...\n");
-	}
-	fclose($STDIN);
-	$makedir = false;
-}
-
-if ($makedir) {
-	if (!mkdir(getcwd() . "/" . $new_branch)) {
-		die(RED . "Could not create dir $new_branch, exiting...\n");
-	}
-	echo "Dir " . $new_branch . " Created.\n";
-}
-
-chdir($new_branch);
-
-if (!(is_dir($cvsmodule))) {
-	//only checkout if there´s nothing in here
-	echo "Checking out " . $cvsmodule . "...\n";
-	exec("cvs -Q -d " . $cvsroot . " checkout $cvsmodule    2>>/tmp/patchmaker-errorlog",$out,$return_value);
-	if ($return_value != 0) {
-		die("Could not checkout from cvs, exiting...\n");
-	}
-	echo GREEN . "Module " . $cvsmodule . " checked out successfully.\n" . NORMAL;
-} else {
-	echo BLUE . "Module " . $cvsmodule . " has already been checked out before.\n" . NORMAL;
-}
-
-updateAll($new_branch,$new_branch_is_date,$plugins,0);
-
-echo "Creating the diff for module " . $cvsmodule . "...\n";
-
-if ($new_branch_is_date) {
-	if ($old_branch_is_date) {
-		exec("cvs -Q -d " . $cvsroot . " diff -BbuN -D $old_branch -D $new_branch > ../$cvsmodule.diff");
-	} else {
-		exec("cvs -Q -d " . $cvsroot . " diff -BbuNr $old_branch -D $new_branch > ../$cvsmodule.diff");
-	}
-} else {
-	if ($old_branch_is_date) {
-		exec("cvs -Q -d " . $cvsroot . " diff -BbuN -D $old_branch -r $new_branch > ../$cvsmodule.diff");
-	} else {
-		exec("cvs -Q -d " . $cvsroot . " diff -BbuNr $old_branch -r $new_branch > ../$cvsmodule.diff");
-	}
-}
-
-chdir ("..");
-if ((!(file_exists("$cvsmodule.diff"))) || ((filesize("$cvsmodule.diff")) < 1)  ){
-	if ((filesize("$cvsmodule.diff")) < 1) {
-		echo BLUE . "The diff for " . $cvsmodule . " is empty...in " . getcwd() . $cvsmodule . ".diff" . ".\n" . NORMAL;
-	} else {
-		die(RED . "Could not create the diff, exiting...\n" . NORMAL);
-	}
-} else {
-	echo GREEN . "Diff created successfully ---> " . $cvsmodule . ".diff" . ".\n" . NORMAL;
-}
-
-parseDiffs();
-joinDiffs();
-if (testPatch($plugins,$debug_patch_output)) {
-	echo GREEN . "GFORGEPATCH file applied successfully, you can distribute the file\n" . NORMAL ;
-} else {
-	echo RED . "GFORGEPATCH file couldn´t be applied correctly, please check the errors and correct manually\n" . NORMAL ;
-}
-
-/* END MAIN */
-
-/**** END PROGRAM ****/
-
-?>
\ No newline at end of file

Deleted: trunk/tools/savannah_std.class
===================================================================
--- trunk/tools/savannah_std.class	2010-10-02 15:31:50 UTC (rev 10798)
+++ trunk/tools/savannah_std.class	2010-10-02 15:31:56 UTC (rev 10799)
@@ -1,309 +0,0 @@
-<?php   
-
-//
-// Copyright 1999-2000 (c) The SourceForge Crew
-//
-//  This is a modified version made by the Savannah Project
-//  Copyright 2000-2001 (c) Free Software Foundation
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-//
-//
-// http://sourceforge.net
-
-
-/*
-
-	Extends the basic Error class to add HTML functions for displaying all site dependent HTML, while allowing extendibility/overriding by themes via the Theme class.
-
-	Make sure browser.php is included _before_ you create an instance of this object.
-
-	Geoffrey Herteg, August 29, 2000
-
-*/
-
-class Theme extends Layout {
-
-	var $theme_id;
-	var $long_name;
-	var $dir_name;
-
-	function Theme() {
-		// Parent constructor
-		$this->Layout();
-
-		// The root location for images
-		$this->imgroot = "themes/THEMENAME/images/";
-		$this->imgproj = "themes/THEMENAME/images/";
-
-		//Define all the icons for this theme
-		$this->icons = array('Summary' => 'ic/anvil24.png',
-			'Homepage' => 'ic/home.png',
-			'Forums' => 'ic/notes.png',
-			'Bugs' => 'ic/bug.png',
-			'Support' => 'ic/support.png',
-			'Patches' => 'ic/patch.png',
-			'Lists' => 'ic/mail.png',
-			'Tasks' => 'ic/index.png',
-			'Docs' => 'ic/docman.png',
-			'Surveys' => 'ic/survey.png',
-			'News' => 'ic/news.png',
-			'CVS' => 'ic/convert.png',
-			'Files' => 'ic/save.png'
-		);
-
-		$this->bgpri = array();
-
-		/*
-	        Set up the priority color array one time only
-		*/
-		$bgpri[1] = 'priora';
-		$bgpri[2] = 'priorb';
-		$bgpri[3] = 'priorc';
-		$bgpri[4] = 'priord';
-		$bgpri[5] = 'priore';
-		$bgpri[6] = 'priorf';
-		$bgpri[7] = 'priorg';
-		$bgpri[8] = 'priorh';
-		$bgpri[9] = 'priori';
-	}
-
-	// Box Top, equivalent to html_box1_top()
-	function box1_top($title,$echoout=1,$bgcolor=''){
-        	$return = '<table summary="" class="boxtable">
-                        <tr>
-                                <td colspan="2" class="boxtitle">'.$title.'</td>
-                        </tr>
-                       <tr>
-                                <td colspan="2" class="boxitem">';
-	        if ($echoout) {
-        	        print $return;
-	        } else {
-                	return $return;
-        	}
-	}
-
-	// Box Middle, equivalent to html_box1_middle()
-	function box1_middle($title,$bgcolor='') {
-        	return '
-                                </td>
-                        </tr>
-                        <tr>
-                                <td colspan="2" class="boxtitle">'.$title.'</td>
-                        </tr>
-                        <tr>
-                                <td colspan=2 class="boxitem">';
-	}
-
-	// Get an alternating row style for tables.
-	function box1_get_alt_row_style($i) {
-		if ($i % 2 == 0) {
-			return 'class=boxitem';
-		} else {
-			return 'class=boxitemalt';
-		}
-	}
-
-	// Box Bottom, equivalent to html_box1_bottom()
-	function box1_bottom($echoout=1) {
-        	$return = '
-                </td>
-                        </tr>
-        </table>
-';
-	        if ($echoout) {
-        	        print $return;
-	        } else {
-                	return $return;
-        	}
-	}
-
-	// generic_header_start() - Start a generic HTML header
-	function generic_header_start($params) {
-
-		global $G_SESSION, $sys_name;
-
-		if (!$params['title']) {
-			$params['title'] = $GLOBALS['sys_name'];
-		} else {
-			$params['title'] = $GLOBALS['sys_name'].": " . $params['title'];
-		}
-		?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-	"http://www.w3.org/TR/REC-html40/loose.dtd">
-
-<!-- Server: <?php echo $sys_name; ?> -->
-<html lang="<?php echo _('en') ?>">
-  <head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <TITLE><?php echo $params['title']; ?></TITLE>
-	<SCRIPT language="JavaScript">
-	<!--
-	function help_window(helpurl) {
-		HelpWin = window.open( '<?php echo ((session_issecure()) ? 'https://'.$GLOBALS['sys_default_domain'] : 'http://'.$GLOBALS['sys_default_domain'] ); ?>' + helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
-	}
-	// -->
-	</SCRIPT>
-    <meta name="Author" content="Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved">
-    <meta name="Keywords" content="Savannah,GNU, FSF, Free Software Foundation, Linux, Emacs, GCC, Unix, Free Software, Operating System, GNU Kernel, HURD, GNU HURD, SourceForge">
-    <meta name="Description" content="Savannah is a central point for development, distribution and maintainance of Free Software. It allows contributors to easily join existing Free Software projects.">
-	<?php
-	// 2002-04-15 yeupou at coleumes.org
-	// NOW we stop to use favico.ico read http://bugzilla.mozilla.org/show_bug.cgi?id=110296
-	?>
-    <link rel="stylesheet" type="text/css" href="/themes/THEMENAME/debiansf.css">
-    <link rel="icon" type="image/png" href="/images/debian-sf-icon.png">
-<?php
-	}
-
-	function generic_header_end($params) {
-	?>
-  </head>
-<?php
-	}
-
-	function generic_footer($params) {
-
-	        global $IS_DEBUG,$QUERY_COUNT;
-        	if ($IS_DEBUG && user_ismember(1,'A')) {
-	                echo "<CENTER><B><FONT COLOR=RED>Query Count: $QUERY_COUNT</FONT
-></B></CENTER>";
-                	echo "<P>$GLOBALS[G_DEBUGQUERY]";
-        	}
-	        ?>
-<p class="footer">
-Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA 
-
-Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
-
-</p>&nbsp;
-</body>
-</html>
-        <?php
-	}
-
-	function header($params) {
-	        $this->generic_header_start($params); 
-
-        	//themable someday?
-	        $site_fonts='helvetica,sans-serif';
-
-        $this->generic_header_end($params); 
-
-?>
-
-<body>
-
-<!-- start page body -->
-<table summary="" class="standardtable">
-        <tr>
-                <td colspan="3">
-<!-- start main body cell -->
-
-        <table summary="" class="standardtable">
-                <tr>
-                        <td class="menutable">
-
-        <?php
-        if (!session_issecure()) {
-                //print '<IMG src="/images/clear.png" width=140 height=1 alt="Counter"><BR>';
-        } else {
-                //print html_blankimage(1,140) . '<br>';
-        }
-        ?>
-
-        <a href="/"><?php print html_image($this->imgroot . "floating.png",'150','130',array('alt'=>'Floating GNU')); ?></a>
-        <p>
-        <!-- menus -->
-        <?php
-        menu_print_sidebar($params);
-        ?>
-        <P>
-        </TD>
-
-	<td class="contenttable">
-        <BR>
-<?php
-	}
-
-	function footer($params) {
-        ?>
-        <!-- end content -->
-        </tr>
-        </table>
-                </td>
-        </tr>
-</table>
-
-<!-- themed page footer -->
-<?php 
-	$this->generic_footer($params);
-	}
-
-
-
-	function menuhtml_top($title) {
-        	/*
-                	Use only for the top most menu
-	        */
-        ?>
-<table summary="" class="menutable">
-        <tr>
-                <td class="menutitle"><?php echo $title; ?><br></td>
-        </tr>
-        <tr>
-                <td class="menuitem">
-        <?php
-	}
-
-
-	function menuhtml_bottom() {
-	        /*
-        	        End the table
-	        */
-        	print '
-                        <BR>
-                        </td>
-                </tr>
-        </table>
-';
-	}
-
-	function menu_entry($link, $title) {
-        	print "\t".'<a href="'.$link.'">'.$title.'</a>&nbsp;&nbsp;';
-		print html_image($this->imgroot . "point.png",'7','7',array('alt'=>' > '));
-		print '&nbsp;&nbsp;<br>';
-	}
-
-        /*!     @function tab_entry
-                @abstract Prints out the a themed tab, used by project_tabs
-                @param  $url is the URL to link to
-			$icon is the image to use (if the theme uses it)
-			$title is the title to use in the link tags
-			$selected is a boolean to test if the tab is 'selected'
-                @result text - echos HTML to the screen directly
-        */
-	function tab_entry($url='http://localhost/', $icon='', $title='Home', $selected=0) {
-        	print '
-                <A ';
-	        if ($selected){
-        	        print 'class=tabselect ';
-	        } else {
-        	        print 'class=tabs ';
-	        }
-        	print 'href="'. $url .'">' . $title . '</A>&nbsp;|&nbsp;';
-	}
-}
-?>




More information about the Fusionforge-commits mailing list