summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-09-23 10:49:50 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-09-23 10:49:50 +0000
commit819bd2a7e7c80e314aa3c23e281d463706149eb9 (patch)
tree134dfbceed9ba5f527874387e3e44d11754d1180 /usr.bin/cvs
parent2a84382ca12d636e2435551185751aafa815f0ef (diff)
pass FILE_HAS_FLAG towards the update code so it can identify
if a given tag is present in the RCSfile or not.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/file.c4
-rw-r--r--usr.bin/cvs/file.h4
-rw-r--r--usr.bin/cvs/update.c5
3 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 9c959f8e311..4f8bef981e2 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.199 2007/09/22 16:01:22 joris Exp $ */
+/* $OpenBSD: file.c,v 1.200 2007/09/23 10:49:49 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -667,6 +667,7 @@ cvs_file_classify(struct cvs_file *cf, const char *tag)
}
notag = 0;
+ cf->file_flags |= FILE_HAS_TAG;
if (tag != NULL && cf->file_rcs != NULL) {
if ((cf->file_rcsrev = rcs_translate_tag(tag,
cf->file_rcs)) != NULL) {
@@ -674,6 +675,7 @@ cvs_file_classify(struct cvs_file *cf, const char *tag)
} else {
notag = 1;
cf->file_rcsrev = rcs_head_get(cf->file_rcs);
+ cf->file_flags &= ~FILE_HAS_TAG;
}
} else if (cf->file_ent != NULL && cf->file_ent->ce_tag != NULL) {
cf->file_rcsrev = rcsnum_alloc();
diff --git a/usr.bin/cvs/file.h b/usr.bin/cvs/file.h
index f3ef3de47d5..33c7245b6ac 100644
--- a/usr.bin/cvs/file.h
+++ b/usr.bin/cvs/file.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.h,v 1.45 2007/09/22 16:01:22 joris Exp $ */
+/* $OpenBSD: file.h,v 1.46 2007/09/23 10:49:49 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -70,6 +70,8 @@ struct cvs_file {
#define FILE_SKIP 100
+#define FILE_HAS_TAG 0x01
+
struct cvs_filelist {
char *file_path;
int check_dir_tag;
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c
index d8b5b75314c..fe4f3f674f3 100644
--- a/usr.bin/cvs/update.c
+++ b/usr.bin/cvs/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.110 2007/09/22 16:01:22 joris Exp $ */
+/* $OpenBSD: update.c,v 1.111 2007/09/23 10:49:49 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -396,7 +396,8 @@ cvs_update_local(struct cvs_file *cf)
if (cvs_cmdop != CVS_OP_UPDATE)
break;
- if (cvs_directory_tag != NULL && cf->file_rcs->rf_dead != 1)
+ if (cvs_directory_tag != NULL && cf->file_rcs->rf_dead != 1 &&
+ (cf->file_flags & FILE_HAS_TAG))
cvs_checkout_file(cf, cf->file_rcsrev, CO_SETSTICKY);
break;
default: