[Home]ComponentSoftware

UseModWiki | RecentChanges | Preferences

http://www.componentsoftware.com

http://www.componentsoftware.com/csdiff/

Problem

I obtained the ComponentSoftware free version of diff (CSDiff) (referred to in UseModWiki/InstallWindows) and installed it (d:/program files/csdiff/), and copied csdiff.exe to diff.exe (to rename).

With wiki or Perl?

I then changed my wiki config file from
 $ENV{PATH}   = "/usr/bin/";     # Path used to find "diff"
to
 $ENV{PATH}   = "d:/program files/csdiff/";     # Path used to find "diff"

Having done this diff does not work, and editing stops working, giving the diagnostic

 Could not get editing lock at d:\PROGRA~1\APACHE~1\apache\cgi-bin\perl\wiki.pl line 3224.

DataDir is

 $DataDir     = "//development/jb2tp/wikidb/"; # Main wiki directory
 $UseConfig   = 1;       # 1 = use config file,    0 = do not look for config

and works fine for displaying pages.

I'm using ApacheHTTPServer 1.3.22 and ActivePerl 5.6.1 build 631.

With CSDiff?

I have since tried

 d://program files//csdiff//
 d:\program files\csdiff  d:\\program files\\csdiff and then (copying the directory)
 d:\\csdiff\ 
Finally I observed with Task Manager that diff was getting loaded, but not apparently completing.

I went to the command line and ran CSDiff with the same parameters as called from wiki.pl, viz

   $diff_out = `d:\\csdiff\\diff /q $oldName $newName`;

Notice the /q parameter. First time up CSDiff fired up a window. So added the /q parameter. STILL CSDiff loads the window, what is happening?

From CSDiff Help

Document Analysis Command-line
Syntax:
CSDiff.exe [/Houtfile | /Toutfile] [/b|/w] [/i] [/s] [/n] [/t=nnn] [/q] BaseFileName CmpFileName
Parameters:
/Houtfile  Generate an HTML output to file outfile.htm
/Toutfile  Generate a text output to file outfile.txt
/b -- Ignores trailing blanks (spaces and tabs) and treats other strings of blanks as equivalent.
/w -- Ignores all blanks. As an example, a = b will compare equal to a=b.

/i -- Ignores the case of letters.  As an example, A will compare equal to a.
/s  Do not perform line fragments analysis.
/n  Output line numbers
/t=size  Set the tab-stop size.
/q  Do not invoke any windows. (Useful for remote activation and Web server activation.)
Examples:
 CSDiff.exe /Tdiff C:\temp\base.txt C:\temp\NewFile.txt 
 CSDiff.exe /Hhdiff /w /t=4 C:\temp\base.txt C:\temp\NewFile.txt 

From the CS-RCS Team

The /q parameter is meant to prevent windows from opening when running CSDiff. However, this is only possible once an output file has been defined (either HTML or plain text). If no such file is defined, the output will be sent to a CSDiff window and the /q parameter will be ignored.

If this is the case should not CSDiff default its output to STDOUT if the /q parameter is used, rather than requiring an output file to be used?

You are right that in your case the logical output would be to STDOUT. However, CSDiff is used mainly in the windows environment and therefore the default output screen is a CSDiff window.

Is there any way (in Windows) to have the output go to STDOUT ?

STDOUT & pipes are not a common concept on windows. However, you can utilize it by specific parameters of the FileOpen? Windows API.

Summary

Don't waste your time.


UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 13, 2004 2:08 pm by MarkusLude (diff)
Search: