summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2000-10-29 03:56:49 +0000
committerjdp <jdp@FreeBSD.org>2000-10-29 03:56:49 +0000
commite6f3651c0396c2eb8f643c737d78da149db3b25d (patch)
treee8ab21e2c31f374ef1b1abbce595461616f5f94c /contrib/cvs/src
parent251bfbe494ff20e477715e0c3c607f4c6f4c5877 (diff)
downloadFreeBSD-src-e6f3651c0396c2eb8f643c737d78da149db3b25d.zip
FreeBSD-src-e6f3651c0396c2eb8f643c737d78da149db3b25d.tar.gz
Fix a bug that shows up when checking out files by date with the
"-D date" command line option. There is code in the original to handle a special case. If the date search finds revision 1.1 it is supposed to check whether revision 1.1.1.1 has the same date stamp, which would indicate that the file was originally brought in with "cvs import". In that case it is supposed to return the vendor branch version 1.1.1.1. However, there is a bug in the code. It actually compares the date of revision 1.1 for equality with the date given on the command line -- clearly wrong. This commit fixes the coding bug. There is an additional bug which is _not_ fixed in this commit. The date comparison should not be a strict equality test. It should allow a fudge factor of, say, 2-3 seconds. Old versions of CVS created the two revisions with two separate invocations of the RCS "ci" command. We have many old files in the tree in which the dates of revisions 1.1 and 1.1.1.1 differ by 1 second. Approved by: peter
Diffstat (limited to 'contrib/cvs/src')
-rw-r--r--contrib/cvs/src/rcs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/cvs/src/rcs.c b/contrib/cvs/src/rcs.c
index 7f2094d8..1e9edce 100644
--- a/contrib/cvs/src/rcs.c
+++ b/contrib/cvs/src/rcs.c
@@ -2900,8 +2900,10 @@ RCS_getdate (rcs, date, force_tag_match)
p = findnode (rcs->versions, "1.1.1.1");
if (p)
{
+ char *date_1_1 = vers->date;
+
vers = (RCSVers *) p->data;
- if (RCS_datecmp (vers->date, date) != 0)
+ if (RCS_datecmp (vers->date, date_1_1) != 0)
return xstrdup ("1.1");
}
}
OpenPOWER on IntegriCloud