Robb Shecter wrote:
Hi,
Not necessarily a trac question per se...
Syntax coloring is working for us. But, the system apparently doesn't
recognize the fact that our *.cgi files are actually perl files.
Anybody know where this could be configured?
There are several approaches.
One would be to set the svn:mime-type properties of those files to
text/perl,
e.g. by doing
svn pset svn:mime-type text/perl my_script.cgi
in your working copy and then committing the change.
Trac 0.10dev offers a few additional possibilities:
First, in trac.ini you could add extra mappings from extensions to
MIME-Type:
[mimeview]
mime_map = text/x-perl:cgi
see http://trac.edgewall.org/changeset/3345 for more info about the syntax.
Also, in trunk you have some basic auto-detection of the file type
from its content, so if the first line of the cgi reads e.g. #!/usr/bin/perl
or has the Emacs or vim mode annotation, it should take it into account.
-- Christian
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac