Pervasive SQL DDF maker and version control


John Knickerbocker
 

Hello group, Unipaas 1.9 & CVS. I'm trying to create the DDF's, but if the project is under version control it dies immediately with the message "Failed to locate project data sources repository, C:\Local VC copies\John\American8\\DataSources.xml. Execution will now terminate."

Notice that the \\ should be \Source\. The DDF maker works fine on projects not under version control. Hoping for a tweek rather than copying the project to a non VC version everytime I need to update the DDF's.

It is Steve Blanks DDF Maker, BTW.

Thanks for any ideas.


Steven Blank
 

John,

Unfortunately, DDFMaker doesn't know anything about Version Control and I've never taken the time to investigate the ramifications, or if even any exist. Apparently, you found the answer to the latter Q. Perhaps you can see where DDFMaker goes off the rails. The startup process is (and always has been) as follows:

  • Create a new Logical Name called %ProjectDir% by evaluating the following expression:

INIPut('[MAGIC_LOGICAL_NAMES]ProjectDir=*' & GetParam('MG_ApplicationWorkingFolder'), 'FALSE'LOG)

Note that, in the case of the global parameter MG_ApplicationWorkingFolder,  the parameter always includes a terminating backslash character ('\'). Thus, the translation for %ProjectDir% will also always include a terminating backslash.
  • Open the eDeveloper Project (*.edp) file using an I/O Device with XML Direct Access and the following expression:

Translate('%ProjectDir%' & GetParam('MG_ApplicationName') & '.edp')

  • Read the value of the Application/Project/SourceDirectory element's val attribute by Updating an Alpha variable ('S'VAR) with the following expression:

XMLGet(0, 1, '/Application/Project/SourceDirectory', 'val')

My assumption has always been that EDP files don't include a trailing backslash character in this value, at least I've never seen one that did. Thus, in order to construct a fully-qualified path to the DataSources.xml file (the ultimate goal of all this) , DDFMaker APPENDS a backslash in the next operation.
  • Create a new Logical Name %DDFMakerSrc% that points to the project's Source folder by evaluating the following expression:

INIPut('[MAGIC_LOGICAL_NAMES]DDFMakerSrc=*' & Translate('%ProjectDir%' & Trim(S) & '\'), 'FALSE'LOG)

where 'S'VAR is the Alpha variable Updated in the previous operation.
  • Finally validate the content of the Logical Name %DDFMakerSrc% by evaluating the following expression:

 FileExist('%DDFMakerSrc%DataSources.xml')

In your case, this expression evaluates to 'FALSE'LOG.
Bottom line: it appears that your project's EDP file does not contain a value for the Application/Project/SourceDirectory element's val attribute. The absence of a value here (or absence of the element/attribute itself) may very well be as it must be for Version Control to work, I don't know, but this is why you see what you see.

Sorry I can't help more.

Steven G. Blank
Ξ SGBlank Consulting

P.S. Note that I removed a couple of nested Trim() functions in order to make the expressions more readable.


On 8/4/2022 4:42 AM, John Knickerbocker wrote:
> Hello group, Unipaas 1.9 & CVS. I'm trying to create the DDF's, but > if the project is under version control it dies immediately with the > message "Failed to locate project data sources repository, C:\Local > VC copies\John\American8\\DataSources.xml. Execution will now > terminate." > > Notice that the \\ should be \Source\. The DDF maker works fine on > projects not under version control. Hoping for a tweek rather than > copying the project to a non VC version everytime I need to update > the DDF's. > > It is Steve Blanks DDF Maker, BTW. > > Thanks for any ideas.