jablonka.czprosek.czf

websvn

Subversion Repositories:
[/] [include/] [distconfig.php] - Blame information for rev 3

 

Line No. Rev Author Line
11simandl<?php
2// WebSVN - Subversion repository viewing via the web using PHP
3// Copyright (C) 2004-2006 Tim Armes
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18//
19// --
20//
21// config.php
22//
23// Configuration parameters
24 
25// --- FOLLOW THE INSTRUCTIONS BELOW TO CONFIGURE YOUR SETUP ---
26 
27// {{{ PLATFORM CONFIGURATION ---
28 
293simandl// Configure the path to your subversion config file
30// (e.g. if accepting certificates is required when using repositories via https)
31// $config->setConfigPath('/tmp');
321simandl 
33// Configure these lines if your commands aren't on your path.
34//
35// $config->setSVNCommandPath('Path/to/svn and svnlook/ e.g. c:\\program files\\subversion\\bin');
36// $config->setDiffPath('Path/to/diff/command/');
37 
38// For syntax colouring, if option enabled...
39// $config->setEnscriptPath('Path/to/enscript/command/');
40// $config->setSedPath('Path/to/sed/command/');
41 
42// For delivered tarballs, if option enabled...
43// $config->setTarPath('Path/to/tar/command/');
44 
45// For delivered GZIP'd files and tarballs, if option enabled...
46// $config->setGZipPath('Path/to/gzip/command/');
47 
483simandl// download folder/file zipped ...
49// $config->setZipPath('Path/to/zip/command/');
50 
511simandl// }}}
52 
53// {{{ REPOSITORY SETUP ---
54 
55// There are 2 methods for defining the repositiories available on the system. Either you list
56// them by hand, in which case you can give each one the name of your choice, or you use the
57// parent path function, in which case the name of the directory is used as the repository name.
58//
59// In all cases, you may optionally supply a group name to the repositories. This is useful in the
60// case that you need to separate your projects. Grouped Repositories are referred to using the
61// convention GroupName.RepositoryName
62//
63// Performance is much better on local repositories (e.g. accessed by file:///). However, you
64// can also provide an interface onto a remote repository. In this case you should supply the
65// username and password needed to access it.
66//
67// To configure the repositories by hand, copy the appropriate line below, uncomment it and
68// replace the name and URL of your repository.
69 
70// Local repositories (without and with optional group):
71//
72// $config->addRepository('NameToDisplay', 'URL to repository (e.g. file:///c:/svn/proj)');
73// $config->addRepository('NameToDisplay', 'URL to repository (e.g. file:///c:/svn/proj)', 'group');
74//
75// Remote repositories (without and with optional group):
76//
77// $config->addRepository('NameToDisplay', 'URL (e.g. http://path/to/rep)', NULL, 'username', 'password');
78// $config->addRepository('NameToDisplay', 'URL (e.g. http://path/to/rep)', 'group', 'username', 'password');
79//
803simandl// Display Part of a repository as if it was a repository.
81//
82// Local repositories (without and with optional group):
83//
84// $config->addRepositorySubpath('NameToDisplay', 'URL to repository (e.g. file:///c:/svn/proj)', 'subpath');
85// $config->addRepositorySubpath('NameToDisplay', 'URL to repository (e.g. file:///c:/svn/proj)', 'subpath', 'group');
86//
87// Remote repositories (without and with optional group):
88//
89// $config->addRepositorySubpath('NameToDisplay', 'URL (e.g. http://path/to/rep)', 'subpath', NULL, 'username', 'password');
90// $config->addRepositorySubpath('NameToDisplay', 'URL (e.g. http://path/to/rep)', 'subpath', 'group', 'username', 'password');
91//
921simandl// To use the parent path method (without and with optional group), uncomment the next line
93// and replace the path with your one. You can call the function several times if you have several parent paths.
94// Note that in this case the path is a filesystem path.
95//
96// $config->parentPath('Path/to/parent (e.g. c:\\svn)');
97// $config->parentPath('Path/to/parent (e.g. c:\\svn)', 'group');
98//
993simandl// To exclude a repository from being added by the parentPath method uncomment the next line
100// and replace the path with your one. You can call the function several times if you have several paths to exclude.
101//
102// $config->addExcludedPath('Path/to/parent/excludedRep (e.g. c:\\svn\\excludedRep)');
103//
1041simandl// To add only a subset of repositories specified by the parent path you can call the function with a pattern.
105//
106// $config->parentPath('Path/to/parent (e.g. c:\\svn)', 'group', '/^beginwith/');
107 
108// }}}
109 
110// {{{ LOOK AND FEEL ---
111//
112// Uncomment ONLY the template file that you want.
113 
114$config->setTemplatePath("$locwebsvnreal/templates/calm/");
115// $config->setTemplatePath("$locwebsvnreal/templates/BlueGrey/");
116 
117// You may also specify a per repository template file by uncommenting and changing the following
118// line as necessary. Use the convention "groupname.myrep" if your repository is in a group.
119 
120// $config->setTemplatePath('$locwebsvnreal/templates/Standard/', 'myrep'); // Access file for myrep
121 
122// The index page containing the projects may either be displayed as a flat view (the default),
123// where grouped repositories are displayed as "GroupName.RepName" or as a tree view.
124// In the case of a tree view, you may choose whether the entire tree is open by default.
125 
126// $config->useTreeIndex(false); // Tree index, closed by default
127// $config->useTreeIndex(true); // Tree index, open by default
128 
129// By default, WebSVN displays a tree view onto the current directory. You can however
130// choose to display a flat view of the current directory only, which may make the display
131// load faster. Uncomment this line if you want that.
132 
133// $config->useFlatView();
134 
1353simandl// By default, WebSVN displays subfolders first and than the files of a directory,
136// both alphabetically sorted.
137// To use alphabetic order independent iof folders and files uncomment this line.
138 
139// $config->setAlphabeticOrder(true);
140 
1411simandl// By default, WebSVN displays the information of the last modification
142// (revision, age and author) for each entry in an extra column.
143// To disable that uncomment this line.
144 
145// $config->setShowLastModInListing(false);
146 
1473simandl// By default, WebSVN displays the age of the last modification.
148// Alternativly the date of the last modification can be shown.
149// To show dates instead of ages uncomment this line.
150 
151// $config->setShowAgeInsteadOfDate(false);
152 
1531simandl// By default, WebSVN displays the a form to select an other repository.
1543simandl// If you have a lot of repositories this slows done the script considerably.
1551simandl// To disable that uncomment this line.
156 
157// $config->setShowRepositorySelectionForm(false);
158 
159// }}}
160 
161// {{{ LANGUAGE SETUP ---
162 
163// WebSVN uses the iconv module to convert messages from your system's character set to the
164// UTF-8 output encoding. If you find that your log messages aren't displayed correctly then
165// you'll need to change the value here.
166//
167// You may also specify the character encoding of the repository contents if different from
168// the system encoding. This is typically the case for windows users, whereby the command
169// line returns, for example, CP850 encoded strings, whereas the source files are encoded
170// as iso-8859-1 by Windows based text editors. When display text file, WebSVN will convert
171// them from the content encoding to the output encoding (UTF-8).
172//
173// WebSVN does its best to automate all this, so only use the following if it doesn't work
174// "out of the box". Uncomment and change one of the examples below.
175//
176// $config->setInputEncoding('CP850'); // Encoding of result returned by svn command line, etc.
177// $config->setContentEncoding('iso-8859-1'); // Content encoding of all your repositories
178 
179// You may also specify a content encoding on a per repository basis. Uncomment and copy this
180// line as necessary.
181//
182// $config->setContentEncoding('iso-8859-1', 'MyEnc');
183 
184// Note for Windows users: To enable iconv you'll need to enable the extension in your php.ini file
185// AND copy iconv.dll (not php_iconv.dll) to your Windows system folder. In most cases the correct
186// encoding is set when you call $config->setServerIsWindows();.
187 
188// Note for *nix users. You'll need to have iconv compiled into your binary. The default input and
189// output encodings are taken from your locale informations. Override these if they aren't correct.
190 
191// Set the default language. If you want English then don't do anything here.
192//
193// $config->setDefaultLanguage('en');
194 
1953simandl// Ignore the user supplied accepted languages to choose reasonable default language.
196// If you want to force the default language - regardless of the client - uncomment the following line.
197//
198// $config->ignoreUserAcceptedLanguages();
199 
2001simandl// }}}
201 
202// {{{ MULTIVIEWS ---
203 
204// Uncomment this line if you want to use MultiView to access the repository by, for example:
205//
206// http://servername/wsvn/repname/path/in/repository
207//
208// Note: The websvn directory will need to have Multiviews turned on in Apache, and you'll need to configure
209// wsvn.php
210 
211// $config->useMultiViews();
212 
213// }}}
214 
215// {{{ ACCESS RIGHTS ---
216 
217// Uncomment this line if you want to use your Subversion access file to control access
218// rights via WebSVN. For this to work, you'll need to set up the same Apache based authentication
219// to the WebSVN (or wsvn) directory as you have for Subversion itself. More information can be
220// found in install.txt
221 
222// $config->useAuthenticationFile('/path/to/accessfile'); // Global access file
223 
224// You may also specify a per repository access file by uncommenting and copying the following
225// line as necessary. Use the convention 'groupname.myrep' if your repository is in a group.
226 
227// $config->useAuthenticationFile('/path/to/accessfile', 'myrep'); // Access file for myrep
228 
229// }}}
230 
231// {{{ FILE CONTENT ---
232//
233// You may wish certain file types to be GZIP'd and delieved to the user when clicked apon.
234// This is useful for binary files and the like that don't display well in a browser window!
235// Copy, uncomment and modify this line for each extension to which this rule should apply.
236// (Don't forget the . before the extension. You don't need an index between the []'s).
237// If you'd rather that the files were delivered uncompressed with the associated MIME type,
238// then read below.
239//
240// $zipped[] = '.dll';
241 
242// Subversion controlled files have an svn:mime-type property that can
243// be set on a file indicating its mime type. By default binary files
244// are set to the generic appcliation/octet-stream, and other files
245// don't have it set at all. WebSVN also has a built-in list of
246// associations from file extension to MIME content type. (You can
247// view this list in setup.php).
248//
249// Determining the content-type: By default, if the svn:mime-type
250// property exists and is different from application/octet-stream, it
251// is used. Otherwise, if the built-in list has a contentType entry
252// for the extension of the file, that is used. Otherwise, if the
253// svn:mime-type property exists has the generic binary value of
254// application/octet-stream, the file will be served as a binary
255// file. Otherwise, the file will be brought up as ASCII text in the
256// browser window (although this text may optionally be colourised.
257// See below).
258//
259// Uncomment this if you want to ignore any svn:mime-type property on your
260// files.
261//
262// $config->ignoreSvnMimeTypes();
263//
264// Uncomment this if you want skip WebSVN's custom mime-type handling
265//
266// $config->ignoreWebSVNContentTypes();
267//
268// Following the examples below, you can add new associations, modify
269// the default ones or even delete them entirely (to show them in
270// ASCII via WebSVN).
271 
272// $contentType['.c'] = 'text/plain'; // Create a new association
273// $contentType['.doc'] = 'text/plain'; // Modify an existing one
274// unset($contentType['.m']); // Remove a default association
275 
2763simandl// If you want to selectively override one or more MIME types to display inline
277// (e.g., the svn:mime-type property is something like text/plain or text/xml, or
278// the file extension matches an entry in $contentType), you can choose to ignore
279// one or more specific MIME types. This approach is finer-grained than ignoring
280// all svn:mime-type properties, and displaying matching files inline such that
281// they are highlighted correctly. (Regular expression matching is used.)
282 
283$config->addInlineMimeType("text/plain");
284// $config->addInlineMimeType("text/*");
285 
2861simandl// }}}
287 
288// {{{ TARBALLS ---
289 
290// You need tar and gzip installed on your system. Set the paths above if necessary
291//
292// Uncomment the line below to offer a tarball download option across all your
293// repositories.
294//
295// $config->allowDownload();
296//
2973simandl// Set download modes
298// $config->setDefaultFileDlMode('plain');
299// $config->setDefaultFolderDlMode('gzip');
300//
3011simandl// Change the line below to set the temporary directory where to store generated tarball.
302//
303// $config->setTarballTmpDir('temp');
304//
305// To change the global option for individual repositories, uncomment and replicate
306// the required line below (replacing 'myrep' for the name of the repository to be changed).
307// Use the convention 'groupname.myrep' if your repository is in a group.
308 
309// $config->allowDownload('myrep'); // Specifically allow downloading for 'myrep'
310// $config->disallowDownload('myrep'); // Specifically disallow downloading for 'myrep'
311 
312// You can also choose the minimum directory level from which you'll allow downloading.
313// A value of zero will allow downloading from the root. 1 will allow downloding of directories
314// in the root, etc.
315//
316// If your project is arranged with trunk, tags and branches at the root level, then a value of 2
317// would allow the downloading of directories within branches/tags while disallowing the download
318// of the entire branches or tags directories. This would also stop downloading of the trunk, but
319// see after for path exceptions.
320//
321// Change the line below to set the download level across all your repositories.
322 
323$config->setMinDownloadLevel(2);
324 
325// To change the level for individual repositories, uncomment and replicate
326// the required line below (replacing 'myrep' for the name of the repository to be changed).
327// Use the convention 'groupname.myrep' if your repository is in a group.
328 
329// $config->setMinDownloadLevel(2, 'myrep');
330 
331// Finally, you may add or remove certain directories (and their contents) either globally
332// or on a per repository basis. Uncomment and copy the following lines as necessary. Note
333// that the these are searched in the order than you give them until a match is made (with the
334// exception that all the per repository exceptions are tested before the global ones). This means
335// that you must disallow /a/b/c/ before you allow /a/b/ otherwise the allowed match on /a/b/ will
336// stop any further searching, thereby allowing downloads on /a/b/c/.
337 
338// Global exceptions possibilties:
339//
340// $config->addAllowedDownloadException('/path/to/allowed/directory/');
341// $config->addDisAllowedDownloadException('/path/to/disallowed/directory/');
342//
343// Per repository exception possibilties:
344// Use the convention 'groupname.myrep' if your repository is in a group.
345//
346// $config->addAllowedDownloadException('/path/to/allowed/directory/', 'myrep');
347// $config->addDisAllowedDownloadException('/path/to/disallowed/directory/', 'myrep');
348 
349// }}}
350 
351// {{{ COLOURISATION ---
352 
353// Uncomment this line if you want to use Enscript to colourise your file listings
354//
355// You'll need Enscript version 1.6 or higher AND Sed installed to use this feature.
356// Set the path above.
357//
358// $config->useEnscript();
359 
360// Enscript need to be told what the contents of a file are so that it can be colourised
361// correctly. WebSVN includes a predefined list of mappings from file extension to Enscript
362// file type (viewable in setup.php).
363//
364// Here you should add and other extensions not already listed or redefine the default ones. eg:
365//
366// $extEnscript['.pas'] = 'pascal';
367//
368// Note that extensions are case sensitive.
369 
370// Uncomment this line if you want to use GeSHi to colourise your file listings
371//
372$config->useGeshi();
373 
3743simandl// GeSHi need to be told what the contents of a file are so that it can be colourised
375// correctly. WebSVN includes a predefined list of mappings from file extension to GeSHi
376// languages (viewable in setup.php).
377//
378// Here you should add and other extensions not already listed or redefine the default ones. eg:
379//
380// $extGeshi['pascal'] = array('p', 'pas');
381//
382// Note that extensions are case sensitive.
383 
3841simandl// }}}
385 
386// {{{ RSSFEED ---
387 
388// Uncomment this line if you wish to hide the RSS feed links across all repositories
389//
390// $config->hideRSS();
391//
392// To change the global option for individual repositories, uncomment and replicate
393// the required line below (replacing 'myrep' for the name of the repository to be changed).
394// Use the convention 'groupname.myrep' if your repository is in a group.
395 
396// $config->hideRSS('myrep'); // Specifically hide RSS links for 'myrep'
397// $config->showRSS('myrep'); // Specifically show RSS links for 'myrep'
398 
399// }}}
400 
401// {{{ BUGTRAQ ---
402 
403// Uncomment this line if you wish to use bugtraq: properties to show links to your BugTracker
404// from the log messages.
405//
406// $config->useBugtraqProperties();
407//
408// To change the global option for individual repositories, uncomment and replicate
409// the required line below (replacing 'myrep' for the name of the repository to be changed).
410// Use the convention 'groupname.myrep' if your repository is in a group.
411 
412// $config->useBugtraqProperties('myrep'); // Specifically use bugtraq properties for 'myrep'
413// $config->ignoreBugtraqProperties('myrep'); // Specifically ignore bugtraq properties for 'myrep'
414 
415// }}}
416 
417// {{{ MISCELLANEOUS ---
418 
419// Comment out this if you don't have the right to use it. Be warned that you may need it however!
420set_time_limit(0);
421 
422// Number of spaces to expand tabs to in diff/listing view across all repositories
423 
424$config->expandTabsBy(8);
425 
426// To change the global option for individual repositories, uncomment and replicate
427// the required line below (replacing 'myrep' for the name of the repository to be changed).
428// Use the convention 'groupname.myrep' if your repository is in a group.
429 
430// $config->expandTabsBy(3, 'myrep'); // Expand Tabs by 3 for repository 'myrep'
431 
432// }}}

Powered by WebSVN 2.2.1