rsyncd listing of directories

Dave Dykstra dwd at bell-labs.com
Thu May 30 13:03:03 EST 2002


Can you figure out another way to do it (that's not a "complete hack")
without affecting the output of list_only mode but yet won't get in your
way?  The Rusty way doesn't actually recurse completely, it only goes one
level down.  I bet he did it that way to avoid having to change the remote
side.

- Dave Dykstra

On Wed, May 22, 2002 at 09:48:58AM -0400, Alberto Accomazzi wrote:
> 
> I just took a look at the 2.5.5 codebase to see how easy it would be to
> write a little driver script that downloads a big directory tree from an
> rsync daemon the chunky way (get a list of a module's subdirectories and
> do the transfer by subdirectory).  The reason for doing this is obvious
> when you have large directory trees, as is the case for many of us.
> Unfortunately the way list_only is currently implemented makes the whole
> idea useless since it forces the daemon to recurse the target directory
> tree anyways.  Here's the code:
> 
> in options.c:
> 
>         /* this is a complete hack - blame Rusty 
> 
>            this is a hack to make the list_only (remote file list)
>            more useful */
>         if (list_only && !recurse) 
>                 argstr[x++] = 'r';
> 
> 
> in exclude.c:
> 
>         /* This is a complete hack - blame Rusty.
>          *
>          * FIXME: This pattern shows up in the output of
>          * report_exclude_result(), which is not ideal. */
>         if (list_only && !recurse) {
>                 add_exclude("/*/*", 0);
>         }
> 
> 
> So I'm going to bite and blame Rusty at this point and ask the question: 
> why was this implemented this way?  I can't think of a good reason why.  
> I'm happy to try and work on a patch if there is a consensus that this 
> is desireable.
> 
> -- Alberto
> 
> 
> 
> ****************************************************************************
> Alberto Accomazzi                          mailto:aaccomazzi at cfa.harvard.edu
> NASA Astrophysics Data System                      http://adsabs.harvard.edu
> Harvard-Smithsonian Center for Astrophysics        http://cfawww.harvard.edu
> 60 Garden Street, MS 83, Cambridge, MA 02138 USA   
> ****************************************************************************
> 
> -- 
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html




More information about the rsync mailing list