A simpler move-files patch

Wayne Davison wayned at users.sourceforge.net
Thu May 9 14:33:08 EST 2002

On Thu, 9 May 2002, Dave Dykstra wrote:
> Maybe I'm dense, but I don't see how that's any different from turning
> on a flag (with the opposite meaning) at the end.

The reason this makes a difference is that not all the files get into
that code.  Any files that are identical just get skipped over on the
generator side, so the sender never sees them (in that loop).  So, the
sender needs to assume that we can delete all the files in the list
until we're told what files are not identical.

An alternate way to implement this is to modify the generator process to
send a special "this file is identical" sequence when we're in file-
moving mode.  That would allow the sending process to remove identical
files immediately on the sending side, and then we could just mark the
differing files with a "delete me" flag after we finish sending out all
the updates.

Another thought just occurred to me on how to implement this without
resorting to a post-processing pass.  It might be possible to have the
receiver send the "delete me" events over the error message pipe (rather
than the redo pipe), and since the generator already keeps this pipe
unblocked, that would allow the code to work without first fixing the
redo pipe's blockability.  I can check into this.


More information about the rsync mailing list