Skip to content

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

Closed
@kenlyon

Description

@kenlyon
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked or caused by an upstream issue or featureblocked: vscodeCaused by or dependent on a VS Code issue or feature

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions