Fisheye - how to retrieve tip of branch raw file contents

Can you clarify the semantics of the "r" value for raw access:


what does "HEAD" actually stand for (assuming a Git repository).

Also what should I set r= to retrieve the tip of a branch?

I tried r=<branch-name> but this would not reliably work, it seemed to work for some time and then stopped.

2 answers

0 vote

Hi @Martin Lichtin,

The r parameter accepts few possible values: "HEAD", changeset id/commit hash (full or short), branch name or tag name.  

The meaning of "HEAD" is the default branch name for particular repository.   While looking at this question I've realised there is a bug related to git repositories though, in some circumstances FishEye may not know what the default branch name is and mail fail with "No revision found HEAD" error if r=HEAD/... parameter is used.  I've just raised a bug to get this fixed, you will find more information on the issue, feel free to watch it to get notification when the bug is resolved.

Now coming back to your second question, in order to retrieve the tip of a branch you should be able to provide r=<branch-name> parameter exactly as you guessed.   It seems to be working fine for me, see for instance:

I don't know what do you mean by

 it seemed to work for some time and then stopped.

Can you please provide more details, what error do you get if any, why do you think it doesn't work?

Hope that helps,

Thanks for the information, much appreciated.

So what I'm doing, using a branch name, should already work. We work in a branch called "dev". So


should work, but doesn't.It returns error "The requested resource cannot be found.No revision found dev".

Trying with r=HEAD


returns contents, but not the latest revision.

Btw, how do find out what the default branch is?

Re "dev" branch - that's weird, should work fine if /path/file.html lives on that branch. Do you want to contact our support via perhaps, so we can investigate in detail? Re "HEAD" - that should be the latest revision on the default branch, assuming that was indexed in FishEye. Are you sure your repository has the polling enabled and you can see the changes you are after in the activity stream? Finally, regarding default branch. What fisheye does is simply running git remote show <<REMOTE_URL>> and extracts default branch name from line starting with "HEAD branch". You can check that manually, for example for AUI repository you would use the following command: $ git remote show | grep 'HEAD branch' HEAD branch: master

Providing the branch name to r= seems to work only intermittently. For example, after a new revision has been committed for this file, it now works again. Not sure for how long.. About the default branch, we don't have that set: $ git remote show ssh://git@git/my.git/ * remote ssh://git@git/my.git/ Fetch URL: ssh://git@git/my.git/ Push URL: ssh://git@git/my.git/ HEAD branch: (unknown)

Re intermittent problems - that's really weird, could you contact our support on please? We'd need to take a closer look, perhaps when you have debugging enabled and experience such behaviour. Re default branch - if default branch is not set then most likely HEAD revision would not be properly resolved to a concrete changeset id. You may want to consider setting up default branch on remote repository, you can do that easily with git symbolic-ref command, see Hope that helps,

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Color tables for a shiny Confluence page

...; ## Developed by: Alana Fernando ## Shared with love ## @param style:title=style type|type=enum|required=true|desc=Choose a style.|enumValues=Style1,Style2,Style3,Style4,Style5 ## @param alignment:title...

165 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you