From 308b60f66831aa65a459a7b347ea6ca14b6e4799 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 18 Mar 1999 09:21:42 +0000 Subject: Import cvs-1.10 onto vendor branch. Merge to follow shortly. Obtained from: cyclic.com --- contrib/cvs/src/diff.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'contrib/cvs/src/diff.c') diff --git a/contrib/cvs/src/diff.c b/contrib/cvs/src/diff.c index 7a4c105..341c04c 100644 --- a/contrib/cvs/src/diff.c +++ b/contrib/cvs/src/diff.c @@ -434,7 +434,15 @@ diff_fileproc (callerdat, finfo) exists = 0; /* special handling for TAG_HEAD */ if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0) - exists = vers->vn_rcs != NULL; + { + char *head = + (vers->vn_rcs == NULL + ? NULL + : RCS_branch_head (vers->srcfile, vers->vn_rcs)); + exists = head != NULL; + if (head != NULL) + free (head); + } else { Vers_TS *xvers; @@ -814,7 +822,9 @@ diff_file_nodiff (finfo, vers, empty_file) { /* special handling for TAG_HEAD */ if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0) - use_rev1 = xstrdup (vers->vn_rcs); + use_rev1 = ((vers->vn_rcs == NULL || vers->srcfile == NULL) + ? NULL + : RCS_branch_head (vers->srcfile, vers->vn_rcs)); else { xvers = Version_TS (finfo, NULL, diff_rev1, diff_date1, 1, 0); @@ -827,7 +837,9 @@ diff_file_nodiff (finfo, vers, empty_file) { /* special handling for TAG_HEAD */ if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0) - use_rev2 = xstrdup (vers->vn_rcs); + use_rev2 = ((vers->vn_rcs == NULL || vers->srcfile == NULL) + ? NULL + : RCS_branch_head (vers->srcfile, vers->vn_rcs)); else { xvers = Version_TS (finfo, NULL, diff_rev2, diff_date2, 1, 0); -- cgit v1.1