summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-11-23 09:39:21 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-11-23 09:39:21 +0000
commitfbeac4e8ea17ba34c44c52f9dadf2d8b450ec371 (patch)
treed4c2b5f1becc6d98327ff6ceac754ec27727cc18
parentf0b99874bcc46c2cd20298d03ab79b8024bbba3f (diff)
initial bits for -T support;
-rw-r--r--usr.bin/rcs/ci.c9
-rw-r--r--usr.bin/rcs/co.c5
-rw-r--r--usr.bin/rcs/rcsclean.c10
-rw-r--r--usr.bin/rcs/rcsdiff.c10
-rw-r--r--usr.bin/rcs/rcsprog.c7
-rw-r--r--usr.bin/rcs/rcsprog.h3
6 files changed, 31 insertions, 13 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index 6136c0077f0..ed1f8d7780e 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.66 2005/11/22 11:49:02 niallo Exp $ */
+/* $OpenBSD: ci.c,v 1.67 2005/11/23 09:39:20 xsa Exp $ */
/*
* Copyright (c) 2005 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -44,7 +44,7 @@
#include "diff.h"
#include "rcsprog.h"
-#define CI_OPTSTRING "d::f::i::j::k:l::m:M::N:n:qr::s:u::Vw:x:"
+#define CI_OPTSTRING "d::f::i::j::k:l::m:M::N:n:qr::s:Tu::Vw:x:"
#define DATE_NOW -1
#define DATE_MTIME -2
@@ -81,7 +81,7 @@ void
checkin_usage(void)
{
fprintf(stderr,
- "usage: ci [-MNqV] [-d[date]] [-f[rev]] [-i[rev]] [-j[rev]]\n"
+ "usage: ci [-MNqTV] [-d[date]] [-f[rev]] [-i[rev]] [-j[rev]]\n"
" [-kmode] [-l[rev]] [-M[rev]] [-mmsg] [-Nsymbol]\n"
" [-nsymbol] [-r[rev]] [-sstate] [-u[rev]] [-wusername]\n"
" file ...\n");
@@ -193,6 +193,9 @@ checkin_main(int argc, char **argv)
exit(1);
}
break;
+ case 'T':
+ pb.flags |= PRESERVETIME;
+ break;
case 'u':
rcs_set_rev(rcs_optarg, &pb.newrev);
pb.flags |= CO_UNLOCK;
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index f56faaf6c9e..394737761fc 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.33 2005/11/23 09:05:02 xsa Exp $ */
+/* $OpenBSD: co.c,v 1.34 2005/11/23 09:39:20 xsa Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -100,6 +100,9 @@ checkout_main(int argc, char **argv)
}
flags |= CO_STATE;
break;
+ case 'T':
+ flags |= PRESERVETIME;
+ break;
case 'u':
rcs_set_rev(rcs_optarg, &rev);
flags |= CO_UNLOCK;
diff --git a/usr.bin/rcs/rcsclean.c b/usr.bin/rcs/rcsclean.c
index 3854b8a28da..9fae89016cb 100644
--- a/usr.bin/rcs/rcsclean.c
+++ b/usr.bin/rcs/rcsclean.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsclean.c,v 1.15 2005/11/21 16:20:29 xsa Exp $ */
+/* $OpenBSD: rcsclean.c,v 1.16 2005/11/23 09:39:20 xsa Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -46,14 +46,15 @@ static int uflag = 0;
int
rcsclean_main(int argc, char **argv)
{
- int i, ch;
+ int i, ch, flags;
RCSNUM *rev;
DIR *dirp;
struct dirent *dp;
+ flags = 0;
rev = RCS_HEAD_REV;
- while ((ch = rcs_getopt(argc, argv, "k:n::q::r:u::Vx:")) != -1) {
+ while ((ch = rcs_getopt(argc, argv, "k:n::q::r:Tu::Vx:")) != -1) {
switch (ch) {
case 'k':
kflag = rcs_kflag_get(rcs_optarg);
@@ -75,6 +76,9 @@ rcsclean_main(int argc, char **argv)
case 'r':
rcs_set_rev(rcs_optarg, &rev);
break;
+ case 'T':
+ flags |= PRESERVETIME;
+ break;
case 'u':
rcs_set_rev(rcs_optarg, &rev);
uflag = 1;
diff --git a/usr.bin/rcs/rcsdiff.c b/usr.bin/rcs/rcsdiff.c
index b40082dba7f..8604e937d43 100644
--- a/usr.bin/rcs/rcsdiff.c
+++ b/usr.bin/rcs/rcsdiff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsdiff.c,v 1.18 2005/11/22 15:00:06 xsa Exp $ */
+/* $OpenBSD: rcsdiff.c,v 1.19 2005/11/23 09:39:20 xsa Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -45,18 +45,19 @@ static int kflag = RCS_KWEXP_ERR;
int
rcsdiff_main(int argc, char **argv)
{
- int i, ch, status;
+ int i, ch, flags, status;
RCSNUM *rev, *rev2, *frev;
RCSFILE *file;
char fpath[MAXPATHLEN];
+ flags = 0;
rev = RCS_HEAD_REV;
rev2 = NULL;
status = 0;
strlcpy(diffargs, "diff", sizeof(diffargs));
- while ((ch = rcs_getopt(argc, argv, "ck:nqr:uVx:")) != -1) {
+ while ((ch = rcs_getopt(argc, argv, "ck:nqr:TuVx:")) != -1) {
switch (ch) {
case 'c':
strlcat(diffargs, " -c", sizeof(diffargs));
@@ -95,6 +96,9 @@ rcsdiff_main(int argc, char **argv)
}
}
break;
+ case 'T':
+ flags |= PRESERVETIME;
+ break;
case 'V':
printf("%s\n", rcs_version);
exit(0);
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index 5ba59109386..d3c261a5fdc 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.45 2005/11/21 16:20:29 xsa Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.46 2005/11/23 09:39:20 xsa Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -336,7 +336,7 @@ rcs_main(int argc, char **argv)
flags = RCS_RDWR;
logstr = alist = comment = elist = NULL;
- while ((ch = rcs_getopt(argc, argv, "A:a:b::c:e::hik:Lm:MqUV")) != -1) {
+ while ((ch = rcs_getopt(argc, argv, "A:a:b::c:e::hik:Lm:MqTUV")) != -1) {
switch (ch) {
case 'A':
if (rcs_statfile(rcs_optarg, ofpath, sizeof(ofpath)) < 0)
@@ -384,6 +384,9 @@ rcs_main(int argc, char **argv)
case 'q':
verbose = 0;
break;
+ case 'T':
+ flags |= PRESERVETIME;
+ break;
case 'U':
if (lkmode == RCS_LOCK_STRICT)
cvs_log(LP_WARN, "-L overriden by -U");
diff --git a/usr.bin/rcs/rcsprog.h b/usr.bin/rcs/rcsprog.h
index c160d22849d..083de4311ab 100644
--- a/usr.bin/rcs/rcsprog.h
+++ b/usr.bin/rcs/rcsprog.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.h,v 1.23 2005/11/22 13:26:53 xsa Exp $ */
+/* $OpenBSD: rcsprog.h,v 1.24 2005/11/23 09:39:20 xsa Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -45,6 +45,7 @@
#define FORCE (1<<8)
#define INTERACTIVE (1<<9)
#define NEWFILE (1<<10)
+#define PRESERVETIME (1<<11)
extern char *__progname;
extern const char rcs_version[];