** :var (buffer-file-name)
   :PROPERTIES:
   :DATE:     2010-09-03
   :END:
during export (buffer-file-name) will return nil because the temporary
export buffer is not visiting any file.

/file=(vc-working-revision (buffer-file-name))/
#+begin_src sh :var file=(vc-working-revision (or (buffer-file-name) "")) :exports results
  echo $file Revision
#+end_src

/file=(vc-working-revision (or (buffer-file-name) org-current-export-file))/
#+begin_src sh :var file=(vc-working-revision (or (buffer-file-name) org-current-export-file)) :exports results
  echo $file Revision
#+end_src