Go Back   Scooter Forums > Beyond Compare 2 Discussion > Script Central
Register FAQ Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 11-Jul-2006, 11:03 AM
mcg62 mcg62 is offline
New User
 
Join Date: Jul 2006
Posts: 2
Default Displaying Differences Like File Diffs Report

I'm trying to get the scripting language using the file-report option when displaying-matches (side-by-side format)to show the lines of code in the report. Currently all I get is the the file names date/time stamp and size. No other information. Can the scripting language even do that. I can't find any commands that do. Here is the code.
Thanks in advance for the help.

MG
__________________________
load Q:\Single_Int\CVSSources\V61 Q:\SSProduction\CVSSources\V61
filter "-CVS\;-UTIL\"
select files
expand all
criteria CRC
log verbose c:\sandbox_comp\DIFFLOG_%date%.log
folder-report layout:side-by-side options:display-mismatches &
title:"Single Int and SSProduction Sandbox BASE (V61) Comparisons" &
output-to:C:\sandbox_comp\DIFF%date%_SBoxSI_SBoxSP.rpt
Reply With Quote
  #2  
Old 11-Jul-2006, 12:32 PM
chrroe chrroe is offline
Pooh-Bah
 
Join Date: Oct 2007
Location: Bremen, Germany
Posts: 562
Default Re: Displaying Differences Like File Diffs Report

Hi mcg!

Try this modified script:

Code:
 
# log command comes first
log verbose c:\sandbox_comp\DIFFLOG_%date%.log

load Q:\Single_Int\CVSSources\V61 Q:\SSProduction\CVSSources\V61
filter "-CVS\;-UTIL\"

expand all
# select better after expand
select files
criteria CRC

# try file-report instead of folder-report.
# but be careful, it has some different options!
file-report layout:side-by-side options:display-mismatches & 
title:"Single Int and SSProduction Sandbox BASE (V61) Comparisons" &
output-to:C:\sandbox_comp\DIFF%date%_SBoxSI_SBoxSP.rpt
Reply With Quote
  #3  
Old 11-Jul-2006, 04:49 PM
Chris Chris is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 3,793
Default Re: Displaying Differences Like File Diffs Report

The file-report command does a rules-based content comparison of files when it generates the report, so you can also get rid of the "criteria CRC" command.
__________________
Chris K Scooter Software
Reply With Quote
  #4  
Old 31-Aug-2006, 05:36 AM
fpdave fpdave is offline
Journeyman
 
Join Date: Apr 2008
Posts: 15
Default Re: Displaying Differences Like File Diffs Report

wow, that script is way cool. DIdnt expect to be able to do stuff I cant do from UI (eg report of file diffs over folder diff) GREAT.

How can I specify the size of context from the report?
Reply With Quote
  #5  
Old 31-Aug-2006, 06:07 AM
fpdave fpdave is offline
Journeyman
 
Join Date: Apr 2008
Posts: 15
Default Re: Displaying Differences Like File Diffs Report

I also want to only show files that are different, so have tried "select right.diff.files" instead of just "select files", but i get a parameter error. Script log:
31/08/2006 13:07:07 >> log verbose c:\DIFFLOG_2006-08-31.log
31/08/2006 13:07:07 User name: david.roberts
31/08/2006 13:07:07 >> load "C:\Program Files\Microsoft Visual Studio\VB98\PROJECTS (v11Rel)\R5Printing" "\\r5bldvpc-curv11\Projects\R5Printing"
31/08/2006 13:07:08 Load Comparison: C:\Program Files\Microsoft Visual Studio\VB98\PROJECTS (v11Rel)\R5Printing <-> \\r5bldvpc-curv11\Projects\R5Printing
31/08/2006 13:07:08 >> filter "-*.ocx;-*.dll;-*.exe;-*.pdb;-*.log;-*.err;-*.lib;-*.exp;-*.scc;-*.done;-*.bak;-*.chm;-*.doc;-BCcsOperatives1.niboxpart;-*.niboxpart;-*.rptpart;-*.vbw;-*.PROC_R5S2;-*.SingleCharBoxPart;-*.PROCESSED_R5S2;-*.SCIR5S;-*.mdf;-*.ldf;-xmldoc.xml;-*.out;-*.OBJ;-*.zip;-*.oca;-*.vbg;-*.ctx;-BoxProperties (orig).csv;-*.vbp;-sgCcsrf.~lmt;-sgCcsrf.lmt;-Thumbs.db;-.\_filesfile;-.\diff.txt;-.\filever_Tue;-.\nodiffs.txt;-.\NULL;-.\processbox.awk;-.\ProcessBoxSingleCharInput.awk;-.\processproj.awk;-.\processscreen.awk;-.\Sage Report Designer User Guide.pdf;-.\vssstatus.bat;-.\writeable.txt;-.\Retrieve\Construct\Construct_Basic.chm;-.\Retrieve\Construct\R5ScreenControlsFromAccessDb. txt;-R5LicenseKeysVSS.lic;-.\SCRIPTS\backup\;-.\CcsStatLayouts\Scripts\archive\"
31/08/2006 13:07:08 >> expand all
31/08/2006 13:07:08 >> # select better after expand
31/08/2006 13:07:08 >> select right.diff.files
31/08/2006 13:07:08 >> #select files
31/08/2006 13:07:08 >> criteria rules-based
31/08/2006 13:07:08 >> # try file-report instead of folder-report.
31/08/2006 13:07:08 >> # but be careful,it has some different options!
31/08/2006 13:07:08 >> file-report layout:composite &
31/08/2006 13:07:08 >> options:display-context,ignore-unimportant &
31/08/2006 13:07:08 >> title:"v11 vs patch Comparison" &
31/08/2006 13:07:08 >> output-to:C:\DIFF_v11_to_Patch.html &
31/08/2006 13:07:08 >> output-options:html-color
31/08/2006 13:07:08 Beyond Compare Version 2.4.1 (build 241)
31/08/2006 13:07:08 Exception occurred at: 000119EE
31/08/2006 13:07:08 System Error. Code: 87.
31/08/2006 13:07:08 The parameter is incorrect
31/08/2006 13:07:08 Script completed in 0.91 seconds
Reply With Quote
  #6  
Old 05-Sep-2006, 05:10 PM
Chris Chris is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 3,793
Default Re: Displaying Differences Like File Diffs Report

I think anything you can do in scripting can be done in the GUI. To create a concatenated report interactively, Expand All, Edit|Select All Files, then Actions|File Differences Report.

It isn't possible to set the number of context lines in a script. To change the number of context lines, go to the File Viewer section of Tools|Options.
__________________
Chris K Scooter Software
Reply With Quote
  #7  
Old 05-Sep-2006, 05:17 PM
Chris Chris is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 3,793
Default Re: Displaying Differences Like File Diffs Report

file-report command will generate this error if no files are selected.

To fix this, change your select command.

Try:

select all.diff.files

Also, place the "criteria rules-based" command before the load command.

This way you'll only select files that are different according to rules-based comparison.
__________________
Chris K Scooter Software
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 07:50 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.