Commit Graph

190 Commits

Author SHA1 Message Date
Wayne Davison
3e2e4b5a33 Tweak the copyright year. 2019-03-16 09:15:49 -07:00
Wayne Davison
1eb7a7061a Need to mark xattr rules in get_rule_prefix().
This fixes the bug of xattr filters getting sent as a normal filter rule
(since the 'x' was dropped in the prefix).
2018-06-14 15:22:53 -07:00
Wayne Davison
473108ae6e Tweak copyright date. 2018-01-14 19:55:07 -08:00
Wayne Davison
87bc224011 Add a way to specify xattr name filtering. 2017-01-22 16:01:45 -08:00
Wayne Davison
a4e8b552d6 Join some lines. 2017-01-22 15:55:54 -08:00
Wayne Davison
453914e35b Update the copyright year. 2015-08-08 12:47:03 -07:00
Wayne Davison
85d3877be9 Improve mergedir filter handling internals.
Fixes bug 10995.
2015-07-13 10:56:13 -07:00
Wayne Davison
dfa5b49110 Bump the year to 2014. 2014-01-26 09:29:15 -08:00
Wayne Davison
e9398b1dc5 Fix a typo that Stefan Beller pointed out. 2013-12-14 16:25:18 -08:00
Wayne Davison
7e1a9c4d79 Update copyright year. 2013-01-19 11:05:53 -08:00
Wayne Davison
3417881d5c Make --delete-excluded work better with --filter=merge. 2011-09-15 07:52:38 -07:00
Wayne Davison
86e90c58f4 Add .hg dir exclude to default_cvsignore list.
Fixes bug 7957.
2011-02-17 22:09:08 -08:00
Wayne Davison
845ed84d70 Fix a warning about a %d not getting an int (on some platforms). 2009-08-10 09:24:53 -07:00
Matt McCutchen
c8fa85b23b Refactorings to the filter code, most notably:
- Improve function name: parse_rule -> parse_filter_str (to make the
  similarity with parse_filter_file clearer, and better indicate that
  it can parse multiple rules when FILTRULE_WORD_SPLIT is specified).

- In preparation for rule prefixes containing information beyond the
  rflags, change the code to pass around a full "template" filter_rule
  instead of just rflags.  Callers of parse_filter_{str,file} that want
  to specify only rflags can use rule_template(rflags) .

- Remove the MODIFIERS_* strings and instead hand-code the condition
  under which each modifier is valid.  This should make it easier to
  see that the conditions are correct.

- Tighten up default modifiers on merge rules:
  - Disallow "!" because it isn't useful.
  - If the merge rule specifies a side via "s" or "r", the rules in the
    file cannot also specify a side via "s", "r", "hide", etc.

[Patch was changed by Wayne a bit prior to application.]
2009-05-23 11:20:40 -07:00
Wayne Davison
a61ec6b168 Improved a couple variable names. 2009-05-23 10:41:16 -07:00
Wayne Davison
7b6c5c7794 Use typedefs for the filter structures. 2009-05-23 09:07:43 -07:00
Wayne Davison
b32d425451 Change filter MATCHFLGs to FILTRULEs. 2009-05-23 09:07:35 -07:00
Wayne Davison
b3bf9b9df9 Update the copyright year. 2009-01-03 10:57:14 -08:00
Wayne Davison
2a147e9fcb Don't define an array with no size. 2008-09-01 19:01:48 -07:00
Wayne Davison
7634fc8eb6 A little tidying up to follow my preferred style. 2008-09-01 17:08:26 -07:00
Matt McCutchen
daa8d92094 Several fixes for merge file handling:
- Free a mergelist's parent_dirscanned filters the last time it is
  popped or as soon as the filters are discarded due to the "n"
  modifier.  Aside from not leaking memory, this is needed to clean up
  any mergelists defined during the parent_dirscan to avoid crashing by
  trying to restore nonexistent state for them in pop_local_filters.
- Make push_local_filters save the current mergelist_cnt, and make
  pop_local_filters assert that it has the correct number of mergelists
  before restoring their state.
- Assert that mergelists get deactivated in strict LIFO order to catch
  any glitches as soon as they happen.  Free linked lists of filters in
  reverse order to make that the case.
- Add a bunch of mergelist-related debug output (--debug=filter2).
2008-09-01 17:01:19 -07:00
Wayne Davison
342bfb5e23 Output an FERROR* for a general io_error, and an FWARNING for other
io_error flags.
2008-07-31 07:59:45 -07:00
Wayne Davison
b791d6802b Include the array-size in array externs so that IBM's code-checker
can do more checking for us.
2008-07-20 22:41:29 -07:00
Wayne Davison
951e826b75 Added the --info=FLAGS an --debug=FLAGS options, which allows
fine-grained output control (in addition to the coarse -v).
2008-07-13 20:51:08 -07:00
Wayne Davison
9793bbb364 Improved a length check in parse_merge_name(). 2008-03-26 14:01:52 -07:00
Wayne Davison
1df02d13d3 Don't send daemon-config filter-action messages back to the user. 2008-03-24 10:14:59 -07:00
Wayne Davison
f5aeb6ff9b Added XFLG_DIR2WILD3 flag that the daemon uses to transform any
config-file dir/ exclude rule into a dir/*** rule.
2008-03-22 14:02:34 -07:00
Wayne Davison
4c74d44dab A couple fixes in add_rule() for XFLG_ABS_IF_SLASH:
- Remove the trailing slash earlier, so that it doesn't
  affect the XFLG_ABS_IF_SLASH check.
- Count the slashes earlier so that the XFLG_ABS_IF_SLASH
  can use it instead of using a strchr() all that could
  scan past the end of the input.
2008-03-22 12:30:43 -07:00
Wayne Davison
4a86fbcda0 Change ex_len to pre_len in add_rule(). 2008-03-22 12:21:41 -07:00
Wayne Davison
d48810ba5b Some improvements to the file-name cleaning code:
- Removed the CFN_KEEP_LEADING_DOT_DIR flag for clean_fname().
- Explicitly add an implied dot-dir to the transfer rather than keeping
  a leading a "./" prefix as a part of a relative pathname.
- Added the CFN_KEEP_DOT_DIRS flag for clean_fname().
- Added the SP_KEEP_DOT_DIRS flag for sanitize_path().
- Call clean_fname() a couple more times.
2008-03-20 22:39:29 -07:00
Wayne Davison
819bfe4599 Changed the name of the server_filter_list to be
daemon_filter_list, for improved clarity.
2008-03-20 10:42:43 -07:00
Wayne Davison
ffe8feb265 Added "const" to a couple more char * args. 2008-03-16 19:50:35 -07:00
Wayne Davison
d3d07a5e86 Include 2008 in the copyright years. 2008-03-01 12:01:41 -08:00
Wayne Davison
29bca53f9b Got rid of the unused symlink parameter to sanitize_path(). 2007-11-20 17:37:53 -08:00
Wayne Davison
c5d77e9659 Including my extern-squishing script, which just found an
extraneous extern in exclude.c.
2007-11-11 22:51:50 -08:00
Wayne Davison
b58bfb2f20 Call clean_fname() with new flag arg. 2007-10-31 04:43:29 +00:00
Wayne Davison
c291d05759 Fixed problem with anchored filter and an absolute
source path with --relative.
2007-10-26 16:53:02 +00:00
Wayne Davison
0485b451ea Added .git/ to "CVS" excludes. 2007-10-25 02:05:05 +00:00
Wayne Davison
bf66c2da14 Got rid of some old exclude trickery for --list-only w/o -r. 2007-10-07 03:52:20 +00:00
Wayne Davison
7e4b6b7bc4 Use new0() function instead of new() followed by memset(). 2007-09-03 04:19:11 +00:00
Wayne Davison
7fa60281bf Avoid a crash if pop_local_filters() has some pointer gaps. 2007-08-04 19:09:21 +00:00
Wayne Davison
8e41b68e8f Tweaking the license text a bit more. 2007-07-10 13:55:49 +00:00
Wayne Davison
4fd842f98d Switching to GPL 3. 2007-07-07 05:33:14 +00:00
Wayne Davison
ba2133d6ad Further modifications to the copyright comment section. 2007-02-04 14:54:58 +00:00
Wayne Davison
fe04532ad2 New support function: change_local_filter_dir(). 2006-12-28 07:54:19 +00:00
Wayne Davison
c2f0e4d965 Don't include MATCHFLG_PERISHABLE in CVS-exclude handling unless
we're talking protocol 30 or above.
2006-12-28 06:27:22 +00:00
Wayne Davison
2a28dd32fd The exclude code wasn't sending the MATCHFLG_NEGATE (!) char to the
other side.
2006-11-21 17:46:54 +00:00
Wayne Davison
ccdb23bb90 - Added the 'p' (perishable) flag to the filter rules, as suggested
by Matt.
- If ignore_perishable is set, we ignore all perishable rules.
- Mark all default-cvsignore rules as perishable (e.g. excludes such
  as *.o CVS .svn/ will not prevent a directory from being deleted).
2006-11-11 16:39:57 +00:00
Wayne Davison
caf8299e2e Tweaked an exit_cleanup() value. 2006-11-11 08:01:40 +00:00
Wayne Davison
e8b21fe406 Cast pat_len to an int when using it as a field width. 2006-10-13 06:24:24 +00:00