Changeset 28067 for other-projects/nightly-tasks/diffcol
- Timestamp:
- 2013-08-15T16:46:52+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm
r28019 r28067 186 186 (my $gsdlhome_re = $ENV{'GSDLHOME'}) =~ s@\\@\/@g; 187 187 $gsdlhome_re = ".*" unless $$ENV{'GSDLHOME'}; 188 my $tmpfile_regex = "<URL>http://$gsdlhome_re/tmp/([^\.]* )(\..{3,4})"; # $gsdlhome/tmp/randomfilename.html, file ext can be 3 or 4 chars long188 my $tmpfile_regex = "<URL>http://$gsdlhome_re/tmp/([^\.]*?)(\..{3,4})"; # $gsdlhome/tmp/randomfilename.html, file ext can be 3 or 4 chars long 189 189 if($test_text =~ m@$tmpfile_regex@g) { 190 190 # found a match, replace the tmp file name with "random", keeping the original file extension … … 198 198 199 199 200 $tmpfile_regex = "(<(URL|UTF8URL|gsdlconvertedfilename|OrigSource)>(http://)?)($gsdlhome_re)?(/tmp/)?.* (\..{3,4})";200 $tmpfile_regex = "(<(URL|UTF8URL|gsdlconvertedfilename|OrigSource)>(http://)?)($gsdlhome_re)?(/tmp/)?.*?(\..{3,4})"; 201 201 if($5) { 202 202 $test_text =~ s@$tmpfile_regex@$1$5$new_tmp_filename$6@mg; … … 206 206 207 207 # modelcol used a different gsdlhome, but also a tmp dir, so make the same changes to its random filename 208 $tmpfile_regex = "(<(URL|UTF8URL|gsdlconvertedfilename|OrigSource)>(http://)?)(.*)?(/tmp/)?.* (\..{3,4})";208 $tmpfile_regex = "(<(URL|UTF8URL|gsdlconvertedfilename|OrigSource)>(http://)?)(.*)?(/tmp/)?.*?(\..{3,4})"; 209 209 if($5) { 210 210 $model_text =~ s@$tmpfile_regex@$1$5$new_tmp_filename$6@mg; … … 219 219 #$test_text =~ s@\[http://.*/tmp/.*(\..{3,4})\]@tmp/random$1@mg; # HASH OIDs can appear in different order 220 220 #$model_text =~ s@\[http://.*/tmp/.*(\..{3,4})\]@tmp/random$1@mg; 221 $test_text =~ s@\[http://.*/tmp/.*(\..{3,4})\]\n<section>[^\n]*\n@tmp/random$1\n<section>RandomHash\n@sg; 222 $model_text =~ s@\[http://.*/tmp/.*(\..{3,4})\]\n<section>[^\n]*\n@tmp/random$1\n<section>RandomHash\n@sg; 221 222 $test_text =~ s@\[http://[^\n]*?/tmp/.*?(\..{3,4})\]\n<section>([^\n]*?)\n@tmp/random$1\n<section>$2\n@sg; 223 $model_text =~ s@\[http://[^\n]*?/tmp/.*?(\..{3,4})\]\n<section>([^\n]*?)\n@tmp/random$1\n<section>$2\n@sg; 223 224 } 224 225
Note:
See TracChangeset
for help on using the changeset viewer.