2 answers

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:

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 git@bitbucket.org:atlassian/aui.git | grep 'HEAD branch'
HEAD branch: master

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

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)

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

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,

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.