File: config.py.sample

package info (click to toggle)
darcsweb 1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny, squeeze
  • size: 172 kB
  • ctags: 13
  • sloc: python: 2,176; makefile: 36
file content (195 lines) | stat: -rw-r--r-- 7,183 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

# base configuration, common to all repos
class base:
	# location of the darcs logo
	darcslogo = "darcs.png"

	# location of the darcs favicon
	darcsfav = "minidarcs.png"

	# the CSS file to use
	cssfile = 'style.css'

	# this script's name, usually just "darcsweb.cgi" unless you rename
	# it; if you leave this commented it will be detected automatically
	#myname = "darcsweb.cgi"

	# our url, used only to generate RSS links, without the script name;
	# if you leave this commented it will be detected automatically
	#myurl = "http://example.com/darcsweb"

	# optionally, you can specify the path to the darcs executable; if you
	# leave this commented, the one on $PATH will be used (this is
	# normally what you want)
	#darcspath = "/home/me/bin/"

	# the text to appear in the top of repo list; this is also optional,
	# and html-formatted
	#summary = "I love darcs!"

	# in case you want to change the beautiful default, you can specify an
	# alternative footer here; it's optional, of course
	#footer = "I don't like shoes"

	# It is possible to have a cache where darcsweb will store the pages
	# it generates; entries are automatically updated when the repository
	# changes. This will speed things up significatively, specially for
	# popular sites.
	# It's recommended that you clean the directory with some regularity,
	# to avoid having too many unused files. A simple rm will do just
	# fine.
	# If you leave the entry commented, no cache will be ever used;
	# otherwise the directory is assumed to exist and be writeable.
	# If you use this option you must set the "myname" and "myurl"
	# variables.
	#cachedir = '/tmp/darcsweb-cache'

	# By default, darcsweb's search looks in the last 100 commits; you can
	# change that number by specifying it here.
	# Note that search are not cached, so if you have tons of commits and
	# set the limit to a very high number, they will take time.
	#searchlimit = 100

	# If you want to log the times it took darcsweb to present a page,
	# uncomment this option. The value should be a file writeable by
	# darcsweb.
	#logtimes = "/tmp/darcsweb_times"

	# If you want darcsweb to automatically detect embedded URLs,
	# define them here, using python-style regexps like the examples
	# below. They will be replaced in summaries, logs, and commits.
	# The following variables are replaced:
	#   myreponame: repository link (darcsweb.cgi?r=repo)
	#   reponame: repository name (repo)
	#
	#url_links = (
	  # Format is: (regexp, replacement)
	  # Some examples:
	  #
	  # Detect '#NNN' as a reference to bug database
	  #(r'#([0-9]+)',
	  # 	r'<a href="/bugs/show_bug.cgi?id=\1">#\1</a>'),
	  #
	  # Replace hashes with commit-links.
	  #(r'(\d{14}-[0-9a-f]{5}-[0-9a-f]{40}\.gz)',
	  #	r'<a href="%(myreponame)s;a=commit;h=\1">\1</a>'),
	#)

	# If you want to generate links from patch author names, define the url
	# here. Example for CIA:
	#author_links = "http://cia.navi.cx/stats/author/%(author)s"

	# If you want to disable the annotate feature (for performance reasons,
	# the http connection will time out on slow machines), uncomment this
	# option.
	#disable_annotate = True



#
# From now on, every class is a repo configuration, with the same format
# There are no restrictions on the class' name, except that it can't be named
# "base" (because it's the name of the one above).
#
# If you have a lot of repos and/or you're too lazy to do this by hand, you
# can use the configuration generator that comes with darcsweb, called
# "mkconfig.py".
#

class repo1:
	# the descriptive name
	reponame = 'repo1'

	# a brief description
	repodesc = 'Example repository'

	# the real path to the repository
	repodir = '/usr/src/repo1'

	# an url so people know where to do "darcs get" from
	repourl = 'http://example.com/repos/repo1/'

	# the encoding used in the repo
	# NOTE: if you use utf8, you _must_ write 'utf8' (and not the variants
	# like 'utf-8' or 'UTF8') if you expect darcsweb to work properly.
	# This is because to workaround a bug in darcs we need to do some
	# codec mangling and it needs special cases for UTF8.
	# You can, optionally, specify multiple encodings; they're tried in
	# order, and if one fails to decode a string, the next one is tried.
	# Example: repoencoding = "utf8", "latin1"
	repoencoding = "latin1"

	# as with the base configuration, the footer is also optional, and it
	# affects only this repository; if you don't specify, the one
	# specified in base is used (and if you don't specify one there
	# either, a default one is used)
	#footer = "I don't like being cold"

	# Each repository may show a link to some website associated with it.
	# This is typically useful if you've got a website describing the
	# software in your repository.
	#repoprojurl = 'http://example.com/projects/repo1/'


class repo2:
	reponame = 'repo2'
	repodesc = 'Second example repository'
	repodir = '/usr/src/repo2'
	repourl = 'http://example.com/repos/repo2/'
	repoencoding = 'latin1'


#
# If you have several repositories in a single directory and don't want to
# create a configuration entry for each one, you can use a "multidir" entry,
# which serves as a "template" for all the repositories in that directory.
# The name is taken from the directory, and inside the variables the string
# "%(name)s" gets expanded to the it. If displayname is set, "%(dname)s" gets
# expanded to it; otherwise it's the same as "%(name)s".
#
# If you set multidir_deep to True (note the capitalization) then all
# subdirectories are searched for darcs repositories. Subdirectories starting
# with a dot (.) are not searched. This may be slow, if huge directory trees
# must be searched. It's unnecesary unless you have a multidir with several
# nested repositories. It defaults to False, and it's optional.
#

class multi1:
	multidir = '/usr/local/src'
	#multidir_deep = False
	repodesc = 'Repository for %(name)s'
	repourl = 'http://example.com/repos/%(name)s/'
	repoencoding = 'latin1'

	# if you want to change the display name of the repositories (i.e. the
	# name it will have on the listings, urls, etc.), you can set it here.
	# You can use "%(name)s" expansion, see above.
	#displayname = "local/%(name)s"

	# optional, see above
	#repoprojurl = 'http://example.com/projects/%(name)s/'

	# if you want to exclude some directories, add them to this list (note
	# they're relative to multidir, not absolute)
	#exclude = 'dir1', 'dir2'

	# if you want the descriptions to be picked up automatically from the
	# file named "_darcs/third_party/darcsweb/desc" (one line only), set
	# this to True. It defaults to False
	#autodesc = True

	# if you want to exclude all the repositories which do NOT have a
	# directory named "_darcs/third_party/darcsweb/" inside, set this to
	# True. It defaults to False.
	#autoexclude = True

	# if you want urls to be picked up automatically from the file named
	# "_darcs/third_party/darcsweb/url" (one line only), set this to
	# True. It defaults to False.
	#autourl = True

	# if you want the projects urls to be picked up automatically from the
	# file named "_darcs/third_party/darcsweb/projurl" (one line only), set
	# this to True. It defaults to False.
	#autoprojurl = True