Page MenuHomePhabricator

In `arc diff`, try to guess where a change should land
ClosedPublic

Authored by epriestley on Dec 10 2015, 10:45 PM.
Tags
None
Referenced Files
F15431417: D14736.id.diff
Mon, Mar 24, 12:13 PM
F15428785: D14736.diff
Sun, Mar 23, 10:18 PM
F15412754: D14736.diff
Wed, Mar 19, 2:43 PM
F15392438: D14736.id35642.diff
Sat, Mar 15, 3:12 PM
F15385221: D14736.id.diff
Fri, Mar 14, 10:00 PM
F15364327: D14736.id35644.diff
Tue, Mar 11, 1:19 PM
Unknown Object (File)
Feb 22 2025, 7:22 PM
Unknown Object (File)
Feb 22 2025, 5:00 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable