Wayne Davison [Sat, 19 Feb 2005 23:41:52 +0000 (23:41 +0000)]
- Needed to use a name buffer in delete_missing() to avoid having
a recursive delete reuse our buffer from f_name().
- Moved the backup-handling into delete_file() in rsync.c.
- Moved the --max-delete counting into delete_file() in rsync.c.
Wayne Davison [Sat, 19 Feb 2005 22:16:53 +0000 (22:16 +0000)]
When logging PERMS_REPORT messages, send them with the FCLIENT code
if the daemon has "%i" in its log message (because it already got a
detailed log message from the generator).
Wayne Davison [Sat, 19 Feb 2005 22:16:50 +0000 (22:16 +0000)]
- Always send the itemized-info bytes on to the receiver. This
not only ensures that batch files are created consistently for
push and pull, but allows a daemon to log itemized changes.
- Improved the logging of itemized changes for the daemon.
- Make sure we debug-log our presence in send_files().
Wayne Davison [Sat, 19 Feb 2005 22:16:45 +0000 (22:16 +0000)]
Make use of new variables (log_format_has_i, log_format_has_o_or_i,
and daemon_log_format_has_i) and the new FCLIENT logging code to
output stats in the best way possible for both the client and the
daemon.
Wayne Davison [Sat, 19 Feb 2005 22:16:41 +0000 (22:16 +0000)]
The FCLIENT log code aviods putting the message into the daemon's
log file and instead sends a FINFO message to the client. This is
used when the daemon wants to log a better message locally than it
is sending to the client. Improved log_delete() to make use of this
idiom if it needs to log a separate delete message for the daemon
and the client.
Wayne Davison [Sat, 19 Feb 2005 22:16:39 +0000 (22:16 +0000)]
- Added log_format_has_i.
- Fixed a problem withe option-refusing code when it refuses the
daemon options.
- Don't sent --itemize-changes (-i) to the server -- send an
improved --log-format value instead.
Wayne Davison [Sat, 19 Feb 2005 19:36:54 +0000 (19:36 +0000)]
We now use a regular expression to parse the (restored to its previous
version) default logfile format. Added parsing for a version of the
default logfile format where %o has been replaced with %i.
Wayne Davison [Sat, 19 Feb 2005 03:54:11 +0000 (03:54 +0000)]
- Set new variable, log_format_has_o_or_i.
- Make sure that -i can't be set w/o an actual %i in the log_format.
- Only need to pass -i to server if we're the sender.
- Only need to pass some --log-format information to the server in
certain circumstances.
Wayne Davison [Sat, 19 Feb 2005 03:12:21 +0000 (03:12 +0000)]
Rules read in from per-dir merge files need to have non-applicable
rules filtered out before the rule gets stored (not in a post-
filtering pass like the rules that are read-in prior to the run).
Wayne Davison [Sat, 19 Feb 2005 02:39:30 +0000 (02:39 +0000)]
Notify the remote side about -i (if either specified or inferred from
the user's --log-format string) and, if we're not verbose but we're
logging messages, let the server know that --log-format was specified.
Wayne Davison [Sat, 19 Feb 2005 02:39:26 +0000 (02:39 +0000)]
- Tweaked the letters output by "%i", including adding support for
logging a deleted item and an identical item.
- Added log_delete(), a routine that either logs the fact that a
deletion happened, or sends a MSG_DELETED message to the client
side (or both if we're a daemon server receiver).
Wayne Davison [Sat, 19 Feb 2005 02:39:23 +0000 (02:39 +0000)]
- Changed the calling args to delete_file() to take an st_mode instead
of a DEL_DIR flag.
- Call log_delete() instead of outputting "deleting ..." messages..
- Log deletions if either verbose or log-format is specified.
Wayne Davison [Sat, 19 Feb 2005 02:39:21 +0000 (02:39 +0000)]
- Send the itemized data for every file, changed or not, if verbose > 1.
- Don't call set_perms() with PERMS_REPORT if we're itemizing changes.
- Don't call delete_file() with DEL_TERSE if we're itemizing changes.
- Call delete_file() with its new arg.
Wayne Davison [Sat, 19 Feb 2005 02:39:18 +0000 (02:39 +0000)]
- Allow send_msg() to be called by the delete code in flist.c and
have it figure out if it should send the message to our sibling
or the other side.
- Handle the new MSG_DELETED message in both the generator and the
sender. This message is used to let the client side log each
deletion when the server side is the receiver.
Wayne Davison [Fri, 18 Feb 2005 20:17:20 +0000 (20:17 +0000)]
- Tweaked code in itemize() a bit.
- Use the new write_short() function.
- Mention the delete() when an item replaces an item of a different type.
- Make sure that this replacing of a non-same item is marked as a new
transfer in the itemized output.
Wayne Davison [Fri, 18 Feb 2005 17:58:03 +0000 (17:58 +0000)]
- Fixed a few bugs and compile warnings.
- Use the long-option parser for better option handling.
- Output a usage message if the options are wrong.
- Improved the option-variable names.
- Parse the new default daemon log-file format.
- Handle filenames that have spaces in them.
Wayne Davison [Wed, 16 Feb 2005 17:02:16 +0000 (17:02 +0000)]
- The itemized flags are now 2 bytes instead of 1.
- Always send/receive the itemized flags for protocols >= 29.
- The output of the verbose log-the-transfer messages is always handled
via log_send() (when we're the client).
Wayne Davison [Wed, 16 Feb 2005 17:02:13 +0000 (17:02 +0000)]
- The itemized flags are now 2 bytes instead of 1.
- Always send/receive the itemized flags for protocols >= 29.
- The output of the verbose log-the-transfer messages is always handled
via log_recv() (when we're the client).
Wayne Davison [Wed, 16 Feb 2005 17:02:11 +0000 (17:02 +0000)]
- The itemized flags are now 2 bytes instead of 1.
- Always send the itemized flags for protocols >= 29.
- Sent an itemized-flag update for dirs and symlinks for protocols >= 29
(instead of outputting a message directly).
Wayne Davison [Wed, 16 Feb 2005 17:02:08 +0000 (17:02 +0000)]
- Auto-set --verbose if --dry-run is specified w/o --log-format.
- When verbose w/o a log_format specified, set it to "%n%L".
- There's no longer a need to send -i to the server.
Wayne Davison [Wed, 16 Feb 2005 08:10:45 +0000 (08:10 +0000)]
- We now accept an itemized-changes flag-byte over the socket if we're
the local client and --itemized-changes was specified. If the item
is not being updated, just call log_recv().
- We reject an attempt to file-update any non-regular file, not just
dirs.
- Avoid the verbose "log the transfer" output if --log-format was
specified and log_before_transfer is in effect.
- Call log_recv() with its new iflags arg.
Wayne Davison [Wed, 16 Feb 2005 08:10:41 +0000 (08:10 +0000)]
- We now accept an itemized-changes flag byte over the socket if we're
in --itemized-changes mode. If the item is not being updated,
either pass it along to the receiver (if we're the server) or just
call log_send().
- We reject an attempt to file-update any non-regular file, not just
dirs.
- Avoid the verbose "log the transfer" output if --log-format was
specified and log_before_transfer is in effect.
- Call log_send() with its new iflags arg.
Wayne Davison [Wed, 16 Feb 2005 08:10:31 +0000 (08:10 +0000)]
- If log_before_transfer is possible, don't force --verbose on for
--progress.
- If --log-format contains %i, set --itemize-changes (-i).
- Always send -i to the remote rsync if it was specified/implied.
Wayne Davison [Wed, 16 Feb 2005 08:10:28 +0000 (08:10 +0000)]
- Improved log_formatted() to handle long filenames better.
- Added %i, for the list of itemized changes, %n for the normal
filename (might be shorter than %f), and %L for a " -> symlink"
string IIF the item is a symlink (else "").
- The log_{send,recv}() functions now take an "iflags" arg.
Wayne Davison [Wed, 16 Feb 2005 08:10:25 +0000 (08:10 +0000)]
Changed showchg() into itemize(), which now ships off a flag byte of
what changed over to the sender instead of outputting a string itself.
This does mean that we now ship off indexes of non-file items that got
updated, but the sender will know what to do with it.