Hi,

I want to check out certain cvs commits by date.  I figured out
that our cvs gets confused if there is a vendor branch and a commit
on top of it.

cvs co -D2018-04-07Z src/gnu/llvm/include/llvm/InitializePasses.h

will check out revision 1.1.  The correct one would be 1.1.1.5.
Attached diff fixes this.  The wrong logic was added by commit

revision 1.9
date: 1999/02/28 21:57:58;  author: tholo;  state: Exp;  lines: +195 -65;
Integrate local changes

ok?

bluhm

Index: gnu/usr.bin/cvs/src/rcs.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/gnu/usr.bin/cvs/src/rcs.c,v
retrieving revision 1.26
diff -u -p -r1.26 rcs.c
--- gnu/usr.bin/cvs/src/rcs.c   28 May 2014 16:43:06 -0000      1.26
+++ gnu/usr.bin/cvs/src/rcs.c   7 Oct 2018 20:34:54 -0000
@@ -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");
        }
     }

Reply via email to