summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2009-02-21 13:44:19 +0000
committerJoris Vink <joris@cvs.openbsd.org>2009-02-21 13:44:19 +0000
commit0a714506acc136f72755d08ad7651e3840ae2573 (patch)
tree10a1fb9d9d1f16fd59b9e25f386de6e6f7a600eb /usr.bin/cvs/file.c
parentfcdb267cb4a93ef44b07b50fe1d8d818fa469aed (diff)
use file_flags for 2 more reasons:
- mark a file as being inside the Attic/ - mark a file as existing in the working copy (both in local and remote mode) this way we no longer will need to check if cf->fd == -1 and think about wether or not we are in local or remote mode.
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 30bf7734b8b..d3681b57de9 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.250 2009/02/21 12:47:19 joris Exp $ */
+/* $OpenBSD: file.c,v 1.251 2009/02/21 13:44:18 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -585,7 +585,8 @@ walkrepo:
if (stat(fpath, &st) == -1 || build_dirs == 1)
cvs_repository_getdir(repo, cf->file_path, &fl, &dl,
- (cr->flags & CR_RECURSE_DIRS));
+ (cr->flags & CR_RECURSE_DIRS) ?
+ REPOSITORY_DODIRS : 0);
}
cvs_file_walklist(&fl, cr);
@@ -761,6 +762,9 @@ cvs_file_classify(struct cvs_file *cf, const char *tag)
ismodified = 0;
}
+ if ((server_has_file == 1) || (cf->fd != -1))
+ cf->file_flags |= FILE_ON_DISK;
+
if (ismodified == 1 && cf->fd != -1 && cf->file_rcs != NULL &&
cf->file_ent != NULL && !RCSNUM_ISBRANCH(cf->file_ent->ce_rev) &&
cf->file_ent->ce_status != CVS_ENT_ADDED) {