Save merge output? dialog buttons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Bulgrien
    Carpal Tunnel
    • Oct 2007
    • 1772

    Save merge output? dialog buttons

    I have a scripted process that runs a 3-way file merge against every file in a set of three folders (a folder of common ancestor files, and two branches of code with changes). Any failed merge loads as a new tab in BC3 (nice).

    However, if I decide not to resolve conflicts now and close BC3, then I have to click on a whole bunch of Yes or No buttons on "Save merge output?" prompts. Please add "Yes to All" and "No to All" buttons to this dialog.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  • Michael Bulgrien
    Carpal Tunnel
    • Oct 2007
    • 1772

    #2
    Still wondering if we can get "Yes to All" and "No to All" buttons on the save changes and save merge output dialogs.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment

    • Michael Bulgrien
      Carpal Tunnel
      • Oct 2007
      • 1772

      #3
      Bump...
      BC v4.0.7 build 19761
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      Comment

      • getbc
        New User
        • Oct 2009
        • 2

        #4
        could you please share your scrips for folder compare. thx

        Comment

        • Michael Bulgrien
          Carpal Tunnel
          • Oct 2007
          • 1772

          #5
          Originally posted by getbc
          could you please share your scrips for folder compare. thx
          My script was for a folder merge, not a folder compare.

          The script expects the 3 input folders and the output folder to be under the current runtime folder of the script itself. Update the merge path and/or the input and output folder names to meet your specific needs:

          Code:
           Option Explicit
          
           Dim fso, WSHShell, oFolder, oFile, BC3
           Dim sMergePath, sLeftSide, sRightSide, sAncestor, sTarget, s
           Dim sTitle1, sTitle2, sTitle3, sTitle4
           
           Set WSHShell = CreateObject("WScript.Shell")
           Set fso = CreateObject("Scripting.FileSystemObject")
           BC3 = """C:\Program Files\Beyond Compare 3\BComp.exe"""
           
           sMergePath = fso.GetAbsolutePathName(".") + "\"
           sLeftSide  = sMergePath + "Left\"
           sRightSide = sMergePath + "Right\"
           sAncestor  = sMergePath + "Base\"
           sTarget    = sMergePath + "Merged\"
           
           s = ""
           If Not fso.FolderExists(sLeftSide)  Then s = s + "Folder not found (Left Side):  " + sLeftSide  + vbCrLf
           If Not fso.FolderExists(sRightSide) Then s = s + "Folder not found (Right Side): " + sRightSide + vbCrLf
           If Not fso.FolderExists(sAncestor)  Then s = s + "Folder not found (Ancestor):   " + sAncestor  + vbCrLf
           If s = "" Then
               If Not fso.FolderExists(sTarget) Then fso.CreateFolder(sTarget)
               Call MergeFolder(sRightSide)
               MsgBox "Done with merge"
               WScript.Quit 
           Else
               MsgBox (s + vbCrLf + "Merge Aborted!")
           End If
           
           Sub MergeFolder(sPath)
               Dim sSubFolder, sLeftFile, sRightFile, sBaseFile, sMergeFile
               Set oFolder = fso.GetFolder(sPath)
               For Each oFile In oFolder.Files
                   s = oFile.Name
                   sRightFile = " """ + oFile.Path + """"
                   sLeftFile  = Replace(sRightFile, sRightSide, sLeftSide)
                   sBaseFile  = Replace(sRightFile, sRightSide, sAncestor)
                   sMergeFile = Replace(sRightFile, sRightSide, sTarget)
                   WSHShell.Run BC3 + sLeftFile + sRightFile + sBaseFile + sMergeFile + Title(1, s) + Title(2, s) + Title(3, s) + Title(4, s) + " /automerge /nobackups /favorright /reviewconflicts", 0, False
               Next
           End Sub
           
           Function FileExists(Path)
               FileExists = fso.FileExists(Replace(Path, """", ""))
           End Function
           
           Function Title(Position, FileName)
               Select Case Position
                   Case 1: Title = " /title1=""Theirs (" + FileName + ")"""
                   Case 2: Title = " /title2=""Mine (" + FileName + ")"""
                   Case 3: Title = " /title3=""Ancestor (" + FileName + ")"""
                   Case 4: Title = " /title3=""Merged (" + FileName + ")"""
               End Select
           End Function
          Last edited by Michael Bulgrien; 19-Oct-2009, 10:40 AM.
          BC v4.0.7 build 19761
          ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

          Comment

          Working...