> Tony, > > Assuming Larry doesn't want to argue with me, could you resubmit this > > patch with a test case and maybe documentation, as per the HACKING > file > in the top level of the source distribution? > > Thanks, > > Derek
***CHANGELOG*** NEWS: Note that rdiff now handles binary files in the same way as the patch utility. ***NEWS*** * The "cvs rdiff" command no longer attempts to diff files marked as binary. Instead, it prints a "Binary files foo:1.1 and foo:1.2 differ" message, just like the patch utility. ***PATCH*** diff -urN cvs-1.11.1p1-orig/src/patch.c cvs-1.11.1p1-apc/src/patch.c --- cvs-1.11.1p1-orig/src/patch.c Tue Apr 24 14:14:53 2001 +++ cvs-1.11.1p1-apc/src/patch.c Wed Oct 30 15:32:38 2002 @@ -590,6 +592,28 @@ case 0: /* nothing to do */ break; case 1: + /* If files differ and are marked as binary, just output message */ + if (rcsfile->expand != NULL && strcmp(rcsfile->expand, "b") == 0) + { + cvs_output("Binary files ", 0); + cvs_output(finfo->fullname, 0); + cvs_output(":", 1); + if (vers_tag) + cvs_output(vers_tag, 0); + else + cvs_output("missing", 0); + cvs_output(" and ", 0); + cvs_output(finfo->fullname, 0); + cvs_output(":", 1); + if (vers_head) + cvs_output(vers_head, 0); + else + cvs_output("removed", 0); + cvs_output(" differ",0); + cvs_output("\n",1); + break; + } + /* * The two revisions are really different, so read the first two * lines of the diff output file, and munge them to include more ***TEST*** # APC - test rdiff_skip_binary # rdiff should warn and skip binary files like patch does mkdir testimport cd testimport echo "not a real binary file" > fakebinary ${AWK} 'BEGIN { printf "%c%c%c@%c%c", 2, 10, 137, 13, 10 }' \ </dev/null | ${TR} '@' '\000' > realbinary echo "just a text file" > textfile dotest_sort rdiff-10.0-skip_binary-do_import \ "${testcvs} import -I ! -m skip-binary-import trdiff_skip_binary TRDIFF T10" \ ' N trdiff_skip_binary/fakebinary N trdiff_skip_binary/realbinary N trdiff_skip_binary/textfile No conflicts created by this import' dotest rdiff-10.1-skip_binary-do_checkout \ "${testcvs} co trdiff_skip_binary " \ "${PROG}"' [a-z]*: Updating trdiff_skip_binary U trdiff_skip_binary/fakebinary U trdiff_skip_binary/realbinary U trdiff_skip_binary/textfile' cd trdiff_skip_binary dotest rdiff-10.3-skip_binary-do_makebinary \ "${testcvs} admin -kb fakebinary realbinary" \ "RCS file: ${CVSROOT_DIRNAME}/trdiff_skip_binary/fakebinary,v done RCS file: ${CVSROOT_DIRNAME}/trdiff_skip_binary/realbinary,v done" dotest rdiff-10.4-skip_binary-do_update \ "${testcvs} update" \ "${PROG}"' [a-z]*: Updating \. U fakebinary U realbinary' cat realbinary realbinary > realbinary.new mv realbinary.new realbinary echo "more text" >> fakebinary echo "more text" >> textfile dotest rdiff-10.4-skip_binary-do_commit \ "${testcvs} commit -m skip-binary-commit" \ "${PROG}"' [a-z]*: Examining \. Checking in fakebinary; '"${CVSROOT_DIRNAME}"'/trdiff_skip_binary/fakebinary,v <-- fakebinary new revision: 1\.2; previous revision: 1\.1 done Checking in realbinary; '"${CVSROOT_DIRNAME}"'/trdiff_skip_binary/realbinary,v <-- realbinary new revision: 1\.2; previous revision: 1\.1 done Checking in textfile; '"${CVSROOT_DIRNAME}"'/trdiff_skip_binary/textfile,v <-- textfile new revision: 1\.2; previous revision: 1\.1 done' dotest rdiff-10.5-reset_ts-do_rdiff \ "${testcvs} rdiff -u -r1\.1 trdiff_skip_binary" \ "${PROG}"' [a-z]*: Diffing trdiff_skip_binary Binary files trdiff_skip_binary/fakebinary:1\.1 and trdiff_skip_binary/fakebinary:1\.2 differ Binary files trdiff_skip_binary/realbinary:1\.1 and trdiff_skip_binary/realbinary:1\.2 differ Index: trdiff_skip_binary/textfile diff -u trdiff_skip_binary/textfile:1\.1 trdiff_skip_binary/textfile:1\.2 --- trdiff_skip_binary/textfile:1\.1 .* +++ trdiff_skip_binary/textfile .* @@ -1 +1,2 @@ just a text file +more text' cd ../.. rm -r testimport rm -rf ${CVSROOT_DIRNAME}/trdiff_skip_binary _______________________________________________ Bug-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-cvs