Changeset 10460


Ignore:
Timestamp:
2005-08-10T14:14:47+12:00 (19 years ago)
Author:
mdewsnip
Message:

Now adds "-keepold" or "-removeold" to the buildcol.pl command (provided the user hasn't selected one) depending on whether incremental building is selected.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r10456 r10460  
    140140     * @see org.greenstone.gatherer.util.Utility
    141141     */
    142     public void buildCollection() {
    143     DebugStream.println("CollectionManager.buildCollection()");
     142    public void buildCollection(boolean incremental_build)
     143    {
     144    DebugStream.println("In CollectionManager.buildCollection(), incremental_build: " + incremental_build);
    144145    building = true;
    145146
     
    156157    command_parts_list.add("-collectdir");
    157158    command_parts_list.add(getCollectDirectory());
     159
     160    // If the user hasn't manually specified "-keepold" or "-removeold" then pick one based on incremental_build
     161    if (!collection.build_options.getValueEnabled("keepold") && !collection.build_options.getValueEnabled("removeold")) {
     162        command_parts_list.add(incremental_build ? "-keepold" : "-removeold");
     163    }
    158164
    159165    String[] build_options = collection.build_options.getValues();
     
    9971003        // Finish import.
    9981004        collection.setImported(true);
    999         buildCollection();
     1005        buildCollection(false);
    10001006    }
    10011007    // If we were running a build, now is when we move files across.
  • trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java

    r10456 r10460  
    5151import org.greenstone.gatherer.cdm.CollectionDesignManager;
    5252import org.greenstone.gatherer.collection.Collection;
    53 import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
    5453import org.greenstone.gatherer.shell.GBasicProgressMonitor;
    5554import org.greenstone.gatherer.shell.GBuildProgressMonitor;
     
    692691            DebugStream.println("Just want to run buildcol.pl");
    693692            prepareForBuild();
    694             Gatherer.c_man.buildCollection();
     693            Gatherer.c_man.buildCollection(isIncremental());
    695694        }
    696695        else if(rebuildTypeRequired == CollectionDesignManager.ALL) {
Note: See TracChangeset for help on using the changeset viewer.