From 37f08ffbfeeea2b2b5b457b85e023b314a6006ef Mon Sep 17 00:00:00 2001 From: Anand Kumria Date: Sat, 10 Jun 2006 23:17:29 +0200 Subject: [PATCH] FreeBSD isn't evil - just misguided cvsps fails against a FreeBSD CVS pserver. By fails I mean it fails back to using the 'log' command rather the 'rlog' which would give me stable patchsets. cvsps requires the remote pserver to be 1.11.1 or later for rlog to work and, indeed, the other side is a later version. Unfortunately FreeBSD have, misguidedly, modified the version string such that cvsps misdetects things. --- cap.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cap.c b/cap.c index a6186f6..a1927df 100644 --- a/cap.c +++ b/cap.c @@ -121,11 +121,19 @@ int check_version_string(const char * str, int req_major, int req_minor, int req return 0; } + /* We might have encountered a FreeBSD system which + * has a mucked up version string of: + * Concurrent Versions System (CVS) '1.11.17'-FreeBSD (client/server) + * so re-test just in case + */ p += skip; if (sscanf(p, "%d.%d.%d", &major, &minor, &extra) != 3) { - debug(DEBUG_APPMSG1, "WARNING: malformed CVS version: %s", str); - return 0; + if (sscanf(p, "'%d.%d.%d'", &major, &minor, &extra) != 3) + { + debug(DEBUG_APPMSG1, "WARNING: malformed CVS version: %s", str); + return 0; + } } return (major > req_major || -- 2.11.4.GIT