Page MenuHomePhabricator

Make rules for guessing onto/remote more powerful and more explicit in `arc land`
ClosedPublic

Authored by epriestley on Oct 28 2015, 3:34 PM.
Tags
None
Referenced Files
F13210765: D14357.diff
Fri, May 17, 5:11 AM
F13194692: D14357.diff
Sun, May 12, 9:47 PM
F13181682: D14357.id34660.diff
Thu, May 9, 2:35 PM
F13181051: D14357.id.diff
Thu, May 9, 7:57 AM
F13177456: D14357.diff
Wed, May 8, 7:43 PM
Unknown Object (File)
Fri, May 3, 6:55 PM
Unknown Object (File)
Mon, Apr 29, 3:08 PM
Unknown Object (File)
Wed, Apr 24, 11:01 PM
Subscribers
None

Details

Summary

Fixes T9543. Fixes T9658. Ref T3855.

Major functional change is that you can have a sequence of branches like:

origin/master -> notmaster -> feature1

...where they track each other, but you named your local master something else. Currently, we resolve only one level of upstreams, so we try to land onto "notmaster" in this case, which is wrong.

Instead, keep resolving upstreams until we either hit a cycle, don't have another upstream to look at, or find someting in a remote. In this case we'll eventually find "origin/master" and select "origin" as the remote and "master" as the target.

Other minor changes:

  • Make this selection process explicit.
  • Make the help 3000x longer.

Also fix a bug where we could incorrectly try to tell Differential to update awith --preview.

Test Plan
  • Landed from a tag.
  • Landed from a tracking branch.
  • Landed from an nth-degree tracking branch.
  • Tried to land from a local branch with a cycle in upstreams.
  • Landed with --remote and --onto.
  • Read arc help land.

Diff Detail

Repository
rARC Arcanist
Branch
land2
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/workflow/ArcanistLandWorkflow.php:363XHP16TODO Comment
Advicesrc/workflow/ArcanistLandWorkflow.php:512XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 8470
Build 9753: Run Core Tests
Build 9752: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Make rules for guessing onto/remote more powerful and more explicit in `arc land`.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
  • Minor wordsmithing in help text.
  • Continue emitting ArcanistEventType::TYPE_LAND_WILLPUSHREVISION for now.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 28 2015, 4:36 PM
This revision was automatically updated to reflect the committed changes.