Fix "Update Diff" to do the right thing on review requests with history.

Review Request #13846 — Created May 8, 2024 and updated

Information

Review Board
release-7.x

Reviewers

When a review request has commit history, it needs to always be updated
via RBTools. Attempting to use "Update Diff" to upload a diff file will
break in a confusing and useless way.

This change makes it so we show an informative error instead of letting
the user choose a diff file and then showing them an unknown error.

This also gets rid of an obsolete implementation for this that hadn't
been removed from ReviewRequestEditorView.

Clicked "Update Diff" on a review request with commit history and saw
the new error dialog. Did it on a review request without commit history
and saw the upload dialog as before.

Summary ID
Fix "Update Diff" to do the right thing on review requests with history.
When a review request has commit history, it needs to always be updated via RBTools. Attempting to use "Update Diff" to upload a diff file will break in a confusing and useless way. This change makes it so we show an informative error instead of letting the user choose a diff file and then showing them an unknown error. This also gets rid of an obsolete implementation for this that hadn't been removed from ReviewRequestEditorView. Testing Done: Clicked "Update Diff" on a review request with commit history and saw the new error dialog. Did it on a review request without commit history and saw the upload dialog as before.
acb98eb84723d2648d569501499bfa9a43cec4e3
Description From Last Updated

Can we explicitly compare length?

chipx86chipx86

Can we link to the RBTools page?

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    Can we explicitly compare length?

  3. Show all issues

    Can we link to the RBTools page?

  4. 
      
david
david
Review request changed

Change Summary:

Rebase onto latest changes.

Commits:

Summary ID
Fix "Update Diff" to do the right thing on review requests with history.
When a review request has commit history, it needs to always be updated via RBTools. Attempting to use "Update Diff" to upload a diff file will break in a confusing and useless way. This change makes it so we show an informative error instead of letting the user choose a diff file and then showing them an unknown error. This also gets rid of an obsolete implementation for this that hadn't been removed from ReviewRequestEditorView. Testing Done: Clicked "Update Diff" on a review request with commit history and saw the new error dialog. Did it on a review request without commit history and saw the upload dialog as before.
eb90727582cbeff82839a8261fee45928b9b186a
Fix "Update Diff" to do the right thing on review requests with history.
When a review request has commit history, it needs to always be updated via RBTools. Attempting to use "Update Diff" to upload a diff file will break in a confusing and useless way. This change makes it so we show an informative error instead of letting the user choose a diff file and then showing them an unknown error. This also gets rid of an obsolete implementation for this that hadn't been removed from ReviewRequestEditorView. Testing Done: Clicked "Update Diff" on a review request with commit history and saw the new error dialog. Did it on a review request without commit history and saw the upload dialog as before.
acb98eb84723d2648d569501499bfa9a43cec4e3

Diff:

Revision 3 (+74 -60)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
maubin
  1. Ship It!
  2. 
      
maubin
  1. We should also update the docs at /users/review-requests/uploading-diffs/ to be more explicit about how you can't use the the "Upload Diff" button for review requests created with RBTools.

  2. 
      
Loading...