diff options
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/file.c | 9 | ||||
-rw-r--r-- | usr.bin/cvs/file.h | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index 66cda12878a..fb07d1feefc 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.93 2005/07/07 14:27:57 joris Exp $ */ +/* $OpenBSD: file.c,v 1.94 2005/07/07 19:06:12 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -358,9 +358,10 @@ cvs_file_copy(CVSFILE *orig) cfp->cf_mode = orig->cf_mode; cfp->cf_cvstat = orig->cf_cvstat; - if (orig->cf_type == DT_REG) + if (orig->cf_type == DT_REG) { + cfp->cf_etime = orig->cf_etime; cfp->cf_mtime = orig->cf_mtime; - else if (orig->cf_type == DT_DIR) { + } else if (orig->cf_type == DT_DIR) { /* XXX copy CVS directory attributes */ } @@ -1104,6 +1105,8 @@ cvs_file_lget(const char *path, int flags, CVSFILE *parent, struct cvs_ent *ent) cfp->cf_cvstat = CVS_FST_MODIFIED; } } + + cfp->cf_etime = ent->ce_mtime; } } else { if (ent == NULL) { diff --git a/usr.bin/cvs/file.h b/usr.bin/cvs/file.h index c46e193562b..6f2b7d9af1f 100644 --- a/usr.bin/cvs/file.h +++ b/usr.bin/cvs/file.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file.h,v 1.22 2005/07/06 10:04:55 xsa Exp $ */ +/* $OpenBSD: file.h,v 1.23 2005/07/07 19:06:12 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -84,6 +84,7 @@ typedef struct cvs_file { union { struct { RCSNUM *cd_lrev; /* local revision */ + time_t cd_etime; /* time in Entries file */ time_t cd_mtime; char *cd_tag; char *cd_opts; @@ -99,6 +100,7 @@ typedef struct cvs_file { } CVSFILE; /* only valid for regular files */ +#define cf_etime cf_td.cf_reg.cd_etime #define cf_mtime cf_td.cf_reg.cd_mtime #define cf_lrev cf_td.cf_reg.cd_lrev #define cf_tag cf_td.cf_reg.cd_tag |