[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Sun Jul 4 19:18:06 UTC 2021


The branch, master has been updated
       via  dbb1c2d1 Set whole_file = 0 when whole_file < 0.  Fixes issue 114.
       via  e8e34ed6 Need to also check stdout_format_has_i in some INFO-NAME checks.
      from  c529782a Fix compiling without ftruncate.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit dbb1c2d10c127b9a5f99e3e4ee5981f5222fc7e7
Author: Wayne Davison <wayne at opencoder.net>
Date:   Sun Jul 4 12:15:16 2021 -0700

    Set whole_file = 0 when whole_file < 0.  Fixes issue 114.

commit e8e34ed6fb576bb734e81d73749cd391d9cc5860
Author: Wayne Davison <wayne at opencoder.net>
Date:   Sun Jun 27 10:16:28 2021 -0700

    Need to also check stdout_format_has_i in some INFO-NAME checks.

-----------------------------------------------------------------------

Summary of changes:
 main.c                 |  5 +++--
 receiver.c             |  5 ++++-
 sender.c               |  4 ++++
 testsuite/devices.test |  1 +
 testsuite/itemize.test | 14 +++++++++++---
 5 files changed, 23 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/main.c b/main.c
index 15303e5d..361dbc4e 100644
--- a/main.c
+++ b/main.c
@@ -87,6 +87,7 @@ extern BOOL shutting_down;
 extern int backup_dir_len;
 extern int basis_dir_cnt;
 extern int default_af_hint;
+extern int stdout_format_has_i;
 extern struct stats stats;
 extern char *stdout_format;
 extern char *logfile_format;
@@ -725,7 +726,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
 		int ret = make_path(dest_path, file_total > 1 && !trailing_slash ? 0 : MKP_DROP_NAME);
 		if (ret < 0)
 			goto mkdir_error;
-		if (ret && INFO_GTE(NAME, 1)) {
+		if (ret && (INFO_GTE(NAME, 1) || stdout_format_has_i)) {
 			if (file_total == 1 || trailing_slash)
 				*cp = '\0';
 			rprintf(FINFO, "created %d director%s for %s\n", ret, ret == 1 ? "y" : "ies", dest_path);
@@ -791,7 +792,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
 		 && strcmp(flist->files[flist->low]->basename, ".") == 0)
 			flist->files[0]->flags |= FLAG_DIR_CREATED;
 
-		if (INFO_GTE(NAME, 1))
+		if (INFO_GTE(NAME, 1) || stdout_format_has_i)
 			rprintf(FINFO, "created directory %s\n", dest_path);
 
 		if (dry_run) {
diff --git a/receiver.c b/receiver.c
index 9df603fe..e85c4779 100644
--- a/receiver.c
+++ b/receiver.c
@@ -539,6 +539,9 @@ int recv_files(int f_in, int f_out, char *local_name)
 	if (delay_updates)
 		delayed_bits = bitbag_create(cur_flist->used + 1);
 
+	if (whole_file < 0)
+		whole_file = 0;
+
 	progress_init();
 
 	while (1) {
@@ -912,7 +915,7 @@ int recv_files(int f_in, int f_out, char *local_name)
 			break;
 		case 0: {
 			enum logcode msgtype = redoing ? FERROR_XFER : FWARNING;
-			if (msgtype == FERROR_XFER || INFO_GTE(NAME, 1)) {
+			if (msgtype == FERROR_XFER || INFO_GTE(NAME, 1) || stdout_format_has_i) {
 				char *errstr, *redostr, *keptstr;
 				if (!(keep_partial && partialptr) && !inplace)
 					keptstr = "discarded";
diff --git a/sender.c b/sender.c
index 9cfca134..83603b99 100644
--- a/sender.c
+++ b/sender.c
@@ -35,6 +35,7 @@ extern int append_mode;
 extern int copy_links;
 extern int io_error;
 extern int flist_eof;
+extern int whole_file;
 extern int allowed_lull;
 extern int preserve_xattrs;
 extern int protocol_version;
@@ -204,6 +205,9 @@ void send_files(int f_in, int f_out)
 	if (DEBUG_GTE(SEND, 1))
 		rprintf(FINFO, "send_files starting\n");
 
+	if (whole_file < 0)
+		whole_file = 0;
+
 	progress_init();
 
 	while (1) {
diff --git a/testsuite/devices.test b/testsuite/devices.test
index 79dfdf17..63d737c9 100644
--- a/testsuite/devices.test
+++ b/testsuite/devices.test
@@ -154,6 +154,7 @@ diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to"
 if test "$CAN_HLINK_SPECIAL" = yes; then
     set -x
     checkdiff "$RSYNC -aii --link-dest='$todir' '$fromdir/' '$chkdir/'" <<EOT
+created directory $chkdir
 cd$allspace ./
 hD$allspace block
 hD$allspace block2
diff --git a/testsuite/itemize.test b/testsuite/itemize.test
index 146ed2ed..6a85ffab 100644
--- a/testsuite/itemize.test
+++ b/testsuite/itemize.test
@@ -54,6 +54,7 @@ case "$RSYNC" in
 esac
 
 checkdiff "$RSYNC -iplr '$fromdir/' '$todir/'" <<EOT
+created directory $todir
 cd$all_plus ./
 cd$all_plus bar/
 cd$all_plus bar/baz/
@@ -151,6 +152,7 @@ EOT
 
 rm -rf "$to2dir"
 cat - "$chkfile.extra" <<EOT >"$chkfile"
+created directory $to2dir
 hf$allspace foo/extra => foo/config1
 EOT
 checkdiff2 "$RSYNC -iplrtH --copy-dest=../to '$fromdir/' '$to2dir/'"
@@ -184,10 +186,13 @@ $L$sym_dots foo/sym -> ../bar/baz/rsync
 EOT
 
 rm -rf "$to2dir"
-checkdiff "$RSYNC -iplrtH --dry-run --link-dest=../to '$fromdir/' '$to2dir/'" <"$chkfile.extra"
+cat - "$chkfile.extra" <<EOT >"$chkfile"
+created directory $to2dir
+EOT
+checkdiff2 "$RSYNC -iplrtH --dry-run --link-dest=../to '$fromdir/' '$to2dir/'"
 
 rm -rf "$to2dir"
-checkdiff "$RSYNC -iplrtH --link-dest=../to '$fromdir/' '$to2dir/'" <"$chkfile.extra"
+checkdiff2 "$RSYNC -iplrtH --link-dest=../to '$fromdir/' '$to2dir/'"
 
 rm -rf "$to2dir"
 checkdiff "$RSYNC -vvplrtH --link-dest='$todir' '$fromdir/' '$to2dir/'" \
@@ -218,7 +223,10 @@ $L_sym_dots foo/sym -> ../bar/baz/rsync
 EOT
 
 rm -rf "$to2dir"
-checkdiff "$RSYNC -iplrtH --compare-dest='$todir' '$fromdir/' '$to2dir/'" <"$chkfile.extra"
+cat - "$chkfile.extra" <<EOT >"$chkfile"
+created directory $to2dir
+EOT
+checkdiff2 "$RSYNC -iplrtH --compare-dest='$todir' '$fromdir/' '$to2dir/'"
 
 rm -rf "$to2dir"
 checkdiff "$RSYNC -vvplrtH --compare-dest='$todir' '$fromdir/' '$to2dir/'" \


-- 
The rsync repository.



More information about the rsync-cvs mailing list