source: npl/fileserver/rsync/progress-hack.patch @ 67ac101

Last change on this file since 67ac101 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 3.0 KB
  • options.c

    Only in rsync-3.0.9: config.h.in
    Only in rsync-3.0.9: configure.sh
    Only in rsyncp/: debian
    diff -u -r rsync-3.0.9/options.c rsyncp/options.c
    old new  
    15431543                log_before_transfer = !am_server;
    15441544        }
    15451545
    1546         if (do_progress && !verbose && !log_before_transfer && !am_server)
    1547                 verbose = 1;
     1546/* if (do_progress && !verbose && !log_before_transfer && !am_server)
     1547verbose = 1; */
     1548
    15481549
    15491550        if (dry_run)
    15501551                do_xfers = 0;
  • progress.c

    diff -u -r rsync-3.0.9/progress.c rsyncp/progress.c
    old new  
    6161 * printed for this file, so we should output a newline.  (Not
    6262 * necessarily the same as all bytes being received.)
    6363 **/
     64int64 progressed_bytes=0;
     65int64 last_mb=0;
    6466static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now,
    6567                            int is_last)
    6668{
     
    7072        unsigned long diff;
    7173        double rate, remain;
    7274
     75       
     76        int64 this_mb=0;
     77       
    7378        if (is_last) {
    7479                /* Compute stats based on the starting info. */
    7580                if (!ph_start.time.tv_sec
     
    7883                rate = (double) (ofs - ph_start.ofs) * 1000.0 / diff / 1024.0;
    7984                /* Switch to total time taken for our last update. */
    8085                remain = (double) diff / 1000.0;
     86                progressed_bytes+=size;
     87                this_mb=progressed_bytes/1000000;
    8188        } else {
    8289                /* Compute stats based on recent progress. */
    8390                if (!(diff = msdiff(&ph_list[oldest_hpos].time, now)))
     
    8592                rate = (double) (ofs - ph_list[oldest_hpos].ofs) * 1000.0
    8693                     / diff / 1024.0;
    8794                remain = rate ? (double) (size - ofs) / rate / 1000.0 : 0.0;
     95
     96                this_mb=(progressed_bytes+ofs)/1000000;
     97        }
     98       
     99        if (this_mb!=last_mb){
     100            last_mb=this_mb;
     101            rprintf(FCLIENT, "%d\n", this_mb);
    88102        }
    89103
    90104        if (rate > 1024*1024) {
     
    114128        } else
    115129                strlcpy(eol, "\r", sizeof eol);
    116130        progress_is_active = 0;
    117         rprintf(FCLIENT, "%12s %3d%% %7.2f%s %s%s",
    118                 human_num(ofs), pct, rate, units, rembuf, eol);
     131/*      rprintf(FCLIENT, "%12s %3d%% %7.2f%s %s%s",
     132                human_num(ofs), pct, rate, units, rembuf, eol);*/
     133               
     134       
    119135        if (!is_last)
    120136                progress_is_active = 1;
    121137}
  • support/rrsync

    Only in rsyncp/: progress.c.orig
    Only in rsync-3.0.9: proto.h
    Only in rsync-3.0.9: proto.h-tstamp
    Only in rsync-3.0.9: rsync.1
    Only in rsync-3.0.9: rsyncd.conf.5
    diff -u -r rsync-3.0.9/support/rrsync rsyncp/support/rrsync
    old new  
    3131# command="rrsync logs/client" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAzGhEeNlPr...
    3232# command="rrsync -ro results" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAmkHG1WCjC...
    3333#
    34 # Format of the envrionment variables set by sshd:
     34# Format of the environment variables set by sshd:
    3535# SSH_ORIGINAL_COMMAND=rsync --server          -vlogDtpr --partial . ARG # push
    3636# SSH_ORIGINAL_COMMAND=rsync --server --sender -vlogDtpr --partial . ARGS # pull
    3737# SSH_CONNECTION=client_addr client_port server_port
Note: See TracBrowser for help on using the repository browser.