Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sl pr unlink does not seem to do anything #940

Open
zjijz opened this issue Aug 26, 2024 · 4 comments
Open

sl pr unlink does not seem to do anything #940

zjijz opened this issue Aug 26, 2024 · 4 comments

Comments

@zjijz
Copy link

zjijz commented Aug 26, 2024

I was suggested to use sl pr unlink when trying to run sl pr submit when the associated GitHub PR had already been closed. I then attempted that, but it didn't seem to change the sl state at all.

This was on the macOS version installed by brew.

% sl version
Sapling 0.2.20240718-145624+f4e9df48
(see https://sapling-scm.com/ for more information)

This was the latest version available through brew (previously called brew upgrade sapling).

sl, sl pr unlink, sl (on the base commit bcc265a08):

% sl
  o  993234c71  15 minutes ago  greg
  │  xtask: Convert structopt to using clap
  │
  @  bcc265a08  15 minutes ago  greg  #13
╭─╯  Update .committemplate to repo
│
o  753ebd9e9  26 minutes ago  remote/main
% sl pr unlink
% sl  
  o  993234c71  15 minutes ago  greg
  │  xtask: Convert structopt to using clap
  │
  @  bcc265a08  15 minutes ago  greg  #13
╭─╯  Update .committemplate to repo
│
o  753ebd9e9  26 minutes ago  remote/main

sl pr submit still fails after this with the same error as before and offers the same guidance to use sl pr unlink.

I tried installing sl from brew at --HEAD, but that version is giving me issues:

% sl
unknown python exception%    
@bolinfest
Copy link
Contributor

Based on the output of sl, it does not appear that Sapling knows anything about the relationship between your commit and a GitHub PR. If it did, you would see #123 after the commit title.

@zjijz
Copy link
Author

zjijz commented Sep 3, 2024

This was for commit bcc265a08, which has #13 after it. I just pasted the entire sl tree, but it's just referencing the bottom commit.

@bolinfest
Copy link
Contributor

@zjijz what if you use -r explicitly: sl unlink -r bcc265a08?

Though I admit the docs for sl pr unlink imply it should operate on the current commit by default.

@zjijz
Copy link
Author

zjijz commented Sep 15, 2024

That was it! sl pr unlink -r . worked.

Can I make a request that pr unlink is updated to work implicitly with the current commit like pr submit or that a warning is added if there is no implicit default commit and sl pr unlink is called with no commit hashes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants