Page MenuHomePhabricator

Differential - refine selecting a repository diff --> revision workflow
ClosedPublic

Authored by btrahan on Nov 19 2014, 1:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 12:47 AM
Unknown Object (File)
Sat, Dec 14, 3:29 PM
Unknown Object (File)
Fri, Dec 13, 10:16 PM
Unknown Object (File)
Fri, Dec 13, 5:02 AM
Unknown Object (File)
Fri, Dec 6, 6:08 AM
Unknown Object (File)
Wed, Dec 4, 11:54 PM
Unknown Object (File)
Tue, Dec 3, 10:41 AM
Unknown Object (File)
Fri, Nov 29, 12:32 PM
Subscribers

Details

Summary

Fixes T6200. Ref T6237. When creating a diff from the web view, allow the user to select the repository at that time. When viewing a diff that has no associated revision and then creating a revision, pass along the repository phid to the create revision controller. Within the create revision controller, default the repository selector to this repository phid. Finally, in the editor, stop aggressively resetting the repository phid for every TYPE_UPDATE; rather, do so if its not a new object -- the diff should reign supreme in that case -- or if there's no repository -- let the diff be the guide.

Test Plan
  • made a diff with an associated repo, made a revision from the diff, saw the associated repo and it stuck on save!
  • made a diff with an associated repo, made a revision from the diff but changed the repo and it stuck on save!
  • made a diff with an associated repo, made a revision from the diff but changed the repo to nothing and it stuck on save!

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Differential - refine selecting a repository diff --> revision workflow.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
src/applications/differential/editor/DifferentialTransactionEditor.php
214–219

sigh, just realized this bit won't work while I was making dinner per the issue you pointed out prior...

One fix that WILL work is to simply have the custom field transactions come AFTER the TYPE_UPDATE transaction. The repository custom field will thus set this correctly 100% of the time. I don't like the brittleness there though of needing transactions in a certain order... but at least it works unlike this bit!

My idea to make this work failed but here it is anyway with some comments explaining how come it failed.

I guess I need to manually process the repository custom field here as well, and update the diff to have the value that the user selected.

actually make it work. Introduce a setRepositoryPHIDOverride to the editor that makes it so.

epriestley edited edge metadata.

One inline.

src/applications/differential/controller/DifferentialDiffCreateController.php
68

I'd expect this parameter to need to be array($repository_phid), I think.

This revision is now accepted and ready to land.Nov 19 2014, 6:54 PM
btrahan edited edge metadata.

allow the user to select no repository at all from diff create and have that be respected all the way through

wrap $repository_phid in an array. (not sure how come this was working...? still works with this fix.)

This revision was automatically updated to reflect the committed changes.