[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diff doesn't know dead means dead
From: |
Paul Edwards |
Subject: |
diff doesn't know dead means dead |
Date: |
Tue, 27 May 2003 13:49:33 GMT |
With cvs 1.11.6, if I go to a directory and go:
cvs diff -r abc -r def file.c
Then if abc is NOT in the file, use_rev1 is NULL.
But if def IS in the file, BUT DEAD, then use_rev2 is NOT NULL.
Which is unfortunate, because that means I either get a
message "tag abc is not in file file.c" or else, if I used the
"-N" option, which I do, then it gives me a full diff listing
as if this was an added file.
Any idea where in the below code there should be something
the recognizes that dead means dead?
Thanks. Paul.
use_rev1 = use_rev2 = (char *) NULL;
if (diff_rev1 || diff_date1)
{
/* special handling for TAG_HEAD */
if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
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);
if (xvers->vn_rcs != NULL)
use_rev1 = xstrdup (xvers->vn_rcs);
freevers_ts (&xvers);
}
}
if (diff_rev2 || diff_date2)
{
/* special handling for TAG_HEAD */
if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0)
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);
if (xvers->vn_rcs != NULL)
use_rev2 = xstrdup (xvers->vn_rcs);
freevers_ts (&xvers);
}
if (use_rev1 == NULL)
{
/* The first revision does not exist. If EMPTY_FILES is
true, treat this as an added file. Otherwise, warn
about the missing tag. */
if (use_rev2 == NULL)
/* At least in the case where DIFF_REV1 and DIFF_REV2
are both numeric, we should be returning some kind
of error (see basicb-8a0 in testsuite). The symbolic
case may be more complicated. */
return DIFF_SAME;
else if (empty_files)
return DIFF_ADDED;
else if (diff_rev1)
error (0, 0, "tag %s is not in file %s", diff_rev1,
finfo->fullname);
else
error (0, 0, "no revision for date %s in file %s",
diff_date1, finfo->fullname);
return DIFF_ERROR;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- diff doesn't know dead means dead,
Paul Edwards <=