What I'll Cover
-
Arcanist, a.k.a. arc — CLI
-
Differential — Code Review
-
Maniphest — Task Integration
- Sample workflow
Coming from GitHub
GitHub: Pull requests (commits and branches)
Phabricator: Revisions (everything is a diff)
Why does that matter?
-
For basic usage, it doesn't
-
Instead of pushing a branch and opening a pull request, you simply
run arc diff
Hello, arc
$ git checkout -b add-toaster-oven
$ emacs
$ git commit
$ arc diff
Addressing review feedback
-
Make your changes
-
Create a new commit on top of your previously reviewed change
-
Run arc diff again
-
Note the lack of force-pushing
When You Get Lost
- When a rebase leaves you in a strange state
- When you're working on multiple feature branches
- Use arc which to get a sense of your surroundings
$ arc which
Updating an existing revision
- If you lose your commit message link and your tree changes
- Use the --update revision-id
$ arc diff --update D123
Changing what's in the diff
Complex scenario
I'm working off a co-worker's topic branch feature-a, I can send
just my changes up for review:
$ git fetch && git checkout feature-a
$ git checkout -b feature-b
$ emacs
$ git commit
$ arc diff feature-a
You get two knobs
-
Only two things you usually want to tweak
-
The base, which specifies where your diff begins
-
Your differential revision (e.g. D456), which can be
manually specified with
$ arc diff --update D456
In review
- Creates or updates a diff between HEAD and your upstream branch
- If you're going to be pushing your branches pre- code-review,
I highly recommend overriding your default base
- If it recognizes an existing revision, updates
- Otherwise it creates a new one
- Behavior can be overriden by using --update D123 or specifying a
base-ref
What's changed for reviewers?
-
Diff between versions of a revision (my FAVORITE)
-
What's changed since the last time I looked at this?
-
More explicit actions
- Comment
- Request Changes ✘
- Accept Revision ✔
Maniphest Tasks
- Like all objects in Phabricator, you can reference T<maniphest
ID>
to create a bi-directional link
- Use special 'Fixes TXXX' to automatically mark a task resolved
when the revision is landed
Turn down the noise
By default, you get an email from Phabricator for every action
you're a part of, including actions you trigger.
To turn this off, go to your email preferences page
But I liked getting all that email...
With GitHub, you get an email for every PR and every individual
comment on every repository.
With Phabricator, it's much more targeted: only reviewers and CCs
are notified of new diffs and comments.
If you want to opt-in, you can set up a herald
rule.
Where can I test this out?
$ git clone gitolite@code.uber.internal:testing
$ cd testing
$ # arc diff to your heart's content
Questions?
Cool. And now, a demo