Make "Update Diff" work like "New Review Request"
Review Request #6138 — Created July 23, 2014 and submitted — Latest diff uploaded
This change replaces the old "Update Diff" dialog with a new version that's
based on the pre-commit workflow from the "New Review Request" page. This makes
it so that the general case is as simple as selecting or drag-and-dropping a
diff file, and other questions (such as the basedir or parent diff) are only
asked if necessary.The PreCommitView from the New Review Request page has been generalized into
UploadDiffView, which both the PreCommitView and UpdateDiffView extend. For the
most part, the only difference between these are the specific templates that
are used, and the fact that the update dialog uses$.fn.modalDlg
around
this.$el
.This eliminates one of our two remaining uses of
$.formDlg
andgReviewRequest
,
getting us that much closer to a clean javascript codebase.
- Went through all the old scenarios with the "New Review Request" page to test
for regressions. - Updated a diff on a review request and saw the resulting change.
- Updated a diff on a review request that required a parent diff, specified
that parent diff, and saw the resulting change. - Tried to update a diff on a review request with a patch file that had short
revs for git and saw the appropriate error. - Updated a diff on a review request using an svn repository and was prompted
for the base directory.