Fix failed hunks.
authorWayne Davison <wayne@opencoder.net>
Sun, 4 Jul 2021 19:20:50 +0000 (12:20 -0700)
committerWayne Davison <wayne@opencoder.net>
Sun, 4 Jul 2021 19:20:50 +0000 (12:20 -0700)
db.diff
source-filter_dest-filter.diff

diff --git a/db.diff b/db.diff
index 5534471adf8f99c7be4bc07dee4530c1ac39cc47..d29d919e764be4c0eed9df3a262f34e0d9a3e6de 100644 (file)
--- a/db.diff
+++ b/db.diff
@@ -21,7 +21,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: dbb1c2d10c127b9a5f99e3e4ee5981f5222fc7e7
 diff --git a/.gitignore b/.gitignore
 --- a/.gitignore
 +++ b/.gitignore
@@ -2435,7 +2435,7 @@ diff --git a/main.c b/main.c
  extern int mkpath_dest_arg;
  extern int file_total;
  extern int recurse;
-@@ -93,6 +95,7 @@ extern char *logfile_format;
+@@ -94,6 +96,7 @@ extern char *logfile_format;
  extern char *filesfrom_host;
  extern char *partial_dir;
  extern char *rsync_path;
@@ -2443,7 +2443,7 @@ diff --git a/main.c b/main.c
  extern char *shell_cmd;
  extern char *password_file;
  extern char *backup_dir;
-@@ -1244,6 +1247,9 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
+@@ -1245,6 +1248,9 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
        if (am_daemon && io_timeout && protocol_version >= 31)
                send_msg_int(MSG_IO_TIMEOUT, io_timeout);
  
@@ -2453,7 +2453,7 @@ diff --git a/main.c b/main.c
        if (am_sender) {
                keep_dirlinks = 0; /* Must be disabled on the sender. */
                if (need_messages_from_generator)
-@@ -1534,6 +1540,9 @@ static int start_client(int argc, char *argv[])
+@@ -1535,6 +1541,9 @@ static int start_client(int argc, char *argv[])
        else
                env_port = rsync_port;
  
@@ -2778,9 +2778,9 @@ diff --git a/receiver.c b/receiver.c
                                if (remove_source_files
                                 || (preserve_hard_links && F_IS_HLINKED(file)))
                                        send_msg_int(MSG_SUCCESS, ndx);
-@@ -539,6 +546,9 @@ int recv_files(int f_in, int f_out, char *local_name)
-       if (delay_updates)
-               delayed_bits = bitbag_create(cur_flist->used + 1);
+@@ -542,6 +549,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+       if (whole_file < 0)
+               whole_file = 0;
  
 +      if (use_db && (append_mode == 1 || protocol_version < 30))
 +              use_db = 0; /* We can't note finished md5 values */
@@ -2788,7 +2788,7 @@ diff --git a/receiver.c b/receiver.c
        progress_init();
  
        while (1) {
-@@ -878,6 +888,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -881,6 +891,8 @@ int recv_files(int f_in, int f_out, char *local_name)
                                        do_unlink(partialptr);
                                handle_partial_dir(partialptr, PDIR_DELETE);
                        }
@@ -2797,7 +2797,7 @@ diff --git a/receiver.c b/receiver.c
                } else if (keep_partial && partialptr && !one_inplace) {
                        if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
                                rprintf(FERROR,
-@@ -891,6 +903,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -894,6 +906,8 @@ int recv_files(int f_in, int f_out, char *local_name)
                                recv_ok = -1;
                        else if (delay_updates && recv_ok) {
                                bitbag_set_bit(delayed_bits, ndx);
index 7165c08dee966ba924710f647259c8f114465b86..cd6a78921171f77aeae48d028d80ca47a479101c 100644 (file)
@@ -30,7 +30,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                (optional if already run)
     make
 
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: dbb1c2d10c127b9a5f99e3e4ee5981f5222fc7e7
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -54,7 +54,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -187,7 +187,7 @@ int shell_exec(const char *cmd)
+@@ -188,7 +188,7 @@ int shell_exec(const char *cmd)
  }
  
  /* Wait for a process to exit, calling io_flush while waiting. */
@@ -259,9 +259,9 @@ diff --git a/receiver.c b/receiver.c
  
        if (DEBUG_GTE(RECV, 1))
                rprintf(FINFO, "recv_files(%d) starting\n", cur_flist->used);
-@@ -539,6 +542,23 @@ int recv_files(int f_in, int f_out, char *local_name)
-       if (delay_updates)
-               delayed_bits = bitbag_create(cur_flist->used + 1);
+@@ -542,6 +545,23 @@ int recv_files(int f_in, int f_out, char *local_name)
+       if (whole_file < 0)
+               whole_file = 0;
  
 +      if (dest_filter) {
 +              char *p;
@@ -283,7 +283,7 @@ diff --git a/receiver.c b/receiver.c
        progress_init();
  
        while (1) {
-@@ -853,6 +873,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -856,6 +876,9 @@ int recv_files(int f_in, int f_out, char *local_name)
                else if (!am_server && INFO_GTE(NAME, 1) && INFO_EQ(PROGRESS, 1))
                        rprintf(FINFO, "%s\n", fname);
  
@@ -293,7 +293,7 @@ diff --git a/receiver.c b/receiver.c
                /* recv file data */
                recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, file, inplace || one_inplace);
  
-@@ -868,6 +891,16 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -871,6 +894,16 @@ int recv_files(int f_in, int f_out, char *local_name)
                        exit_cleanup(RERR_FILEIO);
                }
  
@@ -389,7 +389,7 @@ diff --git a/sender.c b/sender.c
  
  extern int do_xfers;
  extern int am_server;
-@@ -47,6 +48,7 @@ extern int batch_fd;
+@@ -48,6 +49,7 @@ extern int batch_fd;
  extern int write_batch;
  extern int file_old_total;
  extern BOOL want_progress_now;
@@ -397,7 +397,7 @@ diff --git a/sender.c b/sender.c
  extern struct stats stats;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  
-@@ -200,6 +202,26 @@ void send_files(int f_in, int f_out)
+@@ -201,6 +203,26 @@ void send_files(int f_in, int f_out)
        int f_xfer = write_batch < 0 ? batch_fd : f_out;
        int save_io_error = io_error;
        int ndx, j;
@@ -424,7 +424,7 @@ diff --git a/sender.c b/sender.c
  
        if (DEBUG_GTE(SEND, 1))
                rprintf(FINFO, "send_files starting\n");
-@@ -334,6 +356,7 @@ void send_files(int f_in, int f_out)
+@@ -338,6 +360,7 @@ void send_files(int f_in, int f_out)
                        exit_cleanup(RERR_PROTOCOL);
                }
  
@@ -432,7 +432,7 @@ diff --git a/sender.c b/sender.c
                fd = do_open(fname, O_RDONLY, 0);
                if (fd == -1) {
                        if (errno == ENOENT) {
-@@ -353,6 +376,33 @@ void send_files(int f_in, int f_out)
+@@ -357,6 +380,33 @@ void send_files(int f_in, int f_out)
                        continue;
                }
  
@@ -466,7 +466,7 @@ diff --git a/sender.c b/sender.c
                /* map the local file */
                if (do_fstat(fd, &st) != 0) {
                        io_error |= IOERR_GENERAL;
-@@ -414,6 +464,8 @@ void send_files(int f_in, int f_out)
+@@ -418,6 +468,8 @@ void send_files(int f_in, int f_out)
                        }
                }
                close(fd);