rsync.git
15 years agoAdded a warning message when a file fails to verify, letting the user
Wayne Davison [Thu, 22 Jul 2004 04:15:18 +0000 (04:15 +0000)]
Added a warning message when a file fails to verify, letting the user
know if we retained it or discarded it.  Especially useful for batch-
reading mode where the old code could look like it did the update when
it really silently failed.

15 years agoAdded even more double-quoting.
Wayne Davison [Thu, 22 Jul 2004 03:23:04 +0000 (03:23 +0000)]
Added even more double-quoting.

15 years agoNo need to check both delete_after and delete_mode since the former
Wayne Davison [Thu, 22 Jul 2004 02:52:57 +0000 (02:52 +0000)]
No need to check both delete_after and delete_mode since the former
implies the latter.

15 years agoIn read_batch mode, we read ints from the new batch_gen_fd pipe and
Wayne Davison [Wed, 21 Jul 2004 23:59:37 +0000 (23:59 +0000)]
In read_batch mode, we read ints from the new batch_gen_fd pipe and
only process the updates from the batch file when the generator has
indicated that it is ready (which ensures that all the necessary
dirs have been created).

15 years agoGot rid of read_batch special case.
Wayne Davison [Wed, 21 Jul 2004 23:59:33 +0000 (23:59 +0000)]
Got rid of read_batch special case.

15 years agoSetup for read_batch mode a little differently:
Wayne Davison [Wed, 21 Jul 2004 23:59:31 +0000 (23:59 +0000)]
Setup for read_batch mode a little differently:
- Avoid calling local_child().
- Create a pipe that lets the generator send us index values.
- Set batch_gen_fd for the receiver to read the pipe.

15 years agoAdded batch_gen_fd.
Wayne Davison [Wed, 21 Jul 2004 23:59:28 +0000 (23:59 +0000)]
Added batch_gen_fd.

15 years agoIn read_batch mode, we now let the code write out the index value
Wayne Davison [Wed, 21 Jul 2004 23:59:25 +0000 (23:59 +0000)]
In read_batch mode, we now let the code write out the index value
to the f_out pipe before we return from recv_generator().  This gives
the receiver something to sync with so that it doesn't rush ahead of
us (which could be bad if we didn't have a chance to create the
destination dirs yet).

15 years agoDon't write out the protocol_version number in read_batch mode.
Wayne Davison [Wed, 21 Jul 2004 23:59:22 +0000 (23:59 +0000)]
Don't write out the protocol_version number in read_batch mode.

15 years agoComplain if the user combines --read-batch with --files-from.
Wayne Davison [Wed, 21 Jul 2004 22:50:11 +0000 (22:50 +0000)]
Complain if the user combines --read-batch with --files-from.

15 years agoImproved the test a little.
Wayne Davison [Wed, 21 Jul 2004 21:06:13 +0000 (21:06 +0000)]
Improved the test a little.

15 years agoAdding a test for the --compare-dest option.
Wayne Davison [Wed, 21 Jul 2004 20:58:32 +0000 (20:58 +0000)]
Adding a test for the --compare-dest option.

15 years agoA couple am_sender checks (one negated) were not needed.
Wayne Davison [Wed, 21 Jul 2004 20:17:02 +0000 (20:17 +0000)]
A couple am_sender checks (one negated) were not needed.

15 years agoCall map_file() with the new block_size arg (had to delay the
Wayne Davison [Tue, 20 Jul 2004 21:35:58 +0000 (21:35 +0000)]
Call map_file() with the new block_size arg (had to delay the
call to map_file() until the block size was known).

15 years ago- Call map_file() with the new block_size arg (had to delay the
Wayne Davison [Tue, 20 Jul 2004 21:35:55 +0000 (21:35 +0000)]
- Call map_file() with the new block_size arg (had to delay the
  call to map_file() until the block size was known).
- Got rid of the setting of max_map_size.

15 years ago- Added a new block_size arg to map_file(). Use it to set the
Wayne Davison [Tue, 20 Jul 2004 21:35:52 +0000 (21:35 +0000)]
- Added a new block_size arg to map_file().  Use it to set the
  new def_window_size member variable.
- Got rid of max_map_size global (we use def_window_size now).

15 years ago- Got rid of cleanup_buf (map-file cleanup is not needed).
Wayne Davison [Tue, 20 Jul 2004 21:35:49 +0000 (21:35 +0000)]
- Got rid of cleanup_buf (map-file cleanup is not needed).
- Renamed the cleanup_fd* vars.

15 years agoCall map_file() with its new block_size arg.
Wayne Davison [Tue, 20 Jul 2004 21:35:46 +0000 (21:35 +0000)]
Call map_file() with its new block_size arg.

15 years agoTweaked an error message.
Wayne Davison [Tue, 20 Jul 2004 21:10:20 +0000 (21:10 +0000)]
Tweaked an error message.

15 years agoAdded a def_window_size variable to struct map_struct.
Wayne Davison [Tue, 20 Jul 2004 21:08:33 +0000 (21:08 +0000)]
Added a def_window_size variable to struct map_struct.

15 years ago- More batch-file improvements.
Wayne Davison [Tue, 20 Jul 2004 18:12:50 +0000 (18:12 +0000)]
- More batch-file improvements.
- A few spelling fixes.

15 years agoWe now append the exclude list as a "here" document to the end of
Wayne Davison [Tue, 20 Jul 2004 17:07:55 +0000 (17:07 +0000)]
We now append the exclude list as a "here" document to the end of
the BATCH.sh file.

15 years agoMade write_sbuf() non-static.
Wayne Davison [Tue, 20 Jul 2004 16:57:18 +0000 (16:57 +0000)]
Made write_sbuf() non-static.

15 years agoChanged write_batch_argvs_file() to new write_batch_shell_file()
Wayne Davison [Mon, 19 Jul 2004 17:11:41 +0000 (17:11 +0000)]
Changed write_batch_argvs_file() to new write_batch_shell_file()
call (with extra arg).

15 years agoAdded new function discard_receive_data().
Wayne Davison [Mon, 19 Jul 2004 17:05:01 +0000 (17:05 +0000)]
Added new function discard_receive_data().

15 years ago- Don't allow some crafty user to try to force us to update a
Wayne Davison [Mon, 19 Jul 2004 16:37:30 +0000 (16:37 +0000)]
- Don't allow some crafty user to try to force us to update a
  server-excluded file.
- If get_tmpname() fails we need to discard the update using
  receive_data().

15 years agoDo a better job of writing out the BATCH.sh file (i.e. quote special
Wayne Davison [Mon, 19 Jul 2004 08:27:17 +0000 (08:27 +0000)]
Do a better job of writing out the BATCH.sh file (i.e. quote special
characters and spaces in args, omit all the source args, omit the
include/exclude args if we can).

15 years agoChanged batch.rsync_argvs to batch.sh.
Wayne Davison [Mon, 19 Jul 2004 03:59:35 +0000 (03:59 +0000)]
Changed batch.rsync_argvs to batch.sh.

15 years agoFixed the argv munging to work properly regardless of whether the
Wayne Davison [Mon, 19 Jul 2004 00:53:49 +0000 (00:53 +0000)]
Fixed the argv munging to work properly regardless of whether the
user specified a trailing '=VALUE' or put the value in a separate
arg.

15 years agoA very minor optimization was made to read_sbuf(), read_byte(),
Wayne Davison [Sat, 17 Jul 2004 21:17:34 +0000 (21:17 +0000)]
A very minor optimization was made to read_sbuf(), read_byte(),
write_sbuf(), and write_byte().

15 years ago- Improved the warning about --inplace.
Wayne Davison [Sat, 17 Jul 2004 16:44:16 +0000 (16:44 +0000)]
- Improved the warning about --inplace.
- Fixed the sentence describing how to read standard input with
  --read-batch.

15 years agoMoved the read_batch abort check below the code that handles the
Wayne Davison [Sat, 17 Jul 2004 16:29:10 +0000 (16:29 +0000)]
Moved the read_batch abort check below the code that handles the
symlinks and devices.

15 years agoRevamped some of the io variables and calls to make the various I/O
Wayne Davison [Sat, 17 Jul 2004 15:20:00 +0000 (15:20 +0000)]
Revamped some of the io variables and calls to make the various I/O
functions seemlessly work on fds that aren't for the main socket. This
involved changing some fd-variable names (to make them clearer), adding
io_set_sock_fds(), and making input buffering have a better enabled
flag (via an allocated buffer, just like the output buffering).  I also
got rid of the fd arg to some functions where the fd arg could only
specify the input or output fd for the socket (which we already know).

15 years agoGot rid of the arg to io_start_multiplex_out().
Wayne Davison [Sat, 17 Jul 2004 15:19:57 +0000 (15:19 +0000)]
Got rid of the arg to io_start_multiplex_out().

15 years ago- Got rid of the arg to the io_start_multiplex_{in,out}() calls.
Wayne Davison [Sat, 17 Jul 2004 15:19:54 +0000 (15:19 +0000)]
- Got rid of the arg to the io_start_multiplex_{in,out}() calls.
- Call io_set_sock_fds().

15 years agoChanged a MIN() to a MAX() when setting max_map_size.
Wayne Davison [Sat, 17 Jul 2004 10:59:14 +0000 (10:59 +0000)]
Changed a MIN() to a MAX() when setting max_map_size.

15 years agoMention the new --inplace option.
Wayne Davison [Sat, 17 Jul 2004 00:00:27 +0000 (00:00 +0000)]
Mention the new --inplace option.

15 years agoMy version of Mark Curtis's --inplace option.
Wayne Davison [Fri, 16 Jul 2004 20:06:24 +0000 (20:06 +0000)]
My version of Mark Curtis's --inplace option.

15 years agoAdded a check for ftruncate.
Wayne Davison [Fri, 16 Jul 2004 20:04:20 +0000 (20:04 +0000)]
Added a check for ftruncate.

15 years agoAvoid some useless memory copying.
Wayne Davison [Fri, 16 Jul 2004 18:08:52 +0000 (18:08 +0000)]
Avoid some useless memory copying.

15 years ago- Limit the maximum block size we compute for a file.
Wayne Davison [Fri, 16 Jul 2004 18:04:23 +0000 (18:04 +0000)]
- Limit the maximum block size we compute for a file.
- Set max_map_size based on the current file's block size (so that
  map_ptr() is more efficient with large blocks).

15 years agoAdded a max_map_size variable, initialized to MAX_MAP_SIZE.
Wayne Davison [Fri, 16 Jul 2004 18:02:30 +0000 (18:02 +0000)]
Added a max_map_size variable, initialized to MAX_MAP_SIZE.

15 years agoLimit the block-size that the user can specify.
Wayne Davison [Fri, 16 Jul 2004 18:01:30 +0000 (18:01 +0000)]
Limit the block-size that the user can specify.

15 years agoImproved a sentence about --whole-file.
Wayne Davison [Fri, 16 Jul 2004 17:14:55 +0000 (17:14 +0000)]
Improved a sentence about --whole-file.

15 years agoMake wf_writeBufSize based on a multiple of WRITE_SIZE instead
Wayne Davison [Fri, 16 Jul 2004 01:32:02 +0000 (01:32 +0000)]
Make wf_writeBufSize based on a multiple of WRITE_SIZE instead
of the unrelated MAX_MAP_SIZE.

15 years ago- Complain and die if --dry-run is used with a batch option.
Wayne Davison [Thu, 15 Jul 2004 19:06:32 +0000 (19:06 +0000)]
- Complain and die if --dry-run is used with a batch option.
- Improved the warning if a batch option gets sent to the server.

15 years agoChanged the batch examples to show how to do a remote read-batch
Wayne Davison [Thu, 15 Jul 2004 19:04:54 +0000 (19:04 +0000)]
Changed the batch examples to show how to do a remote read-batch
without first transferring the batch file.

15 years agoExpanded the comment on the new batch code.
Wayne Davison [Thu, 15 Jul 2004 19:03:50 +0000 (19:03 +0000)]
Expanded the comment on the new batch code.

15 years agoMention that "-" can be used with --read-batch for reading from stdin.
Wayne Davison [Thu, 15 Jul 2004 17:56:11 +0000 (17:56 +0000)]
Mention that "-" can be used with --read-batch for reading from stdin.

15 years agoAllow --read-batch=- to indicate stdin.
Wayne Davison [Thu, 15 Jul 2004 17:01:51 +0000 (17:01 +0000)]
Allow --read-batch=- to indicate stdin.

15 years agoWe no longer refer to a batch "prefix".
Wayne Davison [Thu, 15 Jul 2004 16:27:02 +0000 (16:27 +0000)]
We no longer refer to a batch "prefix".

15 years agoMention new batch-mode changes.
Wayne Davison [Thu, 15 Jul 2004 03:13:09 +0000 (03:13 +0000)]
Mention new batch-mode changes.

15 years agoMy modified version of Chris Shoemaker's improved batch-file handling.
Wayne Davison [Thu, 15 Jul 2004 02:20:08 +0000 (02:20 +0000)]
My modified version of Chris Shoemaker's improved batch-file handling.

15 years agoMention recent changes.
Wayne Davison [Wed, 14 Jul 2004 17:11:53 +0000 (17:11 +0000)]
Mention recent changes.

15 years agoTweaked some single-line ifs.
Wayne Davison [Wed, 14 Jul 2004 16:41:10 +0000 (16:41 +0000)]
Tweaked some single-line ifs.

15 years agoThe "len" to generate_and_send_sums() is supposed to be an OFF_T.
Wayne Davison [Wed, 14 Jul 2004 16:40:08 +0000 (16:40 +0000)]
The "len" to generate_and_send_sums() is supposed to be an OFF_T.

15 years agoCommitted a space-tweak from Chris Shoemaker.
Wayne Davison [Wed, 14 Jul 2004 16:39:08 +0000 (16:39 +0000)]
Committed a space-tweak from Chris Shoemaker.

15 years agoImproved the write_batch_argvs_file() routine so that it doesn't
Wayne Davison [Wed, 14 Jul 2004 07:20:18 +0000 (07:20 +0000)]
Improved the write_batch_argvs_file() routine so that it doesn't
need the character buffers and so that it properly removes the
hostname from the destination arg.

15 years agoGot rid of the disable_deltas_p() function (the whole_file value
Wayne Davison [Tue, 13 Jul 2004 01:45:51 +0000 (01:45 +0000)]
Got rid of the disable_deltas_p() function (the whole_file value
is now fully set before the generator forks).

15 years agoWe now conditionally turn on whole_file in do_cmd() right before
Wayne Davison [Tue, 13 Jul 2004 01:44:03 +0000 (01:44 +0000)]
We now conditionally turn on whole_file in do_cmd() right before
calling local_child().

15 years agoIn generate_files(), changed arg "f" to "f_out", as Chris Shoemaker
Wayne Davison [Mon, 12 Jul 2004 20:42:48 +0000 (20:42 +0000)]
In generate_files(), changed arg "f" to "f_out", as Chris Shoemaker
suggested.

15 years agoMade hard_link_check() compile when SUPPORT_HARD_LINKS isn't enabled.
Wayne Davison [Mon, 12 Jul 2004 07:03:28 +0000 (07:03 +0000)]
Made hard_link_check() compile when SUPPORT_HARD_LINKS isn't enabled.

15 years agoUse want_i instead of last_i+1.
Wayne Davison [Wed, 7 Jul 2004 08:38:40 +0000 (08:38 +0000)]
Use want_i instead of last_i+1.

15 years agoMake the GID_NONE define a little safer.
Wayne Davison [Wed, 7 Jul 2004 08:25:13 +0000 (08:25 +0000)]
Make the GID_NONE define a little safer.

15 years agoAdded some missing $(srcdir) references.
Wayne Davison [Sun, 4 Jul 2004 08:56:31 +0000 (08:56 +0000)]
Added some missing $(srcdir) references.

15 years agoChanged a "for" loop into a "do ... while" loop.
Wayne Davison [Sun, 4 Jul 2004 08:07:23 +0000 (08:07 +0000)]
Changed a "for" loop into a "do ... while" loop.

15 years agoOptimized away a loop in hash_search().
Wayne Davison [Fri, 2 Jul 2004 23:35:30 +0000 (23:35 +0000)]
Optimized away a loop in hash_search().

15 years agoSome formatting tweaks.
Wayne Davison [Fri, 2 Jul 2004 18:23:57 +0000 (18:23 +0000)]
Some formatting tweaks.

15 years agoMoved the verbose message about renaming the finished file down into
Wayne Davison [Fri, 2 Jul 2004 18:13:53 +0000 (18:13 +0000)]
Moved the verbose message about renaming the finished file down into
finish_transfer() so that it only gets output when we're actually going
to rename the file.

15 years agoTweaked some formatting.
Wayne Davison [Fri, 2 Jul 2004 18:12:24 +0000 (18:12 +0000)]
Tweaked some formatting.

15 years agoSome simple whitespace tweaks.
Wayne Davison [Wed, 30 Jun 2004 07:27:30 +0000 (07:27 +0000)]
Some simple whitespace tweaks.

15 years agoMade recv_generator static.
Wayne Davison [Tue, 29 Jun 2004 19:19:00 +0000 (19:19 +0000)]
Made recv_generator static.

15 years agoOptimized away a call to cmp_modtime() for a compare-dest file.
Wayne Davison [Tue, 29 Jun 2004 16:22:54 +0000 (16:22 +0000)]
Optimized away a call to cmp_modtime() for a compare-dest file.

15 years agoMention the extended argv-overflow checking.
Wayne Davison [Tue, 29 Jun 2004 15:13:18 +0000 (15:13 +0000)]
Mention the extended argv-overflow checking.

15 years agoTweaked an overly-long line.
Wayne Davison [Tue, 29 Jun 2004 15:12:01 +0000 (15:12 +0000)]
Tweaked an overly-long line.

15 years agoA few more improvements to the anti-overflow args[] checking.
Wayne Davison [Mon, 28 Jun 2004 17:45:40 +0000 (17:45 +0000)]
A few more improvements to the anti-overflow args[] checking.

15 years agoMake sure that do_cmd() doesn't overflow its arg-pointer array
Wayne Davison [Mon, 28 Jun 2004 17:25:14 +0000 (17:25 +0000)]
Make sure that do_cmd() doesn't overflow its arg-pointer array
(which was also made larger).

15 years agoGot rid of a couple unneeded assignments.
Wayne Davison [Thu, 24 Jun 2004 04:46:02 +0000 (04:46 +0000)]
Got rid of a couple unneeded assignments.

15 years agoRestoring correct skip_file() return semantics.
Wayne Davison [Wed, 23 Jun 2004 21:21:19 +0000 (21:21 +0000)]
Restoring correct skip_file() return semantics.

15 years agoThought skip_file() wasn't returning 1 for "skip" and 0 or "keep"
Wayne Davison [Wed, 23 Jun 2004 16:51:21 +0000 (16:51 +0000)]
Thought skip_file() wasn't returning 1 for "skip" and 0 or "keep"
so I reversed the return.

15 years agoFixed a newly-introduced problem in read_timeout() where FD_ZERO(&w_fds)
Wayne Davison [Wed, 23 Jun 2004 01:13:09 +0000 (01:13 +0000)]
Fixed a newly-introduced problem in read_timeout() where FD_ZERO(&w_fds)
wasn't always called before w_fds was used.

15 years agoSome trivial format tweaks.
Wayne Davison [Sun, 20 Jun 2004 21:48:06 +0000 (21:48 +0000)]
Some trivial format tweaks.

15 years agoMentioned the latest socket change and fixed a few typos.
Wayne Davison [Sun, 20 Jun 2004 20:37:06 +0000 (20:37 +0000)]
Mentioned the latest socket change and fixed a few typos.

15 years agoRestored the code in the IPV6_V6ONLY section that checks the
Wayne Davison [Sun, 20 Jun 2004 19:51:19 +0000 (19:51 +0000)]
Restored the code in the IPV6_V6ONLY section that checks the
return value from setsockopt() with one improvement:  if the
user has used --ipv6 (-6) we don't discard the IPv6 socket.
This should help people using older Linux kernels that don't
implement IPv6 support quite right.

15 years agoTweaked a comment.
Wayne Davison [Sun, 20 Jun 2004 19:47:05 +0000 (19:47 +0000)]
Tweaked a comment.

15 years agoMust not call check_timeout() before checking the errno value.
Wayne Davison [Sat, 19 Jun 2004 07:09:57 +0000 (07:09 +0000)]
Must not call check_timeout() before checking the errno value.

15 years agoAdded some missing changes.
Wayne Davison [Sat, 19 Jun 2004 06:55:58 +0000 (06:55 +0000)]
Added some missing changes.

15 years agoSome minor improved sentences.
Wayne Davison [Sat, 19 Jun 2004 05:52:45 +0000 (05:52 +0000)]
Some minor improved sentences.

15 years agoTweaked some comments.
Wayne Davison [Fri, 18 Jun 2004 16:55:12 +0000 (16:55 +0000)]
Tweaked some comments.

15 years agoSome helpful comments from Chris Shoemaker.
Wayne Davison [Fri, 18 Jun 2004 16:50:20 +0000 (16:50 +0000)]
Some helpful comments from Chris Shoemaker.

15 years agoFixed some typos in a comment, moved an extern, and made a few
Wayne Davison [Fri, 18 Jun 2004 16:30:24 +0000 (16:30 +0000)]
Fixed some typos in a comment, moved an extern, and made a few
minor format tweaks.

15 years agoImproved a comment.
Wayne Davison [Fri, 18 Jun 2004 16:29:21 +0000 (16:29 +0000)]
Improved a comment.

15 years agoMoved the externs to the top and made a few trivial format tweaks.
Wayne Davison [Fri, 18 Jun 2004 16:22:14 +0000 (16:22 +0000)]
Moved the externs to the top and made a few trivial format tweaks.

15 years agoGot rid of some trailing whitespace.
Wayne Davison [Fri, 18 Jun 2004 16:00:33 +0000 (16:00 +0000)]
Got rid of some trailing whitespace.

15 years agoIf --partial was specified, make sure that make_backup is turned
Wayne Davison [Mon, 14 Jun 2004 15:09:36 +0000 (15:09 +0000)]
If --partial was specified, make sure that make_backup is turned
off during the second (retry) phase of the transfer to avoid
making a second backup of a file (which would lose the original).

15 years agoAdded a short msleep() after option_error() before we exit. This
Wayne Davison [Sun, 13 Jun 2004 14:18:48 +0000 (14:18 +0000)]
Added a short msleep() after option_error() before we exit.  This
ensures that the remote client has time to read our error message
while it is trying to write data to us before it gets a socket
error.

15 years agoChanged the new code in delete_one() so that some compilers
Wayne Davison [Sat, 12 Jun 2004 21:30:07 +0000 (21:30 +0000)]
Changed the new code in delete_one() so that some compilers
don't complain about returning a value from a void function.

15 years agoMention the bugfix in option-parsing error-reporting from a daemon.
Wayne Davison [Sat, 12 Jun 2004 18:27:04 +0000 (18:27 +0000)]
Mention the bugfix in option-parsing error-reporting from a daemon.

15 years ago- Changed some FERROR log calls to FLOG.
Wayne Davison [Sat, 12 Jun 2004 18:22:39 +0000 (18:22 +0000)]
- Changed some FERROR log calls to FLOG.
- Improved the option-error-reporting to actually get the error back
  to the user (by getting I/O multiplexing started).

15 years ago- Made readlink_stat() and link_stat() optionally follow a symlink
Wayne Davison [Fri, 11 Jun 2004 07:40:57 +0000 (07:40 +0000)]
- Made readlink_stat() and link_stat() optionally follow a symlink
  to a dir.  This fixes deletions inside "kept" symlinked dirs.
- Call link_stat() with its new arg (for --keep-dirlinks support).