This is a very good example where other people's specialties can greatly help. jmcnamara's experience with cvs diff totally nullified my snippet. I don't care my XP point, I want to openly accept the fact that I was so wrong, and didn't realize cvs diff's full functionality.

THANK YOU VERY MUCH, I FEEL SO GRATEFUL.

UPDATE

After tried --suppress-common-lines for a while, I went back to my snippet again.

The problem with that option is that, it only shows you the differences, with no indication of their positions in the source file, which make me totally lost. I don't just want to know how big the difference is, I want to know exactly where those modifications are.

One great benefit I got from my snippet is that, it extracts the real differences, and at the same time, it gives me the line numbers of those real differences (not in the source files, but in the result file from cvs diff, but it is still good enough, as the result from cvs diff without --supress-common-lines does contain copies of source files), so I can easily locate them in the source code.

However I still love the --suppress-common-lines option, and will use it in the future, whenever it fits. Thank you jmcnamara.


In reply to Re: Re: extract useful infos from cvs diff output by pg
in thread extract useful infos from cvs diff output by pg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.