Harvest

TECH TIP:  HarCompare - Utility to Compare Local Files to SCM Repository

  • 1.  TECH TIP:  HarCompare - Utility to Compare Local Files to SCM Repository

    Posted 11-28-2017 03:37 PM

    HarCompare is a windows utility that allows the user to compare their local files as "New", "Same", or "Diff" (different)against what is in the Harvest repository based on Project, State, and Package context. The User's Guide PDF file is in the self extracting HarCompare install executable. The default location for install is typically "C:\HarCompare" and all needed files and support files and the PDF guide will be installed there. During execution, all trace and log files will be generated in the same install directory.

     

    On execution, you will see at the top group is the Harvest context, login credentials, and TEMP directory are to be entered (recommend the TEMP directory be set as C:\TEMP). When all this has been entered then you can click the

    button "Populate List from Harvest Repository based on Context". This will populate the Top list box to indicate a list of file and paths that are in the SCM repository.

     

    HarCompare

     

    After the Top list box is populated, then you must focus on the bottom group and enter the Local Parent Path of the local files that you wish to compare with the repository. When this path is entered, click on the radio button "Show Different Files" as ON, "Search sub-directories" check box as ON, then click on the button "Generate Local Files Compare Report" to start the action that will populate the Bottom list box. The "Status" column will indicate whether the files compare to the repository list as "Same" or "Diff" (different). You can then click on a file item in the Bottom list box and it will immediately identify the file in the Top list box (repository list) as dark blue in color. Right click on the bottom list item will popup a menu with options to run WinDiff and other options. WinDiff will display the actual differences of the bottom list file to the top list file so you can see the differences between both files.

     

    The "Status" column in the bottom list box can be clicked on to sort ascending or descending in order to group the status.

     

    The Export button for each list box group will export the contents of the list box to a comma delimited .csv file that can be opened by Microsoft Excel.

     

    The Find buttons for each list box group allows you to search the list box for a specific filename that matches in whole name or in part and high light the list item that was found.

     

    HarCompare is a non-destructive utility that only reads from the Harvest repository and produces list box reports. It is considered a value added utility of the Harvest product. The utility is provided as is and may from time to time be enhanced and updated on this Tech Tip.

     

    CAVEAT: Since the local files cannot be compared directly to the files in the repository physically because they are compressed BLOBs, they are automatically checked out for browse to the TEMP directory to allow physical comparisons. Therefore the user MUST consider that he/she has enough disk space to accomplish the volume checkout. In testing, I compared a test package of 1000 files and the whole operation of clicking the top list button then the bottom list button took ~ 5 minutes.

     

    ADDENDUM 11/28/2017 V1.01 - If a change is made to a bottom list file by using CrystalEdit to modify the local file and the changes are saved, then the Status is changed to "Diff" and the new file properties such as file size is updated in the bottom list box.

    ADDENDUM 12/01/2017 V1.02 - Corrected problem of the Registry changes were not being saved to the registry.

    Also modified Radio buttons in the bottom list group to show:  Show New Files    Show Same Files    Show Diff Files

    These buttons are mutually exclusive in operation.

    ADDENDUM  03/07/2018 V1.04 - Modify to make commit buttons to show 'Cancel' during processing.                 Checkout files for browse now go to %INSTALL_DIR%\Temp. Added color to bottom list status column for ('New', 'Same', and 'Diff'). Modified to use Local Path from command line (overrides any profile setting).

    ADDENDUM 03/08/2018 V1.05 - Added key F3 (search again) in listbox, modified Preference dialog to allow user to set

    their own windows difference program, default is Windiff.exe.

    ADDENDUM 05/21/2018 V1.06 - Modified REG SETTINGS dialog to allow the user to change from the default windiff.exe compare utility to any 3rd party compare utility such as WinMerge or Beyond Compare. When the new utility setting change is saved then the 'Diff..." process will fire the new utility for file comparisons.