3897: Perforce descriptions submitted via rbt post with GUESS_FIELDS enabled are incorrectly parsed

buck*****@gmai***** (Google Code) (Is this you? Claim this profile.)
What version are you running?
ReviewBoard 2.0.13
RBTools 0.7.4
p4 command-line client version P4/LINUX26X86_64/2012.1/473528 (2012/05/31)
Perforce server version P4D/LINUX26X86_64/2014.1/963489 (2014/11/18)

What's the URL of the page containing the problem?
https://reviewboard.example.com/api/review-requests/xxxxxx/draft/

What steps will reproduce the problem?
1. Compose a new Perforce change, including a description. Ensure that the description has a few custom fields (e.g. "Testing Done:").
2. Post the change to ReviewBoard with `-g auto` or `-g yes`: $ rbt post -g auto <CLN>
3. Navigate to the review draft page. Note that the change description includes the "Testing Done" field that should have been parsed into the Testing Done box. The Testing Done box is empty when it should contain the contents of the "Testing Done" field.

What is the expected output? What do you see instead?
Expected output: change description (including first-line summary) in the Description text entry. "Testing Done" field in the Testing Done text entry.

Example of expected output for the description field:
=====
Change description summary

Change description verbose description
=====

Actual output: change description (with first-line summary removed) in the description box, along with the "Testing Done" field after it, as well as other fields present that are usually parsed out. The "Testing Done" box is empty.

Example of actual output for the description box:
=====
Change description verbose description

Testing Done: [testing done field contents]
Reviewed by: [reviewed by field contents]
Review URL: [review URL field contents]
=====

For completeness, here is the entirety of the Perforce description of the faux change used for the above two examples:
=====
Change description summary

Change description verbose description

Testing Done: [testing done field contents]
Reviewed by: [reviewed by field contents]
Review URL: [review URL field contents]
=====

What operating system are you using? What browser?
Linux. Firefox.

Please provide any additional information below.
The default behavior is a regression from RBTools 0.5.x, which handled Perforce changes correctly. I would somewhat expect `-g yes` to no-op on Perforce repos (since I believe the change description is unconditionally fetched directly from the Perforce server by the ReviewBoard server), and `-g auto` should definitely no-op in this case.

I also don't really expect the change description to update when `-g no` is passed, but knowing how the Perforce support works, I'm not really surprised it does either (and don't consider this a bug).
david
#1 david
  • -reviewboard
    +rbtools
  • +SCM:Perforce