facebook / sapling

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

How to land with sapling stack? #284

Open zengk95 opened 1 year ago

zengk95 commented 1 year ago

So I'm using sapling with a GHE repo, which doesn't have access to reviewstack (since you can only log into GH with reviewstack). I decided to use the sapling pr stack instead of ghstack since I don't have access to be able to merge directly into master and what I did was:

  1. Create a stack of PRs
  2. Change the base branch of each of them to the previous item in the stack
  3. Get each of them reviewed, and then change the base branch back to main

but when I merge them into main one by one from the bottom of the stack, I get a merge conflict in GitHub, which I didn't really expect. To resolve this, I pulled in sapling and rebased and then submitted and kept doing this every time I ran into a merge conflict. I guess another potential method is to just merge the top of the stack and close out all the other PRs? Seems a bit weird to me and not sure how that will look within the ISL.

Is this expected or did my changing the base branch mess things up? Also is it possible to automatically make the base branch to be the previous PR? I feel like it would be a pretty useful feature if people don't want to use reviewstack.

jqphu commented 1 year ago

I guess another potential method is to just merge the top of the stack and close out all the other PRs?

I asked a similar question and this was the method that was recommended. https://github.com/facebook/sapling/issues/239#issuecomment-1329875147

That said, I also did the approach of rebasing merging each commit into main from the bottom to the top and that worked fine. I wonder if theres a difference when you merge vs rebase.

zengk95 commented 1 year ago

Hmm that seems pretty annoying. I wonder if they're working on an alternative method.