Given a file with a text MIME type, instead of displaying it in the browser, Safari is forced to download it as an attachment:
$ curl -I http://bitbucket.org/parren/hg-pbranch/raw/pbranch-graphdesc/hgext/pbranch.py
HTTP/1.1 200 OK
Date: Mon, 18 May 2009 12:30:46 GMT
The Content-Disposition header should be set to inline or dropped completely for any text/* MIME type that isn't executed by the browser.