Openbravo Issue Tracking System - Tools
View Issue Details
0006018Toolsopenbravo2popublic2008-11-18 13:192014-04-02 15:51
gforcada 
pheenan 
normalmajoralways
closedfixed 
5
0006018: Can't run runTemplateMerge where the folders contains more than one file
While trying to merge two templates with their base files it fails, even if the files alone merges successfully.
Create a directory and place two files that will be the templates.
Create another directory and place two other files (with the same table as the templates each one) that will be the base files.

execute:
ant runTemplateMerge --inpTempFold=1st directory --inpBaseFold=2nd directory --outFold=another directory

openbravo2po crashes.

But if you move on template and one base file outside the directories the runTemplateMerge ends successfully and the same happens if you switch the files (the ones that are outside from the ones that are inside)

It only fails when there is more than one file in both inpTempFold and inpBaseFold
It would be nice that for a massive TemplateMerge to iterate over all xml files in inpTempFold and try to find a counterpart in inpBaseFold, merge them and send the result to outFold.

For a fine grained merge fixing 0006014 would do the trick.
commsup_sprint6
Issue History
2008-11-18 13:19gforcadaNew Issue
2008-12-09 14:56pheenanAssigned To => pheenan
2009-01-29 15:36pheenanStatusnew => scheduled
2009-01-29 15:36pheenanfix_in_branch => trunk
2009-02-11 19:03pheenanStatusscheduled => resolved
2009-02-11 19:03pheenanResolutionopen => fixed
2009-02-11 19:03pheenanNote Added: 0013370
2009-02-20 09:30PavelPonomarevTag Attached: commsup_sprint6
2014-04-02 15:51dmitry_mezentsevNote Added: 0066091
2014-04-02 15:51dmitry_mezentsevStatusresolved => closed

Notes
(0013370)
pheenan   
2009-02-11 19:03   
Refer fix to 6014. Patch to this issue also completes this request.

Repository: localization
Revision: 271
Author: pheenan
Date: 2009-02-11 19:01:28 +0100 (Wed, 11 Feb 2009)

Fixed 6014. Added two arguments to the template merge task. Task now takes a combination of templateFolder, baseFolder, templateFile, baseFile. If the templateFolder and baseFolder are empty then only the file args will be used. If both are used then they should combine to show the path to the files. If the file args are empty then the folders will be parsed and all files contained in those folders will be merged. Updated other test cases to use the new argument pattern. Added test files used in the test cases.

---
U tools/openbravo2po/branches/openbravo2po-valuetrl/build.xml
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/objects/TaskProcess.java
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/templateMerge/TemplateMerge.java
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/templateMerge/TemplateProcessor.java
U tools/openbravo2po/branches/openbravo2po-valuetrl/src/org/openbravo/xmlpo/utils/XMLFileBuilder.java
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/baseFolder/
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/baseFolder/AD_MENU_TRL_it_IT.xml
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/baseFolder/AD_TASK_TRL_it_IT.xml
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/outputFolder/
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/outputSingleFileWithFolder/
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/templateFolder/
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/templateFolder/AD_MENU_TRL_en_US.xml
A tools/openbravo2po/branches/openbravo2po-valuetrl/tests/resources/templateMerge/folderTest/templateFolder/AD_TASK_TRL_en_US.xml
U tools/openbravo2po/branches/openbravo2po-valuetrl/tests/src/org/openbravo/xmlpo/templateMerge/TestTemplateMerge.java
U tools/openbravo2po/branches/openbravo2po-valuetrl/tests/src/org/openbravo/xmlpo/utils/TestMergeXMLFiles.java
---

https://dev.openbravo.com/websvn/localization/?rev=271&sc=1 [^] [^]
(0066091)
dmitry_mezentsev   
2014-04-02 15:51   
Old issues