Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3495 by make_svn_diff() in rbtools/clients/ can generate corrupt diffs if you are editing a file that has lines starting with "-- "

*** You must complete this form in its entirety, or your bug report will be
*** rejected.
*** If you have a security issue to report, please send it confidentially
*** Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
*** For customer support, please post to
*** If you have a patch, please submit it to
*** This bug tracker is public. Please check that any logs or other
*** that you include has been stripped of confidential information.

What version are you running?

RBtools 0.6.2 (discovered under 0.5.2)

What's the URL of the page containing the problem?

Its not a page, its rbtools

What steps will reproduce the problem?
1. Have a git-svn repo
2. Try to post a diff that includes a file with a change on a line that already starts with "-- " or "++ " 3. When converting the diff from git to svn format, rbtools appends "(revision NNN)" to those lines breaking the diff.

I discovered this posting a diff for an SNMP MIB which often contain lines that start with "-- "

What is the expected output? What do you see instead?

Not to append "(revision NNNN)" to those lines.

What operating system are you using? What browser?

Iceweasel 30 on Debian Sid

Please provide any additional information below.

The bug appears to be in clients/, it assumes any line start with "--- " is part of the diff header. But if a line in the real file starts with "-- " this sequence can occur outside of a header if that line is changed. Likewise for the "+++ " check below this.

make_perforce_diff() below has the same issue and other diff conversion code made have a similar pitfall.

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to