rmuslimov / browse-at-remote

Browse target page on github/bitbucket from emacs buffers
233 stars 54 forks source link

prefer-symbolic nil causes 404 in bitbucket #73

Open mstorus opened 3 years ago

mstorus commented 3 years ago

I have customized Prefer Symbolic to the value nil.

But when I invoke M-x browse-at-remote on a line in a Stash (Bitbucket Server) hosted repo, it produces an invalid at URL parameter.

Example:

I'm currently browsing the source code of a repo at revision 84ae96e198c9d37292a5fbe3b79bf68192c3c40d. I then invoke M-x browse-at-remote on a line of code.

Expected behavior:

I expected the following URL to be opened in my browser (I am only including the tail end of the URL) : /repos/myrepo/browse/file.txt?at=84ae96e198c9d37292a5fbe3b79bf68192c3c40e#26

Actual behavior:

the following URL path is opened in my browser, which cannot be found by bitbucket: /repos/myrepo/browse/file.txt?at=refs%2Fheads%2F84ae96e198c9d37292a5fbe3b79bf68192c3c40e#26

There's an extra refs%2Fheads%2F produced in the URL parameter which seems to break the URL. If refs%2Fheads%2F is removed, then the URL works