Stopgap for Commit Series in Phabricator

364 views
Skip to first unread message

Nika Layzell

unread,
Jul 25, 2018, 4:32:22 PM7/25/18
to dev-platform
While our services team is working on making a reliable & maintained tool
for handling commit series with Phabricator, I threw together something
small to use as a stop-gap for pushing large commit series to Phabricator
and updating them.

It currently works as a wrapper around Arcanist, and *only supports git*
(as I don't know how hg works enough to get it to work reliably), but
should allow pushing a range of commits as revisions without touching the
working tree, automatic dependency relationships, bug number filling, and
reviewer field population.

I called it 'phlay' (splinter => flay; flay + phabricator => phlay).

GitHub: https://github.com/mystor/phlay
Tweet w/ short demo clip:
https://twitter.com/kneecaw/status/1021434807325163523

I've used it to push pretty-much all of my recent patch series to
Phabricator, and it's saved me a good amount of time, so I figured I'd let
people know. Feel free to poke me on IRC if you have questions.

- nika

Kris Maglione

unread,
Jul 26, 2018, 12:09:45 PM7/26/18
to Nika Layzell, dev-platform
Here's an approximate equivalent for hg which doesn't require
Arcanist:

https://bitbucket.org/kmaglione/hgext/src/default/phabricator.py

It's a slightly modified version of stock hg Phabricator plugin
(which we apparently have gps to thank for inspiring) which
handles parsing bug IDs and reviewers from commit messages.

You just need to add something like this to your .hgrc:

[phabricator]
url = https://phabricator.services.mozilla.com/
callsign = MOZILLACENTRAL

[auth]
mozilla.schemes = https
mozilla.prefix = phabricator.services.mozilla.com
mozilla.phabtoken = cli-...

and then use `hg phabsend` to push a commit series (or `hg phabread`
to import one).
--
Kris Maglione

[T]he people can always be brought to the bidding of the leaders.
That is easy. All you have to do is tell them they are being attacked
and denounce the pacifists for lack of patriotism and exposing the
country to danger. It works the same way in any country.
--Herman Göring

Ted Mielczarek

unread,
Aug 6, 2018, 3:27:19 PM8/6/18
to Kris Maglione, dev-platform
Thanks for this, Kris! Just an FYI for anyone planning to try this: I was behind a few versions on Mercurial (at 4.3) and I had to update to 4.7 for this extension to work.

-Ted
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform

Dave Townsend

unread,
Aug 11, 2018, 12:29:39 AM8/11/18
to Kris Maglione, dev-platform
This is an excellent tool and I'm using it for basically all my
submissions. Just one word of warning though, it doesn't currently support
submitting patches that contain binary files at this time. The binary file
will become truncated at phabricator, so watch out for that.
Reply all
Reply to author
Forward
0 new messages