add_exclude(&exclude_list, default_cvsignore,
XFLG_WORD_SPLIT | XFLG_WORDS_ONLY);
---- orig/flist.c 2004-06-18 16:23:07
+--- orig/flist.c 2004-07-15 02:21:10
+++ flist.c 2004-07-03 20:21:27
@@ -39,8 +39,6 @@ extern int module_id;
extern int ignore_errors;
extern int sanitize_paths;
extern int delete_excluded;
extern int orig_umask;
-@@ -69,7 +68,6 @@ extern int write_batch;
+@@ -66,7 +65,6 @@ extern int list_only;
extern struct exclude_list_struct exclude_list;
extern struct exclude_list_struct server_exclude_list;
int io_error;
-@@ -224,8 +222,6 @@ int link_stat(const char *path, STRUCT_S
+@@ -221,8 +219,6 @@ int link_stat(const char *path, STRUCT_S
*/
static int check_exclude_file(char *fname, int is_dir, int exclude_level)
{
#if 0 /* This currently never happens, so avoid a useless compare. */
if (exclude_level == NO_EXCLUDES)
return 0;
-@@ -247,10 +243,7 @@ static int check_exclude_file(char *fnam
+@@ -244,10 +240,7 @@ static int check_exclude_file(char *fnam
if (exclude_level != ALL_EXCLUDES)
return 0;
if (exclude_list.head
return 1;
return 0;
}
-@@ -960,15 +953,7 @@ void send_file_name(int f, struct file_l
+@@ -954,15 +947,7 @@ void send_file_name(int f, struct file_l
if (recursive && S_ISDIR(file->mode)
&& !(file->flags & FLAG_MOUNT_POINT)) {
}
}
-@@ -979,6 +964,7 @@ static void send_directory(int f, struct
+@@ -973,6 +958,7 @@ static void send_directory(int f, struct
struct dirent *di;
char fname[MAXPATHLEN];
unsigned int offset;
char *p;
d = opendir(dir);
-@@ -1002,19 +988,13 @@ static void send_directory(int f, struct
+@@ -996,19 +982,13 @@ static void send_directory(int f, struct
offset++;
}
for (errno = 0, di = readdir(d); di; errno = 0, di = readdir(d)) {
char *dname = d_name(di);
if (dname[0] == '.' && (dname[1] == '\0'
-@@ -1034,6 +1014,8 @@ static void send_directory(int f, struct
+@@ -1028,6 +1008,8 @@ static void send_directory(int f, struct
rsyserr(FERROR, errno, "readdir(%s)", dir);
}
closedir(d);
}
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:21:27
@@ -50,6 +50,7 @@ int preserve_gid = 0;
int preserve_times = 0;
int dry_run = 0;
int local_server = 0;
int ignore_times = 0;
-@@ -309,7 +310,7 @@ void usage(enum logcode F)
+@@ -315,7 +316,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
OPT_REFUSED_BASE = 9000};
-@@ -334,6 +335,7 @@ static struct poptOption long_options[]
+@@ -340,6 +341,7 @@ static struct poptOption long_options[]
{"include", 0, POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 },
{"exclude-from", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 },
{"include-from", 0, POPT_ARG_STRING, 0, OPT_INCLUDE_FROM, 0, 0 },
{"safe-links", 0, POPT_ARG_NONE, &safe_symlinks, 0, 0, 0 },
{"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 },
{"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 },
-@@ -542,6 +544,31 @@ int parse_arguments(int *argc, const cha
+@@ -549,6 +551,31 @@ int parse_arguments(int *argc, const cha
XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE);
break;
+ if (isdigit(*arg))
+ inherit_exclude_levels = atoi(arg);
+ else if (*arg == '.') {
-+ if (!arg[1])
++ if (!*++arg)
+ inherit_exclude_levels = 0;
-+ else if (arg[1] == '.') {
-+ inherit_exclude_levels = 0;
-+ arg--;
-+ do {
++ else if (*arg == '.') {
++ inherit_exclude_levels = 1;
++ arg++;
++ while (strncmp(arg, "/..", 3) == 0) {
+ inherit_exclude_levels++;
+ arg += 3;
-+ } while (strncmp(arg, "/..", 3) == 0);
++ }
+ if (*arg)
+ inherit_exclude_levels = -1;
+ }
case 'h':
usage(FINFO);
exit_cleanup(0);
-@@ -771,6 +798,9 @@ int parse_arguments(int *argc, const cha
+@@ -805,6 +832,9 @@ int parse_arguments(int *argc, const cha
}
}
return 1;
}
-@@ -872,6 +902,12 @@ void server_options(char **args,int *arg
+@@ -906,6 +936,12 @@ void server_options(char **args,int *arg
if (x != 1)
args[ac++] = argstr;
if (block_size) {
if (asprintf(&arg, "-B%u", block_size) < 0)
goto oom;
---- orig/rsync.h 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 20:21:27
@@ -108,6 +108,7 @@
#define XFLG_DEF_INCLUDE (1<<1)
#define PERMS_REPORT (1<<0)
#define PERMS_SKIP_MTIME (1<<1)
-@@ -496,11 +497,16 @@ struct map_struct {
+@@ -498,11 +499,16 @@ struct map_struct {
#define MATCHFLG_INCLUDE (1<<4) /* this is an include, not an exclude */
#define MATCHFLG_DIRECTORY (1<<5) /* this matches only directories */
#define MATCHFLG_CLEAR_LIST (1<<6) /* this item is the "!" token */
};
struct exclude_list_struct {
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:21:27
-@@ -332,6 +332,7 @@ verb(
+@@ -333,6 +333,7 @@ verb(
--exclude-from=FILE exclude patterns listed in FILE
--include=PATTERN don't exclude files matching PATTERN
--include-from=FILE don't exclude patterns listed in FILE
--files-from=FILE read FILE for list of source-file names
-0 --from0 all file lists are delimited by nulls
--version print version number
-@@ -688,6 +689,28 @@ dit(bf(--include-from=FILE)) This specif
+@@ -700,6 +701,28 @@ dit(bf(--include-from=FILE)) This specif
from a file.
- If em(FILE) is bf(-) the list will be read from standard input.
+ If em(FILE) is "-" the list will be read from standard input.
+dit(bf(--inherit=DEPTH)) Using this option allows you to specify that the
+contents of per-directory merge files is inherited by the subdirectories of
+
dit(bf(--files-from=FILE)) Using this option allows you to specify the
exact list of files to transfer (as read from the specified FILE or "-"
- for stdin). It also tweaks the default behavior of rsync to make
-@@ -1043,6 +1066,11 @@ itemize(
+ for standard input). It also tweaks the default behavior of rsync to make
+@@ -1052,6 +1075,11 @@ itemize(
then it is always considered an exclude pattern, even if specified as
part of an include option. The prefix is discarded before matching.
it() if the pattern is a single exclamation mark ! then the current
include/exclude list is reset, removing all previously defined patterns.
)
-@@ -1095,6 +1123,67 @@ itemize(
+@@ -1104,6 +1132,67 @@ itemize(
it would be excluded by the "*")
)