diff --git a/FoxBin2PRGVersionFile.txt b/FoxBin2PRGVersionFile.txt index f112a9b..a406605 100644 --- a/FoxBin2PRGVersionFile.txt +++ b/FoxBin2PRGVersionFile.txt @@ -3,7 +3,7 @@ Lparameters toUpdateInfo Local lcNote With toUpdateInfo .VersionNumber = 'v1.19.50' - .VersionDate = Date(2017,04,26) + .VersionDate = Date(2018,03,03) .SourceFileUrl = 'http://vfpxrepository.com/dl/thorupdate/Projects/FoxBin2Prg/FoxBin2Prg.Zip' .Link = 'http://vfpx.codeplex.com/wikipage?title=FoxBin2PRG' @@ -21,6 +21,9 @@ Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg Change History ------------------------------------------------------------- +2018-03-03 v1.19.50 +- Added a new CFG "BodyDevInfo" switch to control the DevInfo body data of PJX. It is disabled by default because DevInfo normally have compiled data that can be regenerated and causes many differences on source control tools + 2018-02-03 v1.19.49.8 - Bug Fix: When converting a VCX corrupted with duplicated objects to text, "The specified key already exists" error is thrown (Kirides) diff --git a/foxbin2prg.cfg.txt b/foxbin2prg.cfg.txt index 338f943..aead4cf 100644 --- a/foxbin2prg.cfg.txt +++ b/foxbin2prg.cfg.txt @@ -17,6 +17,7 @@ * DontShowErrors: 0 && Show message errors by default / Mostrar mensajes de error por defecto * NoTimestamps: 1 && Clear timestamps by default for minimize differences / Vaciar Timestamps por defecto para minimizar diferencias * Debug: 0 && Don't Activate individual .Log by default / No Activar .Log por defecto +* BodyDevInfo: 0 && [0=Don't keep DevInfo for body pjx records], 1=Keep DevInfo / [0=No guardar DevInfo para el cuerpo del PJX], 1=Guardar DevInfo * ExtraBackupLevels: 1 && By default 1 BAK is created. With this you can make more .N.BAK, or none / Por defecto 1 BAK es creado. Con esto puede crear más .N.BAK, o ninguno * ClearUniqueID: 1 && 0=Keep UniqueID, 1=Clear Unique ID. Useful for Diff and Merge / 0=Mantener UniqueID, 1=Borrar Unique ID. Util para Diff y Merge * ClearDBFLastUpdate: 1 && 0=Keep DBF LastUpdate, 1=Clear DBF LastUpdate. Useful for Diff. / 0=Mantener DBF LastDate, , 1=Borrar DBF LastDate. Util para Diff. diff --git a/foxbin2prg.prg b/foxbin2prg.prg index c99b4d0..a0fb017 100644 --- a/foxbin2prg.prg +++ b/foxbin2prg.prg @@ -208,6 +208,7 @@ * 04/01/2018 FDBOZZO v1.19.49.6 Bug Fix vcx/scx: Cuando se regenera la propiedad _MemberData se agregan CR/LF por cada miembro, pudiendo provocar un error de "valor muy largo" (Doug Hennnig) * 11/01/2018 FDBOZZO v1.19.49.7 Bug Fix: Cuando se convierte la estructura de un DBF puede dar error si existe un campo llamado I o X (Francisco Prieto) * 30/01/2018 FDBOZZO v1.19.49.8 Bug Fix: Cuando se convierte a texto una libreria corrupta con registros duplicados, se genera el error "The specified key already exists" (Kirides) +* 03/03/2018 FDBOZZO v1.19.50 Mejora: La información DevInfo de los PJX estará inhabilitada por defecto y se podrá activar con el nuevo switch BodyDevInfo * * *--------------------------------------------------------------------------------------------------- @@ -808,6 +809,7 @@ DEFINE CLASS c_foxbin2prg AS Session l_CFG_CachedAccess = .F. n_CFG_EvaluateFromParam = 0 n_Debug = 0 + n_BodyDevInfo = 0 && Indica si se debe incluir el campo DevInfo en el cuerpo de los pjx/pj2 l_Error = .F. && Indicador de errores del proceso actual l_Errors = .F. && Indicador de error de la sesión actual, acumulativo de todos los procesos c_TextErr = '' @@ -1194,6 +1196,15 @@ DEFINE CLASS c_foxbin2prg AS Session ENDPROC + PROCEDURE n_BodyDevInfo_ACCESS + IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) ) + RETURN THIS.n_BodyDevInfo + ELSE + RETURN NVL( THIS.o_Configuration( THIS.n_CFG_Actual ).n_BodyDevInfo, THIS.n_BodyDevInfo ) + ENDIF + ENDPROC + + PROCEDURE l_ShowErrors_ACCESS IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) ) RETURN THIS.l_ShowErrors @@ -2268,6 +2279,13 @@ DEFINE CLASS c_foxbin2prg AS Session .writeLog( C_TAB + JUSTFNAME(lcConfigFile) + ' > ExcludeDBFAutoincNextval: ' + TRANSFORM(lo_CFG.n_ExcludeDBFAutoincNextval) ) ENDIF + CASE LEFT( laConfig(m.I), 12 ) == LOWER('BodyDevInfo:') + lcValue = ALLTRIM( SUBSTR( laConfig(m.I), 13 ) ) + IF INLIST( lcValue, '0', '1' ) THEN + lo_CFG.n_BodyDevInfo = INT( VAL( lcValue ) ) + .writeLog( C_TAB + JUSTFNAME(lcConfigFile) + ' > BodyDevInfo: ' + TRANSFORM(lo_CFG.n_BodyDevInfo) ) + ENDIF + ENDCASE ENDFOR @@ -10990,7 +11008,7 @@ DEFINE CLASS c_conversor_prg_a_pjx AS c_conversor_prg_a_bin *-- Identifico el inicio/fin de bloque, definición, cabecera y cuerpo de cada clase .updateProgressbar( 'Identifying Code Blocks...', 1, 2, 1 ) - .identifyCodeBlocks( @laCodeLines, lnCodeLines, @laLineasExclusion, lnBloquesExclusion, @toProject ) + .identifyCodeBlocks( @laCodeLines, lnCodeLines, @laLineasExclusion, lnBloquesExclusion, @toProject, @toFoxBin2Prg ) DO CASE CASE toFoxBin2Prg.c_SimulateError = 'SIMERR_I1' @@ -11169,7 +11187,7 @@ DEFINE CLASS c_conversor_prg_a_pjx AS c_conversor_prg_a_bin PROCEDURE identifyCodeBlocks - LPARAMETERS taCodeLines, tnCodeLines, taLineasExclusion, tnBloquesExclusion, toProject + LPARAMETERS taCodeLines, tnCodeLines, taLineasExclusion, tnBloquesExclusion, toProject, toFoxBin2Prg *-------------------------------------------------------------------------------------------------------------- * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) * taCodeLines (@! IN ) El array con las líneas del código donde buscar @@ -11177,6 +11195,7 @@ DEFINE CLASS c_conversor_prg_a_pjx AS c_conversor_prg_a_bin * taLineasExclusion (@! IN ) Array unidimensional con un .T. o .F. según la línea sea de exclusión o no * tnBloquesExclusion (@! IN ) Cantidad de bloques de exclusión * toProject (@? OUT) Objeto con toda la información del proyecto analizado + * toFoxBin2Prg (v! IN ) Referencia al objeto principal * * NOTA: * Como identificador se usa el nombre de clase o de procedimiento, según corresponda. @@ -11185,6 +11204,7 @@ DEFINE CLASS c_conversor_prg_a_pjx AS c_conversor_prg_a_bin #IF .F. LOCAL toProject AS CL_PROJECT OF 'FOXBIN2PRG.PRG' + LOCAL toFoxBin2Prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' #ENDIF TRY @@ -11219,7 +11239,7 @@ DEFINE CLASS c_conversor_prg_a_pjx AS c_conversor_prg_a_bin CASE .analyzeCodeBlock_ServerData( toProject, @lcLine, @taCodeLines, @m.I, tnCodeLines ) *-- Puede haber varios servidores, por eso se siguen valuando - CASE NOT llBuildProj_Completed AND .analyzeCodeBlock_BuildProj( toProject, @lcLine, @taCodeLines, @m.I, tnCodeLines ) + CASE NOT llBuildProj_Completed AND .analyzeCodeBlock_BuildProj( toProject, @lcLine, @taCodeLines, @m.I, tnCodeLines, @toFoxBin2Prg ) llBuildProj_Completed = .T. CASE NOT llFileComments_Completed AND .analyzeCodeBlock_FileComments( toProject, @lcLine, @taCodeLines, @m.I, tnCodeLines ) @@ -11260,13 +11280,21 @@ DEFINE CLASS c_conversor_prg_a_pjx AS c_conversor_prg_a_bin PROCEDURE analyzeCodeBlock_BuildProj - *------------------------------------------------------ - *-- Analiza el bloque - *------------------------------------------------------ - LPARAMETERS toProject, tcLine, taCodeLines, I, tnCodeLines + *-------------------------------------------------------------------------------------------------------------- + * Analiza el bloque + *-------------------------------------------------------------------------------------------------------------- + * PARÁMETROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT) + * toProject (@? OUT) Objeto con toda la información del proyecto analizado + * tcLine (@! IN ) Línea de datos en evaluación + * taCodeLines (@! IN ) El array con las líneas del código donde buscar + * tnCodeLines (@! IN ) Cantidad de líneas de código + * toFoxBin2Prg (v! IN ) Referencia al objeto principal + *-------------------------------------------------------------------------------------------------------------- + LPARAMETERS toProject, tcLine, taCodeLines, I, tnCodeLines, toFoxBin2Prg #IF .F. LOCAL toProject AS CL_PROJECT OF 'FOXBIN2PRG.PRG' + LOCAL toFoxBin2Prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' #ENDIF TRY @@ -11311,7 +11339,10 @@ DEFINE CLASS c_conversor_prg_a_pjx AS c_conversor_prg_a_bin loFile._ID = .get_ValueByName_FromListNamesWithValues( 'ID', 'I', @laPropsAndValues ) loFile._ObjRev = .get_ValueByName_FromListNamesWithValues( 'ObjRev', 'I', @laPropsAndValues ) loFile._User = .get_ValueByName_FromListNamesWithValues( 'User', 'C', @laPropsAndValues ) - loFile._DevInfo = .get_ValueByName_FromListNamesWithValues( 'DevInfo', 'C', @laPropsAndValues ) + + IF toFoxBin2Prg.n_BodyDevInfo = 1 + loFile._DevInfo = .get_ValueByName_FromListNamesWithValues( 'DevInfo', 'C', @laPropsAndValues ) + ENDIF toProject.ADD( loFile, loFile._Name ) @@ -16167,17 +16198,32 @@ DEFINE CLASS c_conversor_pjx_a_prg AS c_conversor_bin_a_prg TEXT TO C_FB2PRG_CODE ADDITIVE TEXTMERGE NOSHOW FLAGS 1+2 PRETEXT 1+2 <<>> .ADD('<>') ENDTEXT - TEXT TO C_FB2PRG_CODE ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2+4+8 - <<>> <<'&'>><<'&'>> <> - Type="<>" - Cpid="<>" - Timestamp="<>" - ID="<>" - ObjRev="<>" - User="<>" - DevInfo="<>" - <> - ENDTEXT + + IF toFoxBin2Prg.n_BodyDevInfo=1 + * Generates an extra DevInfo tag for each body PJX record + TEXT TO C_FB2PRG_CODE ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2+4+8 + <<>> <<'&'>><<'&'>> <> + Type="<>" + Cpid="<>" + Timestamp="<>" + ID="<>" + ObjRev="<>" + User="<>" + DevInfo="<>" + <> + ENDTEXT + ELSE + TEXT TO C_FB2PRG_CODE ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 1+2+4+8 + <<>> <<'&'>><<'&'>> <> + Type="<>" + Cpid="<>" + Timestamp="<>" + ID="<>" + ObjRev="<>" + User="<>" + <> + ENDTEXT + ENDIF loReg = NULL ENDFOR @@ -27712,6 +27758,7 @@ DEFINE CLASS CL_CFG AS CUSTOM + [] ; + [] ; + [] ; + + [] ; + [] ; + [] ; + [] ; @@ -27745,6 +27792,7 @@ DEFINE CLASS CL_CFG AS CUSTOM c_Foxbin2prg_ConfigFile = '' c_CurDir = '' n_Debug = NULL + n_BodyDevInfo = NULL l_ShowErrors = NULL n_ShowProgressbar = NULL l_Recompile = NULL @@ -27790,6 +27838,7 @@ DEFINE CLASS CL_CFG AS CUSTOM .c_Foxbin2prg_ConfigFile = toParentCFG.c_Foxbin2prg_ConfigFile .c_CurDir = toParentCFG.c_CurDir .n_Debug = toParentCFG.n_Debug + .n_BodyDevInfo = toParentCFG.n_BodyDevInfo .l_ShowErrors = toParentCFG.l_ShowErrors .n_ShowProgressbar = toParentCFG.n_ShowProgressbar .l_Recompile = toParentCFG.l_Recompile