code: def get_rev(tag=True):
      
      rev_cmd = "git describe --always --tag" if tag in (True, "True") else \
                "git rev-parse HEAD"
      return local(rev_cmd, capture=True).strip()
docs: Get build revision.
  
      @param tag  Use git tag instead of hash?