]> khamidou — GitHub mirrors - arcanist.git/commit
Make "arc land" great again
authorepriestley <git@epriestley.com>
Wed, 28 Oct 2015 00:49:01 +0000 (17:49 -0700)
committerepriestley <git@epriestley.com>
Wed, 28 Oct 2015 14:04:57 +0000 (07:04 -0700)
commita03c6079bb71d4f8d4cd4c8c661642f753349760
tree614f1df9aa9eef2d878f194b687b047f4398fb20
parent3308da5f8fbe9de8c9c2a25646a5704eca323851
Make "arc land" great again

Summary:
Ref T3855. Fixes T9537. Fixes T8620. Fixes T4333.

This declares bankruptcy and replaces the entire `arc land` workflow under Git. These are the notable changes:

  - (T3855) You can now land from a branch to itself.
  - (T3855) We now try to restore the original state very aggressively after any failure, instead of dumping you into the middle of a mess.
  - (T9537) You can now land without a local branch.
  - ([not actually] T9543) We'll now ignore the local branch if it just happens to be named the same thing as the remote branch but doesn't actually track it.
  - (T8620) You can now land from a detached HEAD.
  - (T4333) We now preserve the author and author date of whatever you land.

This may need some followup work. In particular:

  - The signal handler (that tries to put you in a better place if you ^C in the middle of things) causes ^C to work awkwardly in prompts. This might not be worth it.
  - Errors/instructions on push/merge issues might need work.
  - I dropped support for `--delete-remote` and `--update-with-blah-blah` because I think these flags aren't worth their complexity.
  - I've simplified the update/merge algorithm a bit. It may need some complexity added back in.
  - I probably missed a few things because this covers like 200 unique, creative workflows.
  - Users might need more guidance on the workflows that drop them in the middle of nowhere if they manage to reach them more often than I think.

Test Plan:
  - Used `arc land` to land like at least 15,000 different kinds of changes.
  - Landed normally.
  - Landed from a branch onto itself.
  - Landed from a detached head.
  - Landed nothing.
  - Landed with no local branch.
  - Landed onto made-up branches.
  - Landed with bad targets.
  - ^C'd things in the middle.

Reviewers: chad

Reviewed By: chad

Subscribers: tycho.tatitscheff

Maniphest Tasks: T3855, T4333, T8620, T9537, T9543

Differential Revision: https://secure.phabricator.com/D14356
src/__phutil_library_map__.php
src/internationalization/ArcanistUSEnglishTranslation.php
src/land/ArcanistGitLandEngine.php [new file with mode: 0644]
src/land/ArcanistLandEngine.php [new file with mode: 0644]
src/workflow/ArcanistLandWorkflow.php
src/workflow/ArcanistWorkflow.php