Fix multi-commit uploading with Mercurial in pre-commit review mode.

Review Request #12623 — Created Sept. 22, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

Currently, uploading a multi-commit review request diffs fails with
"API Error 207: Repository File Not Found" when different files are
changed in different patches.

See the report here:
https://groups.google.com/g/reviewboard/c/FG5TNTNC_fU

It tries to request a raw file from a server repository using the
revision ID of the previous uploaded commit. Sure there's no such
revision on the server as those patches aren't pushed yet to the
upstream repository in a pre-commit review case.

For a proper file request in this case it should use "base_commit_id".

Reproduced the original problem in a new database, and verified that
this fixes the issue.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix multi-commit uploading with Mercurial in pre-commit review mode.
Currently, uploading a multi-commit review request diffs fails with "API Error 207: Repository File Not Found" when different files are changed in different patches. It tries to request a raw file from a server repository using the revision ID of the previous uploaded commit. Sure there's no such revision on the server as those patches aren't pushed yet to the upstream repository in a pre-commit review case. For a proper file request in this case it should use "base_commit_id".
ed7cce1c5ca85ffad8670d0d163f4e4507800678 Valentin V. Bartenev
reviewboard/diffviewer/forms.py
Loading...