CVSROOT/. log_accum

Alexandre Julliard julliard at wine.codeweavers.com
Fri Aug 3 10:53:53 CDT 2007


ChangeSet ID:	31304
CVSROOT:	/opt/cvs-commit
Module name:	CVSROOT
Changes by:	julliard at winehq.org	2007/08/03 10:53:53

Modified files:
	.              : log_accum 

Log message:
	log_accum: Fixes for new CVS syntax and for temp file cleanup.

Patch: http://cvs.winehq.org/patch.py?id=31304

Old revision  New revision  Changes     Path
 1.33          1.34          +10 -10     CVSROOT/log_accum

Index: CVSROOT/log_accum
diff -u -p CVSROOT/log_accum:1.33 CVSROOT/log_accum:1.34
--- CVSROOT/log_accum:1.33	3 Aug 2007 15:53:53 -0000
+++ CVSROOT/log_accum	3 Aug 2007 15:53:53 -0000
@@ -246,9 +246,8 @@ sub change_summary {
 		    chop;
 		    $delta = $_;
 		    # newly added files don't have the lines: indication
-		    if (index($delta, 'lines:') != -1) {
-		       $delta =~ s/^.*;//;
-		       $delta =~ s/^[\s]+lines:\s*//;
+                    if ($delta =~ /lines:\s*([^;]*)/) {
+                       $delta = $1;
 		    } else {
 		       $delta = '+0 -0';
 		    }
@@ -286,12 +285,12 @@ sub create_diff {
     @text = ();
     $tmp_old = $tmp_new = $dif_old = $dif_new = '/dev/null';
 
-    if ($old_rev != 'Added') {
+    if ($old_rev ne 'Added') {
 	$tmp_old = "$tmp_file.old";
 	$dif_old = "$filename:$old_rev";
         system("cd /; cvs -qf -d '$cvsroot' co -p -r '$old_rev' '$filename' > '$tmp_old'");
     } 
-    if ($new_rev != 'Removed') {
+    if ($new_rev ne 'Removed') {
 	$tmp_new = "$tmp_file.new";
 	$dif_new = "$filename:$new_rev";
 	system("cd /; cvs -qf -d '$cvsroot' co -p -r '$new_rev' '$filename' > '$tmp_new'");
@@ -304,7 +303,7 @@ sub create_diff {
     }
     system($cvs_cmd);
 
-    if ($new_rev == 'Removed') {
+    if ($new_rev eq 'Removed') {
 	$dis_old = $filename;
 	$dis_new = '/dev/null';
     } else {
@@ -326,8 +325,8 @@ sub create_diff {
         push(@text, $_);
     }
     close(DIFF);
-    unlink $tmp_old unless $tmp_old = '/dev/null';
-    unlink $tmp_new unless $tmp_new = '/dev/null';
+    unlink $tmp_old unless $tmp_old eq '/dev/null';
+    unlink $tmp_new unless $tmp_new eq '/dev/null';
 
     return $#text > 4 ? @text : ();
 }
@@ -654,7 +653,7 @@ if ($debug) {
 #    files[2] - "New"
 #    files[3] - "directory"
 #
-if ($files[2] =~ /New/ && $files[3] =~ /directory/) {
+if ($files[1] =~ /- New directory/ || ($files[2] =~ /New/ && $files[3] =~ /directory/)) {
     local(@text);
 
     @text = ();
@@ -741,7 +740,7 @@ for ($i = $#log_lines; $i > 0; $i--) {
 #    files[2] - "Imported"
 #    files[3] - "sources"
 #
-if ($files[2] =~ /Imported/ && $files[3] =~ /sources/) {
+if ($files[1] =~ /- Imported sources/ || ($files[2] =~ /Imported/ && $files[3] =~ /sources/)) {
     local(@text);
 
     @text = ();
@@ -762,6 +761,7 @@ if ($files[2] =~ /Imported/ && $files[3]
 	&write_commitlog($commitlog, @text);
     }
 
+    &cleanup_tmpfiles() unless $debug;
     exit 0;
 }
 



More information about the wine-cvs mailing list