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.
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 https://jira.atlassian.com/browse/FE-5594 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 support.atlassian.com 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 email@example.com:atlassian/aui.git | 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 http://support.atlassian.com 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 https://confluence.atlassian.com/display/FISHKB/Setting+a+valid+HEAD+on+your+Git+repository Hope that helps,
Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...
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!
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