Patch export
It would be nice if we had the ability to export commits under the Git email .patch (example: https://patch-diff.githubusercontent.com/raw/facebook/sapling/pull/287.patch)
I use the mailing list patch workflow for some personal projects and would love to use sl to manage the repo, but exporting diffs to mail is a bit difficult right now.
sl export exists, but it's descended from hg export and does not have all the information the Git patch format does (From lines, date, Subject lines, diffstat, unified file diffs)
I think at the moment the outputs of sl export and sl export --git are pretty much the same, so it seems that we actually dropped support for the non-git export format some time ago, besides the headers you mention. Hopefully sending a fix for including those should not be too hard.
Looks like in hg land this is usually done with the patchbomb extension which adds an email command and looks better than added to export itself? https://www.mercurial-scm.org/wiki/PatchbombExtension
Are extensions a thing with sl?
@nemith Extensions are also a thing in Sapling (see https://github.com/facebook/sapling/tree/main/eden/scm/edenscm/ext )
I'm not sure how compatible would that extension be with Sapling, however.
Is changing the output of export okay? If so, I'll take a stab at implementing this.
I'm assuming it's ok since sl export is not documented on the Sapling website, but the current format could be relied on internally. I guess I could add a --email flag though to get around that.
We'd also need some sort of apply command that takes an mbox file containing a commit and applies it to the repo, like git am. Maybe sl import (also inherited from hg and not documented) could be repurposed, or it works out of the box.