Software Freedom Law Center

Changeset 26

Show
Ignore:
Timestamp:
12/11/07 21:05:53 (1 year ago)
Author:
bkuhn
Message:
  • Fixed various bugs that existed due to confusion between file names in
    the SVN repository and those in the HG repository.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r21 r26  
     12007-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 
    172007-12-09  Bradley M. Kuhn  <bkuhn@softwarefreedom.org> 
    28 
  • trunk/dev-tools/update-loblaw-test.plx

    r24 r26  
    280280  DieLog("Failure to aquire lock in $repository for $revision. " . 
    281281         "loblaw-test Mercurial update aborted!") 
    282     if $lockData[0] =~ /failed/; 
     282    if defined $lockData[0] and $lockData[0] =~ /failed/; 
    283283 
    284284  DoUpdate($revision);  # Make sure we have the latest and the greatest 
     
    291291 
    292292  foreach my $vals (@operateOnFiles) { 
    293     my($operation, $file, $changeLine) = 
     293    my($operation, $inputFile, $changeLine) = 
    294294      ($vals->{operation}, $vals->{file}, $vals->{changeLine}); 
    295295 
     
    300300    # See if this is a file we are actually processing over to the hg repository 
    301301    next unless defined $DUAL_REVISIONED_FILE_LIST{$file}; 
     302    my $outputFile = $DUAL_REVISIONED_FILE_LIST{$file}; 
    302303 
    303304    if ($operation =~ /^\s*(?:U|M|\~|L|A)\s*/) { 
    304305      my($dir, $filename); 
    305       if (-d $file) { 
    306         ($dir, $filename) = ($file, ""); 
     306      if (-d "$LOBLAW_TRUNK_CHECKOUT/$inputFile") { 
     307        ($dir, $filename) = ($outputFile, ""); 
    307308      } else { 
    308         ($dir, $filename) = fileparse($file); 
     309        ($dir, $filename) = fileparse($outputFile); 
    309310      } 
    310311      eval { mkpath("$LOBLAW_TEST_HG_CHECKOUT/$dir", 0, 0755) }; 
     
    314315      # copy the actual file over, if it is a file and not a directory. 
    315316      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: $!", 
    318320             $LOCK_CLEANUP_CODE); 
    319321      } 
     
    321323        if ($operation =~ /^\s*A\s*/); 
    322324    } elsif ($operation =~ /^\s*D\s*/) { 
    323       unlink("$LOBLAW_TEST_HG_CHECKOUT/$DUAL_REVISIONED_FILE_LIST{$file}"); 
     325      unlink("$LOBLAW_TEST_HG_CHECKOUT/$outputFile"); 
    324326      read_from_process($HG, 'remove', 
    325                     "$LOBLAW_TEST_HG_CHECKOUT/$DUAL_REVISIONED_FILE_LIST{$file}"); 
     327                    "$LOBLAW_TEST_HG_CHECKOUT/$outputFile"); 
    326328    } else { 
    327329      DieLog("Invalid svnlook status, $operation, in $changeLine", 
    328330             $LOCK_CLEANUP_CODE); 
    329331    } 
    330     my @svnLog = read_from_process($SVN, '-r', $revision, 'log', $file); 
     332    my @svnLog = read_from_process($SVN, '-r', $revision, 'log', $inputFile); 
    331333    my($tempFH, $tempFile) = mkstemps( "hgcommitXXXXXX", ".log"); 
    332334    foreach my $line (@svnLog) { 
     
    338340    $tempFH->close(); 
    339341    my @vals = read_from_process($HG, '-l', $tempFile, 'commit', 
    340                                  "$LOBLAW_TEST_HG_CHECKOUT/$file"); 
     342                                 "$LOBLAW_TEST_HG_CHECKOUT/$outputFile"); 
    341343    unlink($tempFile); 
    342344    DieLog("Unexpected output from commit: " . join("\n", @vals), 
    343345           $LOCK_CLEANUP_CODE) if (@vals > 0); 
    344346    $commitDone = 1; 
    345     read_from_process($HG, 'push') if $commitDone; 
    346   } 
     347  } 
     348  read_from_process($HG, 'push') if $commitDone; 
    347349  &$LOCK_CLEANUP_CODE; 
    348350} 

SFLC Main Page

[frdm] Support SFLC