Announcement

Collapse
No announcement yet.

Show only differences in report output

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Show only differences in report output

    Hi,
    My report looks something like:

    File: file1

    File: file2

    File: file3
    <differences shown>

    File: file4 etc...

    How can I prevent the report from showing file1, file2, file4 when they are the same. Our builds have 1000s of files and I only want to show the changes.

    The script file looks like so:
    # This is a DIFF report for use between archived builds

    load %1 %2
    expand all
    select all

    compare binary

    file-report layout:side-by-side options:display-context,line-numbers output-to:"compare-report.html" output-options:html-color

  • #2
    Hello,

    Do not use the Select All command. Instead select only the different files. By default, these will be files with different timestamps/filesize. You can set a different criteria using the criteria command before the load command if you need to change this.

    select all.diff.files all.newer.files

    More detailed reference material can be found in the Help file under Scripting Reference.
    Last edited by Aaron; 24-Jul-2009, 04:05 PM. Reason: expanding select command
    Aaron P Scooter Software

    Comment


    • #3
      Select all.diff.files creates empty report

      Hi,
      I've tried your suggestion with no success.

      My script is as follows:

      load %1 %2
      expand all

      select all.diff.files
      log verbose projectlog.txt

      compare binary

      # OUTPUT file-report
      file-report layout:side-by-side title:"Build comparison report" options:display-context,line-numbers output-to:"file-diff-report.html" output-options:html-color

      Now my report is empty. If I take out select all.diff.files and replace with select.all, I get all the files listed that are the same and the differences. I need to generate a report with just the differences only. Can you help?

      Comment


      • #4
        Actually, I've just figured it out:

        load %1 %2
        criteria binary
        expand all
        select all.diff.files

        This seems to work. Not sure why using Criteria with Select, instead of Select and Compare works differently. Bit confused about the syntax/ordering of things?!?

        Comment


        • #5
          Hello,

          The ordering is a series of chronological steps that you can take in the graphical interface as well. Each line mirrors an action that could be taken if using the program interactively.

          For example, your previous script would
          load two folders (default criteria of timestamp and size)
          expand all folders
          select all.diff(size).files
          compare binary (which would update comparison status of the selection, but any files of diff size would also be diff binary)
          run report on those files
          *This assumes your current defaults are set to Timestamp and Size. If not, different results would occur.

          Your new script looks good. I would recommend a couple of extra tweaks to the newer script
          log logfile.txt
          criteria binary
          load folders
          expand all
          select all.diff.files

          This way, you can have a log that starts logging at the very beginning (otherwise, it only begins logging from the moment it is declared). Setting the criteria before loading means you do not have to compare twice (first timestamp/size, then binary).
          Last edited by Aaron; 27-Jul-2009, 02:51 PM. Reason: added "of the selection"
          Aaron P Scooter Software

          Comment

          Working...
          X