<div class="gmail_quote">On Wed, Oct 19, 2011 at 9:59 PM, Alex Jurkiewicz <span dir="ltr"><<a href="mailto:alex@jurkiewi.cz">alex@jurkiewi.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>These two patches change how rsync handles temporary files on the receiver side. The first patch adds a static token to rsync's temporary filenames. The second patch ignores files with this token when using --cvs-ignore.</div>
</blockquote><div><br></div><div>[Sorry for the delay in commenting on this.]  I like the idea of making the temp files follow a more easily excluded pattern, but the addition of such a long string to the suffix could make the names overflow more easily on really long paths.  Perhaps switching the name around to be .FILE_NAME_PART.XXXXXX.rsynctmp and extending the code that trims the name down to allow the .rsynctmp to be trimmed out if absolutely necessary would be a good solution.  Then, an exclude of .*.rsynctmp would exclude all the temp files that didn't get truncated at the limit (which would be the majority of the temp files).  Doing the reordering would require the mkstemps() function, so any host that didn't support that wouldn't get the new .rsynctmp suffix.</div>
<div><br></div><div>Here's a patch that should handle the above idea:  <a href="http://pastebin.com/UTbtFu8Ta">http://pastebin.com/UTbtFu8Ta</a></div><div><br></div><div>I don't think I'd add the temp files to the cvs exclusion code, since normal single-use copying should be removing old temp files, not ignoring them.  Thus, it should be up to the user to choose to exclude the temp files or not.</div>
</div><div><br></div>..wayne..<br>