On Fri, Mar 15, 2002 at 11:49:35AM +1100, Martin Pool
wrote:> On 14 Mar 2002, david.e.sewell@jpmorgan.com wrote:
> > I'm sure you get a million and one requests for changes to rsync.
I thought
> > I would put my bid in and sugest that a feature to perform a unix
style
> > diff of files that are found to be different would be useful for
> > administrators that use rsync to maintain synchronised of application
> > distributions. We us it to maintain application distributions and
generate
> > reports of differences between software trees compared to a reference
host.
> > When we detect differences between config files and scripts it would
be
> > fantastic if rsync could automatically generate the diff report.
>
> I think we could do this fairly easily by just diffing the temporary
> file on the destination and then discarding it, rather than moving it
> into place. It's probably simplest to call out to a user-specified
> command:
>
> rsync --diff 'diff -wu' ~/work/rsync/head/src
wistful:work/rsync/head/src
>
> We need to make sure diff output is piped back across the network and
> not mixed up with anything else.
>
> For security reasons I guess we can't allow you to do this when
> uploading to a server.
>
> Thanks for the idea,
>
> --
> Martin
I disagree with this. I don't think rsync should have built-in support for
that. It sounds to me that Martin's suggestion could be done easily with a
wrapper script, and it's probably not what David had in mind anyway. He
probably wants rsync to find the differences without ever generating the
whole file on the destination and without running an external diff
program. That, I think, belongs in another tool that uses the rsync
algorithm and not in this rsync tool.
- Dave Dykstra