Ignore:
Timestamp:
2013-08-08T16:20:31+12:00 (11 years ago)
Author:
ak19
Message:
  1. task.pl summarise cmd now prints out whether the diffcol result is success or failure (previously it would only do this on the upload cmd) 2. Another gdb field had double windows backslashes that got turned into double forward slashes for the MARC-Exploded collection, which need to be single forward slashes when normalising for comparing with the linux version of the gdb file contents.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm

    r27969 r28005  
    6060
    6161#   my $savepath = &getcwd."/../"; # TASK_HOME env var does not exist at this stage, but it's one level up from current directory
    62 #   print_string_to_file($test_text, $savepath.$dbname."_test.out");   
    63 #   print_string_to_file($model_text, $savepath.$dbname."_model.out");
     62#   print_string_to_file($test_text, $savepath.$dbname."_test.out1");   
     63#   print_string_to_file($model_text, $savepath.$dbname."_model.out1");
    6464
    6565    # filter out the fields that can be ignored in the two database files
     
    136136            my $tmp = ""; # rebuild windows file's set of lines after processing them one by one
    137137            for my $line (split /^/, $$win_text) { # split the string into newlines
    138                
    139                 if($line =~ m@^<ex.File.Directory>(.*)@s) { # word-pdf collection contains double windows backslashes
    140                     (my $escaped_path = $1) =~ s@\\\\@\\@g;             
    141                     $line = "<ex.File.Directory>$escaped_path";
     138           
     139                # In the following regex, add any .gdb fieldnames that represent a path and so would contain double backslashes
     140                # on Windows (to escape the single backlash of win filepaths). They will be turned into single-backslashes here,
     141                # and converted into single forward slashes futher below when the txt version of the win gdb file is normalised
     142                # to compare it with the linux version.
     143                # E.g. On windows, the Word-PDF collection(s) contains double backslashes in the ex.File.Directory field
     144                # the MARC-Exploded collection contains double backslashes in the null_file entry field of the .gdb file               
     145                if($line =~ m@^<(ex.File.Directory|null_file)>(.*)@s) {
     146                    my ($fieldname, $escaped_path) = ($1, $2);
     147                    $escaped_path =~ s@\\\\@\\@g; #(my $escaped_path = $2) =~ s@\\\\@\\@g;
     148                    $line = "<$fieldname>$escaped_path";
    142149                }
    143150                elsif($line =~ m@^<Title>(.*)@s) {
Note: See TracChangeset for help on using the changeset viewer.