diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-04-16 12:30:01 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-04-16 12:30:01 +0000 |
commit | 6a0b57b25ae50c006547f2b4619a13bf1d470759 (patch) | |
tree | 05b4cd672a317c345648e0b79642887ee42af249 /usr.bin | |
parent | 74d870a8ac1de6af2e6f7eb3105ff201ac61e6f4 (diff) |
- fix description handling.
ok joris@ xsa@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/ci.c | 6 | ||||
-rw-r--r-- | usr.bin/rcs/rcsprog.h | 35 |
2 files changed, 22 insertions, 19 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c index 791b5bb781a..67c7db491ed 100644 --- a/usr.bin/rcs/ci.c +++ b/usr.bin/rcs/ci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.147 2006/04/14 01:11:07 deraadt Exp $ */ +/* $OpenBSD: ci.c,v 1.148 2006/04/16 12:30:00 niallo Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org> * All rights reserved. @@ -281,6 +281,8 @@ checkin_main(int argc, char **argv) NULL) fatal("invalid revision: %s", rev_str); + if (!(pb.flags & NEWFILE)) + pb.flags |= CI_SKIPDESC; /* XXX - support for commiting to a file without revisions */ if (pb.file->rf_ndelta == 0) { pb.flags |= NEWFILE; @@ -665,7 +667,7 @@ checkin_init(struct checkin_params *pb) checkin_keywordscan(filec, &pb->newrev, &pb->date, &pb->state, &pb->author); - if (pb->file->rf_ndelta == 0) + if (pb->flags & CI_SKIPDESC) goto skipdesc; /* Get description from user */ diff --git a/usr.bin/rcs/rcsprog.h b/usr.bin/rcs/rcsprog.h index 506d8c39132..5e0cb328fa7 100644 --- a/usr.bin/rcs/rcsprog.h +++ b/usr.bin/rcs/rcsprog.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsprog.h,v 1.47 2006/04/15 19:35:19 xsa Exp $ */ +/* $OpenBSD: rcsprog.h,v 1.48 2006/04/16 12:30:00 niallo Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -41,28 +41,29 @@ #define CI_DEFAULT (1<<1) #define CI_INIT (1<<2) #define CI_KEYWORDSCAN (1<<3) +#define CI_SKIPDESC (1<<4) /* flags specific to co.c */ -#define CO_ACLAPPEND (1<<4) -#define CO_AUTHOR (1<<5) -#define CO_LOCK (1<<6) -#define CO_REVDATE (1<<7) -#define CO_REVERT (1<<8) -#define CO_STATE (1<<9) -#define CO_UNLOCK (1<<10) +#define CO_ACLAPPEND (1<<5) +#define CO_AUTHOR (1<<6) +#define CO_LOCK (1<<7) +#define CO_REVDATE (1<<8) +#define CO_REVERT (1<<9) +#define CO_STATE (1<<10) +#define CO_UNLOCK (1<<11) /* flags specific to rcsprog.c */ -#define RCSPROG_EFLAG (1<<11) -#define RCSPROG_LFLAG (1<<12) -#define RCSPROG_NFLAG (1<<13) -#define RCSPROG_TFLAG (1<<14) -#define RCSPROG_UFLAG (1<<15) +#define RCSPROG_EFLAG (1<<12) +#define RCSPROG_LFLAG (1<<13) +#define RCSPROG_NFLAG (1<<14) +#define RCSPROG_TFLAG (1<<15) +#define RCSPROG_UFLAG (1<<16) /* shared flags */ -#define FORCE (1<<16) -#define INTERACTIVE (1<<17) -#define NEWFILE (1<<18) -#define PRESERVETIME (1<<19) +#define FORCE (1<<17) +#define INTERACTIVE (1<<18) +#define NEWFILE (1<<19) +#define PRESERVETIME (1<<20) extern char *__progname; extern const char rcs_version[]; |