summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/update.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-06-14 03:58:30 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-06-14 03:58:30 +0000
commit7d54e7807fd98844ba963369bffbc1a25397f82b (patch)
treec7b763d72a646f2ebd671ed1c984a3600e4117a1 /usr.bin/cvs/update.c
parentf8f91d32a4d2f21ccba26b483b9c1a1ccd61da0d (diff)
Added support for sticky date set in CVS/Tag and CVS/Entries per directory.
ok joris
Diffstat (limited to 'usr.bin/cvs/update.c')
-rw-r--r--usr.bin/cvs/update.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c
index 29c83528f43..ac7792d48d6 100644
--- a/usr.bin/cvs/update.c
+++ b/usr.bin/cvs/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.152 2008/06/14 03:19:15 joris Exp $ */
+/* $OpenBSD: update.c,v 1.153 2008/06/14 03:58:29 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -79,6 +79,7 @@ cvs_update(int argc, char **argv)
case 'D':
dateflag = optarg;
cvs_specified_date = cvs_date_parse(dateflag);
+ reset_tag = 0;
break;
case 'd':
build_dirs = 1;
@@ -415,9 +416,9 @@ cvs_update_local(struct cvs_file *cf)
case FILE_LOST:
case FILE_CHECKOUT:
case FILE_PATCH:
- if ((tag != NULL && !reset_tag) || cvs_specified_date != -1 ||
- (((cf->file_ent != NULL) && cf->file_ent->ce_tag != NULL) &&
- !reset_tag))
+ if (!reset_tag && (tag != NULL || cvs_specified_date != -1 ||
+ cvs_directory_date != -1 || (cf->file_ent != NULL &&
+ cf->file_ent->ce_tag != NULL)))
flags = CO_SETSTICKY;
cvs_checkout_file(cf, cf->file_rcsrev, tag, flags);
@@ -455,7 +456,9 @@ cvs_update_local(struct cvs_file *cf)
if (cf->file_rcsrev == NULL)
break;
- if (tag == NULL && cvs_specified_date == -1)
+ if (tag == NULL && cvs_specified_date == -1 &&
+ cvs_directory_date == -1 && !reset_tag &&
+ !reset_option)
break;
if (cf->file_rcs->rf_dead != 1 &&