Phabricator Administrator's Handbook/Arcanist

Arcanist is a command line tool designed for developers to interact with Phabricator. For example, with Arcanist you can send a patch to a Phabricator repository.

Phabricator logo

Overview

edit

Arcanist simplifies some collaboration workflows.

For example this may be a workflow supported by Arcanist:

  • one contributor clone the repository and do some changes
  • the contributor run arc diff and follows the instructions to share its patch and start a review
    • the patch may be accepted or not, requesting some other edits for example
    • the patch can be changed until it does not respect the upstream expectations
    • each patch update can trigger some continuous integration checks with Harbormaster
    • the patch can be finally accepted
  • the contributor may be able to run arc land to land its patch on the upstream repository, with the right commit message - or the upstream developer run arc land for him if the contributor is not trusted and cannot be allowed to push etc.

This workflow is supported for git, Subversion and Mercurial (with minor changes).

Note: The patch can also be uploaded without Arcanist, but you lose some features! So just try it.

Further notes about using arc diff:

Patch vs pull request

edit

Sometime people does not have any familiarity with the "patch" logic promoted by Phabricator. The interesting thing about a "patch"-based logic, in contrast with "pull request logic", is that a patch can be changed multiple times and can also be rewritten from scratch etc. and can promote a linear history.

In fact, at the end of the patch review, the patch can "land" in the repository with a single clean commit. In this way you can keep "one idea" = "one commit".

One live example is the Phabricator repository itself, where every single commit is related to a patch that is heavily discussed and rewritten before going online. The result is a repository with a clean and linear history where every commit rappresents one idea and where every commit has a complete explanation about what were the needs etc.:

https://secure.phabricator.com/source/phabricator/history/master/

Installing Arcanist

edit

Arcanist is packaged in most of GNU/Linux distributions.

Installing in Debian-based distributions

edit

In Debian GNU/Linux, Ubuntu, or any other derivative distribution, the installation of Arcanist is very simple:

sudo apt install arcanist

That's it.

Installing in Microsoft Windows

edit

If you want to install Arcanist in Microsoft Windows 10 you can follow the related page: