facebook / sapling

A Scalable, User-Friendly Source Control System.
https://sapling-scm.com
GNU General Public License v2.0
5.91k stars 269 forks source link

Support the Sapling identity in aliases #876

Open bolinfest opened 2 months ago

bolinfest commented 2 months ago

Using the Mercurial docs, I was able to define a sync alias as follows:

[alias]
sync=!$HG pull && $HG rebase -r "draft()" -d master

Based on this:

https://github.com/facebook/sapling/blob/78bd513eaa980318469e80b5b15ea4f63af2d2ae/eden/scm/sapling/commands/debugrunshell.py#L26

I believe only $HG is supported, though ideally something that reflects the identity would be used instead:

https://github.com/facebook/sapling/blob/78bd513eaa980318469e80b5b15ea4f63af2d2ae/eden/scm/lib/identity/src/lib.rs#L367-L381

It would also be good to document this on the Sapling website so users don't have to make guesses based on the old Mercurial docs.