Part of lp.translations.model
|Function||omit_redundant_pofiles||Batch-pouring callback: skip POFiles that have become redundant.|
This is needed to deal with a concurrency problem where POFiles may get created (through message sharing) while translations are still being copied.
DistroSerieswith source series' translations.
The target must not already have any translations.
This method uses
MultiTableCopy to copy data.
Translation data for the new series ("target") is first copied into holding tables called e.g. "temp_POTemplate_holding_ubuntu_feisty" and processed there. Then, near the end of the procedure, the contents of these holding tables are all poured back into the original tables.
If this procedure fails, it may leave holding tables behind. This was done deliberately to leave some forensics information for failures, and also to allow admins to see what data has and has not been copied.
If a holding table left behind by an abortive run has a column called new_id at the end, it contains unfinished data and may as well be dropped. If it does not have that column, the holding table was already in the process of being poured back into its source table. In that case the sensible thing to do is probably to continue pouring it.