summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2018-10-22 15:18:51 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2018-10-22 15:18:51 +0000
commitbf75a53222b9691d2cfa7f5c736a7869a9e21228 (patch)
tree82cb57cbfbbe59165355119e91a9a0436b32a691
parentb86dabbcd34c19a2cf7896fd814d238dc69139c0 (diff)
When checking out certain commits by date, cvs got confused. If
there is a vendor branch and a commit on top of it, revision 1.1 was taken instead of the vendor branch. To fix this, compare the vendor date with the current node, and not with the command line date. OK deraadt@
-rw-r--r--gnu/usr.bin/cvs/src/rcs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c
index 102698cefec..7f712bcb6fb 100644
--- a/gnu/usr.bin/cvs/src/rcs.c
+++ b/gnu/usr.bin/cvs/src/rcs.c
@@ -2824,6 +2824,7 @@ RCS_getdate (rcs, date, force_tag_match)
char *cur_rev = NULL;
char *retval = NULL;
Node *p;
+ RCSVers *cur_vers;
RCSVers *vers = NULL;
/* make sure we have something to look at... */
@@ -2851,6 +2852,7 @@ RCS_getdate (rcs, date, force_tag_match)
if (RCS_datecmp (vers->date, date) <= 0)
{
cur_rev = vers->version;
+ cur_vers = vers;
break;
}
@@ -2881,7 +2883,7 @@ RCS_getdate (rcs, date, force_tag_match)
if (p)
{
vers = (RCSVers *) p->data;
- if (RCS_datecmp (vers->date, date) != 0)
+ if (RCS_datecmp (vers->date, cur_vers->date) != 0)
return xstrdup ("1.1");
}
}