Changeset 26
- Timestamp:
- 12/11/07 21:05:53 (1 year ago)
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/dev-tools/update-loblaw-test.plx (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r21 r26 1 2007-12-11 Bradley M. Kuhn <bkuhn@softwarefreedom.org> 2 3 * dev-tools/update-loblaw-test.plx (ProcessRevision): Fixed 4 various bugs based on confusions about which file name is in which 5 directory. 6 1 7 2007-12-09 Bradley M. Kuhn <bkuhn@softwarefreedom.org> 2 8 trunk/dev-tools/update-loblaw-test.plx
r24 r26 280 280 DieLog("Failure to aquire lock in $repository for $revision. " . 281 281 "loblaw-test Mercurial update aborted!") 282 if $lockData[0] =~ /failed/;282 if defined $lockData[0] and $lockData[0] =~ /failed/; 283 283 284 284 DoUpdate($revision); # Make sure we have the latest and the greatest … … 291 291 292 292 foreach my $vals (@operateOnFiles) { 293 my($operation, $ file, $changeLine) =293 my($operation, $inputFile, $changeLine) = 294 294 ($vals->{operation}, $vals->{file}, $vals->{changeLine}); 295 295 … … 300 300 # See if this is a file we are actually processing over to the hg repository 301 301 next unless defined $DUAL_REVISIONED_FILE_LIST{$file}; 302 my $outputFile = $DUAL_REVISIONED_FILE_LIST{$file}; 302 303 303 304 if ($operation =~ /^\s*(?:U|M|\~|L|A)\s*/) { 304 305 my($dir, $filename); 305 if (-d $file) {306 ($dir, $filename) = ($ file, "");306 if (-d "$LOBLAW_TRUNK_CHECKOUT/$inputFile") { 307 ($dir, $filename) = ($outputFile, ""); 307 308 } else { 308 ($dir, $filename) = fileparse($ file);309 ($dir, $filename) = fileparse($outputFile); 309 310 } 310 311 eval { mkpath("$LOBLAW_TEST_HG_CHECKOUT/$dir", 0, 0755) }; … … 314 315 # copy the actual file over, if it is a file and not a directory. 315 316 unless ($filename =~ /^\s*$/) { 316 copy($file, "$LOBLAW_TEST_HG_CHECKOUT/$DUAL_REVISIONED_FILE_LIST{$file}") 317 or DieLog("Couldn't copy into $LOBLAW_TEST_HG_CHECKOUT/$file: $!", 317 copy($inputFile, "$LOBLAW_TEST_HG_CHECKOUT/$outputFile") 318 or DieLog("Couldn't copy $inputFile into " . 319 "$LOBLAW_TEST_HG_CHECKOUT/$outputFile: $!", 318 320 $LOCK_CLEANUP_CODE); 319 321 } … … 321 323 if ($operation =~ /^\s*A\s*/); 322 324 } elsif ($operation =~ /^\s*D\s*/) { 323 unlink("$LOBLAW_TEST_HG_CHECKOUT/$ DUAL_REVISIONED_FILE_LIST{$file}");325 unlink("$LOBLAW_TEST_HG_CHECKOUT/$outputFile"); 324 326 read_from_process($HG, 'remove', 325 "$LOBLAW_TEST_HG_CHECKOUT/$ DUAL_REVISIONED_FILE_LIST{$file}");327 "$LOBLAW_TEST_HG_CHECKOUT/$outputFile"); 326 328 } else { 327 329 DieLog("Invalid svnlook status, $operation, in $changeLine", 328 330 $LOCK_CLEANUP_CODE); 329 331 } 330 my @svnLog = read_from_process($SVN, '-r', $revision, 'log', $ file);332 my @svnLog = read_from_process($SVN, '-r', $revision, 'log', $inputFile); 331 333 my($tempFH, $tempFile) = mkstemps( "hgcommitXXXXXX", ".log"); 332 334 foreach my $line (@svnLog) { … … 338 340 $tempFH->close(); 339 341 my @vals = read_from_process($HG, '-l', $tempFile, 'commit', 340 "$LOBLAW_TEST_HG_CHECKOUT/$ file");342 "$LOBLAW_TEST_HG_CHECKOUT/$outputFile"); 341 343 unlink($tempFile); 342 344 DieLog("Unexpected output from commit: " . join("\n", @vals), 343 345 $LOCK_CLEANUP_CODE) if (@vals > 0); 344 346 $commitDone = 1; 345 read_from_process($HG, 'push') if $commitDone;346 }347 } 348 read_from_process($HG, 'push') if $commitDone; 347 349 &$LOCK_CLEANUP_CODE; 348 350 }