Keep post-review form eating lines starting with "--" beeing removed.

Review Request #624 — Created Nov. 9, 2008 and discarded — Latest diff uploaded

Information

Review Board SVN (deprecated)

Reviewers

If you remove a line starting with "--" from a file thediff will start with "---". In the current incarnation on svn post-review discards ALL lines starting with --- from the diff file.

To avoid that, one needs to implement a state machine for basic diff file parsing. This patch does not contain such a beast but greatly reduces the risk of accidently removing lines by considering three consecutive lines.

I originally wanted to match using regular expressions but I'n not sure which characters are alowed in subversion pathnames and so I didn't know how to exactly craft a regular expression for that.

See also http://groups.google.com/group/reviewboard/browse_thread/thread/cb96afc6064bbf7b#

Seems I'm unable to produce a diff this webinterface accepts o_O. The patch is at http://c0re.23.nu/c0de/misc/reviewboard-r1569_post-review_transparent--upload.patch
I tested it with problematic changesets and it worked. I did no deeper testing regarding the renaming issue which was meant to be handled by the code I changed since I not fully understood under which circumstences that issues could happen.
    Loading...