[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Sat Aug 27 13:05:30 MDT 2011


The branch, master has been updated
       via  865efe9 Fix sending of "." attributes for implied-dot-dir.
       via  1874957 Fix bwlimit multiplication overflow.  Fixes bug 8375.
       via  a05758f Some option-parsing clarifiation in the intro.
      from  fb0d440 Fix misplaced parens on getnameinfo() call.

;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 865efe94563f2866b104c76c58cc38d553b15a54
Author: Wayne Davison <wayned at samba.org>
Date:   Sat Aug 27 11:56:57 2011 -0700

    Fix sending of "." attributes for implied-dot-dir.

commit 18749579b57e5b2f3ab2050c88bf2750686be246
Author: Wayne Davison <wayned at samba.org>
Date:   Sat Aug 27 10:28:20 2011 -0700

    Fix bwlimit multiplication overflow.  Fixes bug 8375.

commit a05758fde647e1d1b36446ca09afbb9433799920
Author: Wayne Davison <wayned at samba.org>
Date:   Sat Aug 27 10:07:28 2011 -0700

    Some option-parsing clarifiation in the intro.

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

Summary of changes:
 flist.c  |   21 +++++++++++++--------
 io.c     |    2 +-
 rsync.yo |   16 +++++++++++-----
 3 files changed, 25 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/flist.c b/flist.c
index 7a6ab34..8bade1c 100644
--- a/flist.c
+++ b/flist.c
@@ -2190,12 +2190,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
 				fn = fbuf;
 			/* A leading ./ can be used in relative mode to affect
 			 * the dest dir without its name being in the path. */
-			if (*fn == '.' && fn[1] == '/' && !implied_dot_dir) {
-				send_file_name(f, flist, ".", NULL,
-				    (flags | FLAG_IMPLIED_DIR) & ~FLAG_CONTENT_DIR,
-				    ALL_FILTERS);
-				implied_dot_dir = 1;
-			}
+			if (*fn == '.' && fn[1] == '/' && fn[2] && !implied_dot_dir)
+				implied_dot_dir = -1;
 			len = clean_fname(fn, CFN_KEEP_TRAILING_SLASH
 					    | CFN_DROP_TRAILING_DOT_DIR);
 			if (len == 1) {
@@ -2233,11 +2229,20 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
 		dirlen = dir ? strlen(dir) : 0;
 		if (dirlen != lastdir_len || memcmp(lastdir, dir, dirlen) != 0) {
 			if (!change_pathname(NULL, dir, -dirlen))
-				continue;
+				goto bad_path;
 			lastdir = pathname;
 			lastdir_len = pathname_len;
-		} else if (!change_pathname(NULL, lastdir, lastdir_len))
+		} else if (!change_pathname(NULL, lastdir, lastdir_len)) {
+		    bad_path:
+			if (implied_dot_dir < 0)
+				implied_dot_dir = 0;
 			continue;
+		}
+
+		if (implied_dot_dir < 0) {
+			send_file_name(f, flist, ".", NULL, (flags | FLAG_IMPLIED_DIR) & ~FLAG_CONTENT_DIR, ALL_FILTERS);
+			implied_dot_dir = 1;
+		}
 
 		if (fn != fbuf)
 			memmove(fbuf, fn, len + 1);
diff --git a/io.c b/io.c
index 4fb78aa..7cb3be1 100644
--- a/io.c
+++ b/io.c
@@ -1936,7 +1936,7 @@ static void sleep_for_bwlimit(int bytes_written)
 	if (prior_tv.tv_sec) {
 		elapsed_usec = (start_tv.tv_sec - prior_tv.tv_sec) * ONE_SEC
 			     + (start_tv.tv_usec - prior_tv.tv_usec);
-		total_written -= elapsed_usec * bwlimit / (ONE_SEC/1024);
+		total_written -= (int64)elapsed_usec * bwlimit / (ONE_SEC/1024);
 		if (total_written < 0)
 			total_written = 0;
 	}
diff --git a/rsync.yo b/rsync.yo
index 3174ca3..96e2634 100644
--- a/rsync.yo
+++ b/rsync.yo
@@ -463,11 +463,17 @@ accepted: verb(
 
 manpageoptions()
 
-rsync uses the GNU long options package. Many of the command line
-options have two variants, one short and one long.  These are shown
-below, separated by commas. Some options only have a long variant.
-The '=' for options that take a parameter is optional; whitespace
-can be used instead.
+Rsync accepts both long (double-dash + word) and short (single-dash + letter)
+options.  The full list of the available options are described below.  If an
+option can be specified in more than one way, the choices are comma-separated.
+Some options only have a long variant, not a short.  If the option takes a
+parameter, the parameter is only listed after the long variant, even though it
+must also be specified for the short.  When specifying a parameter, you can
+either use the form --option=param or replace the '=' with whitespace.  The
+parameter may need to be quoted in some manner for it to survive the shell's
+command-line parsing.  Keep in mind that a leading tilde (~) in a filename is
+substituted by your shell, so --option=~/foo will not change the tilde into
+your home directory (remove the '=' for that).
 
 startdit()
 dit(bf(--help)) Print a short help page describing the options


-- 
The rsync repository.


More information about the rsync-cvs mailing list