From 95ea447268f1e01f55807448e054f6a0834a4064 Mon Sep 17 00:00:00 2001 From: Hecon5 <54177882+hecon5@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:38:47 -0400 Subject: [PATCH 1/7] Fix #553 --- .../modules/modImportExport.bas | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/Version Control.accda.src/modules/modImportExport.bas b/Version Control.accda.src/modules/modImportExport.bas index 9f73efe5..2038a0fa 100644 --- a/Version Control.accda.src/modules/modImportExport.bas +++ b/Version Control.accda.src/modules/modImportExport.bas @@ -726,18 +726,38 @@ Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ End If ' Verify that the source files are being merged into the correct database. - If Not blnFullBuild Then - strPath = GetOriginalDbFullPathFromSource(strSourceFolder) - ' Resolve any relative directives (i.e. "\..\") to actual path - If FSO.FileExists(strPath) Then strPath = FSO.GetFile(strPath).Path - If strPath = vbNullString Then - MsgBox2 "Unable to determine database file name", "Required source files were not found or could not be decrypted:", strSourceFolder, vbExclamation - GoTo CleanUp - ElseIf StrComp(strPath, CurrentProject.FullName, vbTextCompare) <> 0 Then - MsgBox2 "Cannot merge to a different database", _ + strPath = GetOriginalDbFullPathFromSource(strSourceFolder) + ' Resolve any relative directives (i.e. "\..\") to actual path + If FSO.FileExists(strPath) Then strPath = FSO.GetFile(strPath).Path + If strPath = vbNullString Then + MsgBox2 "Unable to determine database file name", "Required source files were not found or could not be decrypted:", strSourceFolder, vbExclamation + GoTo CleanUp + ElseIf StrComp(strPath, CurrentProject.FullName, vbTextCompare) <> 0 Then + If blnFullBuild Then + ' Full build allows you to use source file name. + If Not MsgBox2("Current Database filename does not match source filename." _ + , "Do you want to " & strType & " to the Source Defined Filename?" & _ + vbNewLine & vbNewLine & "Current: " & CurrentProject.FullName & vbNewLine & _ + "Source: " & strPath _ + , "[Ok] = Build with Source Configured Name" & vbNewLine & vbNewLine & _ + "Otherwise cancel and select 'Build As...' from the ribbon to change build name. " & _ + "Performing an export from this file name will also reset the file name, but will " & _ + "overwrite source. If this file stared as a copy of an existing source controlled " & _ + "database, select build as to avoid overwriting." _ + , vbQuestion + vbOKCancel + vbDefaultButton1 _ + , strType & " Name Conflict" _ + , vbOK) = vbOK Then + GoTo CleanUp + End If + + Else + MsgBox2 "Cannot " & strType & " to a different database", _ "The database file name for the source files must match the currently open database.", _ - "Current: " & CurrentProject.FullName & vbCrLf & _ - "Source: " & strPath, vbExclamation + "Current: " & CurrentProject.FullName & vbNewLine & _ + "Source: " & strPath, vbExclamation _ + , strType & " Name Conflict" _ + , vbOK + GoTo CleanUp End If End If From b511a6742421fab32188734c03718fd2f36ebb76 Mon Sep 17 00:00:00 2001 From: Hecon5 <54177882+hecon5@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:33:29 -0400 Subject: [PATCH 2/7] we don't want to close the build database until after checks are complete; otherwise bailing out will end up with a closed database. --- .../modules/modImportExport.bas | 53 ++++++++++++------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/Version Control.accda.src/modules/modImportExport.bas b/Version Control.accda.src/modules/modImportExport.bas index 2038a0fa..e836bafd 100644 --- a/Version Control.accda.src/modules/modImportExport.bas +++ b/Version Control.accda.src/modules/modImportExport.bas @@ -683,11 +683,16 @@ End Sub ' Purpose : Build the project from source files. '--------------------------------------------------------------------------------------- ' -Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ - Optional intFilter As eContainerFilter = ecfAllObjects, Optional strAlternatePath As String) +Public Sub Build(strSourceFolder As String _ + , blnFullBuild As Boolean _ + , Optional intFilter As eContainerFilter = ecfAllObjects _ + , Optional strAlternatePath As String) + + Const FunctionName As String = ModuleName & ".Build" Dim strPath As String Dim strBackup As String + Dim strCurrentDbFilename As String Dim cCategory As IDbComponent Dim dCategories As Dictionary Dim varCategory As Variant @@ -707,17 +712,8 @@ Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ ' The type of build will be used in various messages and log entries. strType = IIf(blnFullBuild, "Build", "Merge") - ' For full builds, close the current database if it is currently open. - If blnFullBuild Then - If DatabaseFileOpen Then - CloseCurrentDatabase2 - If DatabaseFileOpen Then - MsgBox2 "Unable to Close Database", _ - "The current database must be closed to perform a full build.", , vbExclamation - GoTo CleanUp - End If - End If - End If + ' We need to check the current db name later, so we need to cache it (especially for builds). + strCurrentDbFilename = CurrentProject.FullName ' Make sure we can find the source files If Not FolderHasVcsOptionsFile(strSourceFolder) Then @@ -732,12 +728,13 @@ Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ If strPath = vbNullString Then MsgBox2 "Unable to determine database file name", "Required source files were not found or could not be decrypted:", strSourceFolder, vbExclamation GoTo CleanUp - ElseIf StrComp(strPath, CurrentProject.FullName, vbTextCompare) <> 0 Then + + ElseIf StrComp(strPath, strCurrentDbFilename, vbTextCompare) <> 0 Then If blnFullBuild Then ' Full build allows you to use source file name. If Not MsgBox2("Current Database filename does not match source filename." _ , "Do you want to " & strType & " to the Source Defined Filename?" & _ - vbNewLine & vbNewLine & "Current: " & CurrentProject.FullName & vbNewLine & _ + vbNewLine & vbNewLine & "Current: " & strCurrentDbFilename & vbNewLine & _ "Source: " & strPath _ , "[Ok] = Build with Source Configured Name" & vbNewLine & vbNewLine & _ "Otherwise cancel and select 'Build As...' from the ribbon to change build name. " & _ @@ -747,6 +744,11 @@ Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ , vbQuestion + vbOKCancel + vbDefaultButton1 _ , strType & " Name Conflict" _ , vbOK) = vbOK Then + + ' Launch the GUI form (it was closed a moment ago) + DoCmd.OpenForm "frmVCSMain" + Form_frmVCSMain.StartBuild blnFullBuild + Log.Error eelCritical, strType & " aborted. Name mismatch.", FunctionName GoTo CleanUp End If @@ -762,6 +764,18 @@ Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ End If End If + ' For full builds, close the current database if it is currently open. + If blnFullBuild Then + If DatabaseFileOpen Then + CloseCurrentDatabase2 + If DatabaseFileOpen Then + MsgBox2 "Unable to Close Database", _ + "The current database must be closed to perform a full build.", , vbExclamation + GoTo CleanUp + End If + End If + End If + ' Load options from project Set Options = Nothing Options.LoadOptionsFromFile StripSlash(strSourceFolder) & PathSep & "vcs-options.json" @@ -840,7 +854,7 @@ Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ If FSO.FileExists(strPath) Then Log.Add "Saving backup of original database..." Name strPath As strBackup - If CatchAny(eelCritical, "Unable to rename original file", ModuleName & ".Build") Then GoTo CleanUp + If CatchAny(eelCritical, "Unable to rename original file", FunctionName) Then GoTo CleanUp Log.Add "Saved as " & FSO.GetFileName(strBackup) & "." End If Else @@ -862,7 +876,7 @@ Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ If DatabaseFileOpen Then Log.Add "Created blank database for import. (v" & CurrentProject.FileFormat & ")" Else - CatchAny eelCritical, "Unable to create database file", ModuleName & ".Build" + CatchAny eelCritical, "Unable to create database file", FunctionName Log.Add "This may occur when building an older database version if the 'New database sort order' (collation) option is not set to 'Legacy'" GoTo CleanUp End If @@ -1048,7 +1062,7 @@ Public Sub Build(strSourceFolder As String, blnFullBuild As Boolean, _ End If ' Log any errors after build/merge - CatchAny eelError, "Error running " & CallByName(Options, "RunAfter" & strType, VbGet), ModuleName & ".Build", True, True + CatchAny eelError, "Error running " & CallByName(Options, "RunAfter" & strType, VbGet), FunctionName, True, True ' Show final output and save log Log.Spacer @@ -1086,7 +1100,8 @@ CleanUp: End If ' Save index file after build is complete, or discard index for "Build As..." - If strAlternatePath = vbNullString Then + ' discard update if build failed. + If strAlternatePath = vbNullString And blnSuccess Then If blnFullBuild Then ' NOTE: Add a couple seconds since some items may still be in the process of saving. VCSIndex.FullBuildDate = DateAdd("s", 2, Now) From 6d2f6e20133b6eeaf74d4258df80cb9b37f7b210 Mon Sep 17 00:00:00 2001 From: Hecon5 <54177882+hecon5@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:33:43 -0400 Subject: [PATCH 3/7] Update Error Handling on Build --- Version Control.accda.src/modules/modImportExport.bas | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Version Control.accda.src/modules/modImportExport.bas b/Version Control.accda.src/modules/modImportExport.bas index e836bafd..6a82f781 100644 --- a/Version Control.accda.src/modules/modImportExport.bas +++ b/Version Control.accda.src/modules/modImportExport.bas @@ -704,7 +704,8 @@ Public Sub Build(strSourceFolder As String _ Dim strText As String ' Remove later - If DebugMode(True) Then On Error GoTo 0 Else On Error Resume Next + LogUnhandledErrors FunctionName + On Error Resume Next ' Close the previous cached connections, if any CloseCachedConnections @@ -755,7 +756,7 @@ Public Sub Build(strSourceFolder As String _ Else MsgBox2 "Cannot " & strType & " to a different database", _ "The database file name for the source files must match the currently open database.", _ - "Current: " & CurrentProject.FullName & vbNewLine & _ + "Current: " & strCurrentDbFilename & vbNewLine & _ "Source: " & strPath, vbExclamation _ , strType & " Name Conflict" _ , vbOK @@ -781,8 +782,10 @@ Public Sub Build(strSourceFolder As String _ Options.LoadOptionsFromFile StripSlash(strSourceFolder) & PathSep & "vcs-options.json" ' Override the export folder when exporting to an alternate path. If Len(strAlternatePath) Then Options.ExportFolder = strSourceFolder + ' Update VBA debug mode after loading options - If DebugMode(True) Then On Error GoTo 0 Else On Error Resume Next + LogUnhandledErrors FunctionName + On Error Resume Next ' Build original file name for database If blnFullBuild Then @@ -886,7 +889,6 @@ Public Sub Build(strSourceFolder As String _ Set VCSIndex = Nothing If blnFullBuild Then - ' Remove any non-built-in references before importing from source. Log.Add "Removing non built-in references...", False RemoveNonBuiltInReferences @@ -896,7 +898,6 @@ Public Sub Build(strSourceFolder As String _ ' Run any pre-build bootstrapping code PrepareRunBootstrap End If - End If ' Build collections of files to import/merge From d297bcb2c404be40b9180cb2b49a6b0cf68b8190 Mon Sep 17 00:00:00 2001 From: Hecon5 <54177882+hecon5@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:53:17 -0400 Subject: [PATCH 4/7] Add flag to alert user to failed build state. --- Version Control.accda.src/forms/frmVCSMain.cls | 7 ++++--- Version Control.accda.src/modules/modImportExport.bas | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Version Control.accda.src/forms/frmVCSMain.cls b/Version Control.accda.src/forms/frmVCSMain.cls index ec505b81..df4789a8 100644 --- a/Version Control.accda.src/forms/frmVCSMain.cls +++ b/Version Control.accda.src/forms/frmVCSMain.cls @@ -185,7 +185,8 @@ End Sub ' Purpose : Finish the build process '--------------------------------------------------------------------------------------- ' -Public Sub FinishBuild(blnFullBuild As Boolean) 'Optional strType As String = "Build") +Public Sub FinishBuild(blnFullBuild As Boolean _ + , Optional blnSuccess As Boolean = True) Dim strType As String @@ -194,8 +195,8 @@ Public Sub FinishBuild(blnFullBuild As Boolean) 'Optional strType As String = "B ' Display final UI messages. Log.Flush - strType = IIf(blnFullBuild, "Build", "Merge") - SetStatusText "Finished", strType & " Complete", _ + strType = IIf(blnFullBuild, "Build", "Merge") & IIf(blnSuccess, " Complete", " FAILED") + SetStatusText "Finished", strType, _ "Additional details can be found in the project " & LCase(strType) & " log file.

You may now close this window." cmdOpenLogFile.Visible = (Log.LogFilePath <> vbNullString) Me.strLastLogFilePath = Log.LogFilePath diff --git a/Version Control.accda.src/modules/modImportExport.bas b/Version Control.accda.src/modules/modImportExport.bas index 6a82f781..b01ae4ba 100644 --- a/Version Control.accda.src/modules/modImportExport.bas +++ b/Version Control.accda.src/modules/modImportExport.bas @@ -1094,7 +1094,7 @@ CleanUp: DoCmd.Hourglass False If Forms.Count > 0 Then ' Finish up on GUI - Form_frmVCSMain.FinishBuild blnFullBuild + Form_frmVCSMain.FinishBuild blnFullBuild, blnSuccess Else ' Allow navigation pane to refresh list of objects. DoEvents From 1b2af3295d34a70ab211de7817adeb729ae26946 Mon Sep 17 00:00:00 2001 From: Hecon5 <54177882+hecon5@users.noreply.github.com> Date: Tue, 28 Jan 2025 12:16:36 -0500 Subject: [PATCH 5/7] Fix whitespace and charachter case. --- Version Control.accda.src/modules/modFileAccess.bas | 6 +++--- Version Control.accda.src/modules/modObjects.bas | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Version Control.accda.src/modules/modFileAccess.bas b/Version Control.accda.src/modules/modFileAccess.bas index 65b8ced1..cea751ef 100644 --- a/Version Control.accda.src/modules/modFileAccess.bas +++ b/Version Control.accda.src/modules/modFileAccess.bas @@ -595,9 +595,9 @@ End Function ' Purpose : Returns the UNC path for a network location (if applicable) '--------------------------------------------------------------------------------------- ' -Public Function GetUNCPath(ByRef PathIn As String) +Public Function GetUncPath(ByRef PathIn As String) - Const FunctionName As String = ModuleName & ".GetUNCPath" + Const FunctionName As String = ModuleName & ".GetUncPath" Dim DriveLetter As String Dim UNCPath As String @@ -621,7 +621,7 @@ Retry: End If End If End With - GetUNCPath = UNCPath + GetUncPath = UNCPath Exit_Here: Perf.OperationEnd diff --git a/Version Control.accda.src/modules/modObjects.bas b/Version Control.accda.src/modules/modObjects.bas index 55250ba6..9a865e09 100644 --- a/Version Control.accda.src/modules/modObjects.bas +++ b/Version Control.accda.src/modules/modObjects.bas @@ -179,7 +179,7 @@ Retry: If CatchAny(eelError, "Retry FSO Check", FunctionName, False, True) And RetryCount < 2 Then ' Some machines in some environments may fail to generate the FileSystemObject the first time. ' 99% of retries the second attempt will work. This may be due to a race condition in the OS. - ' RetryCount prevents a permanent loop if for some reason the second attempt fails out, and in + ' RetryCount prevents a permanent loop if for some reason the second attempt fails out, and in ' those cases additional tries are also likely to fail. RetryCount = RetryCount + 1 GoTo Retry From 631f57eaf9ea47e24663c1b62717c64e4d200730 Mon Sep 17 00:00:00 2001 From: Hecon5 <54177882+hecon5@users.noreply.github.com> Date: Tue, 28 Jan 2025 12:48:39 -0500 Subject: [PATCH 6/7] Update PR with translation fixes and adaptations to accomodate names. remove use of vbCrLf and convert to vbNewLine. --- .../modules/modImportExport.bas | 83 ++++++++++--------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/Version Control.accda.src/modules/modImportExport.bas b/Version Control.accda.src/modules/modImportExport.bas index ff11b068..76f722f3 100644 --- a/Version Control.accda.src/modules/modImportExport.bas +++ b/Version Control.accda.src/modules/modImportExport.bas @@ -89,7 +89,7 @@ Public Sub ExportSource(blnFullExport As Boolean, Optional intFilter As eContain Log.Flush If MsgBox2(T("Newer VCS Version Detected"), _ T("This project uses VCS version {0}, but version {1} is currently installed." & _ - vbCrLf & "Would you like to continue anyway?", _ + vbNewLine & "Would you like to continue anyway?", _ var0:=Options.GetLoadedVersion, var1:=GetVCSVersion), _ T("Click YES to continue this operation, or NO to cancel."), _ vbExclamation + vbYesNo + vbDefaultButton2) <> vbYes Then @@ -264,7 +264,7 @@ CleanUp: ' Add performance data to log file and save file Perf.EndTiming With Log - .Add vbCrLf & Perf.GetReports, False + .Add vbNewLine & Perf.GetReports, False .SaveFile .Active = False .Flush @@ -408,7 +408,7 @@ CleanUp: ' Add performance data to log file and save file Perf.EndTiming With Log - .Add vbCrLf & Perf.GetReports, False + .Add vbNewLine & Perf.GetReports, False .SaveFile .Active = False .Flush @@ -605,7 +605,7 @@ CleanUp: ' Add performance data to log file and save file Perf.EndTiming With Log - .Add vbCrLf & Perf.GetReports, False + .Add vbNewLine & Perf.GetReports, False .SaveFile .Active = False .Flush @@ -725,7 +725,8 @@ Public Sub Build(strSourceFolder As String _ ' Make sure we can find the source files If Not FolderHasVcsOptionsFile(strSourceFolder) Then - MsgBox2 T("Source files not found"), T("Required source files were not found in the following folder:"), strSourceFolder, vbExclamation + MsgBox2 T("Source files not found") _ + , T("Required source files were not found in the following folder:"), strSourceFolder, vbExclamation GoTo CleanUp End If @@ -734,38 +735,39 @@ Public Sub Build(strSourceFolder As String _ ' Resolve any relative directives (i.e. "\..\") to actual path If FSO.FileExists(strPath) Then strPath = FSO.GetFile(strPath).Path If strPath = vbNullString Then - MsgBox2 T("Unable to determine database file name"), T("Required source files were not found or could not be parsed:"), strSourceFolder, vbExclamation + MsgBox2 T("Unable to determine database file name.") _ + , T("Required source files were not found or could not be parsed: "), strSourceFolder, vbExclamation GoTo CleanUp ElseIf StrComp(strPath, strCurrentDbFilename, vbTextCompare) <> 0 Then If blnFullBuild Then ' Full build allows you to use source file name. If Not MsgBox2(T("Current Database filename does not match source filename.") _ - , T("Do you want to ") & strType & T(" to the Source Defined Filename?") & _ - vbNewLine & vbNewLine & T("Current: ") & strCurrentDbFilename & vbNewLine & _ - T("Source: ") & strPath _ + , T("Do you want to {0} to the Source Defined Filename?" & vbNewLine & vbNewLine & _ + "Current: {1}" & vbNewLine & _ + "Source: {2}", var0:=strType, var1:=strCurrentDbFilename, var2:=strPath) _ , T("[Ok] = Build with Source Configured Name") & vbNewLine & vbNewLine & _ T("Otherwise cancel and select 'Build As...' from the ribbon to change build name. " & _ "Performing an export from this file name will also reset the file name, but will " & _ "overwrite source. If this file stared as a copy of an existing source controlled " & _ - "database, select build as to avoid overwriting.") _ + "database, select 'Build As...' to avoid overwriting.") _ , vbQuestion + vbOKCancel + vbDefaultButton1 _ - , strType & T(" Name Conflict") _ + , T("{0} Name Conflict", var0:=strType) _ , vbOK) = vbOK Then ' Launch the GUI form (it was closed a moment ago) DoCmd.OpenForm "frmVCSMain" Form_frmVCSMain.StartBuild blnFullBuild - Log.Error eelCritical, strType & T(" aborted. Name mismatch."), FunctionName + Log.Error eelCritical, T("{0} aborted. Name mismatch.", var0:=strType), FunctionName GoTo CleanUp End If Else - MsgBox2 T("Cannot ") & strType & T(" to a different database"), _ - T("The database file name for the source files must match the currently open database."), _ - T("Current: ") & strCurrentDbFilename & vbNewLine & _ - T("Source: ") & strPath, vbExclamation _ - , strType & & T(" Name Conflict") _ + MsgBox2 T("Cannot {0} to a different database.", var0:=strType) _ + , T("The database file name for the source files must match the currently open database.") _ + , T("Current: {0}" & vbNewLine & _ + "Source: {1}", var0:=strCurrentDbFilename, var1:=strPath), vbExclamation _ + , T("{0} Name Conflict", var0:=strType) _ , vbOK GoTo CleanUp @@ -799,7 +801,8 @@ Public Sub Build(strSourceFolder As String _ ' Use alternate path if provided, otherwise extract the original database path from the source files. strPath = Nz2(strAlternatePath, GetOriginalDbFullPathFromSource(strSourceFolder)) If strPath = vbNullString Then - MsgBox2 T("Unable to determine database file name"), T("Required source files were not found or could not be parsed:"), strSourceFolder, vbExclamation + MsgBox2 T("Unable to determine database file name") _ + , T("Required source files were not found or could not be parsed:"), strSourceFolder, vbExclamation GoTo CleanUp End If Else @@ -854,8 +857,8 @@ Public Sub Build(strSourceFolder As String _ If Options.CompareLoadedVersion = evcNewerVersion Then If MsgBox2(T("Newer VCS Version Detected"), _ T("This project uses VCS version {0} but version {1} is currently installed." & _ - vbCrLf & "Would you like to continue anyway?", _ - var0:=Options.GetLoadedVersion, var1:=GetVCSVersion), _ + vbNewLine & "Would you like to continue anyway?" _ + , var0:=Options.GetLoadedVersion, var1:=GetVCSVersion), _ T("Click YES to continue this operation, or NO to cancel."), _ vbExclamation + vbYesNo + vbDefaultButton2) <> vbYes Then Log.ErrorLevel = eelCritical @@ -869,8 +872,8 @@ Public Sub Build(strSourceFolder As String _ If FSO.FileExists(strPath) Then Log.Add T("Saving backup of original database...") Name strPath As strBackup - If CatchAny(eelCritical, "Unable to rename original file", FunctionName) Then GoTo CleanUp - Log.Add T("Saved as {0}." & FSO.GetFileName(strBackup) & "." + If CatchAny(eelCritical, T("Unable to rename original file"), FunctionName) Then GoTo CleanUp + Log.Add T("Saved as {0}.", var0:=FSO.GetFileName(strBackup)) End If Else ' Backups for merge builds performed later, @@ -987,7 +990,7 @@ Public Sub Build(strSourceFolder As String _ LogUnhandledErrors Log.Add T("Saving backup of original database...") FSO.CopyFile strPath, strBackup - If CatchAny(eelCritical, T("Unable to back up current database"), ModuleName & ".Build") Then GoTo CleanUp + If CatchAny(eelCritical, T("Unable to back up current database"), FunctionName) Then GoTo CleanUp Log.Add T("Saved as {0}.", var0:=FSO.GetFileName(strBackup)) End If Log.Spacer @@ -1018,7 +1021,7 @@ Public Sub Build(strSourceFolder As String _ cCategory.Merge CStr(varFile) End If CatchAny eelError, T(IIf(blnFullBuild, "Build error in: {0}", "Merge error in: {0}"), _ - var0:=varFile), ModuleName & ".Build", True, True + var0:=varFile), FunctionName, True, True ' Bail out if we hit a critical error. If Log.ErrorLevel = eelCritical Then Log.Add vbNullString: GoTo CleanUp @@ -1099,7 +1102,7 @@ CleanUp: ' Add performance data to log file and save file. Perf.EndTiming With Log - .Add vbCrLf & Perf.GetReports, False + .Add vbNewLine & Perf.GetReports, False .SaveFile .Active = False End With @@ -1257,7 +1260,7 @@ CleanUp: ' Add performance data to log file and save file Perf.EndTiming With Log - .Add vbCrLf & Perf.GetReports, False + .Add vbNewLine & Perf.GetReports, False .SaveFile .Active = False .Flush @@ -1310,14 +1313,14 @@ Public Sub MergeAllSource() ' Display heading With Log .Spacer - .Add "Beginning Merge of All Source Files", False + .Add T("Beginning Merge of All Source Files"), False .Add CurrentProject.Name - .Add "VCS Version " & GetVCSVersion - .Add "Full Path: " & CurrentProject.FullName, False - .Add "Export Folder: " & Options.GetExportFolder, False + .Add T("VCS Version {0}", var0:=GetVCSVersion) + .Add T("Full Path: {0}", var0:=CurrentProject.FullName), False + .Add T("Export Folder: {0}", var0:=Options.GetExportFolder), False .Add Now .Spacer - .Add "Scanning source files..." + .Add T("Scanning source files...") .Flush End With @@ -1345,11 +1348,11 @@ Public Sub MergeAllSource() ' Only show category details when source files are found If dFiles.Count = 0 Then Log.Spacer Options.ShowDebug - Log.Add "No " & LCase(cCategory.Category) & " source files found.", Options.ShowDebug + Log.Add T("No {0} source files found.", var0:=LCase(cCategory.Category)), Options.ShowDebug Else ' Show category header Log.Spacer Options.ShowDebug - Log.PadRight "Merging " & LCase(cCategory.Category) & "...", , Options.ShowDebug + Log.PadRight T("Merging ") & LCase(cCategory.Category) & "...", , Options.ShowDebug Log.ProgMax = dFiles.Count Perf.CategoryStart cCategory.Category @@ -1359,21 +1362,21 @@ Public Sub MergeAllSource() Log.Increment Log.Add " " & FSO.GetFileName(varFile), Options.ShowDebug cCategory.Merge CStr(varFile) - CatchAny eelError, "Merge error in: " & varFile, ModuleName & ".Build", True, True + CatchAny eelError, T("Merge error in: {0}", var0:=varFile), ModuleName & ".MergeAllSource", True, True ' Bail out if we hit a critical error. If Log.ErrorLevel = eelCritical Then Log.Add vbNullString: GoTo CleanUp Next varFile ' Show category wrap-up. - Log.Add "[" & dFiles.Count & "]" & IIf(Options.ShowDebug, " " & LCase(cCategory.Category) & " processed.", vbNullString) + Log.Add "[" & dFiles.Count & "]" & IIf(Options.ShowDebug, " " & LCase(cCategory.Category) & T(" processed."), vbNullString) Perf.CategoryEnd dFiles.Count End If Next varCategory ' Show final output and save log Log.Spacer - Log.Add "Done. (" & Round(Perf.TotalTime, 2) & " seconds)", , False, "green", True + Log.Add T("Done. ({0} seconds)", var0:=Round(Perf.TotalTime, 2)), , False, "green", True CleanUp: @@ -1383,7 +1386,7 @@ CleanUp: ' Add performance data to log file and save file Perf.EndTiming With Log - .Add vbCrLf & Perf.GetReports, False + .Add vbNewLine & Perf.GetReports, False .SaveFile .Active = False .Flush @@ -1486,9 +1489,9 @@ Private Sub CheckForLegacyModules() If Options.ShowVCSLegacy Then If FSO.FileExists(Options.GetExportFolder & FSO.BuildPath("modules", "VCS_ImportExport.bas")) Then MsgBox2 T("Legacy Files not Needed"), _ - T("Other forks of the MSAccessVCS project used additional VBA modules to export code.") & vbCrLf & _ - T("This is no longer needed when using the installed Version Control Add-in.") & vbCrLf & vbCrLf & _ - T("Feel free to remove the legacy VCS_* modules from your database project and enjoy" & vbCrLf & _ + T("Other forks of the MSAccessVCS project used additional VBA modules to export code.") & vbNewLine & _ + T("This is no longer needed when using the installed Version Control Add-in.") & vbNewLine & vbNewLine & _ + T("Feel free to remove the legacy VCS_* modules from your database project and enjoy" & vbNewLine & _ "a simpler, cleaner code base for ongoing development. :-)"), _ T("NOTE: This message can be disabled in 'Options -> Show Legacy Prompt'."), _ vbInformation, T("Just a Suggestion...") From 2b91894aa89b66ba813baf150c75b0b0e295eb00 Mon Sep 17 00:00:00 2001 From: Hecon5 <54177882+hecon5@users.noreply.github.com> Date: Tue, 28 Jan 2025 12:49:59 -0500 Subject: [PATCH 7/7] bum version number. --- Version Control.accda.src/dbs-properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version Control.accda.src/dbs-properties.json b/Version Control.accda.src/dbs-properties.json index 88053202..4a278370 100644 --- a/Version Control.accda.src/dbs-properties.json +++ b/Version Control.accda.src/dbs-properties.json @@ -41,7 +41,7 @@ "Type": 10 }, "AppVersion": { - "Value": "4.0.38", + "Value": "4.0.39", "Type": 10 }, "Auto Compact": {