Commit Graph

6030 Commits

Author SHA1 Message Date
Wayne Davison
bb5f4e7285 A few tweaks to the FILTER RULES section, including a mention of
using the +/- modifiers on merge-file rules.
2005-02-06 07:16:19 +00:00
Wayne Davison
448797a1e6 Fixed an off-by-one error in the prefix-length checking in
get_rule_prefix().
2005-02-05 06:53:20 +00:00
Wayne Davison
a261103ce0 Improved the name of a variable. 2005-02-05 05:30:06 +00:00
Wayne Davison
7b82b5adb3 Mention a couple more changes. 2005-02-05 01:38:19 +00:00
Wayne Davison
397a344364 Added the "C" modifier to the itemized list of +/- modifiers. 2005-02-05 00:03:46 +00:00
Wayne Davison
bafa48759f Mention the new --filter=-C syntax that lets you position the default
CVS rules within your other filter rules.
2005-02-04 23:57:26 +00:00
Wayne Davison
46db185081 - Moved get_cvs_excludes() up above its only use and made it static.
- Changed get_cvs_excludes() to make an mflags arg.
2005-02-04 22:32:17 +00:00
Wayne Davison
1412da7c32 If we're a "local server" (i.e. we just forked a server for a
local transfer), don't duplicate all the filter rules that we
already know about in the forked process.
2005-02-04 21:54:02 +00:00
Wayne Davison
d09e800a0e Fixed the way get_rule_prefix() turns the MATCHFLG_WORD_SPLIT flag
back into a modifier character.
2005-02-04 21:16:39 +00:00
Wayne Davison
53b417e414 - Added MATCHFLG_CVS_IGNORE.
- Made the match_flags var a uint32.
2005-02-04 21:13:12 +00:00
Wayne Davison
57dee64e82 - Moved the cvs_exclude checks into send_filter_list() and
recv_filter_list().  Because of this, we never skip these
  calls anymore, though read-batch processing indicates that
  the list should not really be sent by setting f_out to -1.
- Moved the definintion of the "local_server" variable here
  from options.c.
2005-02-04 21:13:09 +00:00
Wayne Davison
fdc795015f - Changed filter_rule() to add_rule().
- Improved the debug info coming from add_rule().
- Changed add_filter() to parse_rule() and add_filter_file()
  to parse_filter_file().
- Changed get_filter_tok() to parse_rule_tok().
- Made the mflags a uint32.
- Added an extra arg to get_rule_prefix() to indicate if we're
  building the options for transmission or other purposes.
- The 'C' modifier can now be applied to a '-' rule, so it now
  sets a new flag: MATCHFLG_CVS_IGNORE.
- The send_filter_list() and recv_filter_list() functions now handle
  all the logic needed to do the right thing for -C (this used to be
  in main.c).
2005-02-04 21:13:06 +00:00
Wayne Davison
3a5e9224d0 - Changed add_filter() to parse_rule() and add_filter_file()
to parse_filter_file().
- Moved the definintion of the "local_server" variable into main.c.
2005-02-04 21:13:03 +00:00
Wayne Davison
ebfd1a1cf7 Changed add_filter() to parse_rule() and add_filter_file()
to parse_filter_file().
2005-02-04 21:13:00 +00:00
Wayne Davison
dd667c2301 Call get_rule_prefix() with its new arg. 2005-02-04 21:12:56 +00:00
Wayne Davison
d727f0ff48 Fixed the MODIFIERS_MERGE_FILE define. 2005-02-04 00:48:18 +00:00
Wayne Davison
eb9b2e53c8 Changed delete_missing() to not limit the use of DEL_FORCE_RECURSE
to just --delete-during now that the other delete routines are using
delete_in_dir().
2005-02-03 19:19:39 +00:00
Wayne Davison
b6f06b8e8b Added an mflags arg to get_filter_tok(), add_filter_file(), and
add_filter().  This made for less flag conversion between various
MATCHFLG_* and XFLG_* values.  It also made it easy to fix a bug
in the handling of no-prefix per-directory include/exclude files.
We also use the new XFLG_OLD_PREFIXES and MATCHFLGS_FROM_CONTAINER
defines.
2005-02-03 19:00:20 +00:00
Wayne Davison
0a68f869d7 Call add_filter() and add_filter_file() with their new flag args. 2005-02-03 19:00:17 +00:00
Wayne Davison
3b2461cf2e - Got rid of a bunch of XFLG_* options.
- Added XFLG_OLD_PREFIXES and MATCHFLGS_FROM_CONTAINER defines.
2005-02-03 19:00:13 +00:00
Wayne Davison
346402ddbf Use the new negated exclude to filter out all non-dirs in a few
of the rsync commands.
2005-02-03 03:45:24 +00:00
Wayne Davison
44d60d5f83 Document the new "!" modifier for include/exclude filter rules (to
negate the match).
2005-02-03 03:37:02 +00:00
Wayne Davison
f2ae9e8583 Implemented a "!" modifier for filter rules that lets a rule trigger
on a non-matching pattern.
2005-02-03 03:36:58 +00:00
Wayne Davison
7c8e23bd9f Added MATCHFLG_NEGATE. 2005-02-03 03:36:55 +00:00
Wayne Davison
0752721dc3 Mention the latest delete optimization. 2005-02-03 02:01:22 +00:00
Wayne Davison
68a94ac30f Changed delete_files() to use the delete_in_dir() function, which
saves a ton of memory for a large set of files.
2005-02-03 02:01:20 +00:00
Wayne Davison
ee3751c8d7 - We now separate the user-specified top-dir flag (via the restored
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.
2005-02-03 02:01:17 +00:00
Wayne Davison
ec33e0e6bd - Changed {XMIT,FLAG}_DEL_START back to {XMIT,FLAG}_TOP_DIR.
- Define FLAG_DEL_HERE.
2005-02-03 02:01:14 +00:00
Wayne Davison
31937d363b Call delete_in_dir() with its new args. 2005-02-03 02:01:11 +00:00
Wayne Davison
8982a89b24 In hlink_compare(), call f_name_cmp() directly instead of using
file_compare().
2005-02-03 01:19:03 +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
14698a3a1a - Moved an optimization from file_compare() into f_name_cmp() (the one
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).
2005-02-03 01:18:58 +00:00
Wayne Davison
8c2ffaf095 - If recv_files() is sent the index of a directory, complain about it
and die.
- Moved a few code snippets in recv_files() into better locations.
2005-02-03 00:19:40 +00:00
Wayne Davison
afd72c78bd If the generator sends us the index of a directory, generate an
error and die.
2005-02-02 17:15:22 +00:00
Wayne Davison
6bf822649b - Fixed a problem with the setting of the --recurse option from the
batch file.
- Save the state of the --dirs option in the batch flags in a way
  that is compatible with older protocol versions.
2005-02-02 09:40:45 +00:00
Wayne Davison
67dde16163 In read_sum_head: output the who_am_i() info in our error messages. 2005-02-01 16:42:01 +00:00
Wayne Davison
f1d5ba4005 Set am_sender to -1 until the end of the option parsing. This
lets who_am_i() output better values for the command-line
--filter/--include/--exclude options.
2005-02-01 09:46:42 +00:00
Wayne Davison
794b0a037f Changed who_am_i() to output "server" or "client" when am_sender
is negative.  This will only occur during the startup phase
before we know if we're the sender or not (e.g. when parsing
client-side --filter/--exclude/--include options).
2005-02-01 09:45:09 +00:00
Wayne Davison
c32edbe02e Make sure the %f expansion handles the new dir.root properly. 2005-02-01 09:23:59 +00:00
Wayne Davison
f3c3ed44e6 - Made flist_find() and receive_file_entry() static functions.
- 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).
2005-02-01 09:21:32 +00:00
Wayne Davison
f805730493 - Put "basedir" into a union "dir" and named it "root". The other
member of the union is "depth".
- Added members "low" and "high" to the file list structure (which
  are set when the list is cleaned).
- Got rid of the flist_up() inline function.
2005-02-01 09:21:30 +00:00
Wayne Davison
2b1366635d Refer to the old basedir variable as dir.root. 2005-02-01 09:21:28 +00:00
Wayne Davison
42f23f479d Fixed a typo in a variable name. 2005-02-01 08:12:00 +00:00
Wayne Davison
62bf783f06 Changed the "s" modifier to "w" for word-splitting tokens from a
merge filter file.  Also sprinkled some bf(...) macros into that
section.
2005-01-31 23:57:35 +00:00
Wayne Davison
0b2901b72d Changed the "s" modifier to "w" for a word-splitting merge file. 2005-01-31 23:51:54 +00:00
Wayne Davison
faa82484a5 - Mark references to command-line switches with the bf(...) macro.
- Changed some verb(...) macros to use other yodl idioms because
  yodl inserts way too much vertical whitespace surrounding the
  item.
- Some items weren't indenting enough in the manpage, though they
  were indenting fine in the HTML version, so used some creative
  idioms to get things to render well in both.
- Got rid of some empty lines in lists.
- Made several quote(...) items also tt(...).
2005-01-31 23:41:08 +00:00
Wayne Davison
4ccfd96cfe Tweaked one or more warning messages. 2005-01-31 19:13:19 +00:00
Wayne Davison
408aa7b24c Improved the exclude tests to make sure that the filter files
are interacting with --delete-during correctly.
2005-01-31 18:09:23 +00:00
Wayne Davison
776b9d1c00 Added "need_first_push" logic to delete_in_dir(). 2005-01-30 20:24:11 +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