diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-10-16 15:46:08 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-10-16 15:46:08 +0000 |
commit | e9acfb092f31dc14ddc0801bbb2d4b2160a296e6 (patch) | |
tree | d12bb645b51fc7bfd082383a9bb37a7395c6e642 /usr.bin | |
parent | fa28302984377f26f603947ac9dfa077b6bba3c3 (diff) |
spacing;
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/co.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c index 4a5ab1e0570..70091fab807 100644 --- a/usr.bin/rcs/co.c +++ b/usr.bin/rcs/co.c @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.16 2005/10/16 11:59:06 niallo Exp $ */ +/* $OpenBSD: co.c,v 1.17 2005/10/16 15:46:07 joris Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -127,11 +127,14 @@ checkout_main(int argc, char **argv) frev = file->rf_head; else frev = rev; + rcsnum_tostr(frev, buf, sizeof(buf)); + if (checkout_rev(file, frev, argv[i], lock, username) < 0) { rcs_close(file); continue; } + rcs_close(file); } @@ -195,12 +198,15 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int lkmode, } mode = 0444; } + if (cvs_buf_write(bp, dst, mode) < 0) { cvs_log(LP_ERR, "failed to write revision to file"); cvs_buf_free(bp); return (-1); } + cvs_buf_free(bp); + if (verbose == 1) { cvs_printf("revision %s ", buf); if (lkmode == LOCK_LOCK) @@ -210,6 +216,7 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int lkmode, cvs_printf("\n"); cvs_printf("done\n"); } + return (0); } |