Date: Sun, 11 Jan 1998 02:18:06 +0300 (MSK) From: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru> To: Peter Wemm <peter@netplex.com.au>, info-cvs@gnu.ai.mit.edu Cc: Mike Smith <mike@smith.net.au>, FreeBSD-current <current@FreeBSD.ORG>, Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de> Subject: CVS patch to produce correct diffs (-L used now) Message-ID: <Pine.BSF.3.96.980111020744.779A-100000@ache.relcom.ru> In-Reply-To: <199801101810.CAA08076@spinner.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Since "patch" expecially ignore Index: lines for context diffs according to POSIX 1003.2b/D11 section 5.22.7.2 and current practice for GNU "patch" (any version), CVS need mechanism to produce correct pathnames in patches made by 'cvs diff' command. The simple way to do it (already adopted by rcsdiff) is using -L option for diff to specify alternative ***/--- labels. Proposed patch included below: *** src/diff.c.orig Sat May 24 23:48:15 1997 --- src/diff.c Sun Jan 11 01:53:17 1998 *************** *** 568,574 **** if (empty_file == DIFF_ADDED) { if (use_rev2 == NULL) ! run_setup ("%s %s %s %s", DIFF, opts, DEVNULL, finfo->file); else { int retcode; --- 568,576 ---- if (empty_file == DIFF_ADDED) { if (use_rev2 == NULL) ! run_setup ("%s %s -L%s -L%s %s %s", DIFF, opts, ! DEVNULL, finfo->fullname, ! DEVNULL, finfo->file); else { int retcode; *************** *** 589,595 **** } /* FIXME: what if retcode > 0? */ ! run_setup ("%s %s %s %s", DIFF, opts, DEVNULL, tmp); } } else --- 591,599 ---- } /* FIXME: what if retcode > 0? */ ! run_setup ("%s %s -L%s -L%s %s %s", DIFF, opts, ! DEVNULL, finfo->fullname, ! DEVNULL, tmp); } } else *************** *** 610,630 **** } /* FIXME: what if retcode > 0? */ ! run_setup ("%s %s %s %s", DIFF, opts, tmp, DEVNULL); } } else { if (use_rev2) { ! run_setup ("%s%s -x,v/ %s %s -r%s -r%s", Rcsbin, RCS_DIFF, opts, *options ? options : vers->options, ! use_rev1, use_rev2); } else { ! run_setup ("%s%s -x,v/ %s %s -r%s", Rcsbin, RCS_DIFF, opts, ! *options ? options : vers->options, use_rev1); } run_arg (vers->srcfile->path); } --- 614,636 ---- } /* FIXME: what if retcode > 0? */ ! run_setup ("%s %s -L%s %s %s", DIFF, opts, ! finfo->fullname, tmp, DEVNULL); } } else { if (use_rev2) { ! run_setup ("%s%s -x,v/ %s %s -r%s -r%s -L%s", Rcsbin, RCS_DIFF, opts, *options ? options : vers->options, ! use_rev1, use_rev2, finfo->fullname); } else { ! run_setup ("%s%s -x,v/ %s %s -r%s -L%s", Rcsbin, RCS_DIFF, opts, ! *options ? options : vers->options, use_rev1, ! finfo->fullname); } run_arg (vers->srcfile->path); } -- Andrey A. Chernov <ache@nietzsche.net> http://www.nagual.pp.ru/~ache/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980111020744.779A-100000>