Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl2/xcvs/dist/src add -t to preserve timestamps.
details: https://anonhg.NetBSD.org/src/rev/b15cadc13456
branches: trunk
changeset: 349693:b15cadc13456
user: christos <christos%NetBSD.org@localhost>
date: Mon Dec 19 04:37:13 2016 +0000
description:
add -t to preserve timestamps.
diffstat:
external/gpl2/xcvs/dist/src/update.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diffs (80 lines):
diff -r 70ade844b264 -r b15cadc13456 external/gpl2/xcvs/dist/src/update.c
--- a/external/gpl2/xcvs/dist/src/update.c Mon Dec 19 03:32:54 2016 +0000
+++ b/external/gpl2/xcvs/dist/src/update.c Mon Dec 19 04:37:13 2016 +0000
@@ -38,7 +38,7 @@
* as well.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: update.c,v 1.6 2016/12/19 03:15:31 christos Exp $");
+__RCSID("$NetBSD: update.c,v 1.7 2016/12/19 04:37:13 christos Exp $");
#include "cvs.h"
#include <assert.h>
@@ -106,6 +106,7 @@
static int force_tag_match = 1;
static int update_build_dirs = 0;
static int update_prune_dirs = 0;
+static int preserve_timestamps_on_update = 0;
static int pipeout = 0;
static int dotemplate = 0;
#ifdef SERVER_SUPPORT
@@ -131,6 +132,7 @@
"\t-D date\tSet date to update from (is sticky).\n",
"\t-j rev\tMerge in changes made between current revision and rev.\n",
"\t-I ign\tMore files to ignore (! to reset).\n",
+ "\t-t Preserve timestamps on update.\n",
"\t-W spec\tWrappers specification line.\n",
"(Specify the --help global option for a list of other help options)\n",
NULL
@@ -162,7 +164,7 @@
/* parse the args */
getoptreset ();
- while ((c = getopt (argc, argv, "+ApCPflRQqduk:r:D:j:I:W:")) != -1)
+ while ((c = getopt (argc, argv, "+ApCPflRQqduk:r:tD:j:I:W:")) != -1)
{
switch (c)
{
@@ -218,6 +220,9 @@
pipeout = 1;
noexec = 1; /* so no locks will be created */
break;
+ case 't':
+ preserve_timestamps_on_update = 1;
+ break;
case 'j':
if (join_orig2)
error (1, 0, "only two -j options can be specified");
@@ -281,6 +286,8 @@
send_arg("-C");
if (update_prune_dirs)
send_arg("-P");
+ if (preserve_timestamps_on_update)
+ send_arg("-t");
client_prune_dirs = update_prune_dirs;
option_with_arg ("-r", tag);
if (options && options[0] != '\0')
@@ -1366,18 +1373,20 @@
/* set the time from the RCS file iff it was unknown before */
set_time =
(!noexec
-#if 0
/*
* always pass the time to the client, and let it decide
* if it is going to set the time
*/
- && (vers_ts->vn_user == NULL ||
+ && (preserve_timestamps_on_update ||
+ vers_ts->vn_user == NULL ||
strncmp (vers_ts->ts_rcs, "Initial", 7) == 0)
-#endif
&& !file_is_dead);
+
wrap_fromcvs_process_file (finfo->file);
+
xvers_ts = Version_TS (finfo, options, tag, date,
force_tag_match, set_time);
+
if (strcmp (xvers_ts->options, "-V4") == 0)
xvers_ts->options[0] = '\0';
Home |
Main Index |
Thread Index |
Old Index