Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rcshist for openSUSE:Factory checked in at 2025-01-12 11:20:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rcshist (Old) and /work/SRC/openSUSE:Factory/.rcshist.new.1881 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rcshist" Sun Jan 12 11:20:23 2025 rev:3 rq:1236791 version:t20250101 Changes: -------- --- /work/SRC/openSUSE:Factory/rcshist/rcshist.changes 2024-10-02 21:33:32.810786549 +0200 +++ /work/SRC/openSUSE:Factory/.rcshist.new.1881/rcshist.changes 2025-01-12 11:27:51.336243669 +0100 @@ -1,0 +2,9 @@ +Tue Jan 7 23:05:34 UTC 2025 - Manfred Schwarb <manfre...@gmx.ch> + +- update to snapshot t20250101: + * configure updates + * friendly aborting on a fatal errors + * ensure a space between filename and date in the "REV:" lines + * support and document $RCS_DIR + +------------------------------------------------------------------- Old: ---- rcshist-snapshots-t20240419.tar.gz New: ---- rcshist-snapshots-t20250101.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rcshist.spec ++++++ --- /var/tmp/diff_new_pack.9C5hFI/_old 2025-01-12 11:27:51.764261282 +0100 +++ /var/tmp/diff_new_pack.9C5hFI/_new 2025-01-12 11:27:51.768261447 +0100 @@ -1,7 +1,7 @@ # # spec file for package rcshist # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: rcshist -Version: t20240419 +Version: t20250101 Release: 0 Summary: Display RCS change history License: BSD-Source-Code ++++++ rcshist-snapshots-t20240419.tar.gz -> rcshist-snapshots-t20250101.tar.gz ++++++ ++++ 5647 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/CHANGES new/rcshist-snapshots-t20250101/CHANGES --- old/rcshist-snapshots-t20240419/CHANGES 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/CHANGES 2025-01-02 01:22:19.000000000 +0100 @@ -1,3 +1,43 @@ +2025-01-01 Thomas E. Dickey <dic...@invisible-island.net> + + * package/debian/copyright, COPYING: bump + + * rcshist.h: RCS_BASE + + * strbuf.c, rcshist.c, rcsfile.c, namedobjlist.c, misc.c: + aborting on a fatal error is unfriendly - tell the user where it died, + and allow stdout to be flushed, first + + * rcshist.c: + ensure a space between filename and date in the "REV:" lines (report by + Manfred Schwarb) + + * rcshist.1: document $RCS_DIR + + * rcshist.1: convert from mdoc to man, for portability + + * rcsfile.c: + support $RCS_DIR for compatibility with cm_tools utilities. + + * rcshist.c, misc.c, strbuf.c, namedobjlist.c, namedobjlist.h, rcsfile.c: + gcc15-warnings + + * configure: regen + + * configure.in: put --with-systype up front + + * aclocal.m4: resync with my-autoconf + + * package/rcshist.spec, package/debian/changelog: bump + +2024-07-28 Thomas E. Dickey <dic...@invisible-island.net> + + * config.guess: 2024-07-27 + +2024-06-03 Thomas E. Dickey <dic...@invisible-island.net> + + * config.sub: 2024-05-27 + 2024-04-19 Thomas E. Dickey <dic...@invisible-island.net> * package/debian/changelog, package/rcshist.spec: bump diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/COPYING new/rcshist-snapshots-t20250101/COPYING --- old/rcshist-snapshots-t20240419/COPYING 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/COPYING 2025-01-02 01:22:19.000000000 +0100 @@ -1,4 +1,4 @@ -Copyright 2015-2023,2024 Thomas E. Dickey +Copyright 2015-2024,2025 Thomas E. Dickey Copyright (c) 2001 Ian Dowse <iedo...@maths.tcd.ie> All rights reserved. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/configure.in new/rcshist-snapshots-t20250101/configure.in --- old/rcshist-snapshots-t20240419/configure.in 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/configure.in 2025-01-02 01:22:19.000000000 +0100 @@ -1,11 +1,12 @@ dnl Process this file with 'autoconf' to produce a 'configure' script -dnl $Id: configure.in,v 1.4 2022/10/02 12:55:08 tom Exp $ +dnl $Id: configure.in,v 1.5 2025/01/01 20:11:03 tom Exp $ AC_PREREQ(2.52.20141204) -AC_REVISION($Revision: 1.4 $) +AC_REVISION($Revision: 1.5 $) AC_INIT(rcshist.c) AC_CONFIG_HEADER(config.h:config_h.in) CF_CHECK_CACHE([AC_CANONICAL_SYSTEM]) +CF_WITH_SYSTYPE AC_ARG_PROGRAM CF_PROG_CC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/misc.c new/rcshist-snapshots-t20250101/misc.c --- old/rcshist-snapshots-t20240419/misc.c 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/misc.c 2025-01-02 01:22:19.000000000 +0100 @@ -22,11 +22,10 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <stdio.h> -#include <stdlib.h> #include <string.h> #include <err.h> +#include "rcshist.h" #include "misc.h" struct textlist * @@ -104,7 +103,7 @@ void numfree(struct rcsnum *p) { free(p->num); - p->num = 0; + p->num = NULL; } void @@ -114,7 +113,7 @@ if (nump->num != NULL) { printf("text2num: non-NULL num ptr\n"); - abort(); + GIVE_UP(); } i = 0; @@ -127,7 +126,7 @@ nump->len = i + 1; nump->num = malloc((size_t)RCSNUM_BYTES(nump)); - + p = textp->start; for (i = 0; i < nump->len; i++) { int n; @@ -135,9 +134,9 @@ if (*p < '0' || *p > '9') { printf("text2num: parse failed '%.*s'\n", textp->len, textp->start); - abort(); + GIVE_UP(); } - + n = 0; while (p < endp && *p >= '0' && *p <= '9') n = (n * 10) + (*p++ - '0'); @@ -145,7 +144,7 @@ if (p < endp && *p++ != '.') { printf("text2num: parse failed '%.*s'\n", textp->len, textp->start); - abort(); + GIVE_UP(); } nump->num[i] = n; @@ -157,7 +156,7 @@ const char *p1; const char *p = textp->start; const char *end = textp->start + textp->len; - + while (p < end && (p1 = memchr(p, '@', (size_t)(end - p))) != NULL) { fwrite(p, (size_t)(p1 - p + 1), 1, stdout); p = p1 + 2; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/namedobjlist.c new/rcshist-snapshots-t20250101/namedobjlist.c --- old/rcshist-snapshots-t20240419/namedobjlist.c 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/namedobjlist.c 2025-01-02 01:22:19.000000000 +0100 @@ -22,11 +22,10 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: namedobjlist.c,v 1.7 2024/04/19 20:39:31 tom Exp $ + * $Id: namedobjlist.c,v 1.9 2025/01/01 23:43:38 tom Exp $ */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> + +#include "rcshist.h" #include "namedobjlist.h" static int nol_hash(Namedobjlist *self, const void *str, int my_len); @@ -62,12 +61,12 @@ TAILQ_FOREACH(itemp, &self->all, all) { struct nol_hashhead *hash; - + hash = &self->hash[nol_hash(self, itemp->name, itemp->namelen)]; TAILQ_INSERT_TAIL(hash, itemp, hash); } } - + Namedobjlist * namedobjlist_create(void) { Namedobjlist *nol = malloc(sizeof(*nol)); @@ -76,7 +75,7 @@ nol->nitems = 0; nol->hash = NULL; nol_rehash(nol, 2); - + return nol; } @@ -88,7 +87,7 @@ * is no way we can figure out how to destroy them. */ fprintf(stderr, "namedobjlist_destroy: list not empty\n"); - abort(); + GIVE_UP(); } if (self->hash != NULL) free(self->hash); @@ -138,7 +137,7 @@ if (namedobjlist_find(self, name, namelen) != NULL) { fprintf(stderr, "namedobjlist_additem: '%.*s' exists!\n", namelen, (const char *)name); /* XXX strvisx this */ - abort(); + GIVE_UP(); } itemp = malloc(sizeof(*itemp)); @@ -179,10 +178,10 @@ Namedobjlist_iter * nol_iter_create(Namedobjlist *nol) { Namedobjlist_iter *self = malloc(sizeof(*self)); - + self->nol = nol; self->nextitem = TAILQ_FIRST(&nol->all); - + return self; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/namedobjlist.h new/rcshist-snapshots-t20250101/namedobjlist.h --- old/rcshist-snapshots-t20240419/namedobjlist.h 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/namedobjlist.h 2025-01-02 01:22:19.000000000 +0100 @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: namedobjlist.h,v 1.5 2018/03/25 22:44:22 tom Exp $ + * $Id: namedobjlist.h,v 1.6 2025/01/01 20:29:42 tom Exp $ */ #ifndef NAMEDOBJLIST_H #define NAMEDOBJLIST_H @@ -52,7 +52,7 @@ Namedobjlist *nol; struct namedobjlist_item *nextitem; }; - + Namedobjlist *namedobjlist_create(void); void namedobjlist_destroy(Namedobjlist *self); void *namedobjlist_lookup(Namedobjlist *self, const void *name, int namelen); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/package/debian/changelog new/rcshist-snapshots-t20250101/package/debian/changelog --- old/rcshist-snapshots-t20240419/package/debian/changelog 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/package/debian/changelog 2025-01-02 01:22:19.000000000 +0100 @@ -1,3 +1,9 @@ +rcshist (1.04+20250101) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey <dic...@invisible-island.net> Wed, 01 Jan 2025 15:06:03 -0500 + rcshist (1.04+20240419) unstable; urgency=low * maintenance updates diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/package/debian/copyright new/rcshist-snapshots-t20250101/package/debian/copyright --- old/rcshist-snapshots-t20240419/package/debian/copyright 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/package/debian/copyright 2025-01-02 01:22:19.000000000 +0100 @@ -1,9 +1,10 @@ Upstream source http://dickey.his.com/rcshist/rcshist.html -Packaged by: Thomas Dickey <dic...@invisible-island.net> +Packaged by: Thomas E. Dickey <dic...@invisible-island.net> ------------------------------------------------------------------------------- .\" Copyright (c) 2001 Ian Dowse <iedo...@maths.tcd.ie> +.\" Copyright (c) 2025 Thomas E. Dickey <dic...@invisible-island.net> .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -29,7 +30,7 @@ Files: aclocal.m4 Licence: other-BSD -Copyright: 2015-2023,2024 by Thomas E. Dickey +Copyright: 2015-2024,2025 by Thomas E. Dickey Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -86,7 +87,7 @@ shared with many OS's install programs. Files: debian/* -Copyright: 2015-2023,2024 Thomas E. Dickey +Copyright: 2015-2024,2025 Thomas E. Dickey Licence: other-BSD Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/package/rcshist.spec new/rcshist-snapshots-t20250101/package/rcshist.spec --- old/rcshist-snapshots-t20240419/package/rcshist.spec 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/package/rcshist.spec 2025-01-02 01:22:19.000000000 +0100 @@ -1,8 +1,8 @@ -Summary: display RCS change history +Summary: Display RCS change history %define AppProgram rcshist %define AppVersion 1.04 -%define AppRelease 20240419 -# $Id: rcshist.spec,v 1.8 2024/04/19 20:51:53 tom Exp $ +%define AppRelease 20250101 +# $Id: rcshist.spec,v 1.9 2025/01/01 20:06:38 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: %{AppRelease} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/rcsfile.c new/rcshist-snapshots-t20250101/rcsfile.c --- old/rcshist-snapshots-t20240419/rcsfile.c 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/rcsfile.c 2025-01-02 01:22:19.000000000 +0100 @@ -22,18 +22,16 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rcsfile.c,v 1.20 2024/04/19 20:37:36 tom Exp $ + * $Id: rcsfile.c,v 1.23 2025/01/01 23:43:48 tom Exp $ */ #include <sys/stat.h> #include <sys/types.h> #include <sys/mman.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <unistd.h> #include <fcntl.h> #include <err.h> +#include "rcshist.h" #include "rcsfile.h" #include "strbuf.h" @@ -53,7 +51,7 @@ static int optional_tok(struct parser *pp, struct token *tokp, int type); static void expect_tok(struct parser *pp, struct token *tokp, int type); static void puttok(struct parser *pp, struct token *tokp); -static int gettok(struct parser *pp, struct token *tokp); +static int gettok(struct parser *pp, struct token *tokp); static const char *tokname[] = {"NONE", "NUM", "ID", "STRING", "COLON", "SEMI"}; @@ -96,7 +94,7 @@ close(fd); return NULL; } - + if ((map = mmap(NULL, (size_t)sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED) { warn("%s: mmap", filename); @@ -107,7 +105,7 @@ close(fd); pp.pos = map; - pp.end = map + sb.st_size; + pp.end = map + sb.st_size; pp.saved.type = TOKTYPE_NONE; rcsp = calloc(1, sizeof(*rcsp)); @@ -257,7 +255,7 @@ p = sb_ptr(buf); sb_printf(rcsdir, "%s/", p); fclose(fp); - + sb_printf(ftmp, "%sCVS/Repository", sb_ptr(dirname)); if ((fp = fopen(sb_ptr(ftmp), "r")) == NULL) err(1, "%s", sb_ptr(ftmp)); @@ -275,8 +273,13 @@ fclose(fp); } else if (branchp != NULL && *branchp == NULL) *branchp = strdup("MAIN"); - } else - sb_printf(rcsdir, "%sRCS/", sb_ptr(dirname)); + } else { + const char *rcs_dirname = getenv("RCS_DIR"); + if (rcs_dirname == NULL) { + rcs_dirname = "RCS"; + } + sb_printf(rcsdir, "%s%s/", sb_ptr(dirname), rcs_dirname); + } sb_printf(ftmp, "%s%s,v", sb_ptr(rcsdir), sb_ptr(base_name)); if ((fp = fopen(sb_ptr(ftmp), "r")) != NULL) @@ -337,10 +340,10 @@ while (optional_tok(pp, &tok, TOKTYPE_ID)) { struct rcsnum *nump; struct rcstext symbol = tok.value; - + expect_tok(pp, &tok, TOKTYPE_COLON); expect_tok(pp, &tok, TOKTYPE_NUM); -#if 0 +#if 0 printf("symbol: '%.*s' -> '%.*s'\n", symbol.len, symbol.start, tok.value.len, tok.value.start); @@ -643,7 +646,7 @@ found = 0; TEXTLIST_FOREACH(revp->branchrevs, textp) { struct rcsnum brnum; - + numinit(&brnum); text2num(textp, &brnum); if (brnum.len == num.len +1 && bcmp(brnum.num, @@ -708,11 +711,11 @@ while (revp != NULL) { if (i == rcsp->nrevs) - abort(); + GIVE_UP(); list[i++] = revp; revp = revp->prev; } - + return list; } @@ -820,7 +823,7 @@ cstart = opp->line + coff; chunkend = opp->line + opp->len; ocount = chunkend - cstart; - + for (copp = opp + 1; copp < &pp->op[pp->len]; copp++) { if (copp->op == RPOP_ADD || copp->op == RPOP_DEL || copp->len <= ctx || (copp - pp->op < pp->len - 1 && @@ -856,7 +859,7 @@ void rev_remref(struct revnode *revp) { if (--revp->olrefs < 0) - abort(); + GIVE_UP(); if (!(revp->rcsp->flags & RCSFILE_LOWMEM) || revp->olrefs != 0) return; if (revp->outputlines == NULL || revp->prev == NULL) @@ -947,7 +950,7 @@ op = *p++; arg1 = (int)strtoul(p, &q, 10) - 1; arg2 = (int)strtoul(q, &q, 10); - + /* Convert 'insert-after' semantics to 'insert-before' */ if (op == 'a' && oline <= arg1) arg1++; @@ -957,10 +960,10 @@ &plist->list[oline]); nline += arg1 - oline; oline += arg1 - oline; - + if (oline > plist->len || textp > &revp->textlines->list[revp->textlines->len]) - abort(); + GIVE_UP(); } /* Always start a patch with a RPOP_COPY section */ @@ -973,7 +976,7 @@ &plist->list[arg1]); oline += arg2; if (oline > plist->len) - abort(); + GIVE_UP(); break; case 'a': patch_add(pp, RPOP_ADD, arg1, nline, arg2, textp + 1); @@ -981,7 +984,7 @@ nline += arg2; if (oline > plist->len || textp > &revp->textlines->list[revp->textlines->len]) - abort(); + GIVE_UP(); break; } } @@ -1116,11 +1119,11 @@ errx(1, "expect_tok(%s): got %s['%.*s']", tokname[type], tokname[tokp->type], tokp->value.len, tokp->value.start); } - + void puttok(struct parser *pp, struct token *tokp) { if (pp->saved.type != TOKTYPE_NONE) - abort(); + GIVE_UP(); pp->saved = *tokp; } @@ -1169,7 +1172,7 @@ tokp->type = TOKTYPE_COLON; p++; goto done; - + case ';': tokp->value.start = NULL; tokp->type = TOKTYPE_SEMI; @@ -1202,7 +1205,7 @@ } goto done; } - + done: pp->pos = p; return (tokp->type != TOKTYPE_NONE); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/rcshist.1 new/rcshist-snapshots-t20250101/rcshist.1 --- old/rcshist-snapshots-t20240419/rcshist.1 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/rcshist.1 2025-01-02 01:22:19.000000000 +0100 @@ -9,7 +9,7 @@ .\" notice, this list of conditions and the following disclaimer .\" in this position and unchanged. .\" 2. The name of the author may not be used to endorse or promote products -.\" derived from this software withough specific prior written permission +.\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -22,112 +22,103 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: rcshist.1,v 1.2 2005/02/08 00:27:01 iedowse Exp $ +.\" $Id: rcshist.1,v 1.4 2025/01/01 23:03:27 tom Exp $ .\" -.Dd February 8, 2005 -.Dt RCSHIST 1 -.Os -.Sh NAME -.Nm rcshist -.Nd display RCS change history -.Sh SYNOPSIS -.Nm -.Op Fl mR -.Op Fl r Ar branch|MAIN|ALL -.Ar -.Nm -.Ar -L revision rcsfile -.Sh DESCRIPTION -The -.Nm -utility displays the complete revision history of a set of RCS files +.TH RCSHIST 1 2025-01-01 "" "User commands" +.ds Nm rcshist +.SH NAME +rcshist \- +display RCS change history +.SH SYNOPSIS +\fB\*(Nm \fI[\fB-mR\fI] [\fB-r\fI branch|\fBMAIN\fI|\fBALL\fI] file ...\fP +.br +\fB\*(Nm -L \fIrevision\fR \fIrcsfile\fR +.SH DESCRIPTION +The \*(Nm utility displays the complete revision history of a set of RCS files including log messages and patches. -The output is sorted in reverse date order over all revisions of all -files. -.Pp +The output is sorted in reverse date order over all revisions of all files. +.PP The second form displays the patch associated with a particular revision of an RCS file. In this case, the revision must be specified numerically and -.Ar rcsfile +.I rcsfile must be an RCS -.Li ,v +.B ,v file. -.Pp +.PP The options are as follows: -.Bl -tag -width Fl -.It Fl m +.IP \fB\-m\fR Reduce memory usage by retaining only a small fraction of revisions in memory. Normally, -.Nm +\*(Nm will cache all revisions of all files, since this reduces computation time significantly. -For very large file sets, this behaviour can cause excessive memory -usage. -.It Fl R -Recursively search all paths specified for files to analyse. -.It Fl r Ar branch|MAIN|ALL +For very large file sets, this behavior can cause excessive memory usage. +.IP \fB\-R\fR +Recursively search all paths specified for files to analyze. +.IP "\fB\-r\fR \fIbranch|MAIN|ALL\fR" Restrict output to revisions on the specified symbolic branch tag. Two special branch names are supported: -.Bl -tag -width 8n -.It MAIN +.RS +.IP MAIN Only revisions on the main trunk branch are displayed. -.It ALL +.IP ALL All revisions are displayed regardless of their branch. -This is the default if -.Nm -cannot infer a branch tag from a CVS/Tag file. -.El -.El -.Pp +This is the default if \*(Nm cannot infer a branch tag from a CVS/Tag file. +.RE +.PP Each -.Ar file +.I file listed on the command line specifies an RCS file to be examined. The filename is interpreted as follows: -.Pp +.PP If the file has a -.Li ,v +.B ,v suffix, -.Nm -considers it as an RCS format file and opens it directly. -.Pp +\*(Nm considers it as an RCS format file and opens it directly. +.PP If the file has no -.Li ,v +.B ,v suffix, -.Nm -searches for a CVS directory in the same directory as the file. +\*(Nm searches for a CVS directory in the same directory as the file. If this exists, -.Nm +\*(Nm attempts to find the RCS file based on the contents of the CVS/Root and CVS/Repository files. If a CVS/Tag file exists, and if no branch tag has been specified on the command-line or inferred from elsewhere, then -.Nm +\*(Nm uses the branch tag from CVS/Tag as the default branch to display. -.Pp -Finally, the file has no -.Li ,v +.PP +Finally, if the file has no +.B ,v suffix and no CVS directory was found, -.Nm +\*(Nm searches for an RCS directory in the same directory as the file. If this exists, -.Nm +\*(Nm will look for an RCS -.Li ,v +.B ,v file corresponding to the specified file. -.Pp -If -.Nm -fails to locate an RCS file corresponding to a specified command-line -filename, -.Nm +.PP +If \*(Nm fails to locate an RCS file +corresponding to a specified command-line filename, +\*(Nm will simply print a warning message and continue. -.Sh SEE ALSO -.Xr cvs 1 , -.Xr rcs 1 , -.Xr rlog 1 , -.Xr rcsdiff 1 , -.Xr rcsfile 5 , -.Sh AUTHORS -.An Ian Dowse Aq iedo...@freebsd.org +.SH ENVIRONMENT +.IP RCS_DIR +if defined, specifies the directory in which RCS archive files are found. +Normally files are found in "./RCS". +.SH AUTHORS +Ian Dowse <iedo...@freebsd.org> +.br +Thomas E. Dickey <dic...@invisible-island.net> +.SH SEE ALSO +.BR checkout (1), +.BR cvs (1), +.BR rcs (1), +.BR rcsdiff (1), +.BR rcsfile (5), +.BR rlog (1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/rcshist.c new/rcshist-snapshots-t20250101/rcshist.c --- old/rcshist-snapshots-t20240419/rcshist.c 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/rcshist.c 2025-01-02 01:22:19.000000000 +0100 @@ -22,17 +22,15 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rcshist.c,v 1.14 2024/04/19 20:38:14 tom Exp $ + * $Id: rcshist.c,v 1.17 2025/01/01 23:44:15 tom Exp $ */ #include <sys/types.h> #include <sys/stat.h> #include <err.h> #include <fts.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <unistd.h> +#include "rcshist.h" #include "namedobjlist.h" #include "rcsfile.h" #include "misc.h" @@ -43,12 +41,19 @@ void prlist(const char *prefix, struct textlist *tlp); void prlog(struct revnode *revp); void onerev(char *filename, char *revame); -void usage(void); char *progname; int mflag; void +give_up(const char *fn, int ln) +{ + fflush(stdout); + fprintf(stderr, "%s: fatal error at %s line %d\n", progname, fn, ln); + exit(EXIT_FAILURE); +} + +static void usage(void) { fprintf(stderr, "Usage: %s [-mR] [-r<branch|MAIN|ALL>] <filename> ...\n" @@ -123,7 +128,7 @@ argv[2]); continue; } - + for (rpp = rltmp; *rpp != NULL; rpp++) { if (rnum == rlist_len) { rlist_len += rlist_len + 1; @@ -150,7 +155,7 @@ void prrev(struct revnode *revp) { - printf("REV:%-20.*s%-20.*s%d/%02d/%02d %02d:%02d:%02d %.*s\n", + printf("REV:%-20.*s%-20.*s %d/%02d/%02d %02d:%02d:%02d %.*s\n", revp->revtext.len, revp->revtext.start, revp->rcsp->shortfname.len, revp->rcsp->shortfname.start, revp->date.num[0], revp->date.num[1], revp->date.num[2], @@ -199,7 +204,7 @@ if (tlp->len == 0) return; - + TEXTLIST_FOREACH(tlp, textp) { if (len == 0 || len + textp->len > 75) { if (len == 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/rcshist.h new/rcshist-snapshots-t20250101/rcshist.h --- old/rcshist-snapshots-t20240419/rcshist.h 1970-01-01 01:00:00.000000000 +0100 +++ new/rcshist-snapshots-t20250101/rcshist.h 2025-01-02 01:22:19.000000000 +0100 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Thomas E. Dickey <dic...@invisible-island.net> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $Id: rcshist.h,v 1.1 2025/01/01 23:45:56 tom Exp $ + */ +#ifndef RCSHIST_H +#define RCSHIST_H + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#define GIVE_UP() give_up(__FILE__, __LINE__) +void give_up(const char *fn, int ln); + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/rcshist-snapshots-t20240419/strbuf.c new/rcshist-snapshots-t20250101/strbuf.c --- old/rcshist-snapshots-t20240419/strbuf.c 2024-04-19 23:32:21.000000000 +0200 +++ new/rcshist-snapshots-t20250101/strbuf.c 2025-01-02 01:22:19.000000000 +0100 @@ -22,12 +22,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: strbuf.c,v 1.6 2024/04/19 20:37:54 tom Exp $ + * $Id: strbuf.c,v 1.8 2025/01/01 23:44:28 tom Exp $ */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <ctype.h> + +#include "rcshist.h" #include "strbuf.h" /* Code for handling variable length strings. @@ -78,7 +77,7 @@ /* * If the string length is 0 we just return a strdup'd "" and - * leave everything else intact. + * leave everything else intact. */ if (sb->pos == 0) return strdup(""); @@ -92,7 +91,7 @@ } /* Extend the buffer in sb to be at least len bytes */ -static void +static void sb_pullupto(struct strbuf *sb, int len) { if (len <= sb->buflen) return; @@ -141,7 +140,7 @@ /* Truncate the string to len characters */ void sb_truncate(struct strbuf *sb, int len) { if (len < 0 || len > sb->pos) - abort(); + GIVE_UP(); sb->pos = len; if (sb->buf) sb->buf[sb->pos] = '\0'; @@ -171,7 +170,7 @@ return cnt; } -/* +/* * sb_{v,}{print,append}f functions. Write (or append) to a Strbuf * using printf-style format + arg lists. */ @@ -199,7 +198,7 @@ return retval; } - + int sb_appendf(Strbuf *buf, const char *fmt, ...) { va_list ap; int retval; @@ -215,7 +214,7 @@ sb_reset(buf); return sb_vappendf(buf, fmt, args); } - + /* #define PRINTF_CHECKUP */ int sb_vappendf(Strbuf *buf, const char *fmt, va_list args) { @@ -241,9 +240,9 @@ va_copy(ap, args); if (fmt == NULL) { fprintf(stderr, "sb_vappendf: NULL format arg!\n"); - abort(); + GIVE_UP(); } - + if (buf == NULL) { Strbuf *tmpbuf2; fprintf(stderr, "sb_vappendf: NULL buf arg!\n"); @@ -253,7 +252,7 @@ fprintf(stderr, "Output was '%s'\n", sb_ptr(tmpbuf2)); sb_free(tmpbuf2); } - abort(); + GIVE_UP(); } oldlen = sb_len(buf); @@ -315,7 +314,7 @@ prec = 10 * prec + ch2digit(*fmt); } - for (;; fmt++) { + for (;; fmt++) { switch (*fmt) { case 'h': flags |= FLG_SHORT; @@ -347,7 +346,7 @@ else flen = (int)strlen(fieldp); break; - + case 'p': flags |= FLG_HEX; /* FALLTHRU */ @@ -355,14 +354,14 @@ case 'X': base = 16; goto unum; - + case 'd': case 'i': if (flags & FLG_LONG) ul_arg = va_arg(ap, unsigned long); else if (flags & FLG_SHORT) ul_arg = (unsigned long)(short)va_arg(ap, int); - else + else ul_arg = (unsigned long)va_arg(ap, int); if ((long)ul_arg < 0) { sign = '-'; @@ -390,7 +389,7 @@ flags |= FLG_NUM; switch (base) { case 8: - do { + do { *--fieldp = (char)digit2ch(ul_arg & 7); ul_arg = ul_arg >> 3; } while(ul_arg); @@ -408,7 +407,7 @@ flags |= FLG_HEX; i = (*fmt == 'p' ? 'x' : *fmt) - 'X' + 'A' - 10; do { - *--fieldp = (char)(((ul_arg & 15) < 10) ? + *--fieldp = (char)(((ul_arg & 15) < 10) ? digit2ch(ul_arg & 15) : ((ul_arg & 15) + (unsigned long)i)); ul_arg = ul_arg >> 4; @@ -425,7 +424,7 @@ /* Not standard behaviour, but we want to know when * this happens */ fprintf(stdout, "Unknown format char '%c'\n", *fmt); - abort(); + GIVE_UP(); } if (flen == -1) flen = (int)(tmpbuf + FBUF_LEN - fieldp); @@ -466,10 +465,10 @@ strcmp(sb_ptr(buf) + oldlen, p)) { fprintf(stdout, "PRINTF_CHECKUP: '%s' should be '%s'\n", sb_ptr(buf) + oldlen, p); - abort(); + GIVE_UP(); } free(p); #endif - + return sb_len(buf) - oldlen; }