Page MenuHomePhorge

Attach Diff to Revision: fix Repository asked twice
ClosedPublic

Authored by valerio.bozzolan on Jul 7 2023, 06:22.

Details

Summary

If you manually upload a Diff (patch) from the Differential web
interface you can select the Repository.

We fix the default value of the Repository field during creation mode,
guessing the repo from the potentially already-available diff.

Closes T15537

Test Plan
  • Create a cute Differential Revision from web
  • Pick a Repository > Continue
  • Create a new Revision > Continue

At this point you should still have that repository instead of nothing.

Diff Detail

Repository
rP Phorge
Branch
arcpatch-D25338
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 686
Build 686: arc lint + arc unit

Event Timeline

src/applications/differential/editor/DifferentialRevisionEditEngine.php
130

Interestingly $is_create was already available but unused.

192

✅ Nothing changed here. See line 130.

avivey added inline comments.
src/applications/differential/editor/DifferentialRevisionEditEngine.php
244

Phid type can never be falsey if not null, this can be if (.... && !$repository_phid && ...).

src/applications/differential/editor/DifferentialRevisionEditEngine.php
244

Done, thanks :)

This revision is now accepted and ready to land.Jul 21 2023, 15:44