to take an integer count instead of a struct file_list so that we
can pass in a file-list-count offset for delete's separate calls
to send_directory().
a new function: send_if_directory(). This lets the code that is
recursively descending through the directories make its list of a
dir's contents and close the DIR handle before recursing into the
subdirs. Also, the "recurse" var is just true/false once again.
- 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.
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).
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.
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.
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.
equal value without being equal pointers, substitute one of the
pointers for the other in the file list. This optimizes future name
comparisons. Note also that this optimization won't be triggered
very often (because rsync tends to send the names grouped by dir-
name at transmission time), but it's nice to be able to assume that
all files in the same dir have identical dir-name pointers after the
qsort is finished.
of storing it into the files[] array.
- Made flist_find() return "no match" if the found item differs in
its directory-ness from the search item.
- Changed f_name_cmp() to sort sub-directories after non-directories
for each directory's contents. This makes things like the upcoming
--fuzzy patch easier to get right.
- One complicating factor is that clean_flist() needed some extra
code to ensure that a directory doesn't duplicate a non-directory
of the same name.
- Make sure that the "strip_root" code in clean_flist() (for relative
paths) strips off all leading slashes.
of all the conditional code to support that.
- Improved the comment before send_directory() to indicate that it
gets called with f == -1 from delete_in_dir().
- Modified f_name_cmp() so that, beginning with protocol 29,
it will guarantee that a directory name will sort one slot
before its contents (prior versions could sort other items
in between in rare instances).
FLAG_TOP_DIR) from the del-in-this-directory flag (FLAG_DEL_HERE).
This was needed to properly handle -x in delete_in_dir().
- The delete_in_dir() function takes a slightly changed set of args.
- Always set the FLAG_DEL_HERE flags, not just for --delete-during.
that avoids doing a string-compare on two identical char pointers),
making it just a wrapper for f_name_cmp(). Also made file_compare()
static because everyone now calls f_name_cmp() directly.
- Improved the flist summary that is output at high verbosity.
- Improved delete_in_dir() to better handle the push/pop semantics
based on the depth value that is now passed in as an arg (so that
we don't have to parse it out of the paths each time).
- Changed receive_file_entry() args.
- We now store the directory depth into file->dir.depth when
receiving the file list. This will be used to aid in the
traversal of the file list on the receiving side for things
such as the future --fuzzy option and better --delete-during
processing.
- Fixed a bug when -R was used with "." as a source directory:
subdirectories were not being promoted to FLAG_DEL_START when
--delete-during was specified.
- Refer to the old basedir variable as dir.root.
- Got rid of the first-push code -- I decided that it wasn't
the right thing to do for per-dir merge-file processing.
- Improved the flist_find() function to make it a little more
optimal. The new code no longer needs the inline function
flist_up().
- In clean_flist() we now set two new values in the flist struct:
"low" and "high". These are used by the new flist_find().
- Tweaked the output_flist() function to output each entry's
flags and to output the directory-depth on the receiving side
in place of the directory-root (which is still output on the
sending side).
- Moved the local-list push/pop code out of send_directory() so that
the callers (send_file_name() and delete_in_dir()) can call the
push/pop functions themselves. This is in preparation for
delete_in_dir() getting fully correct push/pop semantics (for
its --delete-during handling of per-dir filter files).
- Changed delete_in_dir() to only be used by the --delete-during
option.
- Added delete_missing() that is used by both delete_files() and
delete_in_dir().
- delete_files() still uses send_file_list(), but delete_in_dir()
now uses send_file_name().
option:
- The special handling for cvs_exclude went away.
- Call push_local_excludes() and pop_local_excludes() instead of fiddling
with the (no longer present) local_exclude_list var.