Page MenuHomePhorge

Attach Diff to Revision: fix Repository asked twice
ClosedPublic

Authored by valerio.bozzolan on Jul 7 2023, 06:22.
Tags
None
Referenced Files
F2987108: D25338.1740109264.diff
Thu, Feb 20, 03:41
F2985755: D25338.1740089455.diff
Wed, Feb 19, 22:10
F2985703: D25338.1740083203.diff
Wed, Feb 19, 20:26
F2982460: D25338.1739960378.diff
Tue, Feb 18, 10:19
F2963332: D25338.1739204083.diff
Sun, Feb 9, 16:14
F2936787: D25338.1737939207.diff
Sun, Jan 26, 00:53
F2935456: D25338.1737850146.diff
Sat, Jan 25, 00:09
F2930409: D25338.1737677445.diff
Thu, Jan 23, 00:10

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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