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

Open File on Remote From... is missing remote branches #1447

Closed
eamodio opened this issue Mar 29, 2021 · 6 comments
Closed

Open File on Remote From... is missing remote branches #1447

eamodio opened this issue Mar 29, 2021 · 6 comments
Assignees
Labels
bug Something isn't working needs-verification Request for community verification
Milestone

Comments

@eamodio
Copy link
Member

eamodio commented Mar 29, 2021

Is this now satisfied by the commands:

  • gitlens.openFileRevisionFrom (Open File at Revision From...)
  • gitlens.openFileOnRemoteFrom (Open File on Remote From...)

Possible dupe of #1071 ?

I came looking for this issue because I noticed that openFileOnRemoteFrom seemed to be missing some branches from the quick pick list, even after a recent fetch, although openFileRevisionFrom seems to show these branches.

As it turns out, I prefer opening in VScode (openFileRevisionFrom) rather than opening my browser to look at a different revision (openFileOnRemoteFrom) so I will stick to that – but still seems like a bug from my perspective.

Originally posted by @ian-h-chamberlain in #845 (comment)

@eamodio eamodio self-assigned this Mar 29, 2021
@eamodio eamodio added the bug Something isn't working label Mar 29, 2021
@eamodio eamodio added this to the Soon™ milestone Mar 29, 2021
@eamodio eamodio changed the title Open File on Remote From is missing remote branches _Open File on Remote From..._ is missing remote branches Mar 29, 2021
@eamodio eamodio changed the title _Open File on Remote From..._ is missing remote branches Open File on Remote From... is missing remote branches Mar 29, 2021
@eamodio eamodio added needs-verification Request for community verification pending-release Resolved but not yet released to the stable edition labels Mar 29, 2021
@eamodio
Copy link
Member Author

eamodio commented Mar 29, 2021

@ian-h-chamberlain There was a "bug" in openFileOnRemoteFrom where I didn't support remote branches.

Can you please verify this fix in tomorrow's insiders edition?

You can install the insiders edition from here. Be sure to disable/uninstall the stable version of GitLens first.

@ian-h-chamberlain
Copy link
Contributor

@eamodio Thanks for looking into this!

I am able to see remote branches in the quick pick now, but am unable to actually open the file on the remote. Here is the output channel after doing so:

[2021-03-29 14:40:21:978] [/Users/ichamberlain/Documents/cuber] git rev-parse --verify release/4.5^{commit} • 12 ms 
[2021-03-29 14:40:21:978] [135] GitService.validateReference completed • 12 ms
[2021-03-29 14:40:22:496] [136] GitService.getBranchesAndOrTags — w=/Users/ichamberlain/Documents/cuber
[2021-03-29 14:40:22:496] [137] GitService.getBranches — w=/Users/ichamberlain/Documents/cuber
[2021-03-29 14:40:22:496] [138] GitService.getTags — w=/Users/ichamberlain/Documents/cuber
[2021-03-29 14:40:22:496] [137] GitService.getBranches completed • 0 ms
[2021-03-29 14:40:22:496] [138] GitService.getTags completed • 0 ms
[2021-03-29 14:40:22:496] [136] GitService.getBranchesAndOrTags completed • 0 ms
[2021-03-29 14:40:22:497] OpenOnRemoteCommand
TypeError: Cannot read property 'sha' of undefined
[2021-03-29 14:40:22:497] ShowMessage(error, 'Unable to open in remote provider. See output channel for more details', undefined, null)
[2021-03-29 14:40:22:846] [139] GitService.getBlameForFile — w=GitUri(file:///Users/ichamberlain/Documents/cuber/web/server/scripts/update-and-install repoPath=/Users/ichamberlain/Documents/cuber)
[2021-03-29 14:40:22:846] [139] GitService.getBlameForFile Cache hit: 'blame'
[2021-03-29 14:40:22:846] [139] GitService.getBlameForFile completed • 0 ms

openFileOnRemote and openFileAtRevisionFrom both seem to work fine with the insiders edition, though.

@eamodio
Copy link
Member Author

eamodio commented Apr 6, 2021

@ian-h-chamberlain Can you post a video/git of what you are doing? I can't see how that error could happen.

@ian-h-chamberlain
Copy link
Contributor

@eamodio Hi, attached is a short recording of a reproduction. Something I noticed while recording was that this only seems to happen if I try to view a branch that is only present on the remote – in a case where I had a local branch tracking the remote branch, I was still able to view it by selecting origin/<branch-name> from the quick pick. In the recorded case, I have no local branch tracking it and this error is triggered.

gitlens-issue.mov

Apologies for the large scale recording, but I think this still shows the issue fairly clearly – let me know if there's anything else you need to reproduce this. Thanks!

eamodio added a commit that referenced this issue Apr 6, 2021
@eamodio
Copy link
Member Author

eamodio commented Apr 6, 2021

@ian-h-chamberlain thanks! I found the issue (you must be using Bitbucket). It will be fixed in tomorrow's insiders.

@eamodio eamodio removed the pending-release Resolved but not yet released to the stable edition label Apr 9, 2021
@eamodio eamodio modified the milestones: Soon™, Shipped Apr 9, 2021
@github-actions
Copy link

github-actions bot commented May 9, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs-verification Request for community verification
Projects
None yet
Development

No branches or pull requests

2 participants