Commit Graph

378 Commits

Author SHA1 Message Date
Wayne Davison
ed7e79553e Don't try to determine the phase we're in by looking at the value
of csum_length -- it might have been computed to be SUM_LENGTH.
Instead, look at the "phase" variable directly.
2005-03-05 16:42:52 +00:00
Wayne Davison
ac4f91a5ee Added a hack that sets the ITEM_REPORT_XATTRS bit (which is the old
ITEM_UPDATING bit) when ITEM_TRANSFER or ITEM_LOCAL_CHANGE is set.
This lets us interact compatibly when sending itemized bits to an
earlier pre-release.
2005-03-05 04:34:04 +00:00
Wayne Davison
ee1d11c495 - Updated itemize() to handle sending of hard-link-name info. Made
it non-static so the hard-link code can now output itemized
  messages.
- Made the locally-changed items (such as dirs and symlinks) itemize
  using a new ITEM_LOCAL_CHANGE flag instead of the (renamed)
  ITEM_TRANSFER flag (formerly ITEM_UPDATING).
- Improved the hard-link support by having a cluster of hard-linked
  files get processed as soon as we notice that a single item is
  already up-to-date, or it succssfully finishes being updated.
- The hard-linking that occurs when using --link-dest will now be
  mentioned at higher levels of verbosity IFF %i is in the log-
  format.
2005-03-05 00:21:42 +00:00
Wayne Davison
9497b0d4e9 Call log_item() instead of log_recv(). 2005-03-04 16:08:16 +00:00
Wayne Davison
46e99b09b9 Added read_vstring() and write_vstring() to io.c instead of
having this code in generator.c and receiver.c.
2005-03-04 15:38:58 +00:00
Wayne Davison
33ab4ad879 Simplified whole_file variable checking. 2005-03-03 02:58:48 +00:00
Wayne Davison
e86ae6bc1f Don't kluge the value of statret for --whole-file. 2005-03-03 01:50:43 +00:00
Wayne Davison
c3cbcfb8ef Moved the checks for --ignore-existing and --update higher in
recv_generator() so that they don't trigger erroneously when
--link-dest is specified.
2005-03-03 01:33:51 +00:00
Wayne Davison
a1d23b5314 - Got rid of the SID_* flags -- use the ITEM_* flags directly.
- If --compare-dest find a file that is not the same in attributes,
  we need to copy the file.
2005-03-03 00:14:35 +00:00
Wayne Davison
e224331729 When using multiple --compare-dest options, rsync should avoid
copying a file that has an exact match in any of the dirs.
2005-03-02 17:48:36 +00:00
Wayne Davison
70b54e4e43 Fixed a bug in the --dry-run output when using --link-dest. 2005-03-02 17:27:19 +00:00
Wayne Davison
9ba463435b If the multi-dest loop falls back to the best_match index,
we need to re-stat() the file to restore "st".
2005-03-02 09:51:54 +00:00
Wayne Davison
aef9882581 A little more tweaking to the multi-dest option loop. 2005-03-02 09:09:15 +00:00
Wayne Davison
f62eaa24f1 Made the multi-FOO-dest loop a little nicer. 2005-03-01 19:42:31 +00:00
Wayne Davison
662bdcd4ac Make sure that allowed_lull will not be computed as 0 if
io_timeout is 1.
2005-02-27 18:09:17 +00:00
Wayne Davison
18a11cfd48 - Made the calls to maybe_send_keepalive() happen at better intervals.
- Call do_hard_links() with its new args.
2005-02-27 09:02:32 +00:00
Wayne Davison
e6bc6f4232 We need to turn off make_backups for the redo phase so that
the inplace processing doesn't make a second backup.
2005-02-27 07:50:43 +00:00
Wayne Davison
b558728875 Added keep-alive checking during the directory-touching loop at
the end of the processing.
2005-02-26 20:43:14 +00:00
Wayne Davison
363c3ece3a Don't allow keep-alive sending if --read-batch is enabled. 2005-02-26 19:37:49 +00:00
Wayne Davison
251f22b5d7 Fixed a line-ordering problem. 2005-02-26 19:11:57 +00:00
Wayne Davison
59faec8b8b - 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.
2005-02-26 18:03:49 +00:00
Wayne Davison
7433d73adc - 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).
2005-02-26 06:52:55 +00:00
Wayne Davison
9ac2395bf0 - Call maybe_send_keepalive() if timeouts are enabled.
- Use the new ignore_timeout variable.
2005-02-25 22:01:36 +00:00
Wayne Davison
352963ddc3 Always set the SID_USING_ALT_BASIS appropriately for the transfer,
even if --inplace wasn't specified.
2005-02-22 22:12:59 +00:00
Wayne Davison
8237f9305b 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).
2005-02-22 21:43:57 +00:00
Wayne Davison
1b1fef20b3 Tweaked the rprintf() that outputs about the delta-transmission
enablement.
2005-02-20 22:11:43 +00:00
Wayne Davison
ee03617b3d Cast a uchar* arg to char* for write_buf(). 2005-02-20 16:56:30 +00:00
Wayne Davison
fe96018750 If we update the contents of a symlink and --remove-sent-files
is enabled, tell the sender about it via MSG_SUCCESS.
2005-02-20 01:04:43 +00:00
Wayne Davison
8e3ead09a3 Got rid of maybe_DEL_TERSE. 2005-02-20 00:47:15 +00:00
Wayne Davison
8174bc3506 If the server refuses a directory, don't allow any files to be
sent to the server inside that directory.
2005-02-19 23:01:52 +00:00
Wayne Davison
6c3862fae3 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.
2005-02-19 22:16:45 +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
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
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
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
c8ca974634 Some tweaks to how --itemize-changes works. 2005-02-16 01:13:03 +00:00
Wayne Davison
69864a5ccf Made showchg() use safe_fname(). 2005-02-15 20:41:37 +00:00
Wayne Davison
b78296cb0b Decided on a better option name --itemize-changes (-i). 2005-02-15 07:41:13 +00:00
Wayne Davison
06a1dbad61 Implemented the --what-has-changed functionality. 2005-02-15 07:20:14 +00:00
Wayne Davison
a1cbe76e2c Changed one size_t var into an int32. 2005-02-14 22:47:42 +00:00
Wayne Davison
8e85be0a16 Added handling for fuzzy-basis scanning. When a fuzzy filename is
chosen, the name is sent down the name-pipe to the receiver.
2005-02-14 02:41:27 +00:00
Wayne Davison
4f5b0756df John E. Malmberg convinced me to standardize on #ifs for defined
values instead of non-zero.
2005-02-14 00:53:43 +00:00
Wayne Davison
df337831dc When --dry-run is set, note when a directory is missing and avoid
trying to stat() any items inside that dir's hierarchy.  This fixes
a bug where a symlink to a dir getting replaced by a dir with
identical contents to the dir at the other end of the symlink would
not report the updated files in the new hierarchy. (See bug #1673)
2005-02-12 21:18:58 +00:00
Wayne Davison
3841a04e88 A minor tweak for the dry_run logic. 2005-02-11 20:26:08 +00:00
Wayne Davison
4875d6b64d Adding more calls to safe_fname(). 2005-02-07 20:36:43 +00:00
Wayne Davison
31937d363b Call delete_in_dir() with its new args. 2005-02-03 02:01:11 +00:00
Wayne Davison
0492fdfb2e - Improved some comments.
- Changed the index passed to recv_generator() from "i" to "ndx".
- Call delete_in_dir() with its new args.
- During the redo phase, clear a bunch of options that might interfere
  with the generator deciding it needs to redo the file (for instance,
  --update-only could have interfered if --partial was specified).
2005-02-03 01:19:01 +00:00
Wayne Davison
c93fad5ee0 The --delete-during processing only happens during the first phase
(not the redo phase).  We also call delete_in_dir(NULL, NULL) to
make sure that all the local filter files get popped.
2005-01-30 10:06:18 +00:00
Wayne Davison
7842418b7b Renamed several exclude-related functions/variables using new
filter terminology.
2005-01-25 10:39:14 +00:00
Wayne Davison
3ea9bbd632 Optimized away the post-transfer directory loop in certain
circumstances.
2005-01-24 06:19:58 +00:00