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

Url produced by "Open File on Remote" is url-escaped twice #796

Closed
kenlyon opened this issue Jul 18, 2019 · 3 comments
Closed

Url produced by "Open File on Remote" is url-escaped twice #796

kenlyon opened this issue Jul 18, 2019 · 3 comments
Labels
blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature bug Something isn't working

Comments

@kenlyon
Copy link

kenlyon commented Jul 18, 2019

  • GitLens Version: 9.8.5
  • VSCode Version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:59:35.033Z)
  • OS Version: Windows_NT x64 10.0.17134

Steps to Reproduce:

  1. Create a branch that includes the "#" character in its name. Our branch naming convention is of the form "#{work-item-id}.{work-item-title}", so a typical example is "#123.fix-all-the-things".
  2. Make this new branch your current branch.
  3. In VS Code, right-click a file and choose "Show File History in View".
  4. In the "File History" section, hover over a commit and click the "Open File on Remote" icon.

Expected Outcome:
You should see the file shown in the browser.

Actual Outcome:
My default browser opens the file, but Azure Devops shows this error:

TF401175:The version descriptor <Branch: {my branch name} > could not be resolved to a version in the repository {my repository name}

When I looked closely at the URL, I saw that after # was escaped as %23, it was subsequently escaped again giving %2523. This meant that the server was looking for a branch name starting with "%23" instead of "#".

Using the example branch name from above:

  • Expected: version=GB%23123.fix-all-the-things
  • Actual: version=GB%2523123.fix-all-the-things
@eamodio
Copy link
Member

eamodio commented Jul 18, 2019

I dug into this and it looks like it is an issue in vscode: microsoft/vscode#76606 (comment). I don't currently have a workaround at this point. Hopefully the vscode issue with be resolved quickly.

@eamodio eamodio added blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature bug Something isn't working labels Jul 18, 2019
@kenlyon
Copy link
Author

kenlyon commented Mar 31, 2022

I can no longer reproduce this problem. However, I noticed that the "Open File on Remote" button now open a url containing the commit hash rather than the branch name.

@kenlyon kenlyon closed this as completed Mar 31, 2022
@github-actions
Copy link

github-actions bot commented May 1, 2022

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 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants