[llvm-dev] [cfe-dev] Phabricator -> GitHub PRs?

James Y Knight via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 28 07:40:56 PST 2020

On Tue, Jan 28, 2020 at 8:23 AM Renato Golin via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> But during the review, rewriting history of the series itself makes it
> hard for any review tool to have meaningful representations.

This isn't really true for *any* review tool -- some are written to handle
this well. E.g. Gerrit is designed exactly for this flow.

In order to track the commits, it uses a "logical identity" for a commit
(similar to Phabricator's "Differential Revision:" line), separate from the
commit hash. A local commit hook is used to automatically generate a random
number (well, it's a hash of something, but may-as-well be a random
number), and appends it to the commit message (e.g. "Change-Id:
I0123456789abcdef0123456789abcdef01234567"). This ID subsequently serves as
the review permalink and identity. Because it's in the message, it's
preserved across rebases and amends.

Anyways, given that ID, it's easy to track the evolution of each commit in
your branch separately, and treat them as separately-reviewable changes,
which can each be individually ammended in response to review feedback.

Gerrit also makes it easy to upload an entire branch worth of commits --
just "git push" your branch to the magic-review-upload "branch" on the
server. When you do that, every commit on your local branch either creates
a new review or updates the existing review automatically. And all the
reviews are linked together, so you can see the entire chain of reviews for
the branch. (example, see "Relation Chain" on the right:

I think this is much nicer than Phabricator's method, because the Change-Id
is added to the message *before* it's uploaded, rather than having to go
back and amend each message after first upload to insert the
server-assigned id. And the entity which is uploaded is an actual git
commit, which means it can be more easily worked with (e.g. fetched by
someone else), similar to what you can do with github pull requests.

...But I'm not sure bringing up yet another tool really helps anything
here...sorry. =p
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200128/c6e04649/attachment.html>

More information about the llvm-dev mailing list