summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcs.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-12-03 15:07:22 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-12-03 15:07:22 +0000
commitc754d6bad3dea47b57c8497f2e1f3aa15cb9c3c8 (patch)
tree811ab201499114384c0627ebf0c133aac695c427 /usr.bin/cvs/rcs.c
parent3d78890027fb19ead4c3ba84f930b0a1bd219f96 (diff)
fix date handling in opencvs, this was broken since the very start.
now, when you checkout a tree with gnu cvs, opencvs no longer sees all the files as modified, and visa versa. this actually makes gnu cvs and opencvs dance together in working copies.
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r--usr.bin/cvs/rcs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 7ae69a94a06..a954d9964e0 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.106 2005/12/03 02:10:58 joris Exp $ */
+/* $OpenBSD: rcs.c,v 1.107 2005/12/03 15:07:21 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -3141,6 +3141,12 @@ cvs_checkout_rev(RCSFILE *rf, RCSNUM *rev, CVSFILE *cf, char *fpath,
goto out;
}
+ /*
+ * correct the time first
+ */
+ if ((rcstime = cvs_hack_time(rcstime, 0)) == 0)
+ goto out;
+
tv[0].tv_sec = rcstime;
tv[0].tv_usec = 0;
tv[1] = tv[0];
@@ -3159,6 +3165,9 @@ cvs_checkout_rev(RCSFILE *rf, RCSNUM *rev, CVSFILE *cf, char *fpath,
* if we are removing a file, we don't need this stuff.
*/
if (type != CHECKOUT_REV_REMOVED) {
+ if ((rcstime = cvs_hack_time(rcstime, 0)) == 0)
+ goto out;
+
tp = gmtime(&rcstime);
l = snprintf(timebuf, sizeof(timebuf),
"%02d %s %d %02d:%02d:%02d -0000",