diff -Naur rcs-5.7/configure.in rcs-5.7-magellan/configure.in --- rcs-5.7/configure.in 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/configure.in 2010-03-07 20:13:14.000000000 +0100 @@ -243,7 +243,7 @@ AC_PATH_PROG(ED, ed, ed) ac_save_path=$PATH -PATH=/usr/lib:/usr/bin:/bin:/usr/sbin:/sbin:$PATH +PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/lib:$PATH AC_PATH_PROGS(SENDMAIL, sendmail mail mailx) PATH=$ac_save_path case $SENDMAIL in diff -Naur rcs-5.7/Makefile.in rcs-5.7-magellan/Makefile.in --- rcs-5.7/Makefile.in 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/Makefile.in 2010-03-07 20:12:56.000000000 +0100 @@ -43,6 +43,7 @@ @echo "it deletes files that may require special tools to rebuild." $(standard_GNU_targets) installcheck installdebug :: + groff -t -p -Tps -ms rcs.ms >rcs.ps cd man && $(MAKE) $@ cd src && $(MAKE) $@ @@ -77,7 +78,7 @@ clean :: clean. clean. :: - rm -f confdefs* conftest* core core.* *.core + rm -f confdefs* conftest* core core.* *.core *.ps distclean maintainer-clean :: distclean. distclean. :: clean. diff -Naur rcs-5.7/man/co.1 rcs-5.7-magellan/man/co.1 --- rcs-5.7/man/co.1 1995-06-01 18:23:43.000000000 +0200 +++ rcs-5.7-magellan/man/co.1 2010-03-07 20:13:04.000000000 +0100 @@ -597,7 +597,7 @@ .RB \*(lq "//\ " \*(rq. This is useful for languages with comments that go to the end of the line. The convention for other languages is to use a -.RB \*(lq " \(** " \(rq +.RB \*(lq " * " \(rq prefix inside a multiline comment. For example, the initial log comment of a C program conventionally is of the following form: @@ -606,19 +606,19 @@ .nf .ft 3 .ne 3 -/\(** +/* .in +\w'/'u -\(** $\&Log$ -\(**/ +* $\&Log$ +*/ .in .ft .fi .RE .LP For backwards compatibility with older versions of \*r, if the log prefix is -.B /\(** +.B /* or -.B (\(** +.B (* surrounded by optional white space, inserted log lines contain a space instead of .B / diff -Naur rcs-5.7/man/Makefile.in rcs-5.7-magellan/man/Makefile.in --- rcs-5.7/man/Makefile.in 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/man/Makefile.in 2010-03-07 20:13:14.000000000 +0100 @@ -34,8 +34,8 @@ PIC = @PIC@ prefix = @prefix@ -man1dir = $(prefix)/man/man1 -man5dir = $(prefix)/man/man5 +man1dir = $(prefix)/share/man/man1 +man5dir = $(prefix)/share/man/man5 man1ext = .1 man5ext = .5 @@ -51,7 +51,8 @@ installdirs :: ../mkinstalldirs -$(srcdir)/../mkinstalldirs $(man1dir) $(man5dir) -man1pages = ci co ident merge rcs rcsclean rcsdiff rcsintro rcsmerge rlog +man1pages = ci co ident merge rcs rcsclean rcsdiff rcsintro rcsmerge rlog \ + rcsfreeze install :: installdirs -for m in $(man1pages); do \ diff -Naur rcs-5.7/man/merge.1 rcs-5.7-magellan/man/merge.1 --- rcs-5.7/man/merge.1 1995-06-01 18:23:43.000000000 +0200 +++ rcs-5.7-magellan/man/merge.1 2010-03-07 20:13:04.000000000 +0100 @@ -114,8 +114,9 @@ .TP .BI \-q Quiet; do not warn about conflicts. +.TP .BI \-V -Print \*r's version number. +Print version number. .SH DIAGNOSTICS Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble. .SH IDENTIFICATION @@ -127,7 +128,10 @@ .br Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. .SH SEE ALSO -diff3(1), diff(1), rcsmerge(1), co(1). +.BR diff3 (1), +.BR diff (1), +.BR rcsmerge (1), +.BR co(1) . .SH BUGS It normally does not make sense to merge binary files as if they were text, but .B merge diff -Naur rcs-5.7/man/rcsfile.5 rcs-5.7-magellan/man/rcsfile.5 --- rcs-5.7/man/rcsfile.5 1995-06-16 08:58:26.000000000 +0200 +++ rcs-5.7-magellan/man/rcsfile.5 2010-03-07 20:13:06.000000000 +0100 @@ -69,6 +69,7 @@ \f3state\fP {\f2id\fP}\f3;\fP \f3branches\fP {\f2num\fP}*\f3;\fP \f3next\fP {\f2num\fP}\f3;\fP + { \f3commitid\fP \f2id\fP\f3;\fP } { \f2newphrase\fP }* .LP \f2desc\fP ::= \f3desc\fP \f2string\fP @@ -128,6 +129,18 @@ Dates use the Gregorian calendar; times use UTC. .PP The +.I commitid +is followed by an +.I id +token. This token is intended to be unique across +multiple files and is used to help group files as +being a part of the same logical commit. +This token must uniquely identify the commit +operation that was applied to a set of RCS files. +In particular, it must be unique among all the +commitids in this file. +.PP +The .I newphrase productions in the grammar are reserved for future extensions to the format of \*r files. @@ -230,7 +243,7 @@ .fi .\} .if \np \{\ -.lf 232 +.lf 245 .PS 4.250i 3.812i .\" -2.0625 -4.25 1.75 0 .\" 0.000i 4.250i 3.812i 0.000i @@ -239,7 +252,7 @@ .nr 0x 1 \h'3.812i' .sp -1 -.lf 242 +.lf 255 \h'2.062i-(\w'Head'u/2u)'\v'0.125i-(0v/2u)+0v+0.22m'Head .sp -1 \h'2.062i'\v'0.250i'\D'l0.000i 0.500i' @@ -256,7 +269,7 @@ .sp -1 \h'1.688i'\v'0.750i'\D'l0.000i 0.500i' .sp -1 -.lf 244 +.lf 257 \h'2.062i-(\w'2.1'u/2u)'\v'1.000i-(0v/2u)+0v+0.22m'2.1 .sp -1 \h'2.062i'\v'1.250i'\D'l0.000i 0.500i' @@ -265,7 +278,7 @@ .sp -1 \h'2.062i'\v'1.750i'\D'l-0.025i -0.100i' .sp -1 -.lf 246 +.lf 259 \h'2.062i-(\w'1.3'u/2u)'\v'2.000i-(1v/2u)+0v+0.22m'1.3 .sp -1 \h'2.062i'\v'2.250i'\D'l-0.375i -0.500i' @@ -280,7 +293,7 @@ .sp -1 \h'1.375i'\v'1.500i'\D'l0.025i 0.100i' .sp -1 -.lf 249 +.lf 262 \h'1.375i-(\w'1.3.1.1'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.3.1.1 .sp -1 \h'1.375i'\v'1.000i'\D'l-0.375i 0.500i' @@ -295,7 +308,7 @@ .sp -1 \h'2.062i'\v'2.750i'\D'l-0.025i -0.100i' .sp -1 -.lf 252 +.lf 265 \h'2.062i-(\w'1.2'u/2u)'\v'3.000i-(1v/2u)+0v+0.22m'1.2 .sp -1 \h'2.062i'\v'3.250i'\D'l-0.375i -0.500i' @@ -310,7 +323,7 @@ .sp -1 \h'0.375i'\v'2.500i'\D'l0.025i 0.100i' .sp -1 -.lf 255 +.lf 268 \h'0.375i-(\w'1.2.1.1'u/2u)'\v'2.250i-(1v/2u)+1v+0.22m'1.2.1.1 .sp -1 \h'0.375i'\v'2.000i'\D'l-0.375i 0.500i' @@ -325,7 +338,7 @@ .sp -1 \h'0.375i'\v'1.500i'\D'l0.025i 0.100i' .sp -1 -.lf 257 +.lf 270 \h'0.375i-(\w'1.2.1.3'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.2.1.3 .sp -1 \h'0.375i'\v'1.000i'\D'l-0.375i 0.500i' @@ -340,7 +353,7 @@ .sp -1 \h'2.750i'\v'2.500i'\D'l0.025i 0.100i' .sp -1 -.lf 261 +.lf 274 \h'2.750i-(\w'1.2.2.1'u/2u)'\v'2.250i-(1v/2u)+1v+0.22m'1.2.2.1 .sp -1 \h'2.750i'\v'2.000i'\D'l-0.375i 0.500i' @@ -355,7 +368,7 @@ .sp -1 \h'3.438i'\v'1.250i'\D'l0.025i 0.100i' .sp -1 -.lf 264 +.lf 277 \h'3.438i-(\w'\s-21.2.2.1.1.1\s0'u/2u)'\v'1.000i-(1v/2u)+1v+0.22m'\s-21.2.2.1.1.1\s0 .sp -1 \h'3.438i'\v'0.750i'\D'l-0.375i 0.500i' @@ -370,7 +383,7 @@ .sp -1 \h'2.750i'\v'1.500i'\D'l0.025i 0.100i' .sp -1 -.lf 267 +.lf 280 \h'2.750i-(\w'1.2.2.2'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.2.2.2 .sp -1 \h'2.750i'\v'1.000i'\D'l-0.375i 0.500i' @@ -385,7 +398,7 @@ .sp -1 \h'2.062i'\v'3.750i'\D'l-0.025i -0.100i' .sp -1 -.lf 270 +.lf 283 \h'2.062i-(\w'1.1'u/2u)'\v'4.000i-(1v/2u)+0v+0.22m'1.1 .sp -1 \h'2.062i'\v'4.250i'\D'l-0.375i -0.500i' @@ -398,9 +411,9 @@ .if \n(00 .fi .br .nr 0x 0 -.lf 271 +.lf 284 .PE -.lf 272 +.lf 285 .\} .PP .SH IDENTIFICATION diff -Naur rcs-5.7/man/rcsfile.5in rcs-5.7-magellan/man/rcsfile.5in --- rcs-5.7/man/rcsfile.5in 1995-06-05 10:28:35.000000000 +0200 +++ rcs-5.7-magellan/man/rcsfile.5in 2010-03-07 20:13:06.000000000 +0100 @@ -68,6 +68,7 @@ \f3state\fP {\f2id\fP}\f3;\fP \f3branches\fP {\f2num\fP}*\f3;\fP \f3next\fP {\f2num\fP}\f3;\fP + { \f3commitid\fP \f2id\fP\f3;\fP } { \f2newphrase\fP }* .LP \f2desc\fP ::= \f3desc\fP \f2string\fP @@ -127,6 +128,18 @@ Dates use the Gregorian calendar; times use UTC. .PP The +.I commitid +is followed by an +.I id +token. This token is intended to be unique across +multiple files and is used to help group files as +being a part of the same logical commit. +This token must uniquely identify the commit +operation that was applied to a set of RCS files. +In particular, it must be unique among all the +commitids in this file. +.PP +The .I newphrase productions in the grammar are reserved for future extensions to the format of \*r files. diff -Naur rcs-5.7/man/rlog.1 rcs-5.7-magellan/man/rlog.1 --- rcs-5.7/man/rlog.1 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/man/rlog.1 2010-03-07 20:13:04.000000000 +0100 @@ -187,6 +187,10 @@ .I logins is omitted, the user's login is assumed. .TP +.B \-q +This option has no effect; +it is provided for consistency with other commands. +.TP .B \-T This option has no effect; it is present for compatibility with other \*r commands. diff -Naur rcs-5.7/src/conf.sh rcs-5.7-magellan/src/conf.sh --- rcs-5.7/src/conf.sh 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/conf.sh 2010-03-07 20:13:14.000000000 +0100 @@ -73,17 +73,6 @@ ech='echo -n' dots='... ' esac -$ech >&3 "$0: testing permissions $dots" -rm -f a.d && -date >a.d && -chmod 0 a.d && -{ test -w a.d || cp /dev/null a.d 2>/dev/null; } && { - echo >&3 "$n$0: This command should not be run with superuser permissions." - exit 1 -} -echo >&3 OK -rm -f a.d || exit - $ech >&3 "$0: testing compiler for plausibility $dots" echo 'main() { return 0; }' >a.c rm -f a.exe a.out || exit diff -Naur rcs-5.7/src/ident.c rcs-5.7-magellan/src/ident.c --- rcs-5.7/src/ident.c 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/ident.c 2010-03-07 20:13:11.000000000 +0100 @@ -234,7 +234,7 @@ if (c == EOF && feof(fp) | ferror(fp)) return c; switch (ctab[c]) { - case LETTER: case Letter: + case LETTER: case Letter: case DIGIT: *tp++ = c; if (tp < line+sizeof(line)-4) break; diff -Naur rcs-5.7/src/Makefile.in rcs-5.7-magellan/src/Makefile.in --- rcs-5.7/src/Makefile.in 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/Makefile.in 2010-03-07 20:13:14.000000000 +0100 @@ -116,16 +116,18 @@ for p in $(PROGRAMS); do \ $(INSTALL_PROGRAM) $$p $(bindir)/$$p; \ done + $(INSTALL_PROGRAM) rcsfreeze.sh $(bindir)/rcsfreeze uninstall :: for p in $(PROGRAMS); do \ $(REMOVE) $(bindir)/$$p; \ done + $(REMOVE) $(bindir)/rcsfreeze # Install RCS and (if applicable) GNU diff before running these tests. # To test RCS before installing it, see the file INSTALL.RCS. RCSTEST = \ - ALL_CFLAGS='$(ALL_CFLAGS)' CC='$(CC)' DIFF='$(DIFF)' \ + ALL_CFLAGS="$(ALL_CFLAGS)" CC='$(CC)' DIFF='$(DIFF)' \ LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \ PATH=$(bindir):$$PATH \ sh $(srcdir)/rcstest @@ -153,7 +155,7 @@ #(Unix conf.h : conf.sh Makefile $(REMOVE) a.* - ALL_CFLAGS='$(ALL_CFLAGS)' \ + ALL_CFLAGS="$(ALL_CFLAGS)" \ CC='$(CC)' \ COMPAT2='$(COMPAT2)' \ DIFF3='$(DIFF3)' DIFF3_BIN='$(DIFF3_BIN)' \ diff -Naur rcs-5.7/src/rcsbase.h rcs-5.7-magellan/src/rcsbase.h --- rcs-5.7/src/rcsbase.h 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/rcsbase.h 2010-03-07 20:13:06.000000000 +0100 @@ -358,6 +358,7 @@ char const * lockedby; /* who locks the revision */ char const * state; /* state of revision (Exp by default) */ char const * name; /* name (if any) by which retrieved */ + char const * commitid; /* text string to associate commits */ struct cbuf log; /* log message requested at checkin */ struct branchhead * branches; /* list of first revisions on branches*/ struct cbuf ig; /* ignored phrases in admin part */ @@ -662,6 +663,7 @@ extern char const *const expand_names[]; extern char const Kaccess[], Kauthor[], Kbranch[], Kcomment[], + Kcommitid[], Kdate[], Kdesc[], Kexpand[], Khead[], Klocks[], Klog[], Knext[], Kstate[], Kstrict[], Ksymbols[], Ktext[]; void unexpected_EOF P((void)) exiting; diff -Naur rcs-5.7/src/rcs.c rcs-5.7-magellan/src/rcs.c --- rcs-5.7/src/rcs.c 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/rcs.c 2010-03-07 20:13:13.000000000 +0100 @@ -916,10 +916,11 @@ getkeystring(Klog); if (nextdelta == cuttail) { cb = savestring(&curlogbuf); - if (!delta->log.string) + if (delta && !delta->log.string) delta->log = cleanlogmsg(curlogbuf.string, cb.size); nextlex(); - delta->igtext = getphrases(Ktext); + if (delta) + delta->igtext = getphrases(Ktext); } else { if (nextdelta->log.string && nextdelta->selector) { foutptr = 0; diff -Naur rcs-5.7/src/rcsdiff.c rcs-5.7-magellan/src/rcsdiff.c --- rcs-5.7/src/rcsdiff.c 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/rcsdiff.c 2010-03-07 20:13:10.000000000 +0100 @@ -212,9 +212,13 @@ } goto option_handled; case '-': case 'D': - no_diff_means_no_output = false; + if (c == 'D' + || strcmp(*argv, "--side-by-side") == 0 + || strcmp(*argv, "--ifdef") == 0) { + no_diff_means_no_output = false; + } /* fall into */ - case 'C': case 'F': case 'I': case 'L': case 'W': + case 'C': case 'F': case 'I': case 'L': case 'U': case 'W': #if DIFF_L if (c == 'L' && ++file_labels == 2) faterror("too many -L options"); diff -Naur rcs-5.7/src/rcsedit.c rcs-5.7-magellan/src/rcsedit.c --- rcs-5.7/src/rcsedit.c 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/rcsedit.c 2010-03-07 20:13:08.000000000 +0100 @@ -1503,6 +1503,9 @@ register size_t dl; register struct buf *bn; register char const *name = isworkfile ? workname : RCSname; +# if has_mktemp + int fd; +# endif dl = basefilename(name) - name; bn = &dirtpname[newRCSdirtp_index + isworkfile]; @@ -1521,10 +1524,12 @@ catchints(); # if has_mktemp VOID strcpy(tp, "XXXXXX"); - if (!mktemp(np) || !*np) + fd = mkstemp(np); + if (fd < 0 || !*np) faterror("can't make temporary pathname `%.*s_%cXXXXXX'", (int)dl, name, '0'+isworkfile ); + close(fd); # else /* * Posix 1003.1-1990 has no reliable way diff -Naur rcs-5.7/src/rcsfnms.c rcs-5.7-magellan/src/rcsfnms.c --- rcs-5.7/src/rcsfnms.c 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/rcsfnms.c 2010-03-07 20:13:08.000000000 +0100 @@ -285,6 +285,9 @@ { char *p; char const *t = tpnames[n]; +# if has_mktemp + int fd; +# endif if (t) return t; @@ -296,10 +299,12 @@ size_t tplen = dir_useful_len(tp); p = testalloc(tplen + 10); VOID sprintf(p, "%.*s%cT%cXXXXXX", (int)tplen, tp, SLASH, '0'+n); - if (!mktemp(p) || !*p) + fd = mkstemp(p); + if (fd < 0 || !*p) faterror("can't make temporary pathname `%.*s%cT%cXXXXXX'", (int)tplen, tp, SLASH, '0'+n ); + close(fd); # else static char tpnamebuf[TEMPNAMES][L_tmpnam]; p = tpnamebuf[n]; diff -Naur rcs-5.7/src/rcsfreeze.sh rcs-5.7-magellan/src/rcsfreeze.sh --- rcs-5.7/src/rcsfreeze.sh 1993-11-03 18:42:27.000000000 +0100 +++ rcs-5.7-magellan/src/rcsfreeze.sh 2010-03-07 20:13:08.000000000 +0100 @@ -59,8 +59,7 @@ # Stamp the logfile. Because we order the logfile the most recent # first we will have to save everything right now in a temporary file. -TMPLOG=/tmp/rcsfrz$$ -trap 'rm -f $TMPLOG; exit 1' 1 2 13 15 +TMPLOG=$(tempfile) # Now ask for a log message, continously add to the log file ( echo "Version: $SYMREVNAME($SYMREV), Date: $DATE diff -Naur rcs-5.7/src/rcsgen.c rcs-5.7-magellan/src/rcsgen.c --- rcs-5.7/src/rcsgen.c 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/rcsgen.c 2010-03-07 20:13:06.000000000 +0100 @@ -547,6 +547,9 @@ aprintf(fout, ";\n%s\t%s;\n", Knext, node->next?node->next->num:""); awrite(node->ig.string, node->ig.size, fout); + + if (node->commitid) + aprintf(fout, "%s\t%s;\n", Kcommitid, node->commitid); } diff -Naur rcs-5.7/src/rcssyn.c rcs-5.7-magellan/src/rcssyn.c --- rcs-5.7/src/rcssyn.c 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/rcssyn.c 2010-03-07 20:13:06.000000000 +0100 @@ -171,6 +171,7 @@ Kauthor[] = "author", Kbranch[] = "branch", Kcomment[] = "comment", + Kcommitid[] = "commitid", Kdate[] = "date", Kdesc[] = "desc", Kexpand[] = "expand", @@ -433,6 +434,14 @@ Delta->lockedby = 0; Delta->log.string = 0; Delta->selector = true; + + if (getkeyopt(Kcommitid)) { + Delta->commitid = NextString; + nextlex(); + getsemi(Kcommitid); + } else + Delta->commitid = NULL; + Delta->ig = getphrases(Kdesc); TotalDeltas++; return (true); diff -Naur rcs-5.7/src/rlog.c rcs-5.7-magellan/src/rlog.c --- rcs-5.7/src/rlog.c 1995-06-16 08:19:24.000000000 +0200 +++ rcs-5.7-magellan/src/rlog.c 2010-03-07 20:13:06.000000000 +0100 @@ -591,6 +591,10 @@ aprintf(out, insDelFormat, editscript->insertlns, editscript->deletelns); + if ( node->commitid ) + aprintf(out, "%s commitid: %s", (editscript) ? ";" : "", + node->commitid); + newbranch = node->branches; if ( newbranch ) { bufautobegin(&branchnum);