=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/util.c,v retrieving revision 1.115 retrieving revision 1.116 diff -u -r1.115 -r1.116 --- src/usr.bin/cvs/util.c 2007/09/04 19:07:04 1.115 +++ src/usr.bin/cvs/util.c 2007/09/09 20:24:06 1.116 @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.115 2007/09/04 19:07:04 tobias Exp $ */ +/* $OpenBSD: util.c,v 1.116 2007/09/09 20:24:06 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink @@ -38,6 +38,8 @@ #include "cvs.h" #include "remote.h" +extern int print_stdout; + /* letter -> mode type map */ static const int cvs_modetypes[26] = { -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, @@ -501,6 +503,14 @@ { FILE *fp; char *s, fpath[MAXPATHLEN]; + + /* During checkout -p, do not use any locally available files. */ + if (cvs_cmdop == CVS_OP_CHECKOUT && print_stdout) { + dst[0] = '\0'; + if (strlcat(dst, dir, len) >= len) + fatal("cvs_get_repository_name: truncation"); + return; + } (void)xsnprintf(fpath, sizeof(fpath), "%s/%s", dir, CVS_PATH_REPOSITORY);