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
F3873614: D25338.1746192967.diff
Thu, May 1, 13:36
F3850724: D25338.1746115747.diff
Wed, Apr 30, 16:09
F3801622: D25338.1745958670.diff
Mon, Apr 28, 20:31
F3763646: D25338.1745839425.diff
Sun, Apr 27, 11:23
F3577998: D25338.1745092122.diff
Fri, Apr 18, 19:48
F3496154: D25338.1744788851.diff
Tue, Apr 15, 07:34
F3371224: D25338.1744239696.diff
Tue, Apr 8, 23:01
F3371193: D25338.1744239324.diff
Tue, Apr 8, 22:55

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
differential-fix-repo-prefiller
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 653
Build 653: 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