diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2007-01-13 15:46:00 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2007-01-13 15:46:00 +0000 |
commit | 33da486f0b07596f8124fff0c7bac44afd3859d0 (patch) | |
tree | 18293dab0910cec80e5fc8d26099505f43364b08 /usr.bin/cvs | |
parent | c8b3d5534051a076fe062300cf465e1d046d7d73 (diff) |
remove BUF * argument from cvs_checkout_file() it will
no longer be used, ever.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/add.c | 9 | ||||
-rw-r--r-- | usr.bin/cvs/checkout.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/commit.c | 8 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.h | 4 | ||||
-rw-r--r-- | usr.bin/cvs/update.c | 18 |
5 files changed, 14 insertions, 29 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c index cb9abda8a39..2606fd2b694 100644 --- a/usr.bin/cvs/add.c +++ b/usr.bin/cvs/add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: add.c,v 1.68 2007/01/12 19:28:12 joris Exp $ */ +/* $OpenBSD: add.c,v 1.69 2007/01/13 15:45:59 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> @@ -246,7 +246,6 @@ add_directory(struct cvs_file *cf) static void add_file(struct cvs_file *cf) { - BUF *b; int added, stop; char revbuf[16]; RCSNUM *head; @@ -274,13 +273,9 @@ add_file(struct cvs_file *cf) /* Restore the file. */ head = rcs_head_get(cf->file_rcs); - b = rcs_getrev(cf->file_rcs, head); + cvs_checkout_file(cf, head, 0); rcsnum_free(head); - if (b == NULL) - fatal("cvs_add_local: failed to get HEAD"); - - cvs_checkout_file(cf, head, b, 0); cvs_printf("U %s\n", cf->file_path); cvs_log(LP_NOTICE, "%s, version %s, resurrected", diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c index 60394f706e8..99e1295a94f 100644 --- a/usr.bin/cvs/checkout.c +++ b/usr.bin/cvs/checkout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: checkout.c,v 1.72 2007/01/13 15:29:34 joris Exp $ */ +/* $OpenBSD: checkout.c,v 1.73 2007/01/13 15:45:59 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -162,7 +162,7 @@ checkout_repository(const char *repobase, const char *wdbase) } void -cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, BUF *bp, int flags) +cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, int flags) { int l, oflags, exists; time_t rcstime; diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index 9281b878826..205dfbc452a 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.94 2007/01/12 23:32:01 niallo Exp $ */ +/* $OpenBSD: commit.c,v 1.95 2007/01/13 15:45:59 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -344,11 +344,7 @@ cvs_commit_local(struct cvs_file *cf) cf->fd = -1; if (cf->file_status != FILE_REMOVED) { - b = rcs_getrev(cf->file_rcs, cf->file_rcs->rf_head); - if (b == NULL) - fatal("cvs_commit_local: failed to get HEAD"); - - cvs_checkout_file(cf, cf->file_rcs->rf_head, b, CO_COMMIT); + cvs_checkout_file(cf, cf->file_rcs->rf_head, CO_COMMIT); } else { entlist = cvs_ent_open(cf->file_wd); cvs_ent_remove(entlist, cf->file_name); diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index 099fe95891f..f7fc2dbf416 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.128 2007/01/12 23:32:01 niallo Exp $ */ +/* $OpenBSD: cvs.h,v 1.129 2007/01/13 15:45:59 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -361,7 +361,7 @@ char * cvs_logmsg_create(struct cvs_flisthead *, struct cvs_flisthead *, void cvs_update_local(struct cvs_file *); void cvs_update_enterdir(struct cvs_file *); void cvs_update_leavedir(struct cvs_file *); -void cvs_checkout_file(struct cvs_file *, RCSNUM *, BUF *, int); +void cvs_checkout_file(struct cvs_file *, RCSNUM *, int); int update_has_conflict_markers(struct cvs_file *); #define CO_MERGE 0x01 diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index c5b75d72aaf..29f3d589405 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.84 2007/01/12 23:32:01 niallo Exp $ */ +/* $OpenBSD: update.c,v 1.85 2007/01/13 15:45:59 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -270,7 +270,6 @@ cvs_update_leavedir(struct cvs_file *cf) void cvs_update_local(struct cvs_file *cf) { - BUF *bp; int ret, flags; CVSENTRIES *entlist; char rbuf[16]; @@ -287,12 +286,7 @@ cvs_update_local(struct cvs_file *cf) return; } - /* - * the bp buffer will be released inside rcs_kwexp_buf, - * which is called from cvs_checkout_file(). - */ flags = 0; - bp = NULL; cvs_file_classify(cf, tag, 1); if (cf->file_status == FILE_UPTODATE && cf->file_ent != NULL && @@ -307,7 +301,7 @@ cvs_update_local(struct cvs_file *cf) cvs_printf("%s\nChecking out %s\n" "RCS:\t%s\nVERS:\t%s\n***************\n", RCS_DIFF_DIV, cf->file_path, cf->file_rpath, rbuf); - cvs_checkout_file(cf, cf->file_rcsrev, NULL, CO_DUMP); + cvs_checkout_file(cf, cf->file_rcsrev, CO_DUMP); return; } @@ -340,16 +334,15 @@ cvs_update_local(struct cvs_file *cf) if (tag != NULL) flags = CO_SETSTICKY; - cvs_checkout_file(cf, cf->file_rcsrev, NULL, flags); + cvs_checkout_file(cf, cf->file_rcsrev, flags); cvs_printf("U %s\n", cf->file_path); break; case FILE_MERGE: +#if 0 cvs_diff3(cf->file_rcs, cf->file_path, cf->fd, cf->file_ent->ce_rev, cf->file_rcsrev, 1); - if (bp == NULL) - fatal("cvs_update_local: failed to merge"); - cvs_checkout_file(cf, cf->file_rcsrev, bp, CO_MERGE); + cvs_checkout_file(cf, cf->file_rcsrev, CO_MERGE); if (diff3_conflicts != 0) { cvs_printf("C %s\n", cf->file_path); @@ -357,6 +350,7 @@ cvs_update_local(struct cvs_file *cf) update_clear_conflict(cf); cvs_printf("M %s\n", cf->file_path); } +#endif break; case FILE_UNLINK: (void)unlink(cf->file_path); |