summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/checkout.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-09-22 16:01:23 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-09-22 16:01:23 +0000
commit0d83276c664f67d2670a75d00571c510830d8d10 (patch)
treee599820e2290749831ca6f4184f55756f50d74a4 /usr.bin/cvs/checkout.c
parenta634a04dd7e99d9335ce37798fb7b6335c3495f5 (diff)
better branching/sticky tag support, no branch commits yet though.
Diffstat (limited to 'usr.bin/cvs/checkout.c')
-rw-r--r--usr.bin/cvs/checkout.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index a0b2f567e4e..d110c6add57 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.103 2007/09/22 15:30:29 tobias Exp $ */
+/* $OpenBSD: checkout.c,v 1.104 2007/09/22 16:01:22 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -72,6 +72,8 @@ cvs_checkout(int argc, char **argv)
case 'l':
flags &= ~CR_RECURSE_DIRS;
break;
+ case 'N':
+ break;
case 'P':
prune_dirs = 1;
break;
@@ -184,6 +186,8 @@ checkout_check_repository(int argc, char **argv)
return;
}
+ cvs_directory_tag = cvs_specified_tag;
+
for (i = 0; i < argc; i++) {
(void)xsnprintf(repo, sizeof(repo), "%s/%s",
current_cvsroot->cr_dir, argv[i]);
@@ -258,7 +262,9 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, int co_flags)
exists = 0;
tosend = NULL;
- rcsnum_tostr(rnum, rev, sizeof(rev));
+
+ if (!(co_flags & CO_REMOVE))
+ rcsnum_tostr(rnum, rev, sizeof(rev));
cvs_log(LP_TRACE, "cvs_checkout_file(%s, %s, %d) -> %s",
cf->file_path, rev, co_flags,
@@ -320,9 +326,9 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, int co_flags)
}
if (co_flags & CO_SETSTICKY)
- if (cvs_specified_tag != NULL)
+ if (cvs_directory_tag != NULL)
(void)xsnprintf(stickytag, sizeof(stickytag), "T%s",
- cvs_specified_tag);
+ cvs_directory_tag);
else
(void)xsnprintf(stickytag, sizeof(stickytag), "T%s",
rev);