Wayne Davison [Sat, 26 Feb 2005 18:03:49 +0000 (18:03 +0000)]
- Moved all the file-deletion code here from flist.c and receiver.c.
- Call maybe_send_keepalive() from delete_in_dir() so that a really
long delete-pass won't timeout.
- Renamed delete_files() -> do_delete_pass().
- Renamed delete_file() -> delete_item().
- Call get_dirlist() with its new arg.
Wayne Davison [Sat, 26 Feb 2005 18:03:46 +0000 (18:03 +0000)]
- Moved file-deletion code into generator.c.
- Made filesystem_dev a global that the generator can set during its
delete pass.
- Fixed an off-by-one boundary check in send_directory().
- Added an arg to get_dirlist() so that delete_in_dir() can call it
efficiently.
Wayne Davison [Sat, 26 Feb 2005 06:52:55 +0000 (06:52 +0000)]
- Moved the initialization of "itemizing", "maybe_PERMS_REPORT", and
"code" from recv_generator() to generate_files() so that they
don't get recomputed for every file (we pass them as args now).
- Allow protocols < 29 to call maybe_send_keepalive() so that we can
try to flush the output buffer if things are slow (though we can't
send a keep-alive packet without protocol_version >= 29).
Wayne Davison [Sat, 26 Feb 2005 04:49:30 +0000 (04:49 +0000)]
The log_delete() function may now be called even when the client is
not getting delete messages, which ensures that the daemon's log-
file output includes all deletions when per-file logging is enabled.
Wayne Davison [Fri, 25 Feb 2005 21:58:13 +0000 (21:58 +0000)]
- Added variable "ignore_timeout" that lets the generator tell
us to ignore a timeout without turning off the timeout-related
time-keeping that the keep-alive processing needs.
- Added a new function: maybe_send_keepalive().
Wayne Davison [Fri, 25 Feb 2005 17:08:31 +0000 (17:08 +0000)]
Got rid of kluged value for am_sender, and instead added a new
variable named am_starting_up that is non-zero during the option
parsing. This lets the who_am_i() routine output a better value
for debugging info that is output during the option parsing.
Wayne Davison [Wed, 23 Feb 2005 02:56:42 +0000 (02:56 +0000)]
- Fixed a problem with full_fname() when curr_dir was "/".
- Made full_fname() consistently output a leading "/" for
module paths no matter if chroot is in use or not.
Wayne Davison [Tue, 22 Feb 2005 21:43:59 +0000 (21:43 +0000)]
We now look for the ITEM_USING_ALT_BASIS flag for an --inplace
transer that is using an alternate basis file (instead of reading
an extra byte after the flag word).
Wayne Davison [Tue, 22 Feb 2005 21:43:57 +0000 (21:43 +0000)]
We now set the ITEM_USING_ALT_BASIS flag for an --inplace transfer
that is using an alternate basis file (instead of sending an extra
byte after the flag word).
Wayne Davison [Tue, 22 Feb 2005 03:16:41 +0000 (03:16 +0000)]
- Iterate through the deletion list in reverse order so that we
can't delete a backup file that we just created.
- The rename-directory-for-backup heuristic now checks the
DEL_FORCE_RECURSE flag, not the zap_dir variable. We also set
the flag when we recurse so that only the root dir of a deleted
hierarchy can be missing the flag (and thus be a call from the
generator).
Wayne Davison [Tue, 22 Feb 2005 00:42:12 +0000 (00:42 +0000)]
A couple changes in delete_file() make us more compatible with
older versions: (1) we no longer complain if excluded files
sticking around cause us to not be able to remove a subdir, and
(2) we output the name of the removed subdir after it has been
successfully removed.
Wayne Davison [Mon, 21 Feb 2005 10:50:32 +0000 (10:50 +0000)]
- Moved delete_file() into flist.c.
- No need to separately test for (make_backups && !backup_dir)
because omit_dir_times is now set under those circumstances.
Wayne Davison [Mon, 21 Feb 2005 10:50:30 +0000 (10:50 +0000)]
- Moved delete_file() here from rsync.c and improved it to avoid
removing files we just backed up to the current directory and to
rename a non-empty dir to dir~ (when no backup-dir is specified).
- Made delete_missing() static.
Wayne Davison [Mon, 21 Feb 2005 10:03:23 +0000 (10:03 +0000)]
- Set omit_dir_times if backing up files w/o a backup dir.
- Only send an explicitly specified -O (--omit-dir-times)
if it won't be inferred by the receiver.
Wayne Davison [Sun, 20 Feb 2005 20:55:24 +0000 (20:55 +0000)]
Changed the memory implementation of --delay-updates so that it
only allocates memory to store needed bits, it sparsely allocates
the bits in 16KB chunks, and the bit-finding loop works in a more
efficient manner.
Wayne Davison [Sun, 20 Feb 2005 01:04:54 +0000 (01:04 +0000)]
- For every file that we send off to the receiver, mark it with
FLAG_SENT.
- Added successful_send(), which is called when MSG_SUCCESS was
received from the receiver/generator side. This function
validates the message, and removes the indicated file/symlink
(assuming that remove_sent_files was actually set).
Wayne Davison [Sun, 20 Feb 2005 01:04:49 +0000 (01:04 +0000)]
- If --remove-sent-files was specified, abort if we're pulling from
a read-only module.
- If need_messages_from_generator is set, make sure that the
connection between the generator to the sender has multiplexed
I/O enabled.