Generating Patch Folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • getazoom
    New User
    • Apr 2012
    • 2

    Generating Patch Folder


    I have version 7 and version 13 of folder (having subfolders and files)

    1. One way of doing is opening each folder to last level and open each file;
    do text compare report and generate the patch file.
    And Saving the patch file in the similar folder ; such that when patch is applied on version 7 , version 13 should be generated.

    But this would be very time consuming process since their are about 5000 files in 7 parent folders.

    2. Can you suggest to automate this Or any other alternative. I used to BC only for file comparison not this advanced options.

    3. If the patch generation is difficult is their any other option similar to patch but not so comprehensive but do the above said task in easier steps.
  • Aaron
    Team Scooter
    • Oct 2007
    • 15998

    #2
    If one file instead of many would be ok, you can:
    Launch a BC3 Folder Compare session.
    Load version 7 on the left and version 13 on the right.
    Use the Edit menu -> Expand All (or toolbar button)
    Use the Edit menu -> Select All Files
    Use the Actions menu -> File Compare Report (Pick patch and the same options you use when in the Text Compare). Assuming only text files were selected, the Text Report options should all be available. You may need to tweak the File Name Filters so only the files you wish to create a patch on are visible.

    How does this work for you?
    Aaron P Scooter Software

    Comment

    • getazoom
      New User
      • Apr 2012
      • 2

      #3
      This is very much near to my requirement.
      Though I have generated the zip file which gives me the patch folder (keeping the older folder structure) having the changed files only.

      Though I am not able to do the same for the Newly added files in the new version.
      ( I generated zip file for the same but gives single folder output with all files); I have generated a Patch report for the same so that I can manually add this files in the newly generated patch folder.

      Thanks for guidance..

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 15998

        #4
        So the report works, but you also need to copy the whole files?

        You can copy any different files directly to a zip using the Copy To Folder command, and putting a .zip file at the end of it. BC3 will create the .zip as a destination if it needs to.

        You can also set the Session menu -> Session Settings -> Comparison tab to run a Rules-based comparison (leave Timestamp,Size, Override Quick Test Results enabled, also enable Rules-based). Then use the Display Filters to only Show Differences, and use the Edit menu -> Expand All, Edit menu -> Select All Files. Then use the Copy to Folder command to copy only these different files to a .zip.
        Aaron P Scooter Software

        Comment

        • mcbinder
          New User
          • Apr 2004
          • 2

          #5
          Originally posted by Aaron
          If one file instead of many would be ok, you can:
          Launch a BC3 Folder Compare session.
          Load version 7 on the left and version 13 on the right.
          Use the Edit menu -> Expand All (or toolbar button)
          Use the Edit menu -> Select All Files
          Use the Actions menu -> File Compare Report (Pick patch and the same options you use when in the Text Compare). Assuming only text files were selected, the Text Report options should all be available. You may need to tweak the File Name Filters so only the files you wish to create a patch on are visible.

          How does this work for you?
          How would I automate this?

          I want to save the (new) generated executable file with the directory and file differences from the previous version.

          The above would generate the differences file, but how do I do it and save it automatically?
          I have a batch file that compiles and saves the executable.
          I need to add commands in the batch file to generate the diff file and save it.
          eg: "C:\Program Files\Beyond Compare 3\BCompare.exe" %dir1% %dir2% ,etc.


          mcb
          Last edited by mcbinder; 19-Nov-2012, 05:06 PM. Reason: added info re batch

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 15998

            #6
            Hello,

            You can automate BC3 using BC Scripting. This is documented in more detail in the Help file in the Using Beyond Compare -> Automating with Script. Also, the main Scripting Reference chapter.

            In quick summary, script is used from the command line with:
            bcompare.exe "@c:\bcscript.txt"

            where bcscript.txt is a series of basic commands. For this example, the commands would be close to:
            Code:
            log verbose "c:\bclog.txt"
            load "c:\version7" "c:\version11"
            expand all
            select newer.files older.files diff.files
            text-report layout:patch output-to:"c:\bcpatchreport.txt"
            Last edited by Aaron; 20-Nov-2012, 09:38 AM. Reason: adding code block
            Aaron P Scooter Software

            Comment

            • jmthomas
              Enthusiast
              • Feb 2010
              • 47

              #7
              This sounded like the solution to my requirement to generate a diff over lots of files....

              But, I'm running BC4 (this is a BC3 post), and I can't find Actions menu -> File Compare Report

              Are there revised instructions for BC4?

              Comment

              • Chris
                Team Scooter
                • Oct 2007
                • 5538

                #8
                Actions > File Compare Report is still the correct command in BC4's Folder Compare.

                File Compare Report only operates on files, not on folders. If folders are selected, then the command won't be available on the menu. If you want to report on all files and their subfolders, Edit > Expand All, Edit > Select All Files, then Actions > File Compare Report.
                Chris K Scooter Software

                Comment

                Working...