Date: Sat, 10 Jan 1998 19:11:31 +0300 (MSK) From: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru> To: Mike Smith <mike@smith.net.au> Cc: FreeBSD-current <current@FreeBSD.ORG>, Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, peter@FreeBSD.ORG Subject: CVS DIFF fix for review (-L added) Message-ID: <Pine.BSF.3.96.980110190329.27770A-100000@lsd.relcom.eu.net> In-Reply-To: <199801071350.AAA01279@word.smith.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Since Index: is dead for context diffs, here is a patch to correct ***/---
pathnames generated by CVS (now using -L diff option like in rcsdiff).
Since I not run CVS and don't know how to do its minimal setup, please
test and check is it really fix the problem.
I plan commit it after feedback from you.
*** src/diff.c.orig Sat May 24 23:48:15 1997
--- src/diff.c Sat Jan 10 18:53:13 1998
***************
*** 169,174 ****
--- 169,185 ----
strcat (*str, src);
}
+ static char *set_diff_label PROTO ((const char *fname));
+
+ static char *set_diff_label(fname)
+ const char *fname;
+ {
+ static char label[FILENAME_MAX + 3];
+
+ (void)snprintf(label, sizeof(label), "-L%s", fname);
+ return label;
+ }
+
int
diff (argc, argv)
int argc;
***************
*** 567,574 ****
if (empty_file == DIFF_ADDED)
{
if (use_rev2 == NULL)
! run_setup ("%s %s %s %s", DIFF, opts, DEVNULL, finfo->file);
else
{
int retcode;
--- 578,587 ----
if (empty_file == DIFF_ADDED)
{
+ char *fn;
+
if (use_rev2 == NULL)
! fn = finfo->file;
else
{
int retcode;
***************
*** 589,596 ****
}
/* FIXME: what if retcode > 0? */
! run_setup ("%s %s %s %s", DIFF, opts, DEVNULL, tmp);
}
}
else
{
--- 602,614 ----
}
/* FIXME: what if retcode > 0? */
! fn = tmp;
}
+ run_setup ("%s %s", DIFF, opts);
+ run_arg (set_diff_label (DEVNULL));
+ run_arg (set_diff_label (finfo->fullname));
+ run_arg (DEVNULL);
+ run_arg (fn);
}
else
{
***************
*** 610,616 ****
}
/* FIXME: what if retcode > 0? */
! run_setup ("%s %s %s %s", DIFF, opts, tmp, DEVNULL);
}
}
else
--- 628,637 ----
}
/* FIXME: what if retcode > 0? */
! run_setup ("%s %s", DIFF, opts);
! run_arg (set_diff_label (finfo->fullname));
! run_arg (tmp);
! run_arg (DEVNULL);
}
}
else
***************
*** 626,631 ****
--- 647,653 ----
run_setup ("%s%s -x,v/ %s %s -r%s", Rcsbin, RCS_DIFF, opts,
*options ? options : vers->options, use_rev1);
}
+ run_arg (set_diff_label (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.980110190329.27770A-100000>
