Source Code printing for code reviews....

Source Code printing for code reviews....

Post by Robert_Angel.. » Sun, 24 Dec 2000 01:20:34



Hi all,
    Anyone know of a package which given 2 files (a modified
version of a source file from a source distribution) will
print either a colorized or fontized merged version of the
differences.  I'm looking for something which will combine
both files and show common text and the differences
in either a different color or different font.

I want to use this for code reviews.

--
Robert Angelino
High Tower Software Inc.
Director of Software Development
(949) 852-2233

 
 
 

Source Code printing for code reviews....

Post by Eli Zaretski » Sun, 24 Dec 2000 02:04:51



>     Anyone know of a package which given 2 files (a modified
> version of a source file from a source distribution) will
> print either a colorized or fontized merged version of the
> differences.  I'm looking for something which will combine
> both files and show common text and the differences
> in either a different color or different font.

Sounds like you want "M-x ediff RET" and/or "M-x ediff-merge-files RET".

 
 
 

Source Code printing for code reviews....

Post by Kai Gro?joha » Sun, 24 Dec 2000 02:47:56



> Sounds like you want "M-x ediff RET" and/or "M-x ediff-merge-files
> RET".

I was going to suggest that, too, but I didn't know how to get ediff
to do the printout he wanted.

It appears that he wants a fontified version of the output of the Unix
program `merge'.  But that wants three file names.  Hm.

kai
--
~/.signature

 
 
 

Source Code printing for code reviews....

Post by Guillaume Dargau » Sun, 24 Dec 2000 05:41:00


Ahem, might get flamed for that, but Microsoft Word has a compare function
that does just that. I've used it a couple times.
[Tools][Track Changes][Compare Documents]

Quote:>     Anyone know of a package which given 2 files (a modified
> version of a source file from a source distribution) will
> print either a colorized or fontized merged version of the
> differences.  I'm looking for something which will combine
> both files and show common text and the differences
> in either a different color or different font.

--
Guillaume Dargaud
Colorado State University - Dept of Atmospheric Science
http://rome.atmos.colostate.edu/
  Thesaurus /nm./: a dinosaur with an excellent vocabulary.
 
 
 

Source Code printing for code reviews....

Post by CBFalcone » Sun, 24 Dec 2000 16:18:27



>     Anyone know of a package which given 2 files (a modified
> version of a source file from a source distribution) will
> print either a colorized or fontized merged version of the
> differences.  I'm looking for something which will combine
> both files and show common text and the differences
> in either a different color or different font.

> I want to use this for code reviews.

Don't know about printing, but MultiEdit will compare two source
side by side and color various areas according to whether they are
in the other file or not, etc.

--


http://www.qwikpages.com/backstreets/cbfalconer
   (Remove "NOSPAM." from reply address. my-deja works unmodified)

 
 
 

Source Code printing for code reviews....

Post by Eli Zaretski » Sun, 24 Dec 2000 16:39:33




> > Sounds like you want "M-x ediff RET" and/or "M-x ediff-merge-files
> > RET".

> I was going to suggest that, too, but I didn't know how to get ediff
> to do the printout he wanted.

At least Ediff does all that the proprietary tools suggested by others in
this thread do.

Quote:> It appears that he wants a fontified version of the output of the Unix
> program `merge'.

Doesn't Ediff do that in its merge commands?

Doesn't ediff-files3 do that, _after_ the merge?

 
 
 

Source Code printing for code reviews....

Post by Lee Sau Da » Mon, 25 Dec 2000 11:55:04


    Kai> I was going to suggest that, too, but I didn't know how to
    Kai> get ediff to do the printout he wanted.

Does ps-spool-buffer-with-faces render the ediff highlightings correctly?

BTW, for verions controlled under CVS, C-x v g (vc-annotate) is also a
useful and impressive feature.

--

.----------------------------------------------------------------------------.

`----------------------------------------------------------------------------'

 
 
 

Source Code printing for code reviews....

Post by Victor Wagn » Sun, 24 Dec 2000 21:51:27


: Hi all,
:     Anyone know of a package which given 2 files (a modified
: version of a source file from a source distribution) will
: print either a colorized or fontized merged version of the
: differences.  I'm looking for something which will combine
: both files and show common text and the differences
: in either a different color or different font.

I'll suggest you to filter output of diff -u through some filter
which would convert +ses and -ses into HTML tags
: I want to use this for code reviews.

: --
: Robert Angelino
: High Tower Software Inc.
: Director of Software Development
: (949) 852-2233

--
Less is more or less more
        -- Y_Plentyn on #LinuxGER

 
 
 

Source Code printing for code reviews....

Post by Eli Zaretski » Mon, 25 Dec 2000 16:05:34




>     Kai> I was going to suggest that, too, but I didn't know how to
>     Kai> get ediff to do the printout he wanted.

> Does ps-spool-buffer-with-faces render the ediff highlightings correctly?

Of course!  ps-print doesn't care who added the colors, it just prints
whatever face information is there.

On a black-and-white printer, you might need to define suitable ps-*-faces
lists to get the colors be transformed into bold, underline, or italics.

 
 
 

Source Code printing for code reviews....

Post by Evgeny Roubinchtei » Tue, 26 Dec 2000 10:52:21


    Robert> Anyone know of a package which given 2 files (a modified
    Robert> version of a source file from a source distribution) will
    Robert> print either a colorized or fontized merged version of the
    Robert> differences.  I'm looking for something which will combine
    Robert> both files and show common text and the differences in
    Robert> either a different color or different font.

The GNU enscript distribution comes with a script (called gdiffpp, if
memory serves) that will do something like that.  The script is in
Perl, so it shouldn't be too much work to adapt that to your needs.

--
Evgeny

AG: Add Gibberish