Homec4science

Allow "Differential Revision ID" field appear on create/edit messages

Authored by epriestley <git@epriestley.com> on May 7 2012, 16:35.

Description

Allow "Differential Revision ID" field appear on create/edit messages

Summary:

  • In practice, 'edit' has two modes, 'create' and 'edit'. These seem like they should map to "create a revision" and "update a revision", but they are completely different.
    • We use the "create" mode:
      • When creating a message from the working copy.
      • When creating a message from a file.
      • When creating a message from a commit.
      • When creating a message from a user template.
      • When creating a message from an "--edit"!
    • We use the "edit" mode:
      • ONLY when updating a revision with arc diff --verbatim.
  • The only difference is in which fields may be overwritten. Under "create", all fields may be overwritten. Under "edit", only safe fields may be overwritten.
  • The "Differential Revision" field currently does not render in either edit mode. This is wrong. Even though it can not be updated in the "edit" mode, it should still render in both modes. This is the only material change this revision makes.
  • Without this change, when we "create" a new message from a working copy and the working copy has a "Differential Revision" field, we incorrectly discard it.
  • The only field which does not render on edit modes now is "Reviewed by" (not "Reviewers"), which is correct, since we do not read the value.

Test Plan: Ran "arc diff" to create/update revisions. Ran "arc diff --verbatim" to create/update revisions with implicit edits (with D2411). Ran "arc diff --edit" to update revisions with explicit edits.

Reviewers: jungejason, btrahan

Reviewed by: jungejason

CC: vrana, aran

Differential Revision: https://secure.phabricator.com/D2412

Details

Committed
epriestley <git@epriestley.com>May 7 2012, 17:14
Pushed
aubortJan 31 2017, 17:16
Parents
rPH7b5f47b17d6e: Enforce upload size limits and transport exceptions with appropriate response…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH2d9d2f1aede1: Allow "Differential Revision ID" field appear on create/edit messages (authored by epriestley <git@epriestley.com>).May 7 2012, 17:14