summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-05-26 03:10:02 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-05-26 03:10:02 +0000
commit8fb580b7f581acf1fe452d19558b0ca8bb50fa20 (patch)
tree0c0dc6d383170fcf3e4a83d7fb61f2f73697cada /usr.bin
parentda44409e2f3a4e26752595c405de54975f45ef47 (diff)
send the Checkin-time request along with the file's timestamp when
running in client mode with the -d flag. The timestamp format is the same as ctime(3), as opposed to GNU CVS, which uses Yet Another Timestamp Format to make this more complicated...
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/import.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c
index 20e5d907d63..d6b1a82403d 100644
--- a/usr.bin/cvs/import.c
+++ b/usr.bin/cvs/import.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: import.c,v 1.20 2005/05/26 02:35:13 jfb Exp $ */
+/* $OpenBSD: import.c,v 1.21 2005/05/26 03:10:01 jfb Exp $ */
/*
* Copyright (c) 2004 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -190,7 +190,7 @@ cvs_import_remote(CVSFILE *cf, void *arg)
int len;
struct cvsroot *root;
char fpath[MAXPATHLEN], repodir[MAXPATHLEN];
- char repo[MAXPATHLEN];
+ char repo[MAXPATHLEN], date[32];
root = CVS_DIR_ROOT(cf);
len = snprintf(repo, sizeof(repo), "%s/%s", root->cr_dir, module);
@@ -222,6 +222,11 @@ cvs_import_remote(CVSFILE *cf, void *arg)
return (0);
}
+ if (dflag) {
+ ctime_r(&(cf->cf_mtime), date);
+ if (cvs_sendreq(root, CVS_REQ_CHECKINTIME, date) < 0)
+ return (CVS_EX_PROTO);
+ }
if (cvs_sendreq(root, CVS_REQ_MODIFIED, cf->cf_name) < 0)
return (CVS_EX_PROTO);
if (cvs_sendfile(root, fpath) < 0)