From: <Sve...@nt...> - 2006-02-07 15:13:09
|
Author: SvenDowideit Date: 2006-02-07 07:04:43 -0800 (Tue, 07 Feb 2006) New Revision: 8738 Modified: twiki/branches/TWikiRelease04x00/tools/build.pl Log: Item000: only do an rcs commit of topics that have changed since the last version in the ,v files Modified: twiki/branches/TWikiRelease04x00/tools/build.pl =================================================================== --- twiki/branches/TWikiRelease04x00/tools/build.pl 2006-02-07 13:32:16 UTC (rev 8737) +++ twiki/branches/TWikiRelease04x00/tools/build.pl 2006-02-07 15:04:43 UTC (rev 8738) @@ -140,15 +140,27 @@ } else { # create rcs file, and ci } - #set revision number #TODO: what about topics with no META DATA? - my $cmd = 'perl -pi -e \'s/^(%META:TOPICINFO{.*version=)\"[^\"]*\"(.*)$/$1\"'.($currentRevision+1).'\"$2/\' '.$new.'/'.$file; + + #only do a checkin, if the files are different (fake the rev number to be the same) + my $cmd = 'perl -pi -e \'s/^(%META:TOPICINFO{.*version=)\"[^\"]*\"(.*)$/$1\"'.($currentRevision).'\"$2/\' '.$new.'/'.$file; `$cmd`; - - #check in - `ci -mbuildrelease -wTWikiContributor -t-new-topic $new/$file 2>&1`; - #get a copy of the latest revsion, no lock - `co -u -M $new/$file 2>&1`; - print "\n"; + my $different = `rcsdiff -q $new/$file`; + chomp($different); + + if (defined($different) && ($different ne '')) { + #set revision number #TODO: what about topics with no META DATA? + my $cmd = 'perl -pi -e \'s/^(%META:TOPICINFO{.*version=)\"[^\"]*\"(.*)$/$1\"'.($currentRevision+1).'\"$2/\' '.$new.'/'.$file; + `$cmd`; + #check in + `ci -mbuildrelease -wTWikiContributor -t-new-topic $new/$file 2>&1`; + #get a copy of the latest revsion, no lock + `co -u -M $new/$file 2>&1`; + print "\n"; + } else { + #force unlock + `rcs -u -M $new/$file,v 2>&1`; + print "nochange to $new/$file\n"; + } } # recursively check in files to RCS |