Set the change number/commit ID when posting submitted CLs in Perforce.

Review Request #13940 — Created June 5, 2024 and submitted — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

A while back we added the ability to post submitted changes and ranges
of changes for Perforce. In the case of posting a single CLN for review,
this wasn't properly setting the change number field in Review Board,
which made it hard to search to see whether there were review requests
for any given change.

This change makes it so if we're posting a single, submitted revision
for review, we'll pass along that revision inside the commit_id field.
We use this instead of changenum because we don't want to trigger Review
Board's legacy-ish codepath that pulls the data from the server (and
triggers an error because the CL isn't pending).

  • Ran unit tests.
  • Posted a variety of submitted changelists and saw that change
    descriptions and diffs were properly uploaded, and that the "Change"
    field on the review request contained the correct info.
  • Posted a range that included multiple submitted changelists and saw
    that the "Change" field was blank.

Commits

Files