]> sjero.net Git - wget/commitdiff
--no-match-server-timestamps -> --no-use-server-timestamps
authorMicah Cowan <micah@cowan.name>
Sun, 10 Jan 2010 04:21:37 +0000 (20:21 -0800)
committerMicah Cowan <micah@cowan.name>
Sun, 10 Jan 2010 04:21:37 +0000 (20:21 -0800)
doc/ChangeLog
doc/wget.texi
src/ChangeLog
src/ftp.c
src/http.c
src/init.c
src/main.c
src/options.h

index 140018cd1263607dbc834e77fdd062390280d553..7a0a94735b68b9ce5eb191fcfc0185613e817601 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-09  Micah Cowan  <micah@cowan.name>
+
+       * wget.texi (Download Options): Documented
+       --no-use-server-timestamps.
+
 2009-09-04  Micah Cowan  <micah@cowan.name>
 
        * wget.texi (Time-Stamping): "older" -> "not newer".
index af211e354d96a85fea93d31bc0c51fec1925af96..0f8f266330e3be605635aeeb65325ecd4ee050fe 100644 (file)
@@ -719,6 +719,16 @@ use @samp{--progress=bar:force}.
 @itemx --timestamping
 Turn on time-stamping.  @xref{Time-Stamping}, for details.
 
+@item --no-use-server-timestamps
+Don't set the local file's timestamp by the one on the server.
+
+By default, when a file is downloaded, it's timestamps are set to
+match those from the remote file. This allows the use of
+@samp{--timestamping} on subsequent invocations of wget. However, it
+is sometimes useful to base the local file's timestamp on when it was
+actually downloaded; for that purpose, the
+@samp{--no-use-server-timestamps} option has been provided.
+
 @cindex server response, print
 @item -S
 @itemx --server-response
@@ -3157,6 +3167,10 @@ Set all applicable timeout values to @var{n}, the same as @samp{-T
 @item timestamping = on/off
 Turn timestamping on/off.  The same as @samp{-N} (@pxref{Time-Stamping}).
 
+@item use_server_timestamps = on/off
+If set to @samp{off}, Wget won't set the local file's timestamp by the
+one on the server (same as @samp{--no-use-server-timestamps}).
+
 @item tries = @var{n}
 Set number of retries per @sc{url}---the same as @samp{-t @var{n}}.
 
index 13943bf40cf1254d4ddb7239e4375139772044e6..e13f6589a963ff03b998e4f19bb89c9938d753b1 100644 (file)
@@ -1,6 +1,12 @@
+2010-01-09  Micah Cowan  <micah@cowan.name>
+
+       * init.c, main.c, http.c, ftp.c, options.h: Renamed
+       --no-match-server-timestamps to --no-use-server-timestamps, and
+       add it to print_help.
+
 2010-01-09  David Holman  <holman.david@gmail.com>  (tiny change)
 
-       * init.c, main.c, http.c, ftp.c: Added support for
+       * init.c, main.c, http.c, ftp.c, options.h: Added support for
        --no-match-server-timestamps.
 
 2009-12-03  Peter Rosin  <peda@lysator.liu.se>
index 73cade4227bda82466704d46435e3955f62fdbfa..d141b024a601aa2e51db1f707db83269a3e5bf1b 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -1849,7 +1849,7 @@ Already have correct symlink %s -> %s\n\n"),
          original.  :( */
       if (actual_target != NULL)
         {
-          if (opt.matchservertimestamps
+          if (opt.useservertimestamps
               && !(f->type == FT_SYMLINK && !opt.retr_symlinks)
               && f->tstamp != -1
               && dlthis
index 5fdff618396bd5926d77f24f570afd0a0ded180d..b0a9f2464d0f26744b69be9c615212472f47b325 100644 (file)
@@ -2909,7 +2909,7 @@ Remote file exists.\n\n"));
             } /* send_head_first */
         } /* !got_head */
 
-      if (opt.matchservertimestamps
+      if (opt.useservertimestamps
           && (tmr != (time_t) (-1))
           && ((hstat.len == hstat.contlen) ||
               ((hstat.res == 0) && (hstat.contlen == -1))))
index c04414a3b2fb63f66c6eaae590ed678fb8e11172..16a4d9d29438e1bd288bd36ca9903fb6dcce1b10 100644 (file)
@@ -197,7 +197,6 @@ static const struct {
   { "localencoding",    &opt.locale,            cmd_string },
   { "logfile",          &opt.lfilename,         cmd_file },
   { "login",            &opt.ftp_user,          cmd_string },/* deprecated*/
-  { "matchservertimestamps", &opt.matchservertimestamps, cmd_boolean },
   { "maxredirect",      &opt.max_redirect,      cmd_number },
   { "mirror",           NULL,                   cmd_spec_mirror },
   { "netrc",            &opt.netrc,             cmd_boolean },
@@ -256,6 +255,7 @@ static const struct {
   { "useproxy",         &opt.use_proxy,         cmd_boolean },
   { "user",             &opt.user,              cmd_string },
   { "useragent",        NULL,                   cmd_spec_useragent },
+  { "useservertimestamps", &opt.useservertimestamps, cmd_boolean },
   { "verbose",          NULL,                   cmd_spec_verbose },
   { "wait",             &opt.wait,              cmd_time },
   { "waitretry",        &opt.waitretry,         cmd_time },
@@ -355,7 +355,7 @@ defaults (void)
   opt.locale = NULL;
   opt.encoding_remote = NULL;
 
-  opt.matchservertimestamps = true;
+  opt.useservertimestamps = true;
 }
 \f
 /* Return the user's home directory (strdup-ed), or NULL if none is
index a76eef03481845167ee92fa03d0f56eded74e2b1..b41277ba841355a66c8f49df7f7632676a206b3d 100644 (file)
@@ -218,7 +218,6 @@ static struct cmdline_option option_data[] =
     { "limit-rate", 0, OPT_VALUE, "limitrate", -1 },
     { "load-cookies", 0, OPT_VALUE, "loadcookies", -1 },
     { "local-encoding", 0, OPT_VALUE, "localencoding", -1 },
-    { "match-server-timestamps", 0, OPT_BOOLEAN, "matchservertimestamps", -1 },
     { "max-redirect", 0, OPT_VALUE, "maxredirect", -1 },
     { "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
     { "no", 'n', OPT__NO, NULL, required_argument },
@@ -267,6 +266,7 @@ static struct cmdline_option option_data[] =
     { "timeout", 'T', OPT_VALUE, "timeout", -1 },
     { "timestamping", 'N', OPT_BOOLEAN, "timestamping", -1 },
     { "tries", 't', OPT_VALUE, "tries", -1 },
+    { "use-server-timestamps", 0, OPT_BOOLEAN, "useservertimestamps", -1 },
     { "user", 0, OPT_VALUE, "user", -1 },
     { "user-agent", 'U', OPT_VALUE, "useragent", -1 },
     { "verbose", 'v', OPT_BOOLEAN, "verbose", -1 },
@@ -458,6 +458,9 @@ Download:\n"),
   -N,  --timestamping            don't re-retrieve files unless newer than\n\
                                  local.\n"),
     N_("\
+  --no-use-server-timestamps     don't set the local file's timestamp by\n\
+                                 the one on the server.\n"),
+    N_("\
   -S,  --server-response         print server response.\n"),
     N_("\
        --spider                  don't download anything.\n"),
index 5488e2687d6d4ecf1f301f76f47005918b1fde02..4e5d7203cd19eb48f4b2aa25c92800cb69d72124 100644 (file)
@@ -246,7 +246,7 @@ struct options
   int ftp_stmlf;                /* Force Stream_LF format for binary FTP. */
 #endif /* def __VMS */
 
-  bool matchservertimestamps;  /* Update downloaded files' timestamps to
+  bool useservertimestamps;    /* Update downloaded files' timestamps to
                                   match those on server? */
 
 };