summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-05-11 22:39:44 +0000
committerphk <phk@FreeBSD.org>1994-05-11 22:39:44 +0000
commit037426058494656867e482736a396175e2d4d322 (patch)
treea699bf45d24c8baf88d19ff1005de80d9dde6bc7 /gnu/usr.bin
parentc0fb5cd078cca2d4fcbf66d236f84eb2b67d46c8 (diff)
downloadFreeBSD-src-037426058494656867e482736a396175e2d4d322.zip
FreeBSD-src-037426058494656867e482736a396175e2d4d322.tar.gz
Added -v option to rlog. This gives a quick way to get a list of versions.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/rcs/rlog/rlog.16
-rw-r--r--gnu/usr.bin/rcs/rlog/rlog.c23
2 files changed, 25 insertions, 4 deletions
diff --git a/gnu/usr.bin/rcs/rlog/rlog.1 b/gnu/usr.bin/rcs/rlog/rlog.1
index fa627ff..c4ce039 100644
--- a/gnu/usr.bin/rcs/rlog/rlog.1
+++ b/gnu/usr.bin/rcs/rlog/rlog.1
@@ -2,7 +2,7 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: rlog.1,v 5.3 1991/08/22 06:50:48 eggert Exp $
+.Id $Id: rlog.1,v 1.1.1.1 1993/06/18 04:22:17 jkh Exp $
.ds g \&\s-1UTC\s0
.ds r \&\s-1RCS\s0
.if n .ds - \%--
@@ -54,6 +54,10 @@ Print only the name of the \*r file.
This is convenient for translating a
working pathname into an \*r pathname.
.TP
+.BI \-v "[string]"
+Print only the working pathname and head. The optional string is prepended
+to the outputline.
+.TP
.B \-h
Print only the \*r pathname, working pathname, head,
default branch, access list, locks,
diff --git a/gnu/usr.bin/rcs/rlog/rlog.c b/gnu/usr.bin/rcs/rlog/rlog.c
index dbcf2d4..c7ce890 100644
--- a/gnu/usr.bin/rcs/rlog/rlog.c
+++ b/gnu/usr.bin/rcs/rlog/rlog.c
@@ -36,6 +36,10 @@ Report problems and direct all questions to:
/* $Log: rlog.c,v $
+ * Revision 1.2 1993/08/06 16:47:16 nate
+ * Have rlog output be much easier to parse. (Added one line which is not
+ * used by any CVS/RCS commands)
+ *
* Revision 1.1.1.1 1993/06/18 04:22:17 jkh
* Updated GNU utilities
*
@@ -194,10 +198,10 @@ static struct lockers *lockerlist;
static struct stateattri *statelist;
-mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.1.1.1 1993/06/18 04:22:17 jkh Exp $")
+mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.2 1993/08/06 16:47:16 nate Exp $")
{
static char const cmdusage[] =
- "\nrlog usage: rlog -{bhLRt} -ddates -l[lockers] -rrevs -sstates -w[logins] -Vn file ...";
+ "\nrlog usage: rlog -{bhLRt} [-v[string]] -ddates -l[lockers] -rrevs -sstates -w[logins] -Vn file ...";
register FILE *out;
char *a, **newargv;
@@ -210,11 +214,14 @@ mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.1.1.1 1993/06/18 04:22:17 jkh Exp $")
struct lock const *currlock;
int descflag, selectflag;
int onlylockflag; /* print only files with locks */
+ int versionlist;
+ char *vstring;
int onlyRCSflag; /* print only RCS file name */
unsigned revno;
descflag = selectflag = true;
- onlylockflag = onlyRCSflag = false;
+ versionlist = onlylockflag = onlyRCSflag = false;
+ vstring=0;
out = stdout;
suffixes = X_DEFAULT;
@@ -277,6 +284,11 @@ mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.1.1.1 1993/06/18 04:22:17 jkh Exp $")
setRCSversion(*argv);
break;
+ case 'v':
+ versionlist = true;
+ vstring = a;
+ break;
+
default:
faterror("unknown option: %s%s", *argv, cmdusage);
@@ -326,6 +338,11 @@ mainProg(rlogId, "rlog", "$Id: rlog.c,v 1.1.1.1 1993/06/18 04:22:17 jkh Exp $")
if (onlylockflag && !Locks)
continue;
+ if ( versionlist ) {
+ aprintf(out, "%s%s %s\n", vstring, workfilename, Head->num);
+ continue;
+ }
+
if ( onlyRCSflag ) {
aprintf(out, "%s\n", RCSfilename);
continue;
OpenPOWER on IntegriCloud