Is there a recommended way to open multiple file compare tabs in the same window from the command line (in rapid succession) without (a) causing multiple windows to open when a file comparison takes a while or (b) using folder-based scripting?
Context: we have a Perl program that (1) identifies all files that have been edited locally compare to an SCM, (2) retrieves a copy of each "old" file from the SCM and places it in a temporary file, and (3) launches BC to compare each pair of files. When it works as desired, a single window is launched and the user can switch back and forth very handily between tabs as they review the changes.
The Perl script runs the commands as though it were a bash script like so:
If, for instance, the BC for file2.c is slow to display its tab in the first window, the file3.c comparison opens in a new window. On a slower machine (or VM), this happens more often than not. I have tried using BComp.exe too; same effect.
I'd try to script a folder view, but it's not a folder oriented operation so that would require extra complexity and hoop-jumping. What would be ideal is to open tabs from a script that's not folder-based or to be able to tell BC wait and open it in a previous instance even if that instance is busy. If instances were named in some way (for instance, we could name them by the SCM's assigned change number), that would be ideal because we could have multiple windows, one per change, each with all of the files that have been changed in that change.
Context: we have a Perl program that (1) identifies all files that have been edited locally compare to an SCM, (2) retrieves a copy of each "old" file from the SCM and places it in a temporary file, and (3) launches BC to compare each pair of files. When it works as desired, a single window is launched and the user can switch back and forth very handily between tabs as they review the changes.
The Perl script runs the commands as though it were a bash script like so:
Code:
scm print file1.c > tmp0001.c bcompare.exe /leftreadonly /lefttitle=file1.c#head /righttitle=file1.c#have tmp0001.c file1.c & scm print file2.c > tmp0002.c bcompare.exe /leftreadonly /lefttitle=file2.c#head /righttitle=file2.c#have tmp0002.c file2.c scm print file3.c > tmp0003.c bcompare.exe /leftreadonly /lefttitle=file3.c#head /righttitle=file3.c#have tmp0003.c file3.c rm tmp0001.c tmp0002.c tmp0003.c
I'd try to script a folder view, but it's not a folder oriented operation so that would require extra complexity and hoop-jumping. What would be ideal is to open tabs from a script that's not folder-based or to be able to tell BC wait and open it in a previous instance even if that instance is busy. If instances were named in some way (for instance, we could name them by the SCM's assigned change number), that would be ideal because we could have multiple windows, one per change, each with all of the files that have been changed in that change.
Comment