Commit Graph

155 Commits

Author SHA1 Message Date
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
Wayne Davison
969f7ed5b7 Fixed an infinite loop in parse_rule() when a filter rule is too
longer for MAXPATHLEN.  Also fixed a couple spots nearby that were
erroneously treating pointer "cp" as a '\0'-terminated string.
2006-10-13 01:22:48 +00:00
Wayne Davison
798cde474f Some minor improvements to parse_merge_name(). 2006-10-12 02:14:47 +00:00
Wayne Davison
48ecccce2d The --delete-excluded code now also drops any merge file that was
marked as MATCHFLG_NO_PREFIXES because they can only contain
include/exclude rules.
2006-09-09 18:59:10 +00:00
Wayne Davison
f167879035 Matt pointed out that the code was not properly dropping excludes
that were read from a per-dir merge file when --delete-excluded
is enabled.  This additional code fixes that.
2006-09-01 00:42:39 +00:00
Wayne Davison
97bf86f8ee Make sure that --delete-excluded does not elide a per-dir merge
filter file, while still dumping the .cvsignore file from -C.
2006-08-31 17:18:24 +00:00
Wayne Davison
29930a9fd2 Fixed an exclude bug with --relative excluding "/". 2006-08-12 16:22:03 +00:00
Wayne Davison
55c412630c Added ".bzr/" to the default CVS exclusions. 2006-05-11 07:54:33 +00:00
Wayne Davison
91f4b31fe1 Use the new calling syntax for sanitize_path(). 2006-05-03 00:48:20 +00:00
Wayne Davison
e7c67065c0 Updated the FSF's address to an even newer one. 2006-04-25 23:51:12 +00:00
Wayne Davison
0f78b81511 - Updated the address for the FSF in the opening comment.
- Standardized the format of the opening comment, including adding a
  brief description of what's in the file for those that lacked it.
- Added some missing copyright lines.
- Some minor whitespace tweaks (in a few of the files).
2006-04-25 20:23:34 +00:00
Wayne Davison
e257c6c20b Use the regular delete* vars instead of the saw_delete* vars
(which are no longer around).
2006-03-28 23:09:07 +00:00
Wayne Davison
b316862831 Fixed a problem when copying an absolute source path with
the --relative option enabled.
2006-03-13 01:56:19 +00:00
Wayne Davison
d5782b52a2 - We need to send exclude info from the client to a server-receiver
when --prune-empty-dirs was specified.
- Changed the output of debug include/exclude/show/hide/risk/protect
  messages to use the appropriate filter terminology instead of
  always using the (potentially unclear) include/exclude terms.
2006-01-28 00:14:02 +00:00
Wayne Davison
b8a39ed58a Use the new saw_delete* variables to ensure that the server side
always reads the exclude information when it is present.
2006-01-21 19:54:14 +00:00
Wayne Davison
45c49b52a4 Got rid of calls to (the soon to vanish) safe_fname() function. 2006-01-13 21:17:09 +00:00
Wayne Davison
61e16468f0 We need to call clearerr() when getc() returns EOF with errno == EINTR. 2006-01-06 22:20:07 +00:00
Wayne Davison
e5daa2731a We use the new wildmatch_array() and litmatch_array() functions to
make our include/exclude code easier to read and maintain, and to
eliminate a buffer copy when handling an absolute-path pattern
(which eliminated the full_name[] buffer).  Also added handling
for the new MATCHFLG_WILD3_SUFFIX define that allows a string that
ends with "dir/***" to match the "dir" as well as its contents.
2006-01-02 17:46:18 +00:00
Wayne Davison
770de8994e - Renamed match_start -> anchored_match.
- Twiddled one comment and added another.
- Twiddled the placement of two else statements.
2005-12-24 08:00:12 +00:00
Wayne Davison
c81a20fb7a Tweaked the debug output for cvs_filter_list and server_filter_list. 2005-12-17 21:03:25 +00:00
Wayne Davison
4fc8140a60 Support new XFLG_ABS_IF_SLASH flag. 2005-10-07 18:39:40 +00:00
Wayne Davison
35a388b141 Really fix '!' in a .cvsignore file this time. 2005-09-16 16:10:01 +00:00
Wayne Davison
3fac51e21e Use BIGPATHBUFLEN for the length of two line buffers. 2005-07-29 18:31:07 +00:00
Wayne Davison
a1f99493b3 Changed overflow() to overflow_exit(). 2005-07-07 19:49:14 +00:00
Wayne Davison
98e4741463 A slightly better fix than the last one (though it won't make any
difference in how the code behaves due to how it is called).
2005-04-26 16:09:03 +00:00
Wayne Davison
2765f2e4a7 Fixed problem with -C when we're the sender, the remote is using an
older protocol, and we're not sending the exclude list (i.e. the
user didn't specify --delete or they specified --delete-ignored).
2005-04-26 15:24:40 +00:00
Wayne Davison
664cf3278a Make sure that "- !" or "+ !" aren't interpreted as a list-clearing
token.
2005-04-07 18:06:06 +00:00
Wayne Davison
ac1cb9380d Tweaked an error message. 2005-02-27 07:34:27 +00:00
Wayne Davison
2217b30adf Fixed a problem sending include rules to an older rsync. 2005-02-26 02:56:30 +00:00
Wayne Davison
4adbb5f246 Have rule_strcmp() accept and return a uchar*. 2005-02-20 17:04:53 +00:00
Wayne Davison
6d7b3d52dc Rules read in from per-dir merge files need to have non-applicable
rules filtered out before the rule gets stored (not in a post-
filtering pass like the rules that are read-in prior to the run).
2005-02-19 03:12:21 +00:00
Wayne Davison
ed243f8c29 - Added modifiers for the include/exclude rules that makes them
apply to the indicated (sender/receiver) side.
- Added the hide/show and protect/risk filter rules as an alternate
  way to specify sender-/receiver-specific include/exclude rules.
- send_rules() now allows f_out to be -1 to indicate that the list
  should be scanned but not sent.
- send_rules() now filters the list to remove any items that don't
  apply to the current side (after sending the item to the other
  side when f_out != -1).
- {send,recv}_filter_list() now transfer the list, even when the
  receiver is the server and --delete-excluded was specified (the
  exchanged list is appropriately filtered, of course).
- recv_filter_list() uses send_rules() to trim non-applicable rules
  when we're a local-server (because we got our filter list without
  send/recv calls when fork() duplicated it).
2005-02-12 19:52:26 +00:00
Wayne Davison
345e0988cb Changed rule_match() to rule_strcmp(). Likewise for the
define RULE_MATCH() being changed into RULE_STRCMP().
2005-02-11 10:47:43 +00:00
Wayne Davison
64b761c19a Allow a ',' to prefix the MODIFIERS for a single-letter filter rule. 2005-02-08 18:47:25 +00:00
Wayne Davison
a1ac8edd66 - Added long-name filter rules.
- Only parse the "!" token when MATCHFLG_NO_PREFIXES is set if
  MATCHFLG_CVS_IGNORE is also set.
2005-02-08 18:33:16 +00:00
Wayne Davison
a6126d678b Added missing call to safe_fname(). 2005-02-07 20:38:56 +00:00