diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-05-05 01:30:00 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-05-05 01:30:00 +0000 |
commit | 33fade9e1ab2b17b91558c27d469d81de39591a4 (patch) | |
tree | 93b3ae1db4b3789af03122b36b67aa0a7f58e424 /usr.bin/rcs/co.c | |
parent | 279bf209f80fbecedcda6ea0adb0f03d4a65d2bc (diff) |
o GNU ci returns 0 when a file is reverted (co -l file; ci file).
o Don't unlock file after revert.
o Fix spelling.
Passes extra tests in GNU rcstest.
OK niallo@.
Diffstat (limited to 'usr.bin/rcs/co.c')
-rw-r--r-- | usr.bin/rcs/co.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c index 20d9e83fb17..6cd15e1245d 100644 --- a/usr.bin/rcs/co.c +++ b/usr.bin/rcs/co.c @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.87 2006/04/29 05:31:28 ray Exp $ */ +/* $OpenBSD: co.c,v 1.88 2006/05/05 01:29:59 ray Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -231,7 +231,7 @@ checkout_usage(void) /* * Checkout revision <rev> from RCSFILE <file>, writing it to the path <dst> - * Currenly recognised <flags> are CO_LOCK, CO_UNLOCK and CO_REVDATE. + * Currently recognised <flags> are CO_LOCK, CO_UNLOCK and CO_REVDATE. * * Looks up revision based upon <lockname>, <author>, <state> and <date> * @@ -349,9 +349,6 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags, !(flags & CO_REVERT) && file->rf_ndelta != 0) printf("revision %s", buf); - if (!(flags & QUIET) && (flags & CO_REVERT)) - printf("done"); - if (file->rf_ndelta != 0) { if ((bp = rcs_getrev(file, rev)) == NULL) { warnx("cannot find revision `%s'", buf); @@ -424,7 +421,9 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags, warnx("no revisions, so nothing can be %s", (flags & CO_LOCK) ? "locked" : "unlocked"); } else if (file->rf_ndelta != 0) { - if (!(flags & QUIET) && !(flags & NEWFILE)) + /* XXX - Not a good way to detect if a newline is needed. */ + if (!(flags & QUIET) && !(flags & NEWFILE) && + !(flags & CO_REVERT)) printf("\n"); } |