=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/update.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- src/usr.bin/cvs/update.c 2006/06/19 05:05:17 1.75 +++ src/usr.bin/cvs/update.c 2006/07/01 20:30:46 1.76 @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.75 2006/06/19 05:05:17 joris Exp $ */ +/* $OpenBSD: update.c,v 1.76 2006/07/01 20:30:46 reyk Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -23,6 +23,7 @@ int cvs_update(int, char **); int prune_dirs = 0; +int dump = 0; int build_dirs = 0; int reset_stickies = 0; static char *tag = NULL; @@ -77,6 +78,7 @@ prune_dirs = 1; break; case 'p': + dump = 1; break; case 'Q': case 'q': @@ -244,6 +246,7 @@ BUF *bp; int ret, flags; CVSENTRIES *entlist; + char rbuf[16]; cvs_log(LP_TRACE, "cvs_update_local(%s)", cf->file_path); @@ -269,6 +272,19 @@ cf->file_ent->ce_tag != NULL && reset_stickies == 1) { cf->file_status = FILE_CHECKOUT; cf->file_rcsrev = rcs_head_get(cf->file_rcs); + } + + if (dump && cf->file_status != FILE_UNKNOWN) { + bp = rcs_getrev(cf->file_rcs, cf->file_rcsrev); + if (bp == NULL) + fatal("cvs_update_local: failed to get HEAD"); + rcsnum_tostr(cf->file_rcsrev, rbuf, sizeof(rbuf)); + if (verbosity > 1) + 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, bp, CO_DUMP); + return; } switch (cf->file_status) {