diff options
| author | christos <christos@NetBSD.org> | 2012-03-08 21:32:28 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2012-03-08 21:32:28 +0000 |
| commit | 340f92bece7b8b5747a9fa62f2f50e954eb5c765 (patch) | |
| tree | 3f3e2cb685ed7b0b4761863cc00b7ce0041a872d /gnu | |
| parent | 9a50c53a57f67c8f4f2c25fc1b1816612c46d3ec (diff) | |
Teach rcs about the new cvs "commitid" keyword, so that we don't bitch each
time we play with an RCS file maintained by CVS.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/rcs/lib/rcsbase.h | 7 | ||||
| -rw-r--r-- | gnu/usr.bin/rcs/lib/rcssyn.c | 18 | ||||
| -rw-r--r-- | gnu/usr.bin/rcs/rlog/rlog.1 | 4 | ||||
| -rw-r--r-- | gnu/usr.bin/rcs/rlog/rlog.c | 14 |
4 files changed, 38 insertions, 5 deletions
diff --git a/gnu/usr.bin/rcs/lib/rcsbase.h b/gnu/usr.bin/rcs/lib/rcsbase.h index 6d99949c807..3f210ed656f 100644 --- a/gnu/usr.bin/rcs/lib/rcsbase.h +++ b/gnu/usr.bin/rcs/lib/rcsbase.h @@ -1,4 +1,4 @@ -/* $NetBSD: rcsbase.h,v 1.12 2012/01/12 14:10:56 joerg Exp $ */ +/* $NetBSD: rcsbase.h,v 1.13 2012/03/08 21:32:28 christos Exp $ */ /* RCS common definitions and data structures */ @@ -33,6 +33,10 @@ Report problems and direct all questions to: /* * $Log: rcsbase.h,v $ + * Revision 1.13 2012/03/08 21:32:28 christos + * Teach rcs about the new cvs "commitid" keyword, so that we don't bitch each + * time we play with an RCS file maintained by CVS. + * * Revision 1.12 2012/01/12 14:10:56 joerg * Second try to sort out the dangling elses. Just use {} markers. * Produces identical on amd64. @@ -383,6 +387,7 @@ struct hshentry { 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; /* unique commit identifier */ 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 */ diff --git a/gnu/usr.bin/rcs/lib/rcssyn.c b/gnu/usr.bin/rcs/lib/rcssyn.c index c3dac8aad83..7db8332538a 100644 --- a/gnu/usr.bin/rcs/lib/rcssyn.c +++ b/gnu/usr.bin/rcs/lib/rcssyn.c @@ -1,4 +1,4 @@ -/* $NetBSD: rcssyn.c,v 1.4 1996/10/15 07:00:26 veego Exp $ */ +/* $NetBSD: rcssyn.c,v 1.5 2012/03/08 21:32:28 christos Exp $ */ /* RCS file syntactic analysis */ @@ -39,6 +39,10 @@ Report problems and direct all questions to: /* * $Log: rcssyn.c,v $ + * Revision 1.5 2012/03/08 21:32:28 christos + * Teach rcs about the new cvs "commitid" keyword, so that we don't bitch each + * time we play with an RCS file maintained by CVS. + * * Revision 1.4 1996/10/15 07:00:26 veego * Merge rcs 5.7. * @@ -176,6 +180,7 @@ char const Kauthor[] = "author", Kbranch[] = "branch", Kcomment[] = "comment", + Kcommitid[] = "commitid", Kdate[] = "date", Kdesc[] = "desc", Kexpand[] = "expand", @@ -435,6 +440,17 @@ getdelta() getkey(Knext); Delta->next = num = getdnum(); getsemi(Knext); + if (getkeyopt(Kcommitid)) { + if (nexttok == ID) { + Delta->commitid = NextString; + nextlex(); + } else { + fatserror("missing %s", Kcommitid); + Delta->commitid = NULL; + } + getsemi(Kcommitid); + } else + Delta->commitid = NULL; Delta->lockedby = 0; Delta->log.string = 0; Delta->selector = true; diff --git a/gnu/usr.bin/rcs/rlog/rlog.1 b/gnu/usr.bin/rcs/rlog/rlog.1 index da425801a35..0dc6b2404b9 100644 --- a/gnu/usr.bin/rcs/rlog/rlog.1 +++ b/gnu/usr.bin/rcs/rlog/rlog.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: rlog.1,v 1.5 2002/02/08 01:26:52 ross Exp $ +.\" $NetBSD: rlog.1,v 1.6 2012/03/08 21:32:28 christos Exp $ .\" .de Id .ds Rv \\$3 @@ -48,6 +48,8 @@ The options below restrict this output. .ds n \nn .if \n(.g .if r an-tag-sep .ds n \w'\f3\-V\fP\f2n\fP'u+\n[an-tag-sep]u .TP \*n +.B \-c +Print the commitid if available. .B \-L Ignore \*r files that have no locks set. This is convenient in combination with diff --git a/gnu/usr.bin/rcs/rlog/rlog.c b/gnu/usr.bin/rcs/rlog/rlog.c index d2483e7c2fc..5c045feb36f 100644 --- a/gnu/usr.bin/rcs/rlog/rlog.c +++ b/gnu/usr.bin/rcs/rlog/rlog.c @@ -1,4 +1,4 @@ -/* $NetBSD: rlog.c,v 1.6 2012/01/06 15:16:03 joerg Exp $ */ +/* $NetBSD: rlog.c,v 1.7 2012/03/08 21:32:28 christos Exp $ */ /* Print log messages and other information about RCS files. */ @@ -31,6 +31,10 @@ Report problems and direct all questions to: /* * $Log: rlog.c,v $ + * Revision 1.7 2012/03/08 21:32:28 christos + * Teach rcs about the new cvs "commitid" keyword, so that we don't bitch each + * time we play with an RCS file maintained by CVS. + * * Revision 1.6 2012/01/06 15:16:03 joerg * Don't use dangling elses. * @@ -223,6 +227,7 @@ static char const *insDelFormat; static int branchflag; /*set on -b */ static int exitstatus; static int lockflag; +static int commitid; static struct Datepairs *datelist, *duelst; static struct Revpairs *revlist, *Revlst; static struct authors *authorlist; @@ -233,7 +238,7 @@ static struct stateattri *statelist; mainProg(rlogId, "rlog", "Id: rlog.c,v 5.18 1995/06/16 06:19:24 eggert Exp") { static char const cmdusage[] = - "\nrlog usage: rlog -{bhLNRt} -ddates -l[lockers] -r[revs] -sstates -Vn -w[logins] -xsuff -zzone file ..."; + "\nrlog usage: rlog -{cbhLNRt} -ddates -l[lockers] -r[revs] -sstates -Vn -w[logins] -xsuff -zzone file ..."; register FILE *out; char *a, **newargv; @@ -260,6 +265,9 @@ mainProg(rlogId, "rlog", "Id: rlog.c,v 5.18 1995/06/16 06:19:24 eggert Exp") argv = newargv; while (a = *++argv, 0<--argc && *a++=='-') { switch (*a++) { + case 'c': + commitid = true; + break; case 'L': onlylockflag = true; @@ -593,6 +601,8 @@ putadelta(node,editscript,trunk) date2str(node->date, datebuf), node->author, node->state ); + if (commitid && node->commitid) + aprintf(out, " commitid: %s;", node->commitid); if ( editscript ) { if(trunk) |
