Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-20223

Source view URL of branch name with slashes broken (e.g. "feat/foo")

      Related issue: BCLOUD-408

      I maintain a popular utility called git-open which opens a browser to your bitbucket/github/gitlab to view whatever branch you have checked out.

      Bitbucket makes this pretty difficult if there's a slash in the branch name. (Which it surprisingly common


      For example, in the Guyzmo/git-repo project, following the official docs I can view the devel branch with this URL:
      https://bitbucket.org/guyzmo/git-repo/src/devel

      Easy enough, but here's the problem:

      For the bugfix/conftest_fix branch, bitbucket provides a 404 for a similar URL: https://bitbucket.org/guyzmo/git-repo/src/bugfix/conftest_fix
      And we get the same result if we URL-encode the slash: https://bitbucket.org/guyzmo/git-repo/src/bugfix%2Fconftest_fix

      When using the site to view the branch we get a /src/<commit hash>/?at=<branch/name> URL. So while this is a workaround, it makes for more awkward ergonomics. :/


      Ideally, a fix would make either of the above 404'ing URLs start to work. Thanks!

          Form Name

            [BCLOUD-20223] Source view URL of branch name with slashes broken (e.g. "feat/foo")

            jbsilva added a comment -

            I'm always shocked to see such simple tickets unsolved for almost a decade.

            The raw endpoint does work with %2F.

            jbsilva added a comment - I'm always shocked to see such simple tickets unsolved for almost a decade. The raw endpoint does work with %2F .

            Me too on this one.

            I've been affected when writing release notes. We keep those in Bitbucket too, and so I'd like to be able to put a link to the Readme for an item in another repo, on a release/ branch  in the description. The link is commit-scoped, so I have to update the release note by hand all the time.

            Hayden Clark added a comment - Me too on this one. I've been affected when writing release notes. We keep those in Bitbucket too, and so I'd like to be able to put a link to the Readme for an item in another repo, on a release/ branch  in the description. The link is commit-scoped, so I have to update the release note by hand all the time.

            I don't quite get why the url-encoded approach wouldn't work - it should be extremely easy to implement since existing routing behaviour will not be affected - all you need is to urldecode() the same path segment currently in use.

             

            We've been waiting 7 years (and counting) for a 5-minute change.

            Christian Sciberras added a comment - I don't quite get why the url-encoded approach wouldn't work - it should be extremely easy to implement since existing routing behaviour will not be affected - all you need is to urldecode() the same path segment currently in use.   We've been waiting 7 years (and counting) for a 5-minute change.

            is there an update / workaround for this issue? as mentioned here in the thread - it's a big issue with using the API..

            Eden Hermelin added a comment - is there an update / workaround for this issue? as mentioned here in the thread - it's a big issue with using the API..

            This is a CRITICAL bug affecting usability of the tool. Linking to the latest version of the source (or most commonly some .md file) is a key for easily maintaining documentation references.  It is also related to the inexplicable lack of native linking from Confluence to Bitbucket. On top of it, this bug make a 3rd party solution from mibex effectively useless.  Atlassian - please get it together...

            Paul Bieganski added a comment - This is a CRITICAL bug affecting usability of the tool. Linking to the latest version of the source (or most commonly some .md file) is a key for easily maintaining documentation references.  It is also related to the inexplicable lack of native linking from Confluence to Bitbucket. On top of it, this bug make a 3rd party solution from mibex effectively useless.  Atlassian - please get it together...

            Antti Boman added a comment - - edited

            For some reason, the urlencode trick works when viewing raw files. For example:

            https://bitbucket.org/guyzmo/git-repo/raw/bugfix%2Fconftest_fix/tests/conftest.py

            So, Atlassian guys could check out that code and integrate the URL decoding solution (one line or function, i suppose) to src view, too. Although, there must have been a reason to use a more complicated way (?at=<branch/name>) instead.

            Antti Boman added a comment - - edited For some reason, the urlencode trick works when viewing raw files. For example: https://bitbucket.org/guyzmo/git-repo/raw/bugfix%2Fconftest_fix/tests/conftest.py So, Atlassian guys could check out that code and integrate the URL decoding solution (one line or function, i suppose) to src view, too. Although, there must have been a reason to use a more complicated way ( ?at=<branch/name>) instead.

            This bug prevents linking content from Bitbucket to Confluence using branch name.

            I'm using Confluence cloud Asciidoc macro to load an Asciidoc file from Bitbucket to Confluence. On branches without slash on their name I can link a file in a branch, so the latest commit is always loaded regardless of how many commits are pushed, but when there is slash on the name, I have to update all pages using Asciidoc with Bitbucket and slash as source branch, meaning when updating the repository I have to also manually update the source url in the Confluence macros, meaning it is so impractical that I would consider it impossible for humans without external scripts.

            Jimi Viita-aho EFECTE added a comment - This bug prevents linking content from Bitbucket to Confluence using branch name. I'm using Confluence cloud Asciidoc macro to load an Asciidoc file from Bitbucket to Confluence. On branches without slash on their name I can link a file in a branch, so the latest commit is always loaded regardless of how many commits are pushed, but when there is slash on the name, I have to update all pages using Asciidoc with Bitbucket and slash as source branch, meaning when updating the repository I have to also manually update the source url in the Confluence macros, meaning it is so impractical that I would consider it impossible for humans without external scripts.

            Sam added a comment - - edited

            I respectfully disagree. People reasonably tend to get quite upset when they are unreasonably losing their money. 

            We have paid good money for a broad set of Atlassian services for nearly a decade. I have opened and contributed to issues that go ignored for years.  That's an absurd amount of time in any industry, let alone software. I'm tired of being treated this way when my company has invested so heavily in Atlassian's platform.

            We have built many automated workflows that rely on these naming conventions that seem to be quite common. This bug (and many others like it) are killing my team's productivity and costing us real cash. I'm livid.

            Sam added a comment - - edited I respectfully disagree. People reasonably tend to get quite upset when they are unreasonably losing their money.  We have paid good money for a broad set of Atlassian services for nearly a decade. I have opened and contributed to issues that go ignored for years.  That's an absurd amount of time in any industry, let alone software. I'm tired of being treated this way when my company has invested so heavily in Atlassian's platform. We have built many automated workflows that rely on these naming conventions that seem to be quite common. This bug (and many others like it) are killing my team's productivity and costing us real cash. I'm livid.

            Hey @Sam, I'm as critical as the next guy, but I'm not sure getting petty, snippy and just plain rude is the best way to go. Ever head the phrase "you catch more flies with honey than vinegar?"

            All in all, I am in awe of everything their suite of tools is capable of. Does it have some warts, for sure, but most things work as advertised.

            David Becker added a comment - Hey @Sam, I'm as critical as the next guy, but I'm not sure getting petty, snippy and just plain rude is the best way to go. Ever head the phrase "you catch more flies with honey than vinegar?" All in all, I am in awe of everything their suite of tools is capable of. Does it have some warts, for sure, but most things work as advertised.

            Sam added a comment -

            Hey you slackers at Atneverian! Isn't it strange that this bug exists when:

            • the gitflow dialog in SourceTree suggests branch names with slashes
            • The SourceTree branch view is aware of slashes since it provides a tree view where slashes delineate levels in the hierarchy
            • The "Branching model' page under project settings on the website is also is aware of slashes

            It seems kind of stupid to have built all that functionality, but somehow simple URLs to these resources are broken. 

             

            Perhaps an employ could at least comment on this thread? Are your offices empty? There are a lot of users here that ARE TIRED OF THIS ECHO CHAMBER!!!! There so many issues for major bugs that have been open for YEARS! How about you earn your keep and support the garbage you sold us? 

             

            Sincerely,

            A very disgruntled PAYING customer

            Sam added a comment - Hey you slackers at Atneverian! Isn't it strange that this bug exists when: the gitflow dialog in SourceTree suggests branch names with slashes The SourceTree branch view is aware of slashes since it provides a tree view where slashes delineate levels in the hierarchy The "Branching model' page under project settings on the website is also is aware of slashes It seems kind of stupid to have built all that functionality, but somehow simple URLs to these resources are broken.    Perhaps an employ could at least comment on this thread? Are your offices empty? There are a lot of users here that ARE TIRED OF THIS ECHO CHAMBER!!!! There so many issues for major bugs that have been open for YEARS! How about you earn your keep and support the garbage you sold us?    Sincerely, A very disgruntled PAYING customer

              Unassigned Unassigned
              d52e2f9c57cf paulirish
              Affected customers:
              51 This affects my team
              Watchers:
              43 Start watching this issue

                Created:
                Updated: