summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/checkout.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/src/checkout.c')
-rw-r--r--contrib/cvs/src/checkout.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/contrib/cvs/src/checkout.c b/contrib/cvs/src/checkout.c
index 86dc951..a9afa49 100644
--- a/contrib/cvs/src/checkout.c
+++ b/contrib/cvs/src/checkout.c
@@ -33,6 +33,10 @@
* edited by the user, if necessary (when the repository is moved, e.g.)
*/
+/*
+ * $FreeBSD$
+ */
+
#include <assert.h>
#include "cvs.h"
@@ -50,6 +54,7 @@ static const char *const checkout_usage[] =
"\t-N\tDon't shorten module paths if -d specified.\n",
"\t-P\tPrune empty directories.\n",
"\t-R\tProcess directories recursively.\n",
+ "\t-T\tCreate Template file from local repository for remote commit.\n",
"\t-c\t\"cat\" the module database.\n",
"\t-f\tForce a head revision match if tag/date not found.\n",
"\t-l\tLocal directory only, not recursive\n",
@@ -92,6 +97,7 @@ static char *date = NULL;
static char *join_rev1 = NULL;
static char *join_rev2 = NULL;
static int join_tags_validated = 0;
+static int pull_template = 0;
static char *preload_update_dir = NULL;
static char *history_name = NULL;
static enum mtype m_type;
@@ -127,7 +133,7 @@ checkout (argc, argv)
else
{
m_type = CHECKOUT;
- valid_options = "+ANnk:d:flRpQqcsr:D:j:P";
+ valid_options = "+ANnk:d:flRpTQqcsr:D:j:P";
valid_usage = checkout_usage;
}
@@ -156,6 +162,9 @@ checkout (argc, argv)
case 'n':
run_module_prog = 0;
break;
+ case 'T':
+ pull_template = 1;
+ break;
case 'Q':
case 'q':
#ifdef SERVER_SUPPORT
@@ -1008,7 +1017,7 @@ internal error: %s doesn't start with %s in checkout_proc",
force_tag_match, 0 /* !local */ ,
1 /* update -d */ , aflag, checkout_prune_dirs,
pipeout, which, join_rev1, join_rev2,
- preload_update_dir, m_type == CHECKOUT);
+ preload_update_dir, pull_template);
goto out;
}
@@ -1064,7 +1073,7 @@ internal error: %s doesn't start with %s in checkout_proc",
err += do_update (argc - 1, argv + 1, options, tag, date,
force_tag_match, local_specified, 1 /* update -d */,
aflag, checkout_prune_dirs, pipeout, which, join_rev1,
- join_rev2, preload_update_dir, m_type == CHECKOUT);
+ join_rev2, preload_update_dir, pull_template);
out:
free (preload_update_dir);
preload_update_dir = oldupdate;
OpenPOWER on IntegriCloud