bugzilla-tool's run_command calls rstrip() for stdout, so generated patches will be rstripped. As current svn-apply expects trailing "\n\n" in binary patch, the patching may fail if binary diff is its last diff. It seems removing rstrip() causes unitttest failure in other tests. I think rstripping may happen due to other reasons and the current check is too strict. Let's relax the check a bit.
Created attachment 43138 [details]
Comment on attachment 43138 [details]
The rstripping was added for convenience when dealing with output from commands like svn info, where it's just a single line of output and you don't actually want the trailing \n. We can easily remove the rstrip() and fix all callers to deal with the added newline if that's better?
Created attachment 43213 [details]
I agree run_command should return non-rstripped values if there are no critical reasons. I updated my patch.
Comment on attachment 43213 [details]
Thanks for the review! Closing this bug.