Currently, "Land Revision" always lands into master. Here's my plan to fix this, so it can be used to land into other branches:
- Add PHIDs to PhabricatorRepositoryRefCursor. This will allow us to create a "Branch: ..." typeahead in a clean way.
- Create a typeahead datasource for repository refs (like branches).
- Add a "Branch:" field to the "Land" dialog, using this new datasource and defaulting to the "default branch" for the repository as specified in Diffusion. This will let the user choose which branch they want to target, although the default option sometimes won't be right.
- Make sure the repository operation UI surfaces this information.
- Implement T3462 in arc for tracking branches, so we start storing "branched from <closest upstream branch>" on diffs and showing it in the UI. There is some complexity / future work here that I'll discuss in T3462.
- When this information is available on a diff, use it to select a better default branch than the Diffusion default. This will mean that we get the branch the user wants right more often.