Changeset 37730
- Timestamp:
- 2023-04-27T15:53:20+12:00 (5 weeks ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/DocHistoryFileUtils.pm
r37689 r37730 504 504 } 505 505 elsif ($index_status eq "I") { 506 print STDERR " Newly generated version of document from 'import/' of existing document from 'archives/' (Index-Status=I)\n"; 507 print STDERR " => keepold: store snapshot of previous version in $FLDV_HISTORY_DIR as 'nminus-1'\n"; 508 prepend_document_version($keepold_doc_dirname,$doc_dirname); 506 507 if (!&FileUtils::directoryExists($doc_dirname)) { 508 # This can happen if import.pl has been run twice in a row , without buildcol.pl 509 # 510 # Specifics: In the case that the second import.pl run is incremental, then previous "I" entries 511 # from the first import.pl have not been processed by buildcol.pl and turned into "B" entries. 512 # However, if existing "I" entries have not been modified between the first and second import.pl 513 # then there is is no 'doc_dirname' that has been created in the newly formed archives. Further, 514 # the archives_keepold version isn't an example of a document that needs a "fldv" bump. 515 516 # long description to say, that basically we want to treat the situation like a "B", that 517 # it's been index 518 519 print STDERR " Unchanged version of document in 'archives/' however (Index-Status=I not B)\n"; 520 print STDERR " This can occur if two consecutive import.pl's have been run, without a buildcol.pl inbetween\n"; 521 print STDERR " => Recusirvely copying the archives_keepold/ doc across verbatim to archives/\n"; 522 print STDERR " (effectively treating as a 'B')\n"; 523 524 doc_copy_archivedir_keepold_to_archivedir($keepold_doc_dirname,$doc_dirname); 525 } 526 else { 527 print STDERR " Newly generated version of document from 'import/' of existing document from 'archives/' (Index-Status=I)\n"; 528 print STDERR " => keepold: store snapshot of previous version in $FLDV_HISTORY_DIR as 'nminus-1'\n"; 529 530 prepend_document_version($keepold_doc_dirname,$doc_dirname); 531 } 509 532 } 510 533 elsif ($index_status eq "B") { … … 541 564 } 542 565 elsif ($index_status eq "I") { 543 print STDERR " Newly generated version of document from 'import/' of existing document from 'archives/' (Index-Status=I)\n"; 544 print STDERR " => keepold: store snapshot of previous version in $FLDV_HISTORY_DIR as 'nminus-1'\n"; 545 replace_document_version($keepold_doc_dirname,$doc_dirname); 566 567 if (!&FileUtils::directoryExists($doc_dirname)) { 568 # This can happen if import.pl has been run twice in a row , without buildcol.pl 569 # 570 # For explanation see above 'I' entry for -keepold 571 # 572 # Basically we want to treat the situation like a "B", that it's been index 573 574 print STDERR " Unchanged version of document in 'archives/' however (Index-Status=I not B)\n"; 575 print STDERR " This can occur if two consecutive import.pl's have been run, without a buildcol.pl inbetween\n"; 576 print STDERR " => Recusirvely copying the archives_keepold/ doc across verbatim to archives/\n"; 577 print STDERR " (effectively treating as a 'B')\n"; 578 579 doc_copy_archivedir_keepold_to_archivedir($keepold_doc_dirname,$doc_dirname); 580 } 581 else { 582 print STDERR " Newly generated version of document from 'import/' of existing document from 'archives/' (Index-Status=I)\n"; 583 print STDERR " => keepold: store snapshot of previous version in $FLDV_HISTORY_DIR as 'nminus-1'\n"; 584 replace_document_version($keepold_doc_dirname,$doc_dirname); 585 } 546 586 } 547 587 elsif ($index_status eq "B") { -
main/trunk/greenstone2/perllib/scriptutil.pm
r37152 r37730 171 171 # incremental implies keepold 172 172 if ($incremental) { 173 $keepold = 1; 173 if (!$replaceold) { 174 $keepold = 1; 175 } 174 176 } 175 177 return ($removeold, $keepold, $replaceold, $incremental, $incremental_mode);
Note:
See TracChangeset
for help on using the changeset viewer.