Commit Graph

378 Commits

Author SHA1 Message Date
Wayne Davison
ab3d6c6025 The "ndx" variable now holds the unique, over-the-wire value, not
a value that is relative to the cur_flist object.  This makes the
variable consistent with how the sender and the receiver use it.
2007-02-03 05:13:17 +00:00
Wayne Davison
1ff66d4c68 Changed the main file-scan loop to not check for redo items when
in incremental recurse mode -- it is enough to check for them
when changing from one file-list to another.
2007-01-31 21:45:42 +00:00
Wayne Davison
7730114b30 Moved the code that checks for finished file-lists, for finished "redo"
sends, and finished hard-links into check_for_finished_files(), a new
function that takes the place of check_for_finished_hlinks().  This
lets us signal the sender more rapidly when a file-list is done (which
ensures that it sends us more work to do in a timely manner), and also
avoids two potential deadlocks in the old code.
2007-01-30 03:57:48 +00:00
Wayne Davison
3ea6e0e7a1 Changed the variable "incremental" to "inc_recurse". 2007-01-27 14:56:09 +00:00
Wayne Davison
fd3f5af2aa - Put directory retouching code into a separate function that
is now called for all our touch-up needs.
- Fixed a problem with --delete-delay interfering with the
  directory-time touch-up in incremental mode.
2006-12-29 00:55:28 +00:00
Wayne Davison
f845ef7dec An incremental-recursion transfer can't switch from delete-delay to
delete-after.
2006-12-28 19:02:01 +00:00
Wayne Davison
9ae7a2cddb Use write_ndx() and read_ndx(). 2006-12-28 18:49:13 +00:00
Wayne Davison
f3d6d4800b Handle the new incremental-recursion mode. 2006-12-28 07:54:31 +00:00
Wayne Davison
1f56188f8c Can just test ignore_errors w/o lp_ignore_errors(module_id) now. 2006-12-25 17:49:23 +00:00
Wayne Davison
2ef0340517 Use F_DEPTH() in place of dir.depth. 2006-12-17 00:40:33 +00:00
Wayne Davison
c58c1dc446 Added a basename var to file_struct at the end, making it clearer
where the basename exists without actually changing how the data
is organized.
2006-12-16 07:18:41 +00:00
Wayne Davison
b7cfb9e2c0 Renamed the F_*HLINK* macros to make their purpose clearer. 2006-12-13 15:36:15 +00:00
Wayne Davison
225aeca346 Use new BITS_EQUAL() define. 2006-12-12 20:17:05 +00:00
Wayne Davison
0fddbd8a09 A minor format tweak. 2006-12-09 17:35:36 +00:00
Wayne Davison
18979194cf - Use the revamped hard-link functions.
- Turned maybe_ATTRS_REPORT var into a global for use by hlink.c.
2006-12-09 00:23:58 +00:00
Wayne Davison
ca0e8296bc Get rid of some signed/unsigned-comparison compiler warnings. 2006-12-08 20:58:51 +00:00
Wayne Davison
20319fd9ed - The --delete-delay code now does its own output buffering. This
allows us to delay opening a temp file to hold the list of deletions
  until we overflow the buffer (and thus, it's not usually needed).
- Fall back to doing a --delete-after pass if the --delete-delay
  code has a temp-file-writing failure.
2006-12-08 20:42:45 +00:00
Wayne Davison
01d29d7b02 Fixed --delete-delay by making the fprintf() output an unsigned short
for the mode.
2006-12-08 15:10:12 +00:00
Wayne Davison
1183260426 Added missing initialization of new solo_file variable. 2006-12-07 06:22:22 +00:00
Wayne Davison
49b86442ff - Set "solo_file" bool and use that for improved clarity.
- Use the new device defines: F_RDEV_P(), DEV_MAJOR(), and DEV_MINOR().
2006-12-07 03:31:38 +00:00
Wayne Davison
f7d7fb381d Improved the format of the debug output for mknod(). 2006-12-07 02:37:42 +00:00
Wayne Davison
1e1ca25343 #ifdef calls to hard-link functions. 2006-12-06 01:32:17 +00:00
Wayne Davison
112d728f48 Use the latest F_*() accessors. 2006-12-05 15:59:58 +00:00
Wayne Davison
663b2857eb Use new send_msg_int() function. 2006-12-04 02:07:37 +00:00
Wayne Davison
82ad07c418 - Typical tranfers now save 12-20 bytes per file because several vars
were moved out of file_struct into an optional member-var setup.
- Renamed and reorganized the FLAG_* defines.
- Use NDX_DONE instead of a literal -1 when sending/checking the
  end-of-phase index value.
2006-12-03 06:44:16 +00:00
Wayne Davison
e17883827b Silenced a compiler warning. 2006-11-23 04:16:48 +00:00
Wayne Davison
5e77efaf41 - Implement new --delete-delay option.
- Tweaked a variable name in delete_item().
2006-11-22 20:51:03 +00:00
Wayne Davison
264042760b Use an explicit cast when a value gets stored in a smaller var. 2006-11-21 08:35:58 +00:00
Wayne Davison
4a19c3b254 Added "const" to appropriate char pointers. 2006-11-19 00:23:21 +00:00
Wayne Davison
88897638a9 Tweaked a couple comments. 2006-11-11 17:09:32 +00:00
Wayne Davison
146c2c368c - Restored some of Matt's suggested logic that I left out, as it
is needed to get --dry-run to output appropriately.
- Got rid of DR_PINNED from the enum delret.
- Set a flag when we're deleting outside the transfer hierarchy and
  initialize a counter that flist.c will use to count excluded files.
2006-11-11 16:39:02 +00:00
Wayne Davison
f5761a342b - Make delete_dir_contents() use less stack by recursing directly
to itself, and then calling delete_item() w/o DEL_RECURSE.
- Fixed the return value handling of delete_dir_contents().
2006-11-11 14:45:00 +00:00
Wayne Davison
c6fadc0ee1 My adaptation of Matt's cleanup of the delete_item() code.
The new code splits out part of the directory deletion into
its own function, delete_dir_contents(), and it outputs more
warnings when something could not be deleted.
2006-11-11 07:03:57 +00:00
Wayne Davison
e5e85283a9 Allow --max-delete=0 (zero used to be ignored). 2006-11-11 05:09:14 +00:00
Wayne Davison
b2e4811db2 Changed two more references to "st" to "real_st" in the dir-handling
code.
2006-11-10 07:17:20 +00:00
Wayne Davison
b467495cd0 - Fixed a problem where the real stat struct for a newly-created
root-of-transfer directory could get overwritten by the check
  for basis dirs.
- Fixed a potential problem where the stat struct for a new dir
  could get passed uninitialized to delete_in_dir().
2006-11-10 07:13:21 +00:00
Wayne Davison
116a4769c1 - Improved try_dests_non() so that it works with all non-regular
files (including dirs).
- Changed the directory-creating code to call try_dests_non() when a
  --*-dest option is used.
- Revamped the device/special-files code to have the same logic as
  the symlink code, making it both simpler and more correct.
- All the above makes us output changes for all items consistently
  when a --*-dest option is used.
- Fixed an output bug in try_dests_reg() and try_dests_non() when
  -ii is enabled (we use to fail to output unchanged files).
2006-11-10 05:06:56 +00:00
Wayne Davison
f964ac5eee - Fixed an error-handling path in try_dests_reg().
- Added a comment.
2006-10-22 22:36:36 +00:00
Wayne Davison
f4164b73b4 - Use the new FNONE enum instead of a literal 0 value. 2006-10-13 07:38:21 +00:00
Wayne Davison
1a7f3d99c5 Removed the changes in symlink handling in non-chroot daemon mode as
they were not yet safe (I'll consider similar changes for the next
release).
2006-10-12 03:01:18 +00:00
Wayne Davison
1ef5bf3cfd If new_root_dir is set, itemize the output of the "." dir as a
directory-creation event.
2006-10-11 00:04:44 +00:00
Wayne Davison
d9163a4cf5 If the combination of --dry-run, --link-dest, and -H finds a matching
file in on of the extra basis dirs, make a note of which basis dir
we would have used in the hard-link with the destination file.
2006-10-09 02:59:23 +00:00
Wayne Davison
b06050f9ad I decided that combining --link-dest with -I doesn't make much sense
(without some kind of a post-transfer identicality check, at least)
so I'm removing the code that tried to make the two play nice.
2006-09-30 15:20:17 +00:00
Wayne Davison
47c1197534 Decided that I like remove-source-files better than remove-sender-files. 2006-06-30 15:52:52 +00:00
Wayne Davison
04cd8789cb Handle the --remove-sender-files option by sending MSG_SUCCESS for
any up-to-date file (non-dir).
2006-06-30 15:42:26 +00:00
Wayne Davison
caff33228e If we fail to create a new directory, skip trying to update
everything that is inside that dir.
2006-06-05 16:56:50 +00:00
Wayne Davison
1925c3448c - Got rid of the FNAME logcode enum.
- We no longer output " is uptodate" messages to the log file.
2006-06-01 08:04:40 +00:00
Wayne Davison
17bda2d109 - Use the renamed stdout_format_has_i variable.
- Call log_item() with its new arg.
2006-05-29 22:56:51 +00:00
Wayne Davison
6bfc7b4d79 Tweaked a couple things in try_dests_reg(). 2006-05-16 22:27:26 +00:00
Wayne Davison
ecc7623e7f Some demon_log_* variables changed into logfile_* variables that are
also used by the new --log-file option.
2006-05-09 18:31:06 +00:00