Re: rdiff
"Paul Edwards" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.bugs |
|---|---|
| Organization | BigPond Internet Services (http://www.bigpond.net.au) |
| Message-ID | <[email protected]> |
I have confirmed that these patches both work like a dream. BFN. Paul. "Paul Edwards" <[email protected]> wrote in message news:[email protected]... > "Paul Edwards" <[email protected]> wrote in message news:[email protected]... > > Any ideas on where to fix it for the -r xxx -r yyy variation? > > I think this will fix the premature assumption that because the > version numbers are different, the files must "obviously" be > different too, in both diff and rdiff. I'll test it out later... > > Diffs against cvs1-11-5 > > Index: patch.c > =================================================================== > RCS file: /cvs/ccvs/src/patch.c,v > retrieving revision 1.80 > diff -c -r1.80 patch.c > *** patch.c 28 Dec 2002 17:56:59 -0000 1.80 > --- patch.c 24 May 2003 10:17:51 -0000 > *************** > *** 463,507 **** > goto out2; > } > > - if (patch_short) > - { > - cvs_output ("File ", 0); > - cvs_output (finfo->fullname, 0); > - if (vers_tag == NULL) > - { > - cvs_output (" is new; current revision ", 0); > - cvs_output (vers_head, 0); > - cvs_output ("\n", 1); > - } > - else if (vers_head == NULL) > - { > - cvs_output (" is removed; not included in ", 0); > - if (rev2 != NULL) > - { > - cvs_output ("release tag ", 0); > - cvs_output (rev2, 0); > - } > - else if (date2 != NULL) > - { > - cvs_output ("release date ", 0); > - cvs_output (date2, 0); > - } > - else > - cvs_output ("current release", 0); > - cvs_output ("\n", 1); > - } > - else > - { > - cvs_output (" changed from revision ", 0); > - cvs_output (vers_tag, 0); > - cvs_output (" to ", 0); > - cvs_output (vers_head, 0); > - cvs_output ("\n", 1); > - } > - ret = 0; > - goto out2; > - } > - > /* Create 3 empty files. I'm not really sure there is any advantage > * to doing so now rather than just waiting until later. > * > --- 463,468 ---- > *************** > *** 590,595 **** > --- 551,595 ---- > case 0: /* nothing to do */ > break; > case 1: > + if (patch_short) > + { > + cvs_output ("File ", 0); > + cvs_output (finfo->fullname, 0); > + if (vers_tag == NULL) > + { > + cvs_output (" is new; current revision ", 0); > + cvs_output (vers_head, 0); > + cvs_output ("\n", 1); > + } > + else if (vers_head == NULL) > + { > + cvs_output (" is removed; not included in ", 0); > + if (rev2 != NULL) > + { > + cvs_output ("release tag ", 0); > + cvs_output (rev2, 0); > + } > + else if (date2 != NULL) > + { > + cvs_output ("release date ", 0); > + cvs_output (date2, 0); > + } > + else > + cvs_output ("current release", 0); > + cvs_output ("\n", 1); > + } > + else > + { > + cvs_output (" changed from revision ", 0); > + cvs_output (vers_tag, 0); > + cvs_output (" to ", 0); > + cvs_output (vers_head, 0); > + cvs_output ("\n", 1); > + } > + ret = 0; > + goto out; > + } > + > /* > * The two revisions are really different, so read the first two > * lines of the diff output file, and munge them to include more > Index: diff.c > =================================================================== > RCS file: /cvs/ccvs/src/diff.c,v > retrieving revision 1.93 > diff -c -r1.93 diff.c > *** diff.c 28 Dec 2002 17:56:59 -0000 1.93 > --- diff.c 24 May 2003 10:17:53 -0000 > *************** > *** 956,963 **** > /* now, see if we really need to do the diff */ > if (strcmp (use_rev1, use_rev2) == 0) > return DIFF_SAME; > ! else > ! return DIFF_DIFFERENT; > } > > if ((diff_rev1 || diff_date1) && use_rev1 == NULL) > --- 956,963 ---- > /* now, see if we really need to do the diff */ > if (strcmp (use_rev1, use_rev2) == 0) > return DIFF_SAME; > ! /*else > ! return DIFF_DIFFERENT;*/ > } > > if ((diff_rev1 || diff_date1) && use_rev1 == NULL) > *************** > *** 1003,1010 **** > { > if (strcmp (use_rev1, use_rev2) == 0) > return DIFF_SAME; > ! else > ! return DIFF_DIFFERENT; > } > > if (use_rev1 == NULL > --- 1003,1010 ---- > { > if (strcmp (use_rev1, use_rev2) == 0) > return DIFF_SAME; > ! /*else > ! return DIFF_DIFFERENT;*/ > } > > if (use_rev1 == NULL > >