Wayne Davison
417b59997f
- Moved the code that turns rule flags into chars into a new
...
function called get_rule_prefix().
- Don't pass the per-dir .cvsignore rule from -C for protocols < 29.
2005-01-25 12:10:31 +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
a2b371cd52
Don't try to allocate zero bytes in push_local_excludes().
2005-01-25 02:30:59 +00:00
Wayne Davison
6dfd07d025
Implemented the core of the merge-file and per-dir merge-file support
...
for the --filter option. Some noteworthy changes:
- Added push_local_excludes() and pop_local_excludes() to implement
the changes needed as we go from directory to directory (this takes
the place of the old local_exclude_list var that only handled the
.cvsignore files). These per-dir excludes are linked into the same
exclude list as the global excludes.
- The exclude list is transferred as filter rules to an rsync that
talks protocol 29 or above. It limits itself to just include/exclude
rules for older rsyncs.
2005-01-25 00:52:47 +00:00
Wayne Davison
353f272434
Changed a comment.
2005-01-22 20:27:22 +00:00
Wayne Davison
14d496cc8b
Aid forward-compatibility in the include/exclude syntax by putting
...
a "- " in front of any name that starts with a '+' or a '-' and would
otherwise be unprefixed (the old code only did this if the '+' or '-'
was followed by a space).
2005-01-13 22:01:56 +00:00
Wayne Davison
e425fbe85d
Re-enable the "!" token-handling in a .cvsignore file.
2004-10-06 00:10:08 +00:00
Wayne Davison
9a5e37fca8
In get_exclude_tok(), if XFLG_DIRECTORY was passed in the xflags,
...
set MATCHFLG_DIRECTORY in the mflags we return.
2004-09-22 04:11:15 +00:00
Wayne Davison
9f18657889
A minor improvement in check_one_exclude().
2004-08-10 18:15:33 +00:00
Wayne Davison
7cd72c79ec
Set "eob" correctly in add_exclude_file().
2004-08-05 22:58:17 +00:00
Wayne Davison
65e2487096
Fixed the comment for get_exclude_tok().
2004-05-22 05:32:20 +00:00
Wayne Davison
cb213f1c1b
Got rid of a compiler warning (which was only output by certain
...
compilers).
2004-05-21 09:59:49 +00:00
Wayne Davison
8cbf495a57
Renamed free_exclude_list() to clear_exclude_list().
2004-05-16 23:54:12 +00:00
Wayne Davison
c1b29492c5
Moved the setting of ret->match_flags up a little in make_exclude().
2004-05-16 14:08:34 +00:00
Wayne Davison
5e972dcf34
- Switched the "include" and "directory" ints into bits in match_flags.
...
- Made some length vars unsigned.
2004-05-16 07:28:21 +00:00
Wayne Davison
619d21ffc9
- Complain about an exclude that was too long and then dump it
...
(used to be silently truncated).
- Include extra space in our exclude-reading buffers so that we
can fit a 2-char prefix and a trailing slash and still handle
a MAXPATHLEN name.
2004-05-15 19:31:13 +00:00
Wayne Davison
de91e75724
In the debug output, distinguish between a user-requested clearing
...
of the exclude list and the popping of the local exclude list that
occurs when we finish each subdir.
2004-05-14 21:23:41 +00:00
Wayne Davison
7f0feb4dd6
- Changed XFLG_NO_PREFIXES to XFLG_WORDS_ONLY.
...
- Don't parse comment lines in add_exclude_file() when XFLG_WORD_SPLIT
is set.
2004-04-27 01:36:06 +00:00
Wayne Davison
968ff560d2
Made a comment clearer.
2004-04-27 01:00:58 +00:00
Wayne Davison
82a51ea53d
Improved the debug string for the local_exclude_list.
2004-04-24 08:00:39 +00:00
Wayne Davison
a6536635e3
Fixed a comment.
2004-04-23 08:09:13 +00:00
Wayne Davison
9fdb334e85
Restore the old include behavior where a command-line include could
...
override a .cvsignore exclude.
2004-04-22 22:17:15 +00:00
Wayne Davison
67340e9523
Initialize the new debug_type string in each exclude list and output
...
it in a couple extra debug messages. When we free an exclude list,
make sure we don't clear the debug_type string.
2004-04-22 09:58:15 +00:00
Wayne Davison
24e1569f8b
The debug output for add_exclude() now needs to limit the pattern to
...
print only "pat_len" chars.
2004-04-22 08:41:03 +00:00
Wayne Davison
40d38dc0be
In add_exclude_file(), if we're word-splitting, stop reading a "line"
...
at any whitespace (so that we don't overflow the line buffer).
2004-04-17 17:55:45 +00:00
Wayne Davison
b2aa573b1c
Our exclude lists are now comprised of a base structure with a head
...
and a tail pointer pointing to a linked list of items (rather than
an array of pointers that has to be reallocated all the time).
2004-04-14 23:33:40 +00:00
Wayne Davison
61414c83ce
The check_exclude() and report_exclude_result() functions now take a
...
description string that describes what kind of an include/exclude is
happening (which only gets output when verbose is set to 2 or more).
2004-04-14 21:59:41 +00:00
Wayne Davison
abca4eba67
Fixed a potential problem parsing the "!" token from a word-split string.
2004-04-13 19:07:21 +00:00
Wayne Davison
96d3590a08
A few more improvements to get_exclude_tok() and add_exclude().
2004-04-13 18:35:08 +00:00
Wayne Davison
f8f726449b
- add_exclude() now takes a flag int and can optionally word-split
...
items and/or ignore +/- prefixes.
- add_exclude_file() changed to take the same flags as add_exclude().
- add_exclude_line() was removed since add_exclude() can now do its job.
- make_exclude() now takes a size-limited string without a +/- prefix.
- add_cvs_excludes() was changed to word-split the items that come from
a .cvsignore file, and to ignore all +/- prefixes in all the ignore
sources. Since CVS doesn't check if its ignore items are directories,
the dir-names (e.g. SCCS, CVS, etc.) no longer have a trailing slash
(making our excludes match CVS's ignores more exactly).
2004-04-12 17:42:32 +00:00
Wayne Davison
a3dbb20a0e
Fixed a bug where an exclude name that got sent over the wire could get
...
an extra "- " or "+ " parsed off the start of the name (i.e. we have to
quote excluded names that start with those strings with an extra "- "
at the start).
2004-04-10 10:31:11 +00:00
Wayne Davison
a8edfd53d1
Trivial whitespace tweak.
2004-02-23 19:23:53 +00:00
Wayne Davison
5f5be796b0
Changed a couple sizeof calls and improved some string handling in
...
the {send,recv}_exclude_list() calls.
2004-02-03 23:01:58 +00:00
Wayne Davison
ea847c6232
Use who_am_i() to qualify some debug messages.
2004-01-27 23:13:15 +00:00
Wayne Davison
a7725e6df9
Use new pathjoin() function.
2004-01-20 04:53:59 +00:00
Wayne Davison
3f55bd5dad
Got rid of support for protocols 17 and 18.
2004-01-08 00:45:41 +00:00
Wayne Davison
5e7dbaca50
Use buffered I/O to read the exclude list.
2004-01-02 08:31:12 +00:00
Wayne Davison
58cadc8608
Merged in the security fixes from 2.5.7.
2003-12-06 21:07:27 +00:00
Wayne Davison
d04e9c51b4
Changed "remote_version" to "protocol_version".
2003-09-09 15:58:48 +00:00
Wayne Davison
fe332038c6
Call wildmatch(), not fnmatch().
2003-07-30 06:12:27 +00:00
Wayne Davison
5be7fa93fc
Made make_exclude() store anchored config-file excludes with the full
...
path (clear to the root). Changed several functions to make the args
more general (to support separated lists), more consistent, and easier
to understand.
2003-07-01 21:45:16 +00:00
Wayne Davison
170381c052
Fixed some matching bugs; made the logic of the matching code a little
...
clearer by using defined flags; added several comments; optimized the
matching of an anchored literal string.
2003-05-01 19:33:54 +00:00
Wayne Davison
0f2ac85576
Some whitespace/indentation cleanup.
2003-04-17 01:44:33 +00:00
Wayne Davison
ccdff3ebbf
Open the file in BINARY fd mode, handle the normal line-ending characters
...
better than before, and add support for the new --from0 option (which changes
the line separator to a null).
2003-03-30 23:00:40 +00:00
Wayne Davison
bc72130d71
Got rid of O_TEXT_STR and added code to strip '\r' from the end of the
...
lines we read.
2003-01-26 20:10:23 +00:00
David Dykstra
536b84680b
Open config files in text mode when O_TEXT is defined. This helps on
...
Cygwin when the config files are on a filesystem that is mounted in
binary mode. Patch from Ville Herva.
2003-01-26 03:46:54 +00:00
Wayne Davison
95dd949c09
Added .svn/ to the cvs_ignore_list and some trailing slashes to the
...
other dirs in the list.
2003-01-09 03:55:57 +00:00
David Dykstra
f8a94f0de8
Patch from J.W. Schultz to have --include-from and --exclude-from on
...
filename "-" read from standard input.
2002-08-29 14:37:20 +00:00
Martin Pool
32f761755e
Try to fix ctype issues by always calling these functions as
...
if (!isdigit(* (unsigned char *) p)) {
so that the argument is always in the range of unsigned char when
coerced to an int.
(See digit 1.)
2002-04-11 02:25:53 +00:00
Martin Pool
07a874fd9b
Correction from Nelson Beebe: argument to functions such as isspace()
...
must be an int, not a char. This could cause sign-extension problems.
2002-04-09 06:15:13 +00:00