]> khamidou — GitHub mirrors - arcanist.git/commit
In `arc diff`, try to guess where a change should land
authorepriestley <git@epriestley.com>
Thu, 10 Dec 2015 22:33:33 +0000 (14:33 -0800)
committerepriestley <git@epriestley.com>
Thu, 10 Dec 2015 23:24:38 +0000 (15:24 -0800)
commitdae2f0073f019221839924b4b1431c6cba5dcdda
treed379918262a0b2884d1f47a1862443ee77e5560f
parentd0e73bb656105e82582cf72c415a8c310b30915d
In `arc diff`, try to guess where a change should land

Summary:
Ref T9952. Ref T3462. My primary goal is to improve prefilling of the "Onto Branch:" field in the "Land Revision" dialog.

When uploading a diff with `arc diff`, add a property with some information about which branch to target. In particular:

  - If the local branch tracks an upstream branch (or tracks something which tracks something which tracks the upstream), target that.
  - If not, but "arc.land.onto.default" is set, target that.

This doesn't try to guess in other cases, since they're more involved. I'll add some context about this in T3462.

I don't //love// using "diff properties" for this, but it doesn't make cleaning them up any harder since we already use it for other stuff which isn't going away (lint/unit excuses).

Test Plan:
  - Added some `var_dump()` and used `arc diff --only` to generate diffs.
  - Saw upstream tracking and config-based rules generate reasonable values and submit them.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T3462, T9952

Differential Revision: https://secure.phabricator.com/D14736
src/workflow/ArcanistDiffWorkflow.php