Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jan 2006 22:32:43 -0500
From:      Jonathan Noack <noackjr@alumni.rice.edu>
To:        "Rousell, Jeff" <jrousell@ptc.com>
Cc:        freebsd-cvsweb@FreeBSD.org
Subject:   Re: Unable to get any DIffs to work
Message-ID:  <43C5CDDB.2040809@alumni.rice.edu>
In-Reply-To: <88CB0762D6EE6A4DAEA3A343AA39B2FD6BC21E@HQ-MAIL3.ptcnet.ptc.com>
References:  <88CB0762D6EE6A4DAEA3A343AA39B2FD6BC21E@HQ-MAIL3.ptcnet.ptc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------000408030105050702090708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Rousell, Jeff wrote:
> I am unable to get any diff outputs to work with a new CVSWeb
> installation.
>  
> I  am NOT a newbie who is posting here without first trying to solve
> this myself.
>  
> The installation works perfectly for browsing and doing annotation
> outputs but not for any diffs.
>  rcsdiff and rlog ( 5.7) is installed and has been confirmed to work
> fine from the command line.
> I am not getting not getting any 500 errors nor server error log info
> about the problem.
>  
> For the human readable diff I basically get a blank diff -- the page
> looks fine with all eth header and footer prettiness- but the actual
> "meat" of the page says: 
> " - No viewable change - "
>  
> If I try a unified or side-by-side I get something like below printed to
> the browser( no header or footer prettiness):
> /bin/diff: illegal option -- -
> usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2
>        diff [-bitw] [-C number] file1 file2
>        diff [-bitw] [-D string] file1 file2
>        diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name]
> directory1 directory2
> rcsdiff: /web-content/cvsroot/SCM/bin/jadd: diff failed
> I am able to use rcsdiff from the command line just fine.  And it
> appears as though cvsweb.cgi has the  access to  run rcsdiff and knows
> where it is etc... 
>  
> Is there a debug flag that I cna sue so that it prints out the full diff
> command that it is trying to perform so thhat I could verify that fomr
> teh command line?

Which OS?  Which version of CVSweb?  Can you post of a diff between 
cvsweb.conf.dist and your cvsweb.conf?

Uncommenting '$DEBUG = 1;' in cvsweb.conf will cause STDERR to be sent 
to your web server error log instead of /dev/null.  However, for the 
rcsdiff command STDERR is sent to STDOUT by default so you are already 
seeing any errors in your web browser.

Attached is a patch for CVSweb 3.0.6 which will print out the rcsdiff 
command used.  It should print out at the top of the diff output.

One final note:
When testing from the command-line be sure to run the command as the web 
server user (i.e., 'sudo -u www rcsdiff ...').

-Jonathan

--------------000408030105050702090708
Content-Type: text/plain;
 name="print_command.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="print_command.patch"

--- cvsweb.cgi.old	Wed Jan 11 22:12:42 2006
+++ cvsweb.cgi	Wed Jan 11 22:16:09 2006
@@ -2336,6 +2336,8 @@
   if (!open($fh, "-|")) {    # child
     open(STDERR, ">&STDOUT");    # Redirect stderr to stdout
     openOutputFilter();
+    print(join(' ', $CMD{rcsdiff}, @rcsdiff_options, @difftype, "-r$rev1",
+	  "-r$rev2", $fullname, "\n"));
     exec($CMD{rcsdiff}, @rcsdiff_options, @difftype, "-r$rev1", "-r$rev2",
          $fullname) or exit -1;
   }

--------------000408030105050702090708--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43C5CDDB.2040809>