facebook / sapling

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

VSCode `sl pr submit --stack` #930

Closed MarcosBustamante closed 2 months ago

MarcosBustamante commented 3 months ago

VSCode does not offer a stack submit when I select some nodes from my stack, I need to type this command in the command line everytime. Is it possible to add this button? Maybe starting with a simple button in this view:

Captura de Tela 2024-08-05 às 21 05 43
evangrayk commented 2 months ago

Hey, sorry for the delay on this. Does the submit button appear if you look at just the top commit? Currently, sl pr support is a bit funny where it requires being checked out on the commit, and implicitly updates all the PRs below the current one too (which is what you want in this case). That means it doesn't work for selected commits (even though, in your example, all the selected commits ARE the right linear stack... we just don't show the button in any case for simplicity because your selection could be unrelated to the "you are here" commit).

Note: Looks like you're a Meta employee, if you're using the internal version of the extension then submitting with sl pr is currently not supported, and you should use the CLI for sl pr submit.

MarcosBustamante commented 2 months ago

Does the submit button appear if you look at just the top commit?

No, it appears in all nodes if I click on them individually, like in the image below:

Captura de Tela 2024-09-07 às 23 25 40

implicitly updates all the PRs below the current one too (which is what you want in this case)

Interesting, I tested and the behavior is as you described.

if you're using the internal version of the extension then submitting with sl pr is currently not supported, and you should use the CLI for sl pr submit.

I use the external version in small projects that I create to study different technologies, since the tool improves the development speed a lot.

I guess we can close this issue for now