data.edit.mentor.edcum

data.edit.mentor.edcum synchronizes an ed_cum.stn file with the edit database kept by the DB system. It has two mods of operation, import and export. A third synchronize mode is equivalent to doing both an export and an import with neither being authoritative (that is only adding edits to both sources).

When importing it reads an existing ed_cum file and injects all the directives it finds there that don't match an existing directive. Edits are never removed from the edit database unless the ed_cum file is said to be authoritative (via a switch), in which case all edits strictly contained within the bounds (first and last) of the ed_cum file are removed prior to injection.

When exporting all edits in the edit database are read and compared against the current contents of the ed_cum file, if one is not found it is added. No edits are removed from the ed_cum file unless the authoritative switch is present, in which case the ed_cum file is cleared prior to any additions (that is all edits in the edit database are added and all existing directives in the ed_cum file are removed).

Command Line Usage

data.edit.mentor.edcum [--file=FILE] [--authoritative] [--debugadd] 
                       [station] action

Arguments

station

The station identifier code. For example 'brw'. Case insensitive.

action

Either “import”, “export”, or “sychronize”, see above.

--file=FILE

Set the ed_cum file to use, instead of $STN/$STATION/new/ed_cum.$STATION.

--authoritative

Set the current action as authoritative. For imports that means removing edits from the edit database, for exports clearing the ed_cum file. Can't be used with synchronize mode. USE WITH CAUTION.

--debugadd

Output debugging information for any directives added to either location. Used to determine why synchronizations that should be no-ops alter a database.

Example Usage

Synchronize the ed_cum file

data.edit.mentor.edcum sgp synchronize

Generate a new ed_cum file

data.edit.mentor.edcum --file=ed_cum.sgp.new --authoritative sgp export