Commit Graph

6455 Commits

Author SHA1 Message Date
Wayne Davison
1f30a674cd 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.
2005-02-19 02:39:30 +00:00
Wayne Davison
19bc826d8b - 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).
2005-02-19 02:39:26 +00:00
Wayne Davison
c786a7aec5 - 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.
2005-02-19 02:39:23 +00:00
Wayne Davison
8a8356b7db - 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.
2005-02-19 02:39:21 +00:00
Wayne Davison
0d67e00af8 - 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.
2005-02-19 02:39:18 +00:00
Wayne Davison
7448177753 - Call log_delete() instead of outputting a "deleting ..." message.
- Call delete_file() with its new arg.
2005-02-19 02:39:15 +00:00
Wayne Davison
90d151f423 If the protocol is less than 29, make sure itemize_changes is off. 2005-02-19 02:39:11 +00:00
Wayne Davison
9f7c5dabf8 - Got rid of DEL_DIR define.
- Added define for ITEM_DELETED.
2005-02-19 02:39:09 +00:00
Wayne Davison
a85a151430 - Mention that "%o" can now have the value "del."
- Updated the description of "%i" to reflect the latest functioning.
2005-02-19 02:39:06 +00:00
Wayne Davison
5dd97ab999 Fixed an inaccuracy in the --archive description. 2005-02-19 02:39:03 +00:00
Wayne Davison
8daa9925cc More improvements. 2005-02-18 21:24:00 +00:00
Wayne Davison
e844be4e7b - Use read_short() and write_short().
- If the user does not want itemized changes, don't log the name
  for attribute changes.
2005-02-18 20:17:24 +00:00
Wayne Davison
88b218fa5c - 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.
2005-02-18 20:17:20 +00:00
Wayne Davison
e66d70e34c The '%n' escape needs to append a trailing slash onto a directory name. 2005-02-18 20:17:17 +00:00
Wayne Davison
9361f83933 Added read_short() and write_short(). 2005-02-18 20:17:15 +00:00
Wayne Davison
3b2bebbf90 Improved the "log format" section some more. 2005-02-18 20:17:12 +00:00
Wayne Davison
4f90eb433a Improved --verbose, --itemize-changes, and --log-format. 2005-02-18 20:17:09 +00:00
Wayne Davison
b485e0c16c Fixed/improved the comment before safe_name(). 2005-02-18 20:17:05 +00:00
Wayne Davison
bc1fac9648 Handle uchar and short as a function return type. 2005-02-18 20:16:59 +00:00
Wayne Davison
c78779cce3 - 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.
2005-02-18 17:58:03 +00:00
Wayne Davison
702cd15cb0 For the server, don't ever intuit verbosity higher than what
the client asked for.
2005-02-18 17:36:12 +00:00
Wayne Davison
1da05366ad The daemon loop needs to call log_open() because it called log_close(). 2005-02-18 17:34:09 +00:00
Wayne Davison
2267efeac5 Made log_open() non-static and moved log_close() next to it. 2005-02-18 17:33:43 +00:00
Wayne Davison
15954da08f Updated the default "log format" string and the output of "%i". 2005-02-17 09:19:07 +00:00
Wayne Davison
b2dc7bad39 Changed the default log format. 2005-02-17 09:16:51 +00:00
Wayne Davison
d4e0196346 Use '.' for unchanged attributes in the %i output. 2005-02-17 09:16:23 +00:00
Wayne Davison
2fc50f5a98 More improvements for the description of the %i output. 2005-02-16 20:12:20 +00:00
Wayne Davison
bd5b85dbc7 Mention the new flag-word for protocol 29. 2005-02-16 17:08:04 +00:00
Wayne Davison
8a8324657e - 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).
2005-02-16 17:02:16 +00:00
Wayne Davison
4bb0af79b7 - 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).
2005-02-16 17:02:13 +00:00
Wayne Davison
e3bcd89319 - 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).
2005-02-16 17:02:11 +00:00
Wayne Davison
87383697e8 - 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.
2005-02-16 17:02:08 +00:00
Wayne Davison
e4b808989e Moved the auto-setting of --verbose when --dry-run is specified into
options.c.
2005-02-16 17:02:05 +00:00
Wayne Davison
59e52bf276 Tweaked ITEM_MISSING_DATA. 2005-02-16 17:02:02 +00:00
Wayne Davison
9b40e44ef4 No need to handle itemize_changes anymore. 2005-02-16 17:01:59 +00:00
Wayne Davison
e92f21d2f7 Tweaked the mention of --itemize-changes. 2005-02-16 08:12:34 +00:00
Wayne Davison
910e89b963 - 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.
2005-02-16 08:10:45 +00:00
Wayne Davison
8a9cfb2459 - 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.
2005-02-16 08:10:41 +00:00
Wayne Davison
41961db0bd Ensure that -i is set consistent with the batch's data. 2005-02-16 08:10:38 +00:00
Wayne Davison
e76518843d - 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.
2005-02-16 08:10:31 +00:00
Wayne Davison
ef74f5d626 - 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.
2005-02-16 08:10:28 +00:00
Wayne Davison
c557eb8cec 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.
2005-02-16 08:10:25 +00:00
Wayne Davison
0cc279e0d3 - Added the new ITEM_* flags for the itemized-changes flag passing.
- Also added defines for FLAG_SENT and MSG_SUCCESS.
2005-02-16 08:10:22 +00:00
Wayne Davison
0cfdf22655 Documented that -i now sets a default --log-format string. 2005-02-16 08:10:19 +00:00
Wayne Davison
527a010f10 Documented the new log-format escapes: %n, %L, and %i. 2005-02-16 08:10:13 +00:00
Wayne Davison
c8ca974634 Some tweaks to how --itemize-changes works. 2005-02-16 01:13:03 +00:00
Wayne Davison
3296f91bb0 Check for refusal of --delete-before when it is inferred. 2005-02-15 21:15:58 +00:00
Wayne Davison
e2124620eb Moved two paragraphs. 2005-02-15 20:42:36 +00:00
Wayne Davison
69864a5ccf Made showchg() use safe_fname(). 2005-02-15 20:41:37 +00:00
Wayne Davison
5b4e1f318d - Mention the addition of --itemize-changes.
- Mention the setting of read_only when a daemon is read-only.
2005-02-15 19:47:57 +00:00