forked from sinacloud/sae-python-dev-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sql
More file actions
532 lines (433 loc) · 458 KB
/
Copy pathsetup.sql
File metadata and controls
532 lines (433 loc) · 458 KB
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
-- phpMyAdmin SQL Dump
-- version 3.3.2deb1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2013 年 03 月 11 日 17:30
-- 服务器版本: 5.1.41
-- PHP 版本: 5.3.2-1ubuntu4.11
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- 数据库: `app_tractests`
--
-- --------------------------------------------------------
--
-- 表的结构 `attachment`
--
CREATE TABLE IF NOT EXISTS `attachment` (
`type` text COLLATE utf8_bin NOT NULL,
`id` text COLLATE utf8_bin NOT NULL,
`filename` text COLLATE utf8_bin NOT NULL,
`size` int(11) DEFAULT NULL,
`time` bigint(20) DEFAULT NULL,
`description` text COLLATE utf8_bin,
`author` text COLLATE utf8_bin,
`ipnr` text COLLATE utf8_bin,
PRIMARY KEY (`type`(111),`id`(111),`filename`(111))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `attachment`
--
-- --------------------------------------------------------
--
-- 表的结构 `auth_cookie`
--
CREATE TABLE IF NOT EXISTS `auth_cookie` (
`cookie` text COLLATE utf8_bin NOT NULL,
`name` text COLLATE utf8_bin NOT NULL,
`ipnr` text COLLATE utf8_bin NOT NULL,
`time` int(11) DEFAULT NULL,
PRIMARY KEY (`cookie`(111),`ipnr`(111),`name`(111))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `auth_cookie`
--
-- --------------------------------------------------------
--
-- 表的结构 `cache`
--
CREATE TABLE IF NOT EXISTS `cache` (
`id` int(11) NOT NULL DEFAULT '0',
`generation` int(11) DEFAULT NULL,
`key` text COLLATE utf8_bin,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `cache`
--
INSERT INTO `cache` (`id`, `generation`, `key`) VALUES
(901198563, 57, 'trac.wiki.api.WikiSystem.pages');
-- --------------------------------------------------------
--
-- 表的结构 `component`
--
CREATE TABLE IF NOT EXISTS `component` (
`name` text COLLATE utf8_bin NOT NULL,
`owner` text COLLATE utf8_bin,
`description` text COLLATE utf8_bin,
PRIMARY KEY (`name`(255))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `component`
--
INSERT INTO `component` (`name`, `owner`, `description`) VALUES
('component1', 'somebody', NULL),
('component2', 'somebody', NULL);
-- --------------------------------------------------------
--
-- 表的结构 `enum`
--
CREATE TABLE IF NOT EXISTS `enum` (
`type` text COLLATE utf8_bin NOT NULL,
`name` text COLLATE utf8_bin NOT NULL,
`value` text COLLATE utf8_bin,
PRIMARY KEY (`type`(166),`name`(166))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `enum`
--
INSERT INTO `enum` (`type`, `name`, `value`) VALUES
('resolution', 'fixed', '1'),
('resolution', 'invalid', '2'),
('resolution', 'wontfix', '3'),
('resolution', 'duplicate', '4'),
('resolution', 'worksforme', '5'),
('priority', 'blocker', '1'),
('priority', 'critical', '2'),
('priority', 'major', '3'),
('priority', 'minor', '4'),
('priority', 'trivial', '5'),
('ticket_type', 'defect', '1'),
('ticket_type', 'enhancement', '2'),
('ticket_type', 'task', '3');
-- --------------------------------------------------------
--
-- 表的结构 `milestone`
--
CREATE TABLE IF NOT EXISTS `milestone` (
`name` text COLLATE utf8_bin NOT NULL,
`due` bigint(20) DEFAULT NULL,
`completed` bigint(20) DEFAULT NULL,
`description` text COLLATE utf8_bin,
PRIMARY KEY (`name`(255))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `milestone`
--
INSERT INTO `milestone` (`name`, `due`, `completed`, `description`) VALUES
('milestone1', 0, 0, NULL),
('milestone2', 0, 0, NULL),
('milestone3', 0, 0, NULL),
('milestone4', 0, 0, NULL);
-- --------------------------------------------------------
--
-- 表的结构 `node_change`
--
CREATE TABLE IF NOT EXISTS `node_change` (
`repos` int(11) NOT NULL DEFAULT '0',
`rev` text COLLATE utf8_bin NOT NULL,
`path` text COLLATE utf8_bin NOT NULL,
`node_type` text COLLATE utf8_bin,
`change_type` text COLLATE utf8_bin NOT NULL,
`base_path` text COLLATE utf8_bin,
`base_rev` text COLLATE utf8_bin,
PRIMARY KEY (`repos`,`rev`(20),`path`(255),`change_type`(2)),
KEY `node_change_repos_rev_idx` (`repos`,`rev`(20))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `node_change`
--
-- --------------------------------------------------------
--
-- 表的结构 `permission`
--
CREATE TABLE IF NOT EXISTS `permission` (
`username` text COLLATE utf8_bin NOT NULL,
`action` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`username`(166),`action`(166))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `permission`
--
INSERT INTO `permission` (`username`, `action`) VALUES
('anonymous', 'LOG_VIEW'),
('anonymous', 'FILE_VIEW'),
('anonymous', 'WIKI_VIEW'),
('authenticated', 'WIKI_CREATE'),
('authenticated', 'WIKI_MODIFY'),
('anonymous', 'SEARCH_VIEW'),
('anonymous', 'REPORT_VIEW'),
('anonymous', 'REPORT_SQL_VIEW'),
('anonymous', 'TICKET_VIEW'),
('authenticated', 'TICKET_CREATE'),
('authenticated', 'TICKET_MODIFY'),
('anonymous', 'BROWSER_VIEW'),
('anonymous', 'TIMELINE_VIEW'),
('anonymous', 'CHANGESET_VIEW'),
('anonymous', 'ROADMAP_VIEW'),
('anonymous', 'MILESTONE_VIEW');
-- --------------------------------------------------------
--
-- 表的结构 `report`
--
CREATE TABLE IF NOT EXISTS `report` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`author` text COLLATE utf8_bin,
`title` text COLLATE utf8_bin,
`query` text COLLATE utf8_bin,
`description` text COLLATE utf8_bin,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=9 ;
--
-- 转存表中的数据 `report`
--
INSERT INTO `report` (`id`, `author`, `title`, `query`, `description`) VALUES
(1, NULL, 'Active Tickets', 'SELECT p.value AS __color__,\n id AS ticket, summary, component, version, milestone, t.type AS type,\n owner, status,\n time AS created,\n changetime AS _changetime, description AS _description,\n reporter AS _reporter\n FROM ticket t\n LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''\n WHERE status <> ''closed''\n ORDER BY CAST(p.value AS signed), milestone, t.type, time\n', ' * List all active tickets by priority.\n * Color each row based on priority.\n'),
(2, NULL, 'Active Tickets by Version', 'SELECT p.value AS __color__,\n version AS __group__,\n id AS ticket, summary, component, version, t.type AS type,\n owner, status,\n time AS created,\n changetime AS _changetime, description AS _description,\n reporter AS _reporter\n FROM ticket t\n LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''\n WHERE status <> ''closed''\n ORDER BY (version IS NULL),version, CAST(p.value AS signed), t.type, time\n', 'This report shows how to color results by priority,\nwhile grouping results by version.\n\nLast modification time, description and reporter are included as hidden fields\nfor useful RSS export.\n'),
(3, NULL, 'Active Tickets by Milestone', 'SELECT p.value AS __color__,\n concat(''Milestone '', milestone) AS __group__,\n id AS ticket, summary, component, version, t.type AS type,\n owner, status,\n time AS created,\n changetime AS _changetime, description AS _description,\n reporter AS _reporter\n FROM ticket t\n LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''\n WHERE status <> ''closed''\n ORDER BY (milestone IS NULL),milestone, CAST(p.value AS signed), t.type, time\n', 'This report shows how to color results by priority,\nwhile grouping results by milestone.\n\nLast modification time, description and reporter are included as hidden fields\nfor useful RSS export.\n'),
(4, NULL, 'Accepted, Active Tickets by Owner', 'SELECT p.value AS __color__,\n owner AS __group__,\n id AS ticket, summary, component, milestone, t.type AS type, time AS created,\n changetime AS _changetime, description AS _description,\n reporter AS _reporter\n FROM ticket t\n LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''\n WHERE status = ''accepted''\n ORDER BY owner, CAST(p.value AS signed), t.type, time\n', 'List accepted tickets, group by ticket owner, sorted by priority.\n'),
(5, NULL, 'Accepted, Active Tickets by Owner (Full Description)', 'SELECT p.value AS __color__,\n owner AS __group__,\n id AS ticket, summary, component, milestone, t.type AS type, time AS created,\n description AS _description_,\n changetime AS _changetime, reporter AS _reporter\n FROM ticket t\n LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''\n WHERE status = ''accepted''\n ORDER BY owner, CAST(p.value AS signed), t.type, time\n', 'List tickets accepted, group by ticket owner.\nThis report demonstrates the use of full-row display.\n'),
(6, NULL, 'All Tickets By Milestone (Including closed)', 'SELECT p.value AS __color__,\n t.milestone AS __group__,\n (CASE status\n WHEN ''closed'' THEN ''color: #777; background: #ddd; border-color: #ccc;''\n ELSE\n (CASE owner WHEN $USER THEN ''font-weight: bold'' END)\n END) AS __style__,\n id AS ticket, summary, component, status,\n resolution,version, t.type AS type, priority, owner,\n changetime AS modified,\n time AS _time,reporter AS _reporter\n FROM ticket t\n LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''\n ORDER BY (milestone IS NULL), milestone DESC, (status = ''closed''),\n (CASE status WHEN ''closed'' THEN changetime ELSE (-1) * CAST(p.value AS signed) END) DESC\n', 'A more complex example to show how to make advanced reports.\n'),
(7, NULL, 'My Tickets', 'SELECT DISTINCT\n p.value AS __color__,\n (CASE\n WHEN owner = $USER AND status = ''accepted'' THEN ''Accepted''\n WHEN owner = $USER THEN ''Owned''\n WHEN reporter = $USER THEN ''Reported''\n ELSE ''Commented'' END) AS __group__,\n t.id AS ticket, summary, component, version, milestone,\n t.type AS type, priority, t.time AS created,\n t.changetime AS _changetime, description AS _description,\n reporter AS _reporter\n FROM ticket t\n LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''\n LEFT JOIN ticket_change tc ON tc.ticket = t.id AND tc.author = $USER\n AND tc.field = ''comment''\n WHERE t.status <> ''closed''\n AND (owner = $USER OR reporter = $USER OR author = $USER)\n ORDER BY (owner = $USER AND status = ''accepted'') DESC,\n owner = $USER DESC, reporter = $USER DESC,\n CAST(p.value AS signed), milestone, t.type, t.time\n', 'This report demonstrates the use of the automatically set\nUSER dynamic variable, replaced with the username of the\nlogged in user when executed.\n'),
(8, NULL, 'Active Tickets, Mine first', 'SELECT p.value AS __color__,\n (CASE owner\n WHEN $USER THEN ''My Tickets''\n ELSE ''Active Tickets''\n END) AS __group__,\n id AS ticket, summary, component, version, milestone, t.type AS type,\n owner, status,\n time AS created,\n changetime AS _changetime, description AS _description,\n reporter AS _reporter\n FROM ticket t\n LEFT JOIN enum p ON p.name = t.priority AND p.type = ''priority''\n WHERE status <> ''closed''\n ORDER BY (COALESCE(owner, '''') = $USER) DESC, CAST(p.value AS signed), milestone, t.type, time\n', ' * List all active tickets by priority.\n * Show all tickets owned by the logged in user in a group first.\n');
-- --------------------------------------------------------
--
-- 表的结构 `repository`
--
CREATE TABLE IF NOT EXISTS `repository` (
`id` int(11) NOT NULL DEFAULT '0',
`name` text COLLATE utf8_bin NOT NULL,
`value` text COLLATE utf8_bin,
PRIMARY KEY (`id`,`name`(166))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `repository`
--
-- --------------------------------------------------------
--
-- 表的结构 `revision`
--
CREATE TABLE IF NOT EXISTS `revision` (
`repos` int(11) NOT NULL DEFAULT '0',
`rev` text COLLATE utf8_bin NOT NULL,
`time` bigint(20) DEFAULT NULL,
`author` text COLLATE utf8_bin,
`message` text COLLATE utf8_bin,
PRIMARY KEY (`repos`,`rev`(20)),
KEY `revision_repos_time_idx` (`repos`,`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `revision`
--
-- --------------------------------------------------------
--
-- 表的结构 `session`
--
CREATE TABLE IF NOT EXISTS `session` (
`sid` text COLLATE utf8_bin NOT NULL,
`authenticated` int(11) NOT NULL DEFAULT '0',
`last_visit` int(11) DEFAULT NULL,
PRIMARY KEY (`sid`(166),`authenticated`),
KEY `session_last_visit_idx` (`last_visit`),
KEY `session_authenticated_idx` (`authenticated`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `session`
--
-- --------------------------------------------------------
--
-- 表的结构 `session_attribute`
--
CREATE TABLE IF NOT EXISTS `session_attribute` (
`sid` text COLLATE utf8_bin NOT NULL,
`authenticated` int(11) NOT NULL DEFAULT '0',
`name` text COLLATE utf8_bin NOT NULL,
`value` text COLLATE utf8_bin,
PRIMARY KEY (`sid`(111),`authenticated`,`name`(111))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `session_attribute`
--
-- --------------------------------------------------------
--
-- 表的结构 `system`
--
CREATE TABLE IF NOT EXISTS `system` (
`name` text COLLATE utf8_bin NOT NULL,
`value` text COLLATE utf8_bin,
PRIMARY KEY (`name`(255))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `system`
--
INSERT INTO `system` (`name`, `value`) VALUES
('database_version', '29'),
('initial_database_version', '29');
-- --------------------------------------------------------
--
-- 表的结构 `ticket`
--
CREATE TABLE IF NOT EXISTS `ticket` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` text COLLATE utf8_bin,
`time` bigint(20) DEFAULT NULL,
`changetime` bigint(20) DEFAULT NULL,
`component` text COLLATE utf8_bin,
`severity` text COLLATE utf8_bin,
`priority` text COLLATE utf8_bin,
`owner` text COLLATE utf8_bin,
`reporter` text COLLATE utf8_bin,
`cc` text COLLATE utf8_bin,
`version` text COLLATE utf8_bin,
`milestone` text COLLATE utf8_bin,
`status` text COLLATE utf8_bin,
`resolution` text COLLATE utf8_bin,
`summary` text COLLATE utf8_bin,
`description` text COLLATE utf8_bin,
`keywords` text COLLATE utf8_bin,
PRIMARY KEY (`id`),
KEY `ticket_time_idx` (`time`),
KEY `ticket_status_idx` (`status`(255))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
--
-- 转存表中的数据 `ticket`
--
-- --------------------------------------------------------
--
-- 表的结构 `ticket_change`
--
CREATE TABLE IF NOT EXISTS `ticket_change` (
`ticket` int(11) NOT NULL DEFAULT '0',
`time` bigint(20) NOT NULL DEFAULT '0',
`author` text COLLATE utf8_bin,
`field` text COLLATE utf8_bin NOT NULL,
`oldvalue` text COLLATE utf8_bin,
`newvalue` text COLLATE utf8_bin,
PRIMARY KEY (`ticket`,`time`,`field`(111)),
KEY `ticket_change_ticket_idx` (`ticket`),
KEY `ticket_change_time_idx` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `ticket_change`
--
-- --------------------------------------------------------
--
-- 表的结构 `ticket_custom`
--
CREATE TABLE IF NOT EXISTS `ticket_custom` (
`ticket` int(11) NOT NULL DEFAULT '0',
`name` text COLLATE utf8_bin NOT NULL,
`value` text COLLATE utf8_bin,
PRIMARY KEY (`ticket`,`name`(166))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `ticket_custom`
--
-- --------------------------------------------------------
--
-- 表的结构 `version`
--
CREATE TABLE IF NOT EXISTS `version` (
`name` text COLLATE utf8_bin NOT NULL,
`time` bigint(20) DEFAULT NULL,
`description` text COLLATE utf8_bin,
PRIMARY KEY (`name`(255))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `version`
--
INSERT INTO `version` (`name`, `time`, `description`) VALUES
('1.0', 0, NULL),
('2.0', 0, NULL);
-- --------------------------------------------------------
--
-- 表的结构 `wiki`
--
CREATE TABLE IF NOT EXISTS `wiki` (
`name` text COLLATE utf8_bin NOT NULL,
`version` int(11) NOT NULL DEFAULT '0',
`time` bigint(20) DEFAULT NULL,
`author` text COLLATE utf8_bin,
`ipnr` text COLLATE utf8_bin,
`text` text COLLATE utf8_bin,
`comment` text COLLATE utf8_bin,
`readonly` int(11) DEFAULT NULL,
PRIMARY KEY (`name`(166),`version`),
KEY `wiki_time_idx` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- 转存表中的数据 `wiki`
--
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracCgi', 1, 1362994208158244, 'trac', '127.0.0.1', '= Installing Trac as CGI =\r\n\r\n{{{\r\n#!div class=important\r\n ''''Please note that using Trac via CGI is the slowest deployment method available. It is slower than [TracModPython mod_python], [TracFastCgi FastCGI] and even [trac:TracOnWindowsIisAjp IIS/AJP] on Windows.''''\r\n}}}\r\n\r\nCGI script is the entrypoint that web-server calls when a web-request to an application is made. To generate the `trac.cgi` script run:\r\n{{{\r\ntrac-admin /path/to/env deploy /path/to/www/trac\r\n}}}\r\n`trac.cgi` will be in the `cgi-bin` folder inside the given path. ''''Make sure it is executable by your web server''''. This command also copies `static resource` files to a `htdocs` directory of a given destination.\r\n\r\n== Apache web-server configuration ==\r\n\r\nIn [http://httpd.apache.org/ Apache] there are two ways to run Trac as CGI:\r\n\r\n 1. Use a `ScriptAlias` directive that maps an URL to the `trac.cgi` script (recommended)\r\n 2. Copy the `trac.cgi` file into the directory for CGI executables used by your web server (commonly named `cgi-bin`). You can also create a symbolic link, but in that case make sure that the `FollowSymLinks` option is enabled for the `cgi-bin` directory.\r\n\r\nTo make Trac available at `http://yourhost.example.org/trac` add `ScriptAlias` directive to Apache configuration file, changing `trac.cgi` path to match your installation:\r\n{{{\r\nScriptAlias /trac /path/to/www/trac/cgi-bin/trac.cgi\r\n}}}\r\n\r\n ''''Note that this directive requires enabled `mod_alias` module.''''\r\n\r\nIf you''re using Trac with a single project you need to set its location using the `TRAC_ENV` environment variable:\r\n{{{\r\n<Location "/trac">\r\n SetEnv TRAC_ENV "/path/to/projectenv"\r\n</Location>\r\n}}}\r\n\r\nOr to use multiple projects you can specify their common parent directory using the `TRAC_ENV_PARENT_DIR` variable:\r\n{{{\r\n<Location "/trac">\r\n SetEnv TRAC_ENV_PARENT_DIR "/path/to/project/parent/dir"\r\n</Location>\r\n}}}\r\n\r\n ''''Note that the `SetEnv` directive requires enabled `mod_env` module. It is also possible to set TRAC_ENV in trac.cgi. Just add the following code between "try:" and "from trac.web ...":''''\r\n\r\n{{{\r\n import os\r\n os.environ[''TRAC_ENV''] = "/path/to/projectenv"\r\n}}}\r\n\r\n '''' Or for TRAC_ENV_PARENT_DIR: ''''\r\n\r\n{{{\r\n import os\r\n os.environ[''TRAC_ENV_PARENT_DIR''] = "/path/to/project/parent/dir"\r\n}}}\r\n\r\nIf you are using the [http://httpd.apache.org/docs/suexec.html Apache suEXEC] feature please see [http://trac.edgewall.org/wiki/ApacheSuexec].\r\n\r\nOn some systems, you ''''may'''' need to edit the shebang line in the `trac.cgi` file to point to your real Python installation path. On a Windows system you may need to configure Windows to know how to execute a .cgi file (Explorer -> Tools -> Folder Options -> File Types -> CGI).\r\n\r\n=== Using WSGI ===\r\n\r\nYou can run a [http://henry.precheur.org/python/how_to_serve_cgi WSGI handler] [http://pythonweb.org/projects/webmodules/doc/0.5.3/html_multipage/lib/example-webserver-web-wsgi-simple-cgi.html under CGI]. You can [wiki:TracModWSGI#Thetrac.wsgiscript write your own application function], or use the deployed trac.wsgi''s application.\r\n\r\n== Mapping Static Resources ==\r\n\r\nSee TracInstall#MappingStaticResources.\r\n\r\n== Adding Authentication ==\r\n\r\nSee TracInstall#ConfiguringAuthentication.\r\n\r\n----\r\nSee also: TracGuide, TracInstall, [wiki:TracModWSGI], TracFastCgi, TracModPython', NULL, NULL),
('TracModPython', 1, 1362994208204148, 'trac', '127.0.0.1', '= Trac and mod_python =\r\n[[TracGuideToc]]\r\n\r\nTrac supports [http://www.modpython.org/ mod_python], which speeds up Trac''s response times considerably, especially compared to [TracCgi CGI], and permits use of many Apache features not possible with [wiki:TracStandalone tracd]/mod_proxy.\r\n\r\n{{{#!div class="important"\r\n** A Word of Warning **\r\n\r\nAs of 16^th^ June 2010, the mod_python project is officially dead. If you are considering using mod_python for a new installation, ''''''please don''t''''''! There are known issues which will not be fixed and there are now better alternatives. Check out the main TracInstall pages for your target version for more information.\r\n}}}\r\n\r\n\r\nThese instructions are for Apache 2; if you are still using Apache 1.3, you may have some luck with [trac:wiki:TracModPython2.7 TracModPython2.7], but you''ll be totally on your own.\r\n\r\n[[PageOutline(2-3,Overview,inline)]]\r\n\r\n== Simple configuration: single project == #Simpleconfiguration\r\n\r\nIf you just installed mod_python, you may have to add a line to load the module in the Apache configuration:\r\n{{{\r\nLoadModule python_module modules/mod_python.so\r\n}}}\r\n\r\n''''Note: The exact path to the module depends on how the HTTPD installation is laid out.''''\r\n\r\nOn Debian using apt-get\r\n{{{\r\napt-get install libapache2-mod-python libapache2-mod-python-doc\r\n}}}\r\n(Still on Debian) after you have installed mod_python, you must enable the modules in apache2 (equivalent of the above Load Module directive):\r\n{{{\r\na2enmod python\r\n}}}\r\nOn Fedora use, using yum:\r\n{{{\r\nyum install mod_python\r\n}}}\r\nYou can test your mod_python installation by adding the following to your httpd.conf. You should remove this when you are done testing for security reasons. Note: mod_python.testhandler is only available in mod_python 3.2+.\r\n{{{\r\n#!xml\r\n<Location /mpinfo>\r\n SetHandler mod_python\r\n PythonInterpreter main_interpreter\r\n PythonHandler mod_python.testhandler\r\n Order allow,deny\r\n Allow from all\r\n</Location>\r\n}}}\r\n\r\nA simple setup of Trac on mod_python looks like this:\r\n{{{\r\n#!xml\r\n<Location /projects/myproject>\r\n SetHandler mod_python\r\n PythonInterpreter main_interpreter\r\n PythonHandler trac.web.modpython_frontend \r\n PythonOption TracEnv /var/trac/myproject\r\n PythonOption TracUriRoot /projects/myproject\r\n Order allow,deny\r\n Allow from all\r\n</Location>\r\n}}}\r\n\r\nThe option ''''''`TracUriRoot`'''''' may or may not be necessary in your setup. Try your configuration without it; if the URLs produced by Trac look wrong, if Trac does not seem to recognize URLs correctly, or you get an odd "No handler matched request to..." error, add the ''''''`TracUriRoot`'''''' option. You will notice that the `Location` and ''''''`TracUriRoot`'''''' have the same path.\r\n\r\nThe options available are\r\n{{{\r\n # For a single project\r\n PythonOption TracEnv /var/trac/myproject\r\n\r\n # For multiple projects\r\n PythonOption TracEnvParentDir /var/trac/myprojects\r\n\r\n # For the index of multiple projects\r\n PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_template.html\r\n\r\n # A space delimitted list, with a "," between key and value pairs.\r\n PythonOption TracTemplateVars key1,val1 key2,val2\r\n\r\n # Useful to get the date in the wanted order\r\n PythonOption TracLocale en_GB.UTF8\r\n\r\n # See description above \r\n PythonOption TracUriRoot /projects/myproject\r\n}}}\r\n\r\n=== Python Egg Cache ===\r\n\r\nCompressed python eggs like Genshi are normally extracted into a directory named `.python-eggs` in the users home directory. Since apache''s home usually is not writable an alternate egg cache directory can be specified like this:\r\n{{{\r\nPythonOption PYTHON_EGG_CACHE /var/trac/myprojects/egg-cache\r\n}}}\r\n\r\nor you can uncompress the Genshi egg to resolve problems extracting from it.\r\n\r\n=== Configuring Authentication ===\r\n\r\nSee corresponding section in the [wiki:TracModWSGI#ConfiguringAuthentication] page.\r\n\r\n\r\n== Advanced Configuration\r\n\r\n=== Setting the Python Egg Cache ===\r\n\r\nIf the Egg Cache isn''t writeable by your Web server, you''ll either have to change the permissions, or point Python to a location where Apache can write. This can manifest itself as a ''''500 internal server error'''' and/or a complaint in the syslog. \r\n\r\n{{{\r\n#!xml\r\n<Location /projects/myproject>\r\n ...\r\n PythonOption PYTHON_EGG_CACHE /tmp \r\n ...\r\n</Location>\r\n}}}\r\n\r\n\r\n=== Setting the !PythonPath ===\r\n\r\nIf the Trac installation isn''t installed in your Python path, you''ll have to tell Apache where to find the Trac mod_python handler using the `PythonPath` directive:\r\n{{{\r\n#!xml\r\n<Location /projects/myproject>\r\n ...\r\n PythonPath "sys.path + [''/path/to/trac'']"\r\n ...\r\n</Location>\r\n}}}\r\n\r\nBe careful about using the !PythonPath directive, and ''''not'''' `SetEnv PYTHONPATH`, as the latter won''t work.\r\n\r\n=== Setting up multiple projects ===\r\n\r\nThe Trac mod_python handler supports a configuration option similar to Subversion''s `SvnParentPath`, called `TracEnvParentDir`:\r\n{{{\r\n#!xml\r\n<Location /projects>\r\n SetHandler mod_python\r\n PythonInterpreter main_interpreter\r\n PythonHandler trac.web.modpython_frontend \r\n PythonOption TracEnvParentDir /var/trac\r\n PythonOption TracUriRoot /projects\r\n</Location>\r\n}}}\r\n\r\nWhen you request the `/projects` URL, you will get a listing of all subdirectories of the directory you set as `TracEnvParentDir` that look like Trac environment directories. Selecting any project in the list will bring you to the corresponding Trac environment.\r\n\r\nIf you don''t want to have the subdirectory listing as your projects home page you can use a\r\n{{{\r\n#!xml\r\n<LocationMatch "/.+/">\r\n}}}\r\n\r\nThis will instruct Apache to use mod_python for all locations different from root while having the possibility of placing a custom home page for root in your !DocumentRoot folder.\r\n\r\nYou can also use the same authentication realm for all of the projects using a `<LocationMatch>` directive:\r\n{{{\r\n#!xml\r\n<LocationMatch "/projects/[^/]+/login">\r\n AuthType Basic\r\n AuthName "Trac"\r\n AuthUserFile /var/trac/.htpasswd\r\n Require valid-user\r\n</LocationMatch>\r\n}}}\r\n\r\n=== Virtual Host Configuration ===\r\n\r\nBelow is the sample configuration required to set up your trac as a virtual server (i.e. when you access it at the URLs like\r\n!http://trac.mycompany.com):\r\n\r\n{{{\r\n#!xml\r\n<VirtualHost * >\r\n DocumentRoot /var/www/myproject\r\n ServerName trac.mycompany.com\r\n <Location />\r\n SetHandler mod_python\r\n PythonInterpreter main_interpreter\r\n PythonHandler trac.web.modpython_frontend\r\n PythonOption TracEnv /var/trac/myproject\r\n PythonOption TracUriRoot /\r\n </Location>\r\n <Location /login>\r\n AuthType Basic\r\n AuthName "MyCompany Trac Server"\r\n AuthUserFile /var/trac/myproject/.htpasswd\r\n Require valid-user\r\n </Location>\r\n</VirtualHost>\r\n}}}\r\n\r\nThis does not seem to work in all cases. What you can do if it does not:\r\n * Try using `<LocationMatch>` instead of `<Location>`\r\n * <Location /> may, in your server setup, refer to the complete host instead of simple the root of the server. This means that everything (including the login directory referenced below) will be sent to python and authentication does not work (i.e. you get the infamous Authentication information missing error). If this applies to you, try using a sub-directory for trac instead of the root (i.e. /web/ and /web/login instead of / and /login).\r\n * Depending on apache''s `NameVirtualHost` configuration, you may need to use `<VirtualHost *:80>` instead of `<VirtualHost *>`.\r\n\r\nFor a virtual host that supports multiple projects replace "`TracEnv`" /var/trac/myproject with "`TracEnvParentDir`" /var/trac/\r\n\r\nNote: !DocumentRoot should not point to your Trac project env. As Asmodai wrote on #trac: "suppose there''s a webserver bug that allows disclosure of !DocumentRoot they could then leech the entire Trac environment".\r\n\r\n== Troubleshooting ==\r\n\r\nIn general, if you get server error pages, you can either check the Apache error log, or enable the `PythonDebug` option:\r\n{{{\r\n#!xml\r\n<Location /projects/myproject>\r\n ...\r\n PythonDebug on\r\n</Location>\r\n}}}\r\n\r\nFor multiple projects, try restarting the server as well.\r\n\r\n=== Login Not Working ===\r\nIf you''ve used `<Location />` directive, it will override any other directives, as well as `<Location /login>`.\r\nThe workaround is to use negation expression as follows (for multi project setups):\r\n{{{\r\n#!xml\r\n#this one for other pages\r\n<Location ~ "/*(?!login)">\r\n SetHandler mod_python\r\n PythonHandler trac.web.modpython_frontend\r\n PythonOption TracEnvParentDir /projects\r\n PythonOption TracUriRoot /\r\n\r\n</Location>\r\n#this one for login page\r\n<Location ~ "/[^/]+/login">\r\n SetHandler mod_python\r\n PythonHandler trac.web.modpython_frontend\r\n PythonOption TracEnvParentDir /projects\r\n PythonOption TracUriRoot /\r\n\r\n #remove these if you don''t want to force SSL\r\n RewriteEngine On \r\n RewriteCond %{HTTPS} off\r\n RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}\r\n\r\n AuthType Basic\r\n AuthName "Trac"\r\n AuthUserFile /projects/.htpasswd\r\n Require valid-user\r\n</Location>\r\n}}}\r\n\r\n=== Expat-related segmentation faults === #expat\r\n\r\nThis problem will most certainly hit you on Unix when using Python 2.4.\r\nIn Python 2.4, some version of Expat (an XML parser library written in C) is used, \r\nand if Apache is using another version, this results in segmentation faults.\r\nAs Trac 0.11 is using Genshi, which will indirectly use Expat, that problem\r\ncan now hit you even if everything was working fine before with Trac 0.10.\r\n\r\nSee Graham Dumpleton''s detailed [http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash explanation and workarounds] for the issue.\r\n\r\n=== Form submission problems ===\r\n\r\nIf you''re experiencing problems submitting some of the forms in Trac (a common problem is that you get redirected to the start page after submission), check whether your {{{DocumentRoot}}} contains a folder or file with the same path that you mapped the mod_python handler to. For some reason, mod_python gets confused when it is mapped to a location that also matches a static resource.\r\n\r\n=== Problem with virtual host configuration ===\r\n\r\nIf the <Location /> directive is used, setting the `DocumentRoot` may result in a ''''403 (Forbidden)'''' error. Either remove the `DocumentRoot` directive, or make sure that accessing the directory it points is allowed (in a corresponding `<Directory>` block).\r\n\r\nUsing <Location /> together with `SetHandler` resulted in having everything handled by mod_python, which leads to not being able download any CSS or images/icons. I used <Location /trac> `SetHandler None` </Location> to circumvent the problem, though I do not know if this is the most elegant solution.\r\n\r\n=== Problem with zipped egg ===\r\n\r\nIt''s possible that your version of mod_python will not import modules from zipped eggs. If you encounter an `ImportError: No module named trac` in your Apache logs but you think everything is where it should be, this might be your problem. Look in your site-packages directory; if the Trac module appears as a ''''file'''' rather than a ''''directory'''', then this might be your problem. To rectify, try installing Trac using the `--always-unzip` option, like this:\r\n\r\n{{{\r\neasy_install --always-unzip Trac-0.12b1.zip\r\n}}}\r\n\r\n=== Using .htaccess ===\r\n\r\nAlthough it may seem trivial to rewrite the above configuration as a directory in your document root with a `.htaccess` file, this does not work. Apache will append a "/" to any Trac URLs, which interferes with its correct operation.\r\n\r\nIt may be possible to work around this with mod_rewrite, but I failed to get this working. In all, it is more hassle than it is worth. Stick to the provided instructions. :)\r\n\r\nA success story: For me it worked out-of-box, with following trivial config:\r\n{{{#!xml\r\nSetHandler mod_python\r\nPythonInterpreter main_interpreter\r\nPythonHandler trac.web.modpython_frontend \r\nPythonOption TracEnv /system/path/to/this/directory\r\nPythonOption TracUriRoot /path/on/apache\r\n\r\nAuthType Basic\r\nAuthName "ProjectName"\r\nAuthUserFile /path/to/.htpasswd\r\nRequire valid-user\r\n}}}\r\n\r\nThe `TracUriRoot` is obviously the path you need to enter to the browser to get to the trac (e.g. domain.tld/projects/trac)\r\n\r\n=== Additional .htaccess help ===\r\n\r\nIf you are using the .htaccess method you may have additional problems if your trac directory is inheriting .htaccess directives from another. This may also help to add to your .htaccess file:\r\n\r\n{{{\r\n<IfModule mod_rewrite.c>\r\n RewriteEngine Off\r\n</IfModule>\r\n}}}\r\n\r\n=== Platform specific issues\r\n==== Win32 Issues ====\r\nIf you run trac with mod_python < 3.2 on Windows, uploading attachments will ''''''not'''''' work. This problem is resolved in mod_python 3.1.4 or later, so please upgrade mod_python to fix this.\r\n\r\n\r\n==== OS X issues ====\r\n\r\nWhen using mod_python on OS X you will not be able to restart Apache using `apachectl restart`. This is apparently fixed in mod_python 3.2, but there''s also a patch available for earlier versions [http://www.dscpl.com.au/projects/vampire/patches.html here].\r\n\r\n==== SELinux issues ====\r\n\r\nIf Trac reports something like: ''''Cannot get shared lock on db.lock''''\r\nThe security context on the repository may need to be set:\r\n\r\n{{{\r\nchcon -R -h -t httpd_sys_content_t PATH_TO_REPOSITORY\r\n}}}\r\n\r\nSee also [http://subversion.tigris.org/faq.html#reposperms]\r\n\r\n==== FreeBSD issues ====\r\nPay attention to the version of the installed mod_python and sqlite packages. Ports have both the new and old ones, but earlier versions of pysqlite and mod_python won''t integrate as the former requires threaded support in python, and the latter requires a threadless install.\r\n\r\nIf you compiled and installed apache2, apache wouldn´t support threads (cause it doesn´t work very well on FreeBSD). You could force thread support when running ./configure for apache, using --enable-threads, but this isn´t recommendable.\r\nThe best option [http://modpython.org/pipermail/mod_python/2006-September/021983.html seems to be] adding to /usr/local/apache2/bin/ennvars the line \r\n\r\n{{{\r\nexport LD_PRELOAD=/usr/lib/libc_r.so\r\n}}}\r\n\r\n\r\n==== Fedora 7 Issues ====\r\nMake sure you install the ''python-sqlite2'' package as it seems to be required for TracModPython but not for tracd\r\n\r\n\r\n=== Subversion issues ===\r\n\r\nIf you get the following Trac Error `Unsupported version control system "svn"` only under mod_python, though it works well on the command-line and even with TracStandalone, chances are that you forgot to add the path to the Python bindings with the [TracModPython#ConfiguringPythonPath PythonPath] directive. (The better way is to add a link to the bindings in the Python `site-packages` directory, or create a `.pth` file in that directory.)\r\n\r\nIf this is not the case, it''s possible that you''re using Subversion libraries that are binary incompatible with the apache ones (an incompatibility of the `apr` libraries is usually the cause). In that case, you also won''t be able to use the svn modules for Apache (`mod_dav_svn`).\r\n\r\nYou also need a recent version of `mod_python` in order to avoid a runtime error ({{{argument number 2: a ''apr_pool_t *'' is expected}}}) due to the default usage of multiple sub-interpreters. 3.2.8 ''''should'''' work, though it''s probably better to use the workaround described in [trac:#3371 #3371], in order to force the use of the main interpreter:\r\n{{{\r\nPythonInterpreter main_interpreter\r\n}}}\r\nThis is anyway the recommended workaround for other well-known issues seen when using the Python bindings for Subversion within mod_python ([trac:#2611 #2611], [trac:#3455 #3455]). See in particular Graham Dumpleton''s comment in [trac:comment:9:ticket:3455 #3455] explaining the issue.\r\n\r\n=== Page layout issues ===\r\n\r\nIf the formatting of the Trac pages look weird chances are that the style sheets governing the page layout are not handled properly by the web server. Try adding the following lines to your apache configuration:\r\n{{{\r\n#!xml\r\nAlias /myproject/css "/usr/share/trac/htdocs/css"\r\n<Location /myproject/css>\r\n SetHandler None\r\n</Location>\r\n}}}\r\n\r\nNote: For the above configuration to have any effect it must be put after the configuration of your project root location, i.e. {{{<Location /myproject />}}}.\r\n\r\nAlso, setting `PythonOptimize On` seems to mess up the page headers and footers, in addition to hiding the documentation for macros and plugins (see #Trac8956). Considering how little effect the option has, it is probably a good idea to leave it `Off`.\r\n\r\n=== HTTPS issues ===\r\n\r\nIf you want to run Trac fully under https you might find that it tries to redirect to plain http. In this case just add the following line to your apache configuration:\r\n{{{\r\n#!xml\r\n<VirtualHost * >\r\n DocumentRoot /var/www/myproject\r\n ServerName trac.mycompany.com\r\n SetEnv HTTPS 1\r\n ....\r\n</VirtualHost>\r\n}}}\r\n\r\n\r\n=== Segmentation fault with php5-mhash or other php5 modules ===\r\nYou may encounter segfaults (reported on debian etch) if php5-mhash module is installed. Try to remove it to see if this solves the problem. See debian bug report [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411487]\r\n\r\nSome people also have troubles when using php5 compiled with its own 3rd party libraries instead of system libraries. Check here [http://www.djangoproject.com/documentation/modpython/#if-you-get-a-segmentation-fault]\r\n\r\n----\r\nSee also: TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracFastCgi FastCGI], [trac:TracNginxRecipe TracNginxRecipe]\r\n', NULL, NULL),
('WikiPageNames', 1, 1362994208233297, 'trac', '127.0.0.1', '= Wiki Page Names =\r\n[[TracGuideToc]]\r\n\r\nWiki page names commonly use the CamelCase convention. Within wiki text, any word in CamelCase automatically becomes a hyperlink to the wiki page with that name.\r\n\r\nCamelCase page names must follow these rules:\r\n\r\n 1. The name must consist of ''''''alphabetic characters only''''''. No digits, spaces, punctuation, or underscores are allowed.\r\n 2. A name must have at least two capital letters.\r\n 3. The first character must be capitalized.\r\n 4. Every capital letter must be followed by one or more lower-case letters. \r\n 5. The use of slash ( / ) is permitted in page names (possibly representing a hierarchy).\r\n\r\nIf you want to create a wiki page that doesn''t follow CamelCase rules you can use the following syntax:\r\n{{{\r\n * [wiki:Wiki_page], [wiki:ISO9000],\r\n and with a label: [wiki:ISO9000 ISO 9000 standard]\r\n * [wiki:"Space Matters"]\r\n and with a label: [wiki:"Space Matters" all about white space]\r\n * or simply: ["WikiPageName"]s\r\n * even better, the new [[WikiCreole link style]]\r\n and with a label: [[WikiCreole link style|WikiCreole style links]]\r\n}}}\r\n\r\nThis will be rendered as:\r\n * [wiki:Wiki_page], [wiki:ISO9000],\r\n and with a label: [wiki:ISO9000 ISO 9000 standard]\r\n * [wiki:"Space Matters"] ''''(that page name embeds space characters)''''\r\n and with a label: [wiki:"Space Matters" all about white space]\r\n * or simply: ["WikiPageName"]s ''''(old !MoinMoin''s internal free links style)''''\r\n * even better, the new [[WikiCreole link style]]\r\n and with a label: [[WikiCreole link style|WikiCreole style links]]\r\n ''''(since 0.12, also now adopted by !MoinMoin)''''\r\n\r\n\r\nStarting with Trac 0.11, it''s also possible to link to a specific ''''version'''' of a Wiki page, as you would do for a specific version of a file, for example: WikiStart@1.\r\n\r\nYou can also prevent a CamelCase name to be interpreted as a TracLinks, by quoting it. See TracLinks#EscapingLinks.\r\n\r\nAs visible in the example above, one can also append an anchor to a Wiki page name, in order to link to a specific section within that page. The anchor can easily be seen by hovering the mouse over a section heading, then clicking on the [[html(¶)]] sign that appears at its end. The anchor is usually generated automatically, but it''s also possible to specify it explicitly: see WikiFormatting#using-explicit-id-in-heading.\r\n----\r\nSee also: WikiNewPage, WikiFormatting, TracWiki, TracLinks\r\n', NULL, NULL),
('InterWiki', 1, 1362994208251342, 'trac', '127.0.0.1', '= Support for InterWiki links =\r\n\r\n''''(since [trac:milestone:0.10 0.10])''''\r\n\r\n== Definition ==\r\n\r\nAn InterWiki link can be used for referring to a Wiki page\r\nlocated in another Wiki system, and by extension, to any object\r\nlocated in any other Web application, provided a simple URL \r\nmapping can be done.\r\n\r\nAt the extreme, InterWiki prefixes can even be used to simply introduce\r\nlinks to new protocols, such as `tsvn:` used by [trac:TortoiseSvn TortoiseSvn].\r\n\r\n== Link Syntax ==\r\n\r\n{{{\r\n<target_wiki>(:<identifier>)+\r\n}}}\r\n\r\nThe link is composed by the targeted Wiki (or system) name,\r\nfollowed by a colon (e.g. `MeatBall:`),\r\nfollowed by a page specification in the target.\r\nNote that, as for InterTrac prefixes, ''''''InterWiki prefixes are case insensitive''''''.\r\n\r\nThe target Wiki URL is looked up in the `[interwiki]` section of TracIni or in the InterMapTxt wiki page, modeled after MeatBall:InterMapTxt. If a prefix is defined in both the `[interwiki]` section and InterMapTxt, the `[interwiki]` section takes precedence.\r\n\r\nIn addition to traditional InterWiki links, where the target\r\nis simply ''''appended'''' to the URL, \r\nTrac supports parametric InterWiki URLs:\r\nidentifiers `$1`, `$2`, ... in the URL\r\nwill be replaced by corresponding arguments.\r\nThe argument list is formed by splitting the page identifier\r\nusing the ":" separator.\r\n\r\n=== [interwiki] ===\r\nEvery option in the `[interwiki]` section in TracIni defines one InterWiki prefix. The option name defines the prefix. The option value defines the URL, optionally followed by a description separated from the URL by whitespace. Parametric URLs are supported as well.\r\n\r\n''''''Example:''''''\r\n{{{\r\n[interwiki]\r\nMeatBall = http://www.usemod.com/cgi-bin/mb.pl?\r\nPEP = http://www.python.org/peps/pep-$1.html Python Enhancement Proposal $1\r\ntsvn = tsvn: Interact with TortoiseSvn\r\n}}}\r\n\r\n== Examples ==\r\n\r\nIf the following is an excerpt of the InterMapTxt page:\r\n\r\n{{{\r\n= InterMapTxt =\r\n== This is the place for defining InterWiki prefixes ==\r\n\r\nCurrently active prefixes: [[InterWiki]]\r\n\r\nThis page is modelled after the MeatBall:InterMapTxt page.\r\nIn addition, an optional comment is allowed after the mapping.\r\n----\r\n{{{\r\nPEP http://www.python.org/peps/pep-$1.html # Python Enhancement Proposal $1 \r\nTrac-ML http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/$1 # Message $1 in Trac Mailing List\r\n\r\ntsvn tsvn: # Interact with TortoiseSvn\r\n...\r\nMeatBall http://www.usemod.com/cgi-bin/mb.pl?\r\nMetaWiki http://sunir.org/apps/meta.pl?\r\nMetaWikiPedia http://meta.wikipedia.org/wiki/\r\nMoinMoin http://moinmoin.wikiwikiweb.de/\r\n...\r\n}}}\r\n}}}\r\n\r\nThen, \r\n * `MoinMoin:InterWikiMap` should be rendered as MoinMoin:InterWikiMap\r\n and the ''''title'''' for that link would be "!InterWikiMap in !MoinMoin"\r\n * `Trac-ML:4346` should be rendered as Trac-ML:4346\r\n and the ''''title'''' for that link would be "Message 4346 in Trac Mailing List"\r\n\r\n----\r\nSee also: InterTrac, InterMapTxt\r\n', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('WikiFormatting', 1, 1362994208253481, 'trac', '127.0.0.1', '= WikiFormatting =\r\n[[TracGuideToc]]\r\n\r\nWiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole.\r\n\r\nTrac has a built in small and powerful wiki rendering engine. This wiki engine implements an ever growing subset of the commands from other popular Wikis,\r\nespecially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole].\r\n\r\n\r\nThis page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed.\r\n\r\nThe ''''Cheat sheet'''' below gives you a quick overview for the most common syntax, each link in the ''''Category'''' column will lead you to the more detailed explanation later in this page.\r\n\r\nA few other wiki pages present the advanced features of the Trac wiki markup in more depth: \r\n - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof,\r\n - WikiPageNames talks about the various names a wiki page can take, CamelCase or not\r\n - WikiMacros lists the macros available for generating dynamic content,\r\n - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways\r\n\r\n\r\n== Cheat sheet ==\r\n\r\n||= ''''''Category'''''' =||= ''''''Wiki Markup'''''' =||= ''''''Display'''''' =||\r\n|-----------------------------------------------------------\r\n{{{#!th rowspan=3\r\n[#FontStyles Font Styles]\r\n}}}\r\n|| `''''''bold''''''`, `''''italic''''`, `''''''''''Wikipedia style''''''''''` || \\\r\n|| ''''''bold'''''', ''''italic'''', ''''''''''Wikipedia style'''''''''' ||\r\n|| {{{`monospaced (''''other markup ignored'''')`}}} || \\\r\n|| `monospaced (''''other markup ignored'''')` ||\r\n|| `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \\\r\n|| **bold**, //italic//, **//!WikiCreole style//** ||\r\n|-----------------------------------------------------------\r\n||= [#Headings Headings] =||\\\r\n{{{#!td \r\n {{{\r\n == Level 2 ==\r\n === Level 3 ^([#hn note])^\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\n== Level 2 ==\r\n=== Level 3 ^([#hn note])^\r\n}}}\r\n|-----------------------------------------------------------\r\n||= [#Paragraphs Paragraphs] =||\\\r\n{{{#!td\r\n {{{\r\n First paragraph\r\n on multiple lines.\r\n\r\n Second paragraph.\r\n }}}\r\n}}}\r\n{{{#!td\r\nFirst paragraph\r\non multiple lines.\r\n\r\nSecond paragraph.\r\n}}}\r\n|-----------------------------------------------------------\r\n||= [#Lists Lists] =||\\\r\n{{{#!td\r\n {{{\r\n * bullets list\r\n on multiple lines\r\n 1. nested list\r\n a. different numbering \r\n styles\r\n }}}\r\n}}}\r\n{{{#!td\r\n* bullets list\r\n on multiple lines\r\n 1. nested list\r\n a. different numbering\r\n styles\r\n}}}\r\n|-----------------------------------------------------------\r\n{{{#!th\r\n[#DefinitionLists Definition Lists]\r\n}}}\r\n{{{#!td\r\n {{{\r\n term:: definition on\r\n multiple lines\r\n }}}\r\n}}}\r\n{{{#!td\r\n term:: definition on\r\n multiple lines\r\n}}}\r\n|-----------------------------------------------------------\r\n||= [#PreformattedText Preformatted Text] =||\\\r\n{{{#!td\r\n {{{\r\n {{{\r\n multiple lines, ''''no wiki''''\r\n white space respected\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td\r\n {{{\r\n multiple lines, ''''no wiki''''\r\n white space respected\r\n }}}\r\n}}}\r\n|-----------------------------------------------------------\r\n||= [#Blockquotes Blockquotes] =||\\\r\n{{{#!td\r\n {{{\r\n if there''s some leading\r\n space the text is quoted\r\n }}}\r\n}}}\r\n{{{#!td\r\n if there''s some leading\r\n space the text is quoted\r\n}}}\r\n|-----------------------------------------------------------\r\n||= [#DiscussionCitations Discussion Citations] =||\\\r\n{{{#!td\r\n {{{\r\n >> ... (I said)\r\n > (he replied)\r\n }}}\r\n}}}\r\n{{{#!td\r\n>>... (I said)\r\n> (he replied)\r\n}}}\r\n|-----------------------------------------------------------\r\n||= [#Tables Tables] =||\\\r\n{{{#!td\r\n {{{\r\n ||= Table Header =|| Cell ||\r\n |||| (details below) ||\r\n }}}\r\n}}}\r\n{{{#!td\r\n||= Table Header =|| Cell ||\r\n|||| (details below) ||\r\n}}}\r\n|-----------------------------------------------------------\r\n{{{#!th rowspan=2\r\n[#Links Links]\r\n}}}\r\n|| `http://trac.edgewall.org` ||\\\r\n|| http://trac.edgewall.org ||\r\n|| `WikiFormatting (CamelCase)` ||\\\r\n|| WikiFormatting (CamelCase) ||\r\n|-----------------------------------------------------------\r\n{{{#!th rowspan=5\r\n[#TracLinks TracLinks]\r\n}}}\r\n|| `wiki:WikiFormatting`, `wiki:"WikiFormatting"` ||\\\r\n|| wiki:WikiFormatting, wiki:"WikiFormatting" ||\r\n|| `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\\\r\n|| #1 (ticket), [1] (changeset), {1} (report) ||\r\n|| `ticket:1, ticket:1#comment:1` ||\\\r\n|| ticket:1, ticket:1#comment:1 ||\r\n|| `Ticket [ticket:1]`, `[ticket:1 ticket one]` ||\\\r\n|| Ticket [ticket:1], [ticket:1 ticket one] ||\r\n|| `Ticket [[ticket:1]]`, `[[ticket:1|ticket one]]` ||\\\r\n|| Ticket [[ticket:1]], [[ticket:1|ticket one]] ||\r\n|-----------------------------------------------------------\r\n{{{#!th rowspan=2 \r\n[#SettingAnchors Setting Anchors]\r\n}}}\r\n|| `[=#point1 (1)] First...` ||\\\r\n|| [=#point1 (1)] First... ||\r\n|| `see [#point1 (1)]` ||\\\r\n|| see [#point1 (1)] ||\r\n|-----------------------------------------------------------\r\n{{{#!th rowspan=3\r\n[#Escaping Escaping Markup]\r\n}}}\r\n|| `!'''' doubled quotes` ||\\\r\n|| !'''' doubled quotes ||\r\n|| `!wiki:WikiFormatting`, `!WikiFormatting` ||\\\r\n|| !wiki:WikiFormatting, !WikiFormatting ||\r\n|| {{{`}}}`{{{-}}}`{{{`}}}` triple curly brackets` ||\\\r\n|| `{{{-}}}` triple curly brackets ||\r\n|-----------------------------------------------------------\r\n||= [#Images Images] =|| `[[Image(`''''link''''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] ||\r\n|-----------------------------------------------------------\r\n{{{#!th rowspan=2\r\n[#Macros Macros]\r\n}}}\r\n|| `[[MacroList(*)]]` || ''''(short list of all available macros)'''' ||\r\n|| `[[Image?]]` || ''''(help for the Image macro)'''' ||\r\n|-----------------------------------------------------------\r\n||= [#Processors Processors] =||\\\r\n{{{#!td\r\n {{{\r\n {{{\r\n #!div style="font-size: 80%"\r\n Code highlighting:\r\n {{{#!python\r\n hello = lambda: "world"\r\n }}}\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\n {{{\r\n #!div style="font-size: 80%"\r\n Code highlighting:\r\n {{{#!python \r\n hello = lambda: "world"\r\n }}}\r\n }}}\r\n}}}\r\n|-----------------------------------------------------------\r\n||= [#Comments Comments] =||\\\r\n{{{#!td\r\n {{{\r\n {{{#!comment\r\n Note to Editors: ...\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\n {{{#!comment\r\n Note to Editors: ...\r\n }}}\r\n}}}\r\n|-----------------------------------------------------------\r\n||= [#Miscellaneous Miscellaneous] =||\\\r\n{{{#!td\r\n {{{\r\n Line [[br]] break \r\n Line \\\\ break\r\n ----\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\nLine [[br]] break\r\nLine \\\\ break\r\n----\r\n}}}\r\n\r\n\r\n== Font Styles ==\r\n\r\nThe Trac wiki supports the following font styles:\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n * ''''''bold'''''', \r\n '''''' triple quotes !'''''' \r\n can be bold too if prefixed by ! '''''', \r\n * ''''italic''''\r\n * ''''''''''bold italic'''''''''' or ''''italic and\r\n '''''' italic bold '''''' ''''\r\n * __underline__\r\n * {{{monospace}}} or `monospace`\r\n (hence `{{{` or {{{`}}} quoting)\r\n * ~~strike-through~~\r\n * ^superscript^ \r\n * ,,subscript,,\r\n * **also bold**, //italic as well//, \r\n and **'''' bold italic **'''' //(since 0.12)//\r\n }}}\r\n}}}\r\n{{{#!td\r\n * ''''''bold'''''', \r\n '''''' triple quotes !'''''' \r\n can be bold too if prefixed by ! '''''', \r\n * ''''italic''''\r\n * ''''''''''bold italic'''''''''' or ''''italic and\r\n '''''' italic bold '''''' ''''\r\n * __underline__\r\n * {{{monospace}}} or `monospace`\r\n (hence `{{{` or {{{`}}} quoting)\r\n * ~~strike-through~~\r\n * ^superscript^ \r\n * ,,subscript,,\r\n * **also bold**, //italic as well//, \r\n and **'''' bold italic **'''' //(since 0.12)//\r\n}}}\r\n\r\nNotes:\r\n * `{{{...}}}` and {{{`...`}}} commands not only select a monospace font, but also treat their content as verbatim text, meaning that no further wiki processing is done on this text.\r\n * {{{ ! }}} tells wiki parser to not take the following characters as wiki format, so pay attention to put a space after !, e.g. when ending bold.\r\n * all the font styles marks have to be used in opening/closing pairs, \r\n and they must nest properly (in particular, an `''''` italic can''t be paired \r\n with a `//` one, and `''''''` can''t be paired with `**`)\r\n\r\n\r\n== Headings ==\r\n\r\nYou can create heading by starting a line with one up to six ''''equal'''' characters ("=")\r\nfollowed by a single space and the headline text. \r\n\r\n[=#hn]\r\nThe headline text can be followed by the same number of "=" characters, but this is no longer mandatory.\r\n\r\nFinally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n = Heading =\r\n == Subheading\r\n === About ''''this'''' ===\r\n === Explicit id === #using-explicit-id-in-heading\r\n == Subheading #sub2\r\n}}}\r\n}}}\r\n{{{#!td style="padding: 1em;"\r\n {{{\r\n #!div\r\n = Heading =\r\n == Subheading\r\n === About ''''this'''' ===\r\n === Explicit id === #using-explicit-id-in-heading\r\n == Subheading #sub2\r\n }}}\r\n}}}\r\n\r\n== Paragraphs ==\r\n\r\nA new text paragraph is created whenever two blocks of text are separated by one or more empty lines.\r\n\r\nA forced line break can also be inserted, using:\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n Line 1[[BR]]Line 2\r\n }}}\r\n {{{\r\n Paragraph\r\n one\r\n\r\n Paragraph \r\n two\r\n }}}\r\n}}}\r\n{{{#!td\r\n Line 1[[BR]]Line 2\r\n\r\n Paragraph \r\n one\r\n\r\n Paragraph \r\n two\r\n}}}\r\n\r\n== Lists ==\r\n\r\nThe wiki supports both ordered/numbered and unordered lists.\r\n\r\nExample:\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n * Item 1\r\n * Item 1.1\r\n * Item 1.1.1 \r\n * Item 1.1.2\r\n * Item 1.1.3\r\n * Item 1.2\r\n * Item 2\r\n - items can start at the beginning of a line\r\n and they can span multiple lines\r\n - be careful though to continue the line \r\n with the appropriate indentation, otherwise\r\n that will start a new paragraph...\r\n \r\n 1. Item 1\r\n a. Item 1.a\r\n a. Item 1.b\r\n i. Item 1.b.i\r\n i. Item 1.b.ii\r\n 1. Item 2\r\n And numbered lists can also be restarted\r\n with an explicit number:\r\n 3. Item 3\r\n }}}\r\n}}}\r\n{{{#!td\r\n * Item 1\r\n * Item 1.1\r\n * Item 1.1.1 \r\n * Item 1.1.2\r\n * Item 1.1.3\r\n * Item 1.2\r\n * Item 2\r\n- items can start at the beginning of a line\r\n and they can span multiple lines\r\n - be careful though to continue the line \r\n with the appropriate indentation, otherwise\r\nthat will start a new paragraph...\r\n\r\n 1. Item 1\r\n a. Item 1.a\r\n a. Item 1.b\r\n i. Item 1.b.i\r\n i. Item 1.b.ii\r\n 1. Item 2\r\nAnd numbered lists can also be restarted with an explicit number:\r\n 3. Item 3\r\n}}}\r\n\r\n\r\n== Definition Lists ==\r\n\r\nThe wiki also supports definition lists.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n llama::\r\n some kind of mammal, with hair\r\n ppython::\r\n some kind of reptile, without hair\r\n (can you spot the typo?)\r\n }}}\r\n}}}\r\n{{{#!td\r\n llama::\r\n some kind of mammal, with hair\r\n ppython::\r\n some kind of reptile, without hair\r\n (can you spot the typo?)\r\n}}}\r\n\r\nNote that you need a space in front of the defined term.\r\n\r\n\r\n== Preformatted Text ==\r\n\r\nBlock containing preformatted text are suitable for source code snippets, notes and examples. Use three ''''curly braces'''' wrapped around the text to define a block quote. The curly braces need to be on a separate line.\r\n \r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n {{{\r\n def HelloWorld():\r\n print ''''''Hello World''''''\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td\r\n {{{\r\n def HelloWorld():\r\n print ''''''Hello World''''''\r\n }}}\r\n}}}\r\n\r\nNote that this kind of block is also used for selecting lines that should be processed through WikiProcessors.\r\n\r\n== Blockquotes ==\r\n\r\nIn order to mark a paragraph as blockquote, indent that paragraph with two spaces.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n{{{\r\nParagraph\r\n This text is a quote from someone else.\r\n}}}\r\n}}}\r\n{{{#!td\r\nParagraph\r\n This text is a quote from someone else.\r\n}}}\r\n\r\n== Discussion Citations ==\r\n\r\nTo delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. \r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n >> Someone''s original text\r\n > Someone else''s reply text\r\n > - which can be any kind of Wiki markup\r\n My reply text\r\n }}}\r\n}}}\r\n{{{#!td\r\n>> Someone''s original text\r\n> Someone else''s reply text\r\n> - which can be any kind of Wiki markup\r\nMy reply text\r\n}}}\r\n\r\n\r\n== Tables ==\r\n=== Simple Tables ===\r\nSimple tables can be created like this:\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n ||Cell 1||Cell 2||Cell 3||\r\n ||Cell 4||Cell 5||Cell 6||\r\n }}}\r\n}}}\r\n{{{#!td style="padding: 2em;"\r\n||Cell 1||Cell 2||Cell 3||\r\n||Cell 4||Cell 5||Cell 6||\r\n}}}\r\n\r\nCell headings can be specified by wrapping the content in a pair of ''='' characters.\r\nNote that the ''='' characters have to stick to the cell separators, like this:\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n || ||= stable =||= latest =||\r\n ||= 0.10 =|| 0.10.5 || 0.10.6dev||\r\n ||= 0.11 =|| 0.11.6 || 0.11.7dev||\r\n }}}\r\n}}}\r\n{{{#!td style="padding: 2em;"\r\n|| ||= stable =||= latest =||\r\n||= 0.10 =|| 0.10.5 || 0.10.6dev||\r\n||= 0.11 =|| 0.11.6 || 0.11.7dev||\r\n}}}\r\n\r\nFinally, specifying an empty cell means that the next non empty cell will span the empty cells. For example:\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n || 1 || 2 || 3 ||\r\n |||| 1-2 || 3 ||\r\n || 1 |||| 2-3 ||\r\n |||||| 1-2-3 ||\r\n }}}\r\n}}}\r\n{{{#!td style="padding: 2em;"\r\n|| 1 || 2 || 3 ||\r\n|||| 1-2 || 3 ||\r\n|| 1 |||| 2-3 ||\r\n|||||| 1-2-3 ||\r\n}}}\r\n\r\nNote that if the content of a cell "sticks" to one side of the cell and only one, then the text will be aligned on that side. Example:\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n ||=Text =||= Numbers =||\r\n ||left align || 1.0||\r\n || center || 4.5||\r\n || right align|| 4.5||\r\n || default alignment || 2.5||\r\n ||default|| 2.5||\r\n || default || 2.5||\r\n || default || 2.5||\r\n }}}\r\n}}}\r\n{{{#!td style="padding: 2em;"\r\n||=Text =||= Numbers =||\r\n||left align || 1.0||\r\n|| center || 4.5||\r\n|| right align|| 4.5||\r\n|| default alignment || 2.5||\r\n||default|| 2.5||\r\n|| default || 2.5||\r\n|| default || 2.5||\r\n}}}\r\n\r\nIf contrary to the example above, the cells in your table contain more text, it might be convenient to spread a table row over multiple lines of markup. The `\\` character placed at the end of a line after a cell separator tells Trac to not start a new row for the cells on the next line.\r\n\r\n||= Wiki Markup =||\r\n{{{#!td\r\n {{{\r\n || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \\\r\n || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \\\r\n || that''s column 3 and last one ||\r\n }}}\r\n}}}\r\n|-------------\r\n||= Display =||\r\n{{{#!td style="padding: 2em;"\r\n|| this is column 1 [http://trac.edgewall.org/newticket new ticket] || \\\r\n|| this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \\\r\n|| that''s column 3 and last one ||\r\n}}}\r\n\r\n=== Complex Tables ===\r\n\r\nIf the possibilities offered by the simple "pipe"-based markup for tables described above are not enough for your needs, you can create more elaborated tables by using [#Processors-example-tables WikiProcessor based tables].\r\n\r\n\r\n== Links ==\r\n\r\nHyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n TitleIndex, http://www.edgewall.com/, !NotAlink\r\n }}}\r\n}}}\r\n{{{#!td\r\nTitleIndex, http://www.edgewall.com/, !NotAlink\r\n}}}\r\n\r\nLinks can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets. \r\nIf the descriptive title is omitted, then the explicit prefix is discarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n * [http://www.edgewall.com Edgewall Software]\r\n * [wiki:TitleIndex Title Index] \r\n * [wiki:TitleIndex] \r\n * [wiki:ISO9000]\r\n }}}\r\n}}}\r\n{{{#!td\r\n * [http://www.edgewall.com Edgewall Software]\r\n * [wiki:TitleIndex Title Index] \r\n * [wiki:TitleIndex] \r\n * [wiki:ISO9000]\r\n}}}\r\n\r\nFollowing the [trac:WikiCreole] trend, the descriptive title can also be specified by writing the link followed by a pipe (''|'') and a title and all this inside //double// square brackets. \r\n\r\n{{{#!td\r\n {{{\r\n * [[http://www.edgewall.com|Edgewall Software]]\r\n * [[wiki:TitleIndex|Title Index]]\r\n or even [[TitleIndex|Title Index]]\r\n * [[wiki:TitleIndex]]\r\n '''''' but not ![[TitleIndex]]! ''''''\r\n * [[ISO9000]]\r\n }}}\r\n}}}\r\n{{{#!td\r\n * [[http://www.edgewall.com|Edgewall Software]]\r\n * [[wiki:TitleIndex|Title Index]]\r\n or even [[TitleIndex|Title Index]]\r\n * [[wiki:TitleIndex]]\r\n '''''' but not ![[TitleIndex]]! ''''''\r\n * [[ISO9000]]\r\n}}}\r\n\r\n''''''Note'''''': the [trac:WikiCreole] style for links is quick to type and\r\ncertainly looks familiar as it''s the one used on Wikipedia and in many\r\nother wikis. Unfortunately it conflicts with the syntax for [#Macros macros].\r\nSo in the rare case when you need to refer to a page which is named after\r\na macro (typical examples being TitleIndex, InterTrac and InterWiki), \r\nby writing `[[TitleIndex]]` you will actually call the macro instead of linking\r\nto the page.\r\n\r\n== Trac Links ==\r\n\r\nWiki pages can link directly to other parts of the Trac system. Pages can refer to tickets, reports, changesets, milestones, source files and other Wiki pages using the following notations:\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n * Tickets: #1 or ticket:1\r\n * Reports: {1} or report:1\r\n * Changesets: r1, [1] or changeset:1\r\n * ...\r\n * targeting other Trac instances, \r\n so called InterTrac links:\r\n - Tickets: #Trac1 or Trac:ticket:1\r\n - Changesets: [Trac1] or Trac:changeset:1\r\n }}}\r\n}}}\r\n{{{#!td\r\n * Tickets: #1 or ticket:1\r\n * Reports: {1} or report:1\r\n * Changesets: r1, [1] or changeset:1\r\n * ... \r\n * targeting other Trac instances, \r\n so called InterTrac links:\r\n - Tickets: #Trac1 or Trac:ticket:1\r\n - Changesets: [Trac1] or Trac:changeset:1\r\n}}}\r\n\r\nThere are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.\r\n\r\n\r\n== Setting Anchors ==\r\n\r\nAn anchor, or more correctly speaking, an [http://www.w3.org/TR/REC-html40/struct/links.html#h-12.2.1 anchor name] can be added explicitly at any place in the Wiki page, in order to uniquely identify a position in the document:\r\n\r\n{{{\r\n[=#point1]\r\n}}}\r\n\r\nThis syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example:\r\n{{{\r\n== Long title == #title\r\n}}}\r\n\r\nIt''s also very close to the syntax for the corresponding link to that anchor:\r\n{{{\r\n[#point1]\r\n}}}\r\n\r\nOptionally, a label can be given to the anchor:\r\n{{{\r\n[[=#point1 ''''''Point 1'''''']]\r\n}}}\r\n\r\n||= Wiki Markup =||= Display =||\r\n|----------------------------------\r\n{{{#!td\r\n {{{\r\n [#point2 jump to the second point]\r\n\r\n ...\r\n\r\n Point2: [=#point2] Jump here\r\n }}}\r\n}}}\r\n{{{#!td\r\n [#point2 jump to the second point]\r\n\r\n ...\r\n\r\n Point2: [=#point2] Jump here\r\n}}}\r\n\r\nFor more complex anchors (e.g. when a custom title is wanted), one can use the Span macro, e.g. `[[span(id=point2, class=wikianchor, title=Point 2, ^(2)^)]]`.\r\n\r\n\r\n== Escaping Links, WikiPageNames and other Markup == #Escaping\r\n\r\nYou may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n !NoHyperLink\r\n !#42 is not a link\r\n }}}\r\n {{{\r\nVarious forms of escaping for list markup:\r\n `-` escaped minus sign \\\\\r\n ``1. escaped number \\\\\r\n {{{*}}} escaped asterisk sign\r\n }}}\r\n}}}\r\n{{{#!td\r\n !NoHyperLink\r\n !#42 is not a link\r\n\r\nVarious forms of escaping for list markup:\r\n `-` escaped minus sign \\\\\r\n ``1. escaped number \\\\\r\n {{{*}}} escaped asterisk sign\r\n}}}\r\n\r\n== Images ==\r\n\r\nUrls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.\r\n\r\nYou now have to use the ![[Image]] macro. The simplest way to include an image is to upload it as attachment to the current page, and put the filename in a macro call like `[[Image(picture.gif)]]`.\r\n\r\nIn addition to the current page, it is possible to refer to other resources:\r\n * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page)\r\n * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket)\r\n * `[[Image(htdocs:picture.gif)]]` (referring to a file inside the [TracEnvironment environment] `htdocs` directory)\r\n * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n [[Image(htdocs:../common/trac_logo_mini.png)]]\r\n }}}\r\n}}}\r\n{{{#!td\r\n[[Image(htdocs:../common/trac_logo_mini.png)]]\r\n}}}\r\n\r\nSee WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.)\r\n\r\n\r\n== Macros ==\r\n\r\nMacros are ''''custom functions'''' to insert dynamic content in a page.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n [[RecentChanges(Trac,3)]]\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\n[[RecentChanges(Trac,3)]]\r\n}}}\r\n\r\nSee WikiMacros for more information, and a list of installed macros.\r\n\r\nThe detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n [[MacroList?]]\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\n[[MacroList?]]\r\n}}}\r\n\r\n\r\n== Processors ==\r\n\r\nTrac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in \r\n[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML]. \r\n\r\n||= Wiki Markup =||= Display =||\r\n|--------------------------------------------------------\r\n{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"\r\n\r\n [=#Processors-example-html Example 1:] HTML\r\n\r\n}}}\r\n|--------------------------------------------------------\r\n{{{#!td style="border: 0px"\r\n {{{\r\n {{{\r\n #!html\r\n <h1 style="text-align: right; color: blue">\r\n HTML Test\r\n </h1>\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td valign="top" style="border: 0px"\r\n\r\n{{{\r\n#!html\r\n<h1 style="text-align: right; color: blue">HTML Test</h1>\r\n}}}\r\n\r\n}}}\r\n|--------------------------------------------------------\r\n{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"\r\n\r\n [=#Processors-example-highlight Example 2:] Code Highlighting\r\n\r\n}}}\r\n|--------------------------------------------------------\r\n{{{#!td style="border: 0px"\r\n {{{\r\n {{{\r\n #!python\r\n class Test:\r\n \r\n def __init__(self):\r\n print "Hello World"\r\n if __name__ == ''__main__'':\r\n Test()\r\n }}}\r\n }}}\r\n}}}\r\n{{{\r\n#!td valign="top" style="border: 0px"\r\n\r\n{{{\r\n#!python\r\nclass Test:\r\n def __init__(self):\r\n print "Hello World"\r\nif __name__ == ''__main__'':\r\n Test()\r\n}}}\r\n\r\n}}}\r\n|--------------------------------------------------------\r\n{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"\r\n\r\n [=#Processors-example-tables Example 3:] Complex Tables\r\n\r\n}}}\r\n|--------------------------------------------------------\r\n{{{#!td style="border: 0px"\r\n {{{\r\n {{{#!th rowspan=4 align=justify\r\n With the `#td` and `#th` processors,\r\n table cells can contain any content:\r\n }}}\r\n |----------------\r\n {{{#!td\r\n - lists\r\n - embedded tables\r\n - simple multiline content\r\n }}}\r\n |----------------\r\n {{{#!td\r\n As processors can be easily nested, \r\n so can be tables:\r\n {{{#!th\r\n Example:\r\n }}}\r\n {{{#!td style="background: #eef"\r\n || must be at the third level now... ||\r\n }}}\r\n }}}\r\n |----------------\r\n {{{#!td\r\n Even when you don''t have complex markup,\r\n this form of table cells can be convenient\r\n to write content on multiple lines.\r\n }}}\r\n }}}\r\n}}}\r\n{{{\r\n#!td valign="top" style="border: 0px"\r\n\r\n {{{#!th rowspan=4 align=justify\r\n With the `#td` and `#th` processors,\r\n table cells can contain any content:\r\n }}}\r\n |----------------\r\n {{{#!td\r\n - lists\r\n - embedded tables\r\n - simple multiline content\r\n }}}\r\n |----------------\r\n {{{#!td\r\n As processors can be easily nested, \r\n so can be tables:\r\n {{{#!th\r\n Example:\r\n }}}\r\n {{{#!td style="background: #eef"\r\n || must be at the third level now... ||\r\n }}}\r\n }}}\r\n |----------------\r\n {{{#!td\r\n Even when you don''t have complex markup,\r\n this form of table cells can be convenient\r\n to write content on multiple lines.\r\n }}}\r\n\r\n}}}\r\n\r\nSee WikiProcessors for more information.\r\n\r\n\r\n== Comments ==\r\n\r\nComments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n Nothing to\r\n {{{\r\n #!comment\r\n Your comment for editors here\r\n }}}\r\n see ;-)\r\n }}}\r\n}}}\r\n{{{#!td\r\n Nothing to\r\n {{{\r\n #!comment\r\n Your comment for editors here\r\n }}}\r\n see ;-)\r\n}}}\r\n\r\n== Miscellaneous ==\r\n\r\nAn horizontal line can be used to separated different parts of your page:\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n Four or more dashes will be replaced \r\n by an horizontal line (<HR>)\r\n ----\r\n See?\r\n }}}\r\n}}}\r\n{{{#!td\r\nFour or more dashes will be replaced\r\nby an horizontal line (<HR>)\r\n----\r\nSee?\r\n}}}\r\n|----------------------------------\r\n{{{#!td\r\n {{{\r\n "macro" style [[br]] line break\r\n }}}\r\n}}}\r\n{{{#!td\r\n"macro" style [[br]] line break\r\n}}}\r\n|----------------------------------\r\n{{{#!td\r\n {{{\r\n !WikiCreole style \\\\ line\\\\break\r\n }}}\r\n}}}\r\n{{{#!td\r\n!WikiCreole style \\\\ line\\\\break\r\n}}}\r\n\r\n', NULL, NULL),
('InterMapTxt', 1, 1362994208257901, 'trac', '127.0.0.1', '= InterMapTxt =\r\n\r\n== This is the place for defining InterWiki prefixes ==\r\n\r\nThis page was modelled after the MeatBall:InterMapTxt page.\r\nIn addition, an optional comment is allowed after the mapping.\r\n\r\n\r\nThis page is interpreted in a special way by Trac, in order to support\r\n!InterWiki links in a flexible and dynamic way.\r\n\r\nThe code block after the first line separator in this page\r\nwill be interpreted as a list of !InterWiki specifications:\r\n{{{\r\nprefix <space> URL [<space> # comment]\r\n}}}\r\n\r\nBy using `$1`, `$2`, etc. within the URL, it is possible to create \r\nInterWiki links which support multiple arguments, e.g. Trac:ticket:40.\r\nThe URL itself can be optionally followed by a comment, \r\nwhich will subsequently be used for decorating the links \r\nusing that prefix.\r\n\r\nNew !InterWiki links can be created by adding to that list, in real time.\r\nNote however that ''''deletions'''' are also taken into account immediately,\r\nso it may be better to use comments for disabling prefixes.\r\n\r\nAlso note that !InterWiki prefixes are case insensitive.\r\n\r\n\r\n== List of Active Prefixes ==\r\n\r\n[[InterWiki]]\r\n\r\n\r\n----\r\n\r\n== Prefix Definitions ==\r\n\r\n{{{\r\nPEP http://www.python.org/peps/pep-$1.html # Python Enhancement Proposal \r\nPythonBug http://bugs.python.org/issue$1 # Python Issue #$1\r\nPython-issue http://bugs.python.org/issue$1 # Python Issue #$1\r\n\r\nTrac-ML http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/ # Message $1 in Trac Mailing List\r\ntrac-dev http://thread.gmane.org/gmane.comp.version-control.subversion.trac.devel/ # Message $1 in Trac Development Mailing List\r\n\r\nMercurial http://www.selenic.com/mercurial/wiki/index.cgi/ # the wiki for the Mercurial distributed SCM\r\n\r\nRFC http://tools.ietf.org/html/rfc$1 # IETF''s RFC $1\r\nISO http://en.wikipedia.org/wiki/ISO_ # ISO Standard $1 in Wikipedia\r\nkb http://support.microsoft.com/kb/$1/en-us/ # Article $1 in Microsoft''s Knowledge Base\r\n\r\nchromium-issue http://code.google.com/p/chromium/issues/detail?id=\r\n\r\nDjango http://code.djangoproject.com/intertrac/ # Django''s Trac\r\n\r\nCreoleWiki http://wikicreole.org/wiki/\r\nCreole1Wiki http://wikicreole.org/wiki/\r\nCreole2Wiki http://wiki.wikicreole.org/\r\n\r\nMediaWiki http://www.mediawiki.org/wiki/\r\n\r\nSO http://stackoverflow.com/questions/ # Question $1 in StackOverflow\r\n\r\nTransifex https://www.transifex.com/projects/p/trac/\r\n\r\nkwquery /query?group=status&keywords=~ # Custom query for tickets matching keyword $1\r\n\r\n#\r\n# A arbitrary pick of InterWiki prefixes...\r\n#\r\nAcronym http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=\r\nC2find http://c2.com/cgi/wiki?FindPage&value=\r\nCache http://www.google.com/search?q=cache:\r\nCPAN http://search.cpan.org/perldoc?\r\nDebianBug http://bugs.debian.org/\r\nDebianPackage http://packages.debian.org/\r\nDebianPTS http://packages.qa.debian.org/\r\nDictionary http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=\r\nGoogle http://www.google.com/search?q=\r\nlmgtfy http://lmgtfy.com/?q= # Well, just search for "$1", follow the link to see how to do it...\r\nGoogleGroups http://groups.google.com/group/$1/msg/$2 # Message $2 in $1 Google Group\r\ngdiscussion https://groups.google.com/d/topic/$1/$2/discussion # Discussion $2 in $1 Google \r\ngmessage https://groups.google.com/d/msg/$1/$2 # Message $2 in $1 Google Group\r\nJargonFile http://downlode.org/perl/jargon-redirect.cgi?term=\r\nMeatBall http://www.usemod.com/cgi-bin/mb.pl?\r\nMetaWiki http://sunir.org/apps/meta.pl?\r\nMetaWikiPedia http://meta.wikipedia.org/wiki/\r\nMoinMoin http://moinmo.in/\r\nTracHacks http://trac-hacks.org/wiki/\r\nOSM http://www.openstreetmap.org/wiki/\r\nWhoIs http://www.whois.sc/\r\nWhy http://clublet.com/c/c/why?\r\nc2Wiki http://c2.com/cgi/wiki?\r\nWikiPedia http://en.wikipedia.org/wiki/\r\n}}}\r\n\r\n\r\n----\r\nSee also: InterWiki, InterTrac', NULL, NULL),
('PageTemplates', 1, 1362994208259845, 'trac', '127.0.0.1', '= Wiki Page Templates = \r\n\r\n ''''(since [http://trac.edgewall.org/milestone/0.11 0.11])''''\r\n\r\nThe default content for a new wiki page can be chosen from a list of page templates. \r\n\r\nThat list is generated from all the wiki pages having a name starting with ''''PageTemplates/''''.\r\nThe initial content of a new page will simply be the content of the chosen template page, or a blank page if the special ''''(blank page)'''' entry is selected. When there are no wiki pages with the ''''PageTemplates/'''' prefix, the initial content will always be the blank page and the list selector will not be shown (i.e. this matches the behavior we had up to now).\r\n\r\nTo create a new template, simply create a new page having a name starting with ''''PageTemplates/''''.\r\n\r\n(Hint: one could even create a ''''!PageTemplates/Template'''' for facilitating the creation of new templates!)\r\n\r\nAfter the first template has been created, a drop-down selection box will automatically appear on any new wiki pages that are created. By default it is located on the right side of the ''Create this page'' button. The default selection will be ''''blank page'''', or ''''!DefaultPage'''' if ''''!PageTemplates/DefaultPage'''' exists.\r\n\r\nAvailable templates: \r\n[[TitleIndex(PageTemplates/)]]\r\n----\r\nSee also: TracWiki\r\n', NULL, NULL),
('CamelCase', 1, 1362994208261554, 'trac', '127.0.0.1', '= !CamelCase =\r\nNew words created by smashing together capitalized words.\r\n\r\nCamelCase is the original wiki convention for creating hyperlinks, with the additional requirement that the capitals are followed by a lower-case letter; hence “AlabamA” and “ABc” will not be links.\r\n\r\n== Customizing the Wiki behavior ==\r\n\r\nSome people dislike linking by CamelCase. While Trac remains faithful to the original Wiki style, it provides a number of ways to accomodate users with different preferences:\r\n * There''s an option (`ignore_missing_pages` in the [wiki:TracIni#wiki-section "[wiki]"] section of TracIni) to simply ignore links to missing pages when the link is written using the CamelCase style, instead of that word being replaced by a gray link followed by a question mark.[[BR]]\r\n That can be useful when CamelCase style is used to name code artifacts like class names and there''s no corresponding page for them.\r\n * There''s an option (`split_page_names` in the [wiki:TracIni#wiki-section "[wiki]"] section of TracIni) to automatically insert space characters between the words of a CamelCase link when rendering the link.\r\n * Creation of explicit Wiki links is also easy, see WikiPageNames for details.\r\n * In addition, Wiki formatting can be disabled completely in some places (e.g. when rendering commit log messages). See `wiki_format_messages` in the [wiki:TracIni#changeset-section "[changeset]"] section of TracIni.\r\n\r\nSee TracIni for more information on the available options.\r\n\r\n== More information on !CamelCase ==\r\n\r\n * http://c2.com/cgi/wiki?WikiCase\r\n * http://en.wikipedia.org/wiki/CamelCase\r\n\r\n----\r\nSee also: WikiPageNames, WikiNewPage, WikiFormatting, TracWiki\r\n', NULL, NULL),
('TracInterfaceCustomization', 1, 1362994208263524, 'trac', '127.0.0.1', '= Customizing the Trac Interface =\r\n[[TracGuideToc]]\r\n[[PageOutline]]\r\n\r\n== Introduction ==\r\nThis page is meant to give users suggestions on how they can customize the look of Trac. Topics on this page cover editing the HTML templates and CSS files, but not the program code itself. The topics are intended to show users how they can modify the look of Trac to meet their specific needs. Suggestions for changes to Trac''s interface applicable to all users should be filed as tickets, not listed on this page.\r\n\r\n== Project Logo and Icon ==\r\nThe easiest parts of the Trac interface to customize are the logo and the site icon. Both of these can be configured with settings in [wiki:TracIni trac.ini].\r\n\r\nThe logo or icon image should be put in a folder named "htdocs" in your project''s environment folder. (''''Note: in projects created with a Trac version prior to 0.9 you will need to create this folder'''')\r\n\r\n ''''Note: you can actually put the logo and icon anywhere on your server (as long as it''s accessible through the web server), and use their absolute or server-relative URLs in the configuration.''''\r\n\r\nNow configure the appropriate section of your [wiki:TracIni trac.ini]:\r\n\r\n=== Logo ===\r\nChange the `src` setting to `site/` followed by the name of your image file. The `width` and `height` settings should be modified to match your image''s dimensions (the Trac chrome handler uses "`site/`" for files within the project directory `htdocs`, and "`common/`" for the common `htdocs` directory belonging to a Trac installation). Note that ''site/'' is not a placeholder for your project name, it is the actual prefix that should be used (literally). For example, if your project is named ''sandbox'', and the image file is ''red_logo.gif'' then the ''src'' setting would be ''site/red_logo.gif'', not ''sandbox/red_logo.gif''.\r\n\r\n{{{\r\n[header_logo]\r\nsrc = site/my_logo.gif\r\nalt = My Project\r\nwidth = 300\r\nheight = 100\r\n}}}\r\n\r\n=== Icon ===\r\nIcons should be a 32x32 image in `.gif` or `.ico` format. Change the `icon` setting to `site/` followed by the name of your icon file. Icons will typically be displayed by your web browser next to the site''s URL and in the `Bookmarks` menu.\r\n\r\n{{{\r\n[project]\r\nicon = site/my_icon.ico\r\n}}}\r\n\r\nNote though that this icon is ignored by Internet Explorer, which only accepts a file named ``favicon.ico`` at the root of the host. To make the project icon work in both IE and other browsers, you can store the icon in the document root of the host, and reference it from ``trac.ini`` as follows:\r\n\r\n{{{\r\n[project]\r\nicon = /favicon.ico\r\n}}}\r\n\r\nShould your browser have issues with your favicon showing up in the address bar, you may put a "?" (less the quotation marks) after your favicon file extension. \r\n\r\n{{{\r\n[project]\r\nicon = /favicon.ico?\r\n}}}\r\n\r\n== Custom Navigation Entries ==\r\nThe new [mainnav] and [metanav] can now be used to customize the text and link used for the navigation items, or even to disable them (but not for adding new ones).\r\n\r\nIn the following example, we rename the link to the Wiki start "Home", and hide the "!Help/Guide". We also make the "View Tickets" entry link to a specific report .\r\n{{{\r\n[mainnav]\r\nwiki.label = Home\r\ntickets.href = /report/24\r\n\r\n[metanav]\r\nhelp = disabled\r\n}}}\r\n\r\nSee also TracNavigation for a more detailed explanation of the mainnav and metanav terms.\r\n\r\n== Site Appearance == #SiteAppearance\r\n\r\nTrac is using [http://genshi.edgewall.org Genshi] as the templating engine. Documentation is yet to be written, in the meantime the following tip should work.\r\n\r\nSay you want to add a link to a custom stylesheet, and then your own\r\nheader and footer. Save the following content as `site.html` inside your projects `templates/` directory (each Trac project can have their own `site.html`), e.g. {{{/path/to/env/templates/site.html}}}:\r\n\r\n{{{\r\n#!xml\r\n<html xmlns="http://www.w3.org/1999/xhtml"\r\n xmlns:py="http://genshi.edgewall.org/"\r\n py:strip="">\r\n\r\n <!--! Add site-specific style sheet -->\r\n <head py:match="head" py:attrs="select(''@*'')">\r\n ${select(''*|comment()|text()'')}\r\n <link rel="stylesheet" type="text/css"\r\n href="${href.chrome(''site/style.css'')}" />\r\n </head>\r\n\r\n <body py:match="body" py:attrs="select(''@*'')">\r\n <!--! Add site-specific header -->\r\n <div id="siteheader">\r\n <!--! Place your header content here... -->\r\n </div>\r\n\r\n ${select(''*|text()'')}\r\n\r\n <!--! Add site-specific footer -->\r\n <div id="sitefooter">\r\n <!--! Place your footer content here... -->\r\n </div>\r\n </body>\r\n</html>\r\n}}}\r\n\r\nThose who are familiar with XSLT may notice that Genshi templates bear some similarities. However, there are some Trac specific features - for example `${href.chrome(''site/style.css'')}` attribute references a CSS file placed into environment''s `htdocs/` directory. In a similar fashion `${chrome.htdocs_location}` is used to specify the common `htdocs/` directory belonging to a Trac installation. That latter location can however be overriden using the [[TracIni#trac-config|[trac] htdocs_location]] configuration setting.\r\n\r\n`site.html` is one file to contain all your modifications. It usually works using the `py:match` directive (element or attribute), and it allows you to modify the page as it renders - the matches hook onto specific sections depending on what it tries to find\r\nand modify them.\r\nSee [http://groups.google.com/group/trac-users/browse_thread/thread/70487fb2c406c937/ this thread] for a detailed explanation of the above example `site.html`.\r\nA `site.html` can contain any number of such `py:match` sections for whatever you need to modify. This is all Genshi, so the [http://genshi.edgewall.org/wiki/Documentation/xml-templates.html docs on the exact syntax] can be found there.\r\n\r\n\r\nExample snippet of adding introduction text to the new ticket form (but not shown during preview):\r\n\r\n{{{#!xml\r\n<form py:match="div[@id=''content'' and @class=''ticket'']/form" py:attrs="select(''@*'')">\r\n <py:if test="req.environ[''PATH_INFO''] == ''/newticket'' and (not ''preview'' in req.args)">\r\n <p>Please make sure to search for existing tickets before reporting a new one!</p>\r\n </py:if>\r\n ${select(''*'')} \r\n</form>\r\n}}}\r\n\r\nThis example illustrates a technique of using `req.environ[''PATH_INFO'']` to limit scope of changes to one view only. For instance, to make changes in `site.html` only for timeline and avoid modifying other sections - use `req.environ[''PATH_INFO''] == ''/timeline''` condition in `<py:if>` test.\r\n\r\nMore examples snippets for `site.html` can be found at [trac:wiki:CookBook/SiteHtml CookBook/SiteHtml].\r\n\r\nExample snippets for `style.css` can be found at [trac:wiki:CookBook/SiteStyleCss CookBook/SiteStyleCss].\r\n\r\nIf the environment is upgraded from 0.10 and a `site_newticket.cs` file already exists, it can actually be loaded by using a workaround - providing it contains no ClearSilver processing. In addition, as only one element can be imported, the content needs some sort of wrapper such as a `<div>` block or other similar parent container. The XInclude namespace must be specified to allow includes, but that can be moved to document root along with the others:\r\n{{{\r\n#!xml\r\n<form py:match="div[@id=''content'' and @class=''ticket'']/form" py:attrs="select(''@*'')"\r\n xmlns:xi="http://www.w3.org/2001/XInclude">\r\n <py:if test="req.environ[''PATH_INFO''] == ''/newticket'' and (not ''preview'' in req.args)"> \r\n <xi:include href="site_newticket.cs"><xi:fallback /></xi:include>\r\n </py:if>\r\n ${select(''*'')} \r\n</form>\r\n}}}\r\n\r\nAlso note that the `site.html` (despite its name) can be put in a common templates directory - see the [[TracIni#inherit-section|[inherit] templates_dir]] option. This could provide easier maintainence (and a migration path from 0.10 for larger installations) as one new global `site.html` file can be made to include any existing header, footer and newticket snippets.\r\n\r\n== Project List == #ProjectList\r\n\r\nYou can use a custom Genshi template to display the list of projects if you are using Trac with multiple projects. \r\n\r\nThe following is the basic template used by Trac to display a list of links to the projects. For projects that could not be loaded it displays an error message. You can use this as a starting point for your own index template.\r\n\r\n{{{\r\n#!text/html\r\n<!DOCTYPE html\r\n PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r\n<html xmlns="http://www.w3.org/1999/xhtml"\r\n xmlns:py="http://genshi.edgewall.org/"\r\n xmlns:xi="http://www.w3.org/2001/XInclude">\r\n <head>\r\n <title>Available Projects</title>\r\n </head>\r\n <body>\r\n <h1>Available Projects</h1>\r\n <ul>\r\n <li py:for="project in projects" py:choose="">\r\n <a py:when="project.href" href="$project.href"\r\n title="$project.description">$project.name</a>\r\n <py:otherwise>\r\n <small>$project.name: <em>Error</em> <br /> ($project.description)</small>\r\n </py:otherwise>\r\n </li>\r\n </ul>\r\n </body>\r\n</html>\r\n}}}\r\n\r\nOnce you''ve created your custom template you will need to configure the webserver to tell Trac where the template is located (pls verify ... not yet changed to 0.11):\r\n\r\nFor [wiki:TracModWSGI mod_wsgi]:\r\n{{{\r\nos.environ[''TRAC_ENV_INDEX_TEMPLATE''] = ''/path/to/template.html''\r\n}}}\r\n\r\nFor [wiki:TracFastCgi FastCGI]:\r\n{{{\r\nFastCgiConfig -initial-env TRAC_ENV_PARENT_DIR=/parent/dir/of/projects \\\r\n -initial-env TRAC_ENV_INDEX_TEMPLATE=/path/to/template\r\n}}}\r\n\r\nFor [wiki:TracModPython mod_python]:\r\n{{{\r\nPythonOption TracEnvParentDir /parent/dir/of/projects\r\nPythonOption TracEnvIndexTemplate /path/to/template\r\n}}}\r\n\r\nFor [wiki:TracCgi CGI]:\r\n{{{\r\nSetEnv TRAC_ENV_INDEX_TEMPLATE /path/to/template\r\n}}}\r\n\r\nFor [wiki:TracStandalone], you''ll need to set up the `TRAC_ENV_INDEX_TEMPLATE` environment variable in the shell used to launch tracd:\r\n - Unix\r\n {{{\r\n#!sh\r\n$ export TRAC_ENV_INDEX_TEMPLATE=/path/to/template\r\n }}}\r\n - Windows\r\n {{{\r\n#!sh\r\n$ set TRAC_ENV_INDEX_TEMPLATE=/path/to/template\r\n }}}\r\n\r\n== Project Templates ==\r\n\r\nThe appearance of each individual Trac environment (that is, instance of a project) can be customized independently of other projects, even those hosted by the same server. The recommended way is to use a `site.html` template (see [#SiteAppearance]) whenever possible. Using `site.html` means changes are made to the original templates as they are rendered, and you should not normally need to redo modifications whenever Trac is upgraded. If you do make a copy of `theme.html` or any other Trac template, you need to migrate your modifiations to the newer version - if not, new Trac features or bug fixes may not work as expected.\r\n\r\nWith that word of caution, any Trac template may be copied and customized. The default Trac templates are located inside the installed Trac egg (`/usr/lib/pythonVERSION/site-packages/Trac-VERSION.egg/trac/templates, .../trac/ticket/templates, .../trac/wiki/templates, ++`). The [#ProjectList] template file is called `index.html`, while the template responsible for main layout is called `theme.html`. Page assets such as images and CSS style sheets are located in the egg''s `trac/htdocs` directory.\r\n\r\nHowever, do not edit templates or site resources inside the Trac egg - installing Trac again can completely delete your modifications. Instead use one of two alternatives:\r\n * For a modification to one project only, copy the template to project `templates` directory.\r\n * For a modification shared by several projects, copy the template to a shared location and have each project point to this location using the `[inherit] templates_dir =` trac.ini option.\r\n\r\nTrac resolves requests for a template by first looking inside the project, then in any inherited templates location, and finally inside the Trac egg.\r\n\r\nTrac caches templates in memory by default to improve performance. To apply a template you need to restart the server.\r\n\r\n----\r\nSee also TracGuide, TracIni\r\n', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracModWSGI', 1, 1362994208275927, 'trac', '127.0.0.1', '= Trac and mod_wsgi =\r\n\r\n\r\n[http://code.google.com/p/modwsgi/ mod_wsgi] is an Apache module for running WSGI-compatible Python applications directly on top of the Apache webserver. The mod_wsgi adapter is written completely in C and provides very good performances.\r\n\r\n[[PageOutline(2-3,Overview,inline)]]\r\n\r\n== The `trac.wsgi` script\r\n\r\nTrac can be run on top of mod_wsgi with the help of the following application script, which is just a Python file, though usually saved with a `.wsgi` extension). \r\n\r\n=== A very basic script\r\nIn its simplest form, the script could be:\r\n\r\n{{{#!python\r\nimport os\r\n\r\nos.environ[''TRAC_ENV''] = ''/usr/local/trac/mysite''\r\nos.environ[''PYTHON_EGG_CACHE''] = ''/usr/local/trac/mysite/eggs''\r\n\r\nimport trac.web.main\r\napplication = trac.web.main.dispatch_request\r\n}}}\r\n\r\nThe `TRAC_ENV` variable should naturally be the directory for your Trac environment (if you have several Trac environments in a directory, you can also use `TRAC_ENV_PARENT_DIR` instead), while the `PYTHON_EGG_CACHE` should be a directory where Python can temporarily extract Python eggs.\r\n\r\n=== A more elaborate script\r\n\r\nIf you''re using multiple `.wsgi` files (for example one per Trac environment) you must ''''not'''' use `os.environ[''TRAC_ENV'']` to set the path to the Trac environment. Using this method may lead to Trac delivering the content of another Trac environment, as the variable may be filled with the path of a previously viewed Trac environment. \r\n\r\nTo solve this problem, use the following `.wsgi` file instead:\r\n{{{#!python\r\nimport os\r\n\r\nos.environ[''PYTHON_EGG_CACHE''] = ''/usr/local/trac/mysite/eggs''\r\n\r\nimport trac.web.main\r\ndef application(environ, start_response):\r\n environ[''trac.env_path''] = ''/usr/local/trac/mysite'' \r\n return trac.web.main.dispatch_request(environ, start_response)\r\n}}}\r\n\r\nFor clarity, you should give this file a `.wsgi` extension. You should probably put the file in its own directory, since you will expose it to Apache. \r\n\r\nIf you have installed Trac and eggs in a path different from the standard one you should add that path by adding the following code at the top of the wsgi script:\r\n\r\n{{{#!python\r\nimport site\r\nsite.addsitedir(''/usr/local/trac/lib/python2.4/site-packages'')\r\n}}}\r\n\r\nChange it according to the path you installed the Trac libs at.\r\n\r\n=== Recommended `trac.wsgi` script\r\n\r\nA somewhat robust and generic version of this file can be created using the `trac-admin <env> deploy <dir>` command which automatically substitutes the required paths (see TracInstall#cgi-bin).\r\n\r\n\r\n== Mapping requests to the script\r\n\r\nAfter you''ve done preparing your .wsgi script, add the following to your Apache configuration file (`httpd.conf` for example).\r\n\r\n{{{\r\nWSGIScriptAlias /trac /usr/local/trac/mysite/apache/mysite.wsgi\r\n\r\n<Directory /usr/local/trac/mysite/apache>\r\n WSGIApplicationGroup %{GLOBAL}\r\n Order deny,allow\r\n Allow from all\r\n</Directory>\r\n}}}\r\n\r\nHere, the script is in a subdirectory of the Trac environment.\r\n\r\nIf you followed the directions [http://trac.edgewall.org/wiki/TracInstall#cgi-bin Generating the Trac cgi-bin directory], your Apache configuration file should look like following:\r\n\r\n{{{\r\nWSGIScriptAlias /trac /usr/share/trac/cgi-bin/trac.wsgi\r\n\r\n<Directory /usr/share/trac/cgi-bin>\r\n WSGIApplicationGroup %{GLOBAL}\r\n Order deny,allow\r\n Allow from all\r\n</Directory>\r\n}}}\r\n\r\nIn order to let Apache run the script, access to the directory in which the script resides is opened up to all of Apache. Additionally, the `WSGIApplicationGroup` directive ensures that Trac is always run in the first Python interpreter created by mod_wsgi; this is necessary because the Subversion Python bindings, which are used by Trac, don''t always work in other sub-interpreters and may cause requests to hang or cause Apache to crash as a result. After adding this configuration, restart Apache, and then it should work.\r\n\r\nTo test the setup of Apache, mod_wsgi and Python itself (ie. without involving Trac and dependencies), this simple wsgi application can be used to make sure that requests gets served (use as only content in your `.wsgi` script):\r\n\r\n{{{#!python\r\ndef application(environ, start_response):\r\n start_response(''200 OK'',[(''Content-type'',''text/html'')])\r\n return [''<html><body>Hello World!</body></html>'']\r\n}}}\r\n\r\nFor more information about using the mod_wsgi specific directives, see the [http://code.google.com/p/modwsgi/wiki/ mod_wsgi''s wiki] and more specifically the [http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac IntegrationWithTrac] page.\r\n\r\n\r\n== Configuring Authentication\r\n\r\nWe describe in the the following sections different methods for setting up authentication.\r\n\r\nSee also [http://httpd.apache.org/docs/2.2/howto/auth.html Authentication, Authorization and Access Control] in the Apache guide.\r\n\r\n=== Using Basic Authentication ===\r\n\r\nThe simplest way to enable authentication with Apache is to create a password file. Use the `htpasswd` program to create the password file:\r\n{{{\r\n$ htpasswd -c /somewhere/trac.htpasswd admin\r\nNew password: <type password>\r\nRe-type new password: <type password again>\r\nAdding password for user admin\r\n}}}\r\n\r\nAfter the first user, you dont need the "-c" option anymore:\r\n{{{\r\n$ htpasswd /somewhere/trac.htpasswd john\r\nNew password: <type password>\r\nRe-type new password: <type password again>\r\nAdding password for user john\r\n}}}\r\n\r\n ''''See the man page for `htpasswd` for full documentation.''''\r\n\r\nAfter you''ve created the users, you can set their permissions using TracPermissions.\r\n\r\nNow, you''ll need to enable authentication against the password file in the Apache configuration:\r\n{{{\r\n<Location "/trac/login">\r\n AuthType Basic\r\n AuthName "Trac"\r\n AuthUserFile /somewhere/trac.htpasswd\r\n Require valid-user\r\n</Location>\r\n}}}\r\n\r\nIf you''re hosting multiple projects you can use the same password file for all of them:\r\n{{{\r\n<LocationMatch "/trac/[^/]+/login">\r\n AuthType Basic\r\n AuthName "Trac"\r\n AuthUserFile /somewhere/trac.htpasswd\r\n Require valid-user\r\n</LocationMatch>\r\n}}}\r\nNote that neither a file nor a directory named ''login'' needs to exist.[[BR]]\r\nSee also the [http://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html mod_auth_basic] documentation.\r\n\r\n=== Using Digest Authentication ===\r\n\r\nFor better security, it is recommended that you either enable SSL or at least use the “digest” authentication scheme instead of “Basic”. \r\n\r\nYou''ll have to create your `.htpasswd` file with the `htdigest` command instead of `htpasswd`, as follows:\r\n{{{\r\n# htdigest -c /somewhere/trac.htpasswd trac admin\r\n}}}\r\n\r\nThe "trac" parameter above is the "realm", and will have to be reused in the Apache configuration in the !AuthName directive:\r\n\r\n{{{\r\n<Location "/trac/login">\r\n\r\n AuthType Digest\r\n AuthName "trac"\r\n AuthDigestDomain /trac\r\n AuthUserFile /somewhere/trac.htpasswd\r\n Require valid-user\r\n</Location>\r\n}}}\r\n\r\nFor multiple environments, you can use the same `LocationMatch` as described with the previous method.\r\n\r\nDon''t forget to activate the mod_auth_digest. For example, on a Debian 4.0r1 (etch) system:\r\n{{{\r\n LoadModule auth_digest_module /usr/lib/apache2/modules/mod_auth_digest.so\r\n}}}\r\n\r\n\r\nSee also the [http://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html mod_auth_digest] documentation.\r\n\r\n=== Using LDAP Authentication \r\n\r\nConfiguration for [http://httpd.apache.org/docs/2.2/mod/mod_ldap.html mod_ldap] authentication in Apache is a bit tricky (httpd 2.2.x and OpenLDAP: slapd 2.3.19)\r\n\r\n1. You need to load the following modules in Apache httpd.conf\r\n{{{\r\nLoadModule ldap_module modules/mod_ldap.so\r\nLoadModule authnz_ldap_module modules/mod_authnz_ldap.so\r\n}}}\r\n\r\n2. Your httpd.conf also needs to look something like:\r\n\r\n{{{\r\n<Location /trac/>\r\n # (if you''re using it, mod_python specific settings go here)\r\n Order deny,allow\r\n Deny from all\r\n Allow from 192.168.11.0/24\r\n AuthType Basic\r\n AuthName "Trac"\r\n AuthBasicProvider "ldap"\r\n AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=co,dc=ke?uid?sub?(objectClass=inetOrgPerson)"\r\n authzldapauthoritative Off\r\n Require valid-user\r\n</Location>\r\n}}}\r\n\r\n\r\n3. You can use the LDAP interface as a way to authenticate to a Microsoft Active Directory:\r\n\r\n\r\nUse the following as your LDAP URL:\r\n{{{\r\n AuthLDAPURL "ldap://directory.example.com:3268/DC=example,DC=com?sAMAccountName?sub?(objectClass=user)"\r\n}}}\r\n\r\nYou will also need to provide an account for Apache to use when checking\r\ncredentials. As this password will be listed in plaintext in the\r\nconfig, you should be sure to use an account specifically for this task:\r\n{{{\r\n AuthLDAPBindDN ldap-auth-user@example.com\r\n AuthLDAPBindPassword "password"\r\n}}}\r\n\r\nThe whole section looks like:\r\n{{{\r\n<Location /trac/>\r\n # (if you''re using it, mod_python specific settings go here)\r\n Order deny,allow\r\n Deny from all\r\n Allow from 192.168.11.0/24\r\n AuthType Basic\r\n AuthName "Trac"\r\n AuthBasicProvider "ldap"\r\n AuthLDAPURL "ldap://adserver.company.com:3268/DC=company,DC=com?sAMAccountName?sub?(objectClass=user)"\r\n AuthLDAPBindDN ldap-auth-user@company.com\r\n AuthLDAPBindPassword "the_password"\r\n authzldapauthoritative Off\r\n # require valid-user\r\n require ldap-group CN=Trac Users,CN=Users,DC=company,DC=com\r\n</Location>\r\n}}}\r\n\r\nNote 1: This is the case where the LDAP search will get around the multiple OUs, conecting to Global Catalog Server portion of AD (Notice the port is 3268, not the normal LDAP 389). The GCS is basically a "flattened" tree which allows searching for a user without knowing to which OU they belong.\r\n\r\nNote 2: You can also require the user be a member of a certain LDAP group, instead of\r\njust having a valid login:\r\n{{{\r\n Require ldap-group CN=Trac Users,CN=Users,DC=example,DC=com\r\n}}}\r\n\r\nSee also:\r\n - [http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html mod_authnz_ldap], documentation for mod_authnz_ldap\r\n \r\n - [http://httpd.apache.org/docs/2.2/mod/mod_ldap.html mod_ldap], documentation for mod_ldap, which provides connection pooling and a shared cache.\r\n - [http://trac-hacks.org/wiki/LdapPlugin TracHacks:LdapPlugin] for storing TracPermissions in LDAP.\r\n\r\n=== Using SSPI Authentication\r\n\r\nIf you are using Apache on Windows, you can use mod_auth_sspi to provide\r\nsingle-sign-on. Download the module from the !SourceForge [http://sourceforge.net/projects/mod-auth-sspi/ mod-auth-sspi project] and then add the\r\nfollowing to your !VirtualHost:\r\n{{{\r\n <Location /trac/login>\r\n AuthType SSPI\r\n AuthName "Trac Login"\r\n SSPIAuth On\r\n SSPIAuthoritative On\r\n SSPIDomain MyLocalDomain\r\n SSPIOfferBasic On\r\n SSPIOmitDomain Off\r\n SSPIBasicPreferred On\r\n Require valid-user\r\n </Location>\r\n}}}\r\n\r\nUsing the above, usernames in Trac will be of the form `DOMAIN\\username`, so\r\nyou may have to re-add permissions and such. If you do not want the domain to\r\nbe part of the username, set `SSPIOmitDomain On` instead.\r\n\r\nSome common problems with SSPI authentication: [trac:#1055], [trac:#1168] and [trac:#3338].\r\n\r\nSee also [trac:TracOnWindows/Advanced].\r\n\r\n=== Using Apache authentication with the Account Manager plugin''s Login form ===\r\n\r\nTo begin with, see the basic instructions for using the Account Manager plugin''s [http://trac-hacks.org/wiki/AccountManagerPlugin/Modules#LoginModule Login module] and its [http://trac-hacks.org/wiki/AccountManagerPlugin/AuthStores#HttpAuthStore HttpAuthStore authentication module].\r\n\r\n''''''Note:'''''' If is difficult to get !HttpAuthStore to work with WSGI when using any Account Manager version prior to acct_mgr-0.4. Upgrading is recommended.\r\n\r\nHere is an example (from the !HttpAuthStore link) using acct_mgr-0.4 for hosting a single project:\r\n{{{\r\n[components]\r\n; be sure to enable the component\r\nacct_mgr.http.HttpAuthStore = enabled\r\n\r\n[account-manager]\r\n; configure the plugin to use a page that is secured with http authentication\r\nauthentication_url = /authFile\r\npassword_store = HttpAuthStore\r\n}}}\r\nThis will generally be matched with an Apache config like:\r\n{{{\r\n<Location /authFile>\r\n …HTTP authentication configuration…\r\n Require valid-user\r\n</Location>\r\n}}}\r\nNote that ''''''authFile'''''' need not exist. See the !HttpAuthStore link above for examples where multiple Trac projects are hosted on a server.\r\n\r\n=== Example: Apache/mod_wsgi with Basic Authentication, Trac being at the root of a virtual host\r\n\r\nPer the mod_wsgi documentation linked to above, here is an example Apache configuration that a) serves the Trac instance from a virtualhost subdomain and b) uses Apache basic authentication for Trac authentication.\r\n\r\n\r\nIf you want your Trac to be served from e.g. !http://trac.my-proj.my-site.org, then from the folder e.g. `/home/trac-for-my-proj`, if you used the command `trac-admin the-env initenv` to create a folder `the-env`, and you used `trac-admin the-env deploy the-deploy` to create a folder `the-deploy`, then first:\r\n\r\nCreate the htpasswd file:\r\n{{{\r\ncd /home/trac-for-my-proj/the-env\r\nhtpasswd -c htpasswd firstuser\r\n### and add more users to it as needed:\r\nhtpasswd htpasswd seconduser\r\n}}}\r\n(keep the file above your document root for security reasons)\r\n\r\nCreate this file e.g. (ubuntu) `/etc/apache2/sites-enabled/trac.my-proj.my-site.org.conf` with the following contents:\r\n\r\n{{{\r\n<Directory /home/trac-for-my-proj/the-deploy/cgi-bin/trac.wsgi>\r\n WSGIApplicationGroup %{GLOBAL}\r\n Order deny,allow\r\n Allow from all\r\n</Directory>\r\n\r\n<VirtualHost *:80>\r\n ServerName trac.my-proj.my-site.org\r\n DocumentRoot /home/trac-for-my-proj/the-env/htdocs/\r\n WSGIScriptAlias / /home/trac-for-my-proj/the-deploy/cgi-bin/trac.wsgi\r\n <Location ''/''>\r\n AuthType Basic\r\n AuthName "Trac"\r\n AuthUserFile /home/trac-for-my-proj/the-env/htpasswd\r\n Require valid-user\r\n </Location>\r\n</VirtualHost>\r\n\r\n}}}\r\n\r\nNote: for subdomains to work you would probably also need to alter `/etc/hosts` and add A-Records to your host''s DNS.\r\n\r\n\r\n== Troubleshooting\r\n\r\n=== Use a recent version\r\n\r\nPlease use either version 1.6, 2.4 or later of `mod_wsgi`. Versions prior to 2.4 in the 2.X branch have problems with some Apache configurations that use WSGI file wrapper extension. This extension is used in Trac to serve up attachments and static media files such as style sheets. If you are affected by this problem attachments will appear to be empty and formatting of HTML pages will appear not to work due to style sheet files not loading properly. Another frequent symptom is that binary attachment downloads are truncated. See mod_wsgi tickets [http://code.google.com/p/modwsgi/issues/detail?id=100 #100] and [http://code.google.com/p/modwsgi/issues/detail?id=132 #132].\r\n\r\n''''Note: using mod_wsgi 2.5 and Python 2.6.1 gave an Internal Server Error on my system (Apache 2.2.11 and Trac 0.11.2.1). Upgrading to Python 2.6.2 (as suggested [http://www.mail-archive.com/modwsgi@googlegroups.com/msg01917.html here]) solved this for me[[BR]]-- Graham Shanks''''\r\n\r\nIf you plan to use `mod_wsgi` in embedded mode on Windows or with the MPM worker on Linux, then you''ll even need version 0.3.4 or greater (see [trac:#10675] for details).\r\n\r\n=== Getting Trac to work nicely with SSPI and ''Require Group'' ===\r\nIf like me you''ve set Trac up on Apache, Win32 and configured SSPI, but added a ''Require group'' option to your apache configuration, then the SSPIOmitDomain option is probably not working. If its not working your usernames in trac are probably looking like ''DOMAIN\\user'' rather than ''user''.\r\n\r\nThis WSGI script ''fixes'' things, hope it helps:\r\n{{{#!python\r\nimport os\r\nimport trac.web.main\r\n\r\nos.environ[''TRAC_ENV''] = ''/usr/local/trac/mysite''\r\nos.environ[''PYTHON_EGG_CACHE''] = ''/usr/local/trac/mysite/eggs''\r\n\r\ndef application(environ, start_response):\r\n if "\\\\" in environ[''REMOTE_USER'']:\r\n environ[''REMOTE_USER''] = environ[''REMOTE_USER''].split("\\\\", 1)[1]\r\n return trac.web.main.dispatch_request(environ, start_response)\r\n}}}\r\n\r\n\r\n=== Trac with PostgreSQL ===\r\n\r\nWhen using the mod_wsgi adapter with multiple Trac instances and PostgreSQL (or MySQL?) as a database back-end, the server ''''may'''' create a lot of open database connections and thus PostgreSQL processes.\r\n\r\nA somewhat brutal workaround is to disabled connection pooling in Trac. This is done by setting `poolable = False` in `trac.db.postgres_backend` on the `PostgreSQLConnection` class.\r\n\r\nBut it''s not necessary to edit the source of Trac, the following lines in `trac.wsgi` will also work:\r\n\r\n{{{\r\nimport trac.db.postgres_backend\r\ntrac.db.postgres_backend.PostgreSQLConnection.poolable = False\r\n}}}\r\n\r\nor\r\n\r\n{{{\r\nimport trac.db.mysql_backend\r\ntrac.db.mysql_backend.MySQLConnection.poolable = False\r\n}}}\r\n\r\nNow Trac drops the connection after serving a page and the connection count on the database will be kept minimal.\r\n\r\n//This is not a recommended approach though. See also the notes at the bottom of the [http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac mod_wsgi''s IntegrationWithTrac] wiki page.//\r\n\r\n=== Other resources\r\n\r\nFor more troubleshooting tips, see also the [TracModPython#Troubleshooting mod_python troubleshooting] section, as most Apache-related issues are quite similar, plus discussion of potential [http://code.google.com/p/modwsgi/wiki/ApplicationIssues application issues] when using mod_wsgi. The wsgi page also has a [http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac Integration With Trac] document.\r\n\r\n\r\n----\r\nSee also: TracGuide, TracInstall, [wiki:TracFastCgi FastCGI], [wiki:TracModPython ModPython], [trac:TracNginxRecipe TracNginxRecipe]\r\n', NULL, NULL),
('WikiDeletePage', 1, 1362994208280549, 'trac', '127.0.0.1', '= Deleting a Wiki Page =\r\n\r\nExisting wiki pages can be completely deleted using the ''''Delete Page'''' or the ''''Delete this Version'''' buttons at the bottom of the wiki page. These buttons are only visible for users with `WIKI_DELETE` permissions.\r\n\r\n''''''Note:'''''' Deleting a wiki page is an irreversible operation.\r\n\r\nIf you want to delete a page because you actually re-created a new page with the same content but a different name, it is recommended to keep the page and use it as a redirection page instead of completely deleting it, as to not frustrate the visitor with broken links when coming to the site from a search engine. \r\n\r\nIn this situation, chances are that you actually wanted to [[WikiNewPage#renaming|rename]] the page instead of doing a copy + delete. \r\nThe ''''Rename'''' operation also offers you the possibility to create a redirection page.\r\nA redirection page is a short page that contains a link such as “See !SomeOtherPage”. \r\n\r\nHowever, deleting specific versions or even complete pages can make sense to remove spam or other abusive submissions.\r\n\r\n----\r\nSee also: TracWiki, TracPermissions\r\n', NULL, NULL),
('TracStandalone', 1, 1362994208283052, 'trac', '127.0.0.1', '= Tracd =\r\n\r\nTracd is a lightweight standalone Trac web server.\r\nIt can be used in a variety of situations, from a test or development server to a multiprocess setup behind another web server used as a load balancer.\r\n\r\n== Pros ==\r\n\r\n * Fewer dependencies: You don''t need to install apache or any other web-server.\r\n * Fast: Should be almost as fast as the [wiki:TracModPython mod_python] version (and much faster than the [wiki:TracCgi CGI]), even more so since version 0.12 where the HTTP/1.1 version of the protocol is enabled by default\r\n * Automatic reloading: For development, Tracd can be used in ''''auto_reload'''' mode, which will automatically restart the server whenever you make a change to the code (in Trac itself or in a plugin).\r\n\r\n== Cons ==\r\n\r\n * Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache httpd.\r\n * No native HTTPS support: [http://www.rickk.com/sslwrap/ sslwrap] can be used instead,\r\n or [http://trac.edgewall.org/wiki/STunnelTracd stunnel -- a tutorial on how to use stunnel with tracd] or Apache with mod_proxy.\r\n\r\n== Usage examples ==\r\n\r\nA single project on port 8080. (http://localhost:8080/)\r\n{{{\r\n $ tracd -p 8080 /path/to/project\r\n}}}\r\nStricly speaking this will make your Trac accessible to everybody from your network rather than ''''localhost only''''. To truly limit it use ''''--hostname'''' option.\r\n{{{\r\n $ tracd --hostname=localhost -p 8080 /path/to/project\r\n}}}\r\nWith more than one project. (http://localhost:8080/project1/ and http://localhost:8080/project2/)\r\n{{{\r\n $ tracd -p 8080 /path/to/project1 /path/to/project2\r\n}}}\r\n\r\nYou can''t have the last portion of the path identical between the projects since Trac uses that name to keep the URLs of the\r\ndifferent projects unique. So if you use `/project1/path/to` and `/project2/path/to`, you will only see the second project.\r\n\r\nAn alternative way to serve multiple projects is to specify a parent directory in which each subdirectory is a Trac project, using the `-e` option. The example above could be rewritten:\r\n{{{\r\n $ tracd -p 8080 -e /path/to\r\n}}}\r\n\r\nTo exit the server on Windows, be sure to use {{{CTRL-BREAK}}} -- using {{{CTRL-C}}} will leave a Python process running in the background.\r\n\r\n== Installing as a Windows Service ==\r\n\r\n=== Option 1 ===\r\nTo install as a Windows service, get the [http://www.google.com/search?q=srvany.exe SRVANY] utility and run:\r\n{{{\r\n C:\\path\\to\\instsrv.exe tracd C:\\path\\to\\srvany.exe\r\n reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\tracd\\Parameters /v Application /d "\\"C:\\path\\to\\python.exe\\" \\"C:\\path\\to\\python\\scripts\\tracd-script.py\\" <your tracd parameters>"\r\n net start tracd\r\n}}}\r\n\r\n''''''DO NOT'''''' use {{{tracd.exe}}}. Instead register {{{python.exe}}} directly with {{{tracd-script.py}}} as a parameter. If you use {{{tracd.exe}}}, it will spawn the python process without SRVANY''s knowledge. This python process will survive a {{{net stop tracd}}}.\r\n\r\nIf you want tracd to start automatically when you boot Windows, do:\r\n{{{\r\n sc config tracd start= auto\r\n}}}\r\n\r\nThe spacing here is important.\r\n\r\n{{{#!div\r\nOnce the service is installed, it might be simpler to run the Registry Editor rather than use the `reg add` command documented above. Navigate to:[[BR]]\r\n`HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\tracd\\Parameters`\r\n\r\nThree (string) parameters are provided:\r\n||!AppDirectory ||C:\\Python26\\ ||\r\n||Application ||python.exe ||\r\n||!AppParameters ||scripts\\tracd-script.py -p 8080 ... ||\r\n\r\nNote that, if the !AppDirectory is set as above, the paths of the executable ''''and'''' of the script name and parameter values are relative to the directory. This makes updating Python a little simpler because the change can be limited, here, to a single point.\r\n(This is true for the path to the .htpasswd file, as well, despite the documentation calling out the /full/path/to/htpasswd; however, you may not wish to store that file under the Python directory.)\r\n}}}\r\n\r\nFor Windows 7 User, srvany.exe may not be an option, so you can use [http://www.google.com/search?q=winserv.exe WINSERV] utility and run:\r\n{{{\r\n"C:\\path\\to\\winserv.exe" install tracd -displayname "tracd" -start auto "C:\\path\\to\\python.exe" c:\\path\\to\\python\\scripts\\tracd-script.py <your tracd parameters>"\r\n\r\nnet start tracd\r\n}}}\r\n\r\n=== Option 2 ===\r\n\r\nUse [http://trac-hacks.org/wiki/WindowsServiceScript WindowsServiceScript], available at [http://trac-hacks.org/ Trac Hacks]. Installs, removes, starts, stops, etc. your Trac service.\r\n\r\n=== Option 3 ===\r\n\r\nalso cygwin''s cygrunsrv.exe can be used:\r\n{{{\r\n$ cygrunsrv --install tracd --path /cygdrive/c/Python27/Scripts/tracd.exe --args ''--port 8000 --env-parent-dir E:\\IssueTrackers\\Trac\\Projects''\r\n$ net start tracd\r\n}}}\r\n\r\n== Using Authentication ==\r\n\r\nTracd allows you to run Trac without the need for Apache, but you can take advantage of Apache''s password tools (htpasswd and htdigest) to easily create a password file in the proper format for tracd to use in authentication. (It is also possible to create the password file without htpasswd or htdigest; see below for alternatives)\r\n\r\nTracd provides support for both Basic and Digest authentication. Digest is considered more secure. The examples below use Digest; to use Basic authentication, replace `--auth` with `--basic-auth` in the command line.\r\n\r\nThe general format for using authentication is:\r\n{{{\r\n $ tracd -p port --auth="base_project_dir,password_file_path,realm" project_path\r\n}}}\r\nwhere:\r\n * ''''''base_project_dir'''''': the base directory of the project specified as follows:\r\n * when serving multiple projects: ''''relative'''' to the `project_path`\r\n * when serving only a single project (`-s`): the name of the project directory\r\n Don''t use an absolute path here as this won''t work. ''''Note:'''' This parameter is case-sensitive even for environments on Windows.\r\n * ''''''password_file_path'''''': path to the password file\r\n * ''''''realm'''''': the realm name (can be anything)\r\n * ''''''project_path'''''': path of the project\r\n\r\n * **`--auth`** in the above means use Digest authentication, replace `--auth` with `--basic-auth` if you want to use Basic auth. Although Basic authentication does not require a "realm", the command parser does, so the second comma is required, followed directly by the closing quote for an empty realm name.\r\n\r\nExamples:\r\n\r\n{{{\r\n $ tracd -p 8080 \\\r\n --auth="project1,/path/to/passwordfile,mycompany.com" /path/to/project1\r\n}}}\r\n\r\nOf course, the password file can be be shared so that it is used for more than one project:\r\n{{{\r\n $ tracd -p 8080 \\\r\n --auth="project1,/path/to/passwordfile,mycompany.com" \\\r\n --auth="project2,/path/to/passwordfile,mycompany.com" \\\r\n /path/to/project1 /path/to/project2\r\n}}}\r\n\r\nAnother way to share the password file is to specify "*" for the project name:\r\n{{{\r\n $ tracd -p 8080 \\\r\n --auth="*,/path/to/users.htdigest,mycompany.com" \\\r\n /path/to/project1 /path/to/project2\r\n}}}\r\n\r\n=== Basic Authorization: Using a htpasswd password file ===\r\nThis section describes how to use `tracd` with Apache .htpasswd files.\r\n\r\n Note: It is necessary (at least with Python 2.6) to install the fcrypt package in order to\r\n decode some htpasswd formats. Trac source code attempt an `import crypt` first, but there\r\n is no such package for Python 2.6. Only `SHA-1` passwords (since Trac 1.0) work without this module.\r\n\r\nTo create a .htpasswd file use Apache''s `htpasswd` command (see [#GeneratingPasswordsWithoutApache below] for a method to create these files without using Apache):\r\n{{{\r\n $ sudo htpasswd -c /path/to/env/.htpasswd username\r\n}}}\r\nthen for additional users:\r\n{{{\r\n $ sudo htpasswd /path/to/env/.htpasswd username2\r\n}}}\r\n\r\nThen to start `tracd` run something like this:\r\n{{{\r\n $ tracd -p 8080 --basic-auth="projectdirname,/fullpath/environmentname/.htpasswd,realmname" /fullpath/environmentname\r\n}}}\r\n\r\nFor example:\r\n{{{\r\n $ tracd -p 8080 --basic-auth="testenv,/srv/tracenv/testenv/.htpasswd,My Test Env" /srv/tracenv/testenv\r\n}}}\r\n''''Note:'''' You might need to pass "-m" as a parameter to htpasswd on some platforms (OpenBSD).\r\n\r\n=== Digest authentication: Using a htdigest password file ===\r\n\r\nIf you have Apache available, you can use the htdigest command to generate the password file. Type ''htdigest'' to get some usage instructions, or read [http://httpd.apache.org/docs/2.0/programs/htdigest.html this page] from the Apache manual to get precise instructions. You''ll be prompted for a password to enter for each user that you create. For the name of the password file, you can use whatever you like, but if you use something like `users.htdigest` it will remind you what the file contains. As a suggestion, put it in your <projectname>/conf folder along with the [TracIni trac.ini] file.\r\n\r\nNote that you can start tracd without the `--auth` argument, but if you click on the ''''Login'''' link you will get an error.\r\n\r\n=== Generating Passwords Without Apache ===\r\n\r\nBasic Authorization can be accomplished via this [http://aspirine.org/htpasswd_en.html online HTTP Password generator] which also supports `SHA-1`. Copy the generated password-hash line to the .htpasswd file on your system. Note that Windows Python lacks the "crypt" module that is the default hash type for htpasswd ; Windows Python can grok MD5 password hashes just fine and you should use MD5.\r\n\r\nYou can use this simple Python script to generate a ''''''digest'''''' password file:\r\n\r\n{{{\r\n#!python\r\nfrom optparse import OptionParser\r\n# The md5 module is deprecated in Python 2.5\r\ntry:\r\n from hashlib import md5\r\nexcept ImportError:\r\n from md5 import md5\r\nrealm = ''trac''\r\n\r\n# build the options\r\nusage = "usage: %prog [options]"\r\nparser = OptionParser(usage=usage)\r\nparser.add_option("-u", "--username",action="store", dest="username", type = "string",\r\n help="the username for whom to generate a password")\r\nparser.add_option("-p", "--password",action="store", dest="password", type = "string",\r\n help="the password to use")\r\nparser.add_option("-r", "--realm",action="store", dest="realm", type = "string",\r\n help="the realm in which to create the digest")\r\n(options, args) = parser.parse_args()\r\n\r\n# check options\r\nif (options.username is None) or (options.password is None):\r\n parser.error("You must supply both the username and password")\r\nif (options.realm is not None):\r\n realm = options.realm\r\n \r\n# Generate the string to enter into the htdigest file\r\nkd = lambda x: md5('':''.join(x)).hexdigest()\r\nprint '':''.join((options.username, realm, kd([options.username, realm, options.password])))\r\n}}}\r\n\r\nNote: If you use the above script you must set the realm in the `--auth` argument to ''''''`trac`''''''. Example usage (assuming you saved the script as trac-digest.py):\r\n\r\n{{{\r\n $ python trac-digest.py -u username -p password >> c:\\digest.txt\r\n $ tracd --port 8000 --auth=proj_name,c:\\digest.txt,trac c:\\path\\to\\proj_name\r\n}}}\r\n\r\n==== Using `md5sum`\r\nIt is possible to use `md5sum` utility to generate digest-password file:\r\n{{{\r\nuser=\r\nrealm=\r\npassword=\r\npath_to_file=\r\necho ${user}:${realm}:$(printf "${user}:${realm}:${password}" | md5sum - | sed -e ''s/\\s\\+-//'') > ${path_to_file}\r\n}}}\r\n\r\n== Reference ==\r\n\r\nHere''s the online help, as a reminder (`tracd --help`):\r\n{{{\r\nUsage: tracd [options] [projenv] ...\r\n\r\nOptions:\r\n --version show program''s version number and exit\r\n -h, --help show this help message and exit\r\n -a DIGESTAUTH, --auth=DIGESTAUTH\r\n [projectdir],[htdigest_file],[realm]\r\n --basic-auth=BASICAUTH\r\n [projectdir],[htpasswd_file],[realm]\r\n -p PORT, --port=PORT the port number to bind to\r\n -b HOSTNAME, --hostname=HOSTNAME\r\n the host name or IP address to bind to\r\n --protocol=PROTOCOL http|scgi|ajp|fcgi\r\n -q, --unquote unquote PATH_INFO (may be needed when using ajp)\r\n --http10 use HTTP/1.0 protocol version instead of HTTP/1.1\r\n --http11 use HTTP/1.1 protocol version (default)\r\n -e PARENTDIR, --env-parent-dir=PARENTDIR\r\n parent directory of the project environments\r\n --base-path=BASE_PATH\r\n the initial portion of the request URL''s "path"\r\n -r, --auto-reload restart automatically when sources are modified\r\n -s, --single-env only serve a single project without the project list\r\n -d, --daemonize run in the background as a daemon\r\n --pidfile=PIDFILE when daemonizing, file to which to write pid\r\n --umask=MASK when daemonizing, file mode creation mask to use, in\r\n octal notation (default 022)\r\n --group=GROUP the group to run as\r\n --user=USER the user to run as\r\n}}}\r\n\r\nUse the -d option so that tracd doesn''t hang if you close the terminal window where tracd was started.\r\n\r\n== Tips ==\r\n\r\n=== Serving static content ===\r\n\r\nIf `tracd` is the only web server used for the project, \r\nit can also be used to distribute static content \r\n(tarballs, Doxygen documentation, etc.)\r\n\r\nThis static content should be put in the `$TRAC_ENV/htdocs` folder,\r\nand is accessed by URLs like `<project_URL>/chrome/site/...`.\r\n\r\nExample: given a `$TRAC_ENV/htdocs/software-0.1.tar.gz` file,\r\nthe corresponding relative URL would be `/<project_name>/chrome/site/software-0.1.tar.gz`, \r\nwhich in turn can be written as `htdocs:software-0.1.tar.gz` (TracLinks syntax) or `[/<project_name>/chrome/site/software-0.1.tar.gz]` (relative link syntax). \r\n\r\n ''''Support for `htdocs:` TracLinks syntax was added in version 0.10''''\r\n\r\n=== Using tracd behind a proxy\r\n\r\nIn some situations when you choose to use tracd behind Apache or another web server.\r\n\r\nIn this situation, you might experience issues with redirects, like being redirected to URLs with the wrong host or protocol. In this case (and only in this case), setting the `[trac] use_base_url_for_redirect` to `true` can help, as this will force Trac to use the value of `[trac] base_url` for doing the redirects.\r\n\r\nIf you''re using the AJP protocol to connect with `tracd` (which is possible if you have flup installed), then you might experience problems with double quoting. Consider adding the `--unquote` parameter.\r\n\r\nSee also [trac:TracOnWindowsIisAjp], [trac:TracNginxRecipe].\r\n\r\n=== Authentication for tracd behind a proxy\r\nIt is convenient to provide central external authentication to your tracd instances, instead of using {{{--basic-auth}}}. There is some discussion about this in #9206.\r\n\r\nBelow is example configuration based on Apache 2.2, mod_proxy, mod_authnz_ldap.\r\n\r\nFirst we bring tracd into Apache''s location namespace.\r\n\r\n{{{\r\n<Location /project/proxified>\r\n Require ldap-group cn=somegroup, ou=Groups,dc=domain.com\r\n Require ldap-user somespecificusertoo\r\n ProxyPass http://localhost:8101/project/proxified/\r\n # Turns out we don''t really need complicated RewriteRules here at all\r\n RequestHeader set REMOTE_USER %{REMOTE_USER}s\r\n</Location>\r\n}}}\r\n\r\nThen we need a single file plugin to recognize HTTP_REMOTE_USER header as valid authentication source. HTTP headers like ''''''HTTP_FOO_BAR'''''' will get converted to ''''''Foo-Bar'''''' during processing. Name it something like ''''''remote-user-auth.py'''''' and drop it into ''''''proxified/plugins'''''' directory:\r\n{{{\r\n#!python\r\nfrom trac.core import *\r\nfrom trac.config import BoolOption\r\nfrom trac.web.api import IAuthenticator\r\n\r\nclass MyRemoteUserAuthenticator(Component):\r\n\r\n implements(IAuthenticator)\r\n\r\n obey_remote_user_header = BoolOption(''trac'', ''obey_remote_user_header'', ''false'', \r\n """Whether the ''Remote-User:'' HTTP header is to be trusted for user logins \r\n (''''since ??.??'').""") \r\n\r\n def authenticate(self, req):\r\n if self.obey_remote_user_header and req.get_header(''Remote-User''): \r\n return req.get_header(''Remote-User'') \r\n return None\r\n\r\n}}}\r\n\r\nAdd this new parameter to your TracIni:\r\n{{{\r\n...\r\n[trac]\r\n...\r\nobey_remote_user_header = true\r\n...\r\n}}}\r\n\r\nRun tracd:\r\n{{{\r\ntracd -p 8101 -r -s proxified --base-path=/project/proxified\r\n}}}\r\n\r\nNote that if you want to install this plugin for all projects, you have to put it in your [TracPlugins#Plugindiscovery global plugins_dir] and enable it in your global trac.ini.\r\n\r\nGlobal config (e.g. `/srv/trac/conf/trac.ini`):\r\n{{{\r\n[components]\r\nremote-user-auth.* = enabled\r\n[inherit]\r\nplugins_dir = /srv/trac/plugins\r\n[trac]\r\nobey_remote_user_header = true\r\n}}}\r\n\r\nEnvironment config (e.g. `/srv/trac/envs/myenv`):\r\n{{{\r\n[inherit]\r\nfile = /srv/trac/conf/trac.ini\r\n}}}\r\n\r\n=== Serving a different base path than / ===\r\nTracd supports serving projects with different base urls than /<project>. The parameter name to change this is\r\n{{{\r\n $ tracd --base-path=/some/path\r\n}}}\r\n\r\n----\r\nSee also: TracInstall, TracCgi, TracModPython, TracGuide, [trac:TracOnWindowsStandalone#RunningTracdasservice Running tracd.exe as a Windows service]\r\n', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracReports', 1, 1362994208285343, 'trac', '127.0.0.1', '= Trac Reports =\r\n[[TracGuideToc]]\r\n\r\nThe Trac reports module provides a simple, yet powerful reporting facility\r\nto present information about tickets in the Trac database.\r\n\r\nRather than have its own report definition format, TracReports relies on standard SQL\r\n`SELECT` statements for custom report definition. \r\n\r\n ''''''Note:'''''' ''''The report module is being phased out in its current form because it seriously limits the ability of the Trac team to make adjustments to the underlying database schema. We believe that the [wiki:TracQuery query module] is a good replacement that provides more flexibility and better usability. While there are certain reports that cannot yet be handled by the query module, we intend to further enhance it so that at some point the reports module can be completely removed. This also means that there will be no major enhancements to the report module anymore.''''\r\n\r\n ''''You can already completely replace the reports module by the query module simply by disabling the former in [wiki:TracIni trac.ini]:''''\r\n {{{\r\n [components]\r\n trac.ticket.report.* = disabled\r\n }}}\r\n ''''This will make the query module the default handler for the “View Tickets” navigation item. We encourage you to try this configuration and report back what kind of features of reports you are missing, if any.''''\r\n\r\nA report consists of these basic parts:\r\n * ''''''ID'''''' — Unique (sequential) identifier \r\n * ''''''Title'''''' — Descriptive title\r\n * ''''''Description'''''' — A brief description of the report, in WikiFormatting text.\r\n * ''''''Report Body'''''' — List of results from report query, formatted according to the methods described below.\r\n * ''''''Footer'''''' — Links to alternative download formats for this report.\r\n\r\n== Changing Sort Order ==\r\nSimple reports - ungrouped reports to be specific - can be changed to be sorted by any column simply by clicking the column header. \r\n\r\nIf a column header is a hyperlink (red), click the column you would like to sort by. Clicking the same header again reverses the order.\r\n\r\n== Changing Report Numbering ==\r\nThere may be instances where you need to change the ID of the report, perhaps to organize the reports better. At present this requires changes to the trac database. The ''''report'''' table has the following schema ''''(since 0.10)'''':\r\n * id integer PRIMARY KEY\r\n * author text\r\n * title text\r\n * query text\r\n * description text\r\nChanging the ID changes the shown order and number in the ''''Available Reports'''' list and the report''s perma-link. This is done by running something like:\r\n{{{\r\nupdate report set id=5 where id=3;\r\n}}}\r\nKeep in mind that the integrity has to be maintained (i.e., ID has to be unique, and you don''t want to exceed the max, since that''s managed by SQLite someplace).\r\n\r\nYou may also need to update or remove the report number stored in the report or query.\r\n\r\n== Navigating Tickets ==\r\nClicking on one of the report results will take you to that ticket. You can navigate through the results by clicking the ''''Next Ticket'''' or ''''Previous Ticket'''' links just below the main menu bar, or click the ''''Back to Report'''' link to return to the report page.\r\n\r\nYou can safely edit any of the tickets and continue to navigate through the results using the ''''!Next/Previous/Back to Report'''' links after saving your results, but when you return to the report, there will be no hint about what has changed, as would happen if you were navigating a list of tickets obtained from a query (see TracQuery#NavigatingTickets). ''''(since 0.11)''''\r\n\r\n== Alternative Download Formats ==\r\nAside from the default HTML view, reports can also be exported in a number of alternative formats.\r\nAt the bottom of the report page, you will find a list of available data formats. Click the desired link to \r\ndownload the alternative report format.\r\n\r\n=== Comma-delimited - CSV (Comma Separated Values) ===\r\nExport the report as plain text, each row on its own line, columns separated by a single comma ('','').\r\n''''''Note:'''''' The output is fully escaped so carriage returns, line feeds, and commas will be preserved in the output.\r\n\r\n=== Tab-delimited ===\r\nLike above, but uses tabs (\\t) instead of comma.\r\n\r\n=== RSS - XML Content Syndication ===\r\nAll reports support syndication using XML/RSS 2.0. To subscribe to an RSS feed, click the orange ''XML'' icon at the bottom of the page. See TracRss for general information on RSS support in Trac.\r\n\r\n----\r\n\r\n== Creating Custom Reports ==\r\n\r\n''''Creating a custom report requires a comfortable knowledge of SQL.''''\r\n\r\n''''''Note that you need to set up [TracPermissions#Reports permissions] in order to see the buttons for adding or editing reports.''''''\r\n\r\nA report is basically a single named SQL query, executed and presented by\r\nTrac. Reports can be viewed and created from a custom SQL expression directly\r\nin the web interface.\r\n\r\nTypically, a report consists of a SELECT-expression from the ''ticket'' table,\r\nusing the available columns and sorting the way you want it.\r\n\r\n== Ticket columns ==\r\nThe ''''ticket'''' table has the following columns:\r\n * id\r\n * type\r\n * time\r\n * changetime\r\n * component\r\n * severity \r\n * priority \r\n * owner\r\n * reporter\r\n * cc\r\n * version\r\n * milestone\r\n * status\r\n * resolution\r\n * summary\r\n * description\r\n * keywords\r\n\r\nSee TracTickets for a detailed description of the column fields.\r\n\r\nExample: ''''''All active tickets, sorted by priority and time''''''\r\n{{{\r\nSELECT id AS ticket, status, severity, priority, owner, \r\n time AS created, summary FROM ticket \r\n WHERE status IN (''new'', ''assigned'', ''reopened'')\r\n ORDER BY priority, time\r\n}}}\r\n\r\n\r\n== Advanced Reports: Dynamic Variables ==\r\nFor more flexible reports, Trac supports the use of ''''dynamic variables'''' in report SQL statements. \r\nIn short, dynamic variables are ''''special'''' strings that are replaced by custom data before query execution.\r\n\r\n=== Using Variables in a Query ===\r\nThe syntax for dynamic variables is simple, any upper case word beginning with ''$'' is considered a variable.\r\n\r\nExample:\r\n{{{\r\nSELECT id AS ticket,summary FROM ticket WHERE priority=$PRIORITY\r\n}}}\r\n\r\nTo assign a value to $PRIORITY when viewing the report, you must define it as an argument in the report URL, leaving out the leading ''$''.\r\n\r\nExample:\r\n{{{\r\n http://trac.edgewall.org/reports/14?PRIORITY=high\r\n}}}\r\n\r\nTo use multiple variables, separate them with an ''&''.\r\n\r\nExample:\r\n{{{\r\n http://trac.edgewall.org/reports/14?PRIORITY=high&SEVERITY=critical\r\n}}}\r\n\r\nDynamic variables can also be used in the report title and description (since 1.1.1).\r\n\r\n=== !Special/Constant Variables ===\r\nThere is one dynamic variable whose value is set automatically (the URL does not have to be changed) to allow practical reports. \r\n\r\n * $USER — Username of logged in user.\r\n\r\nExample (''''List all tickets assigned to me''''):\r\n{{{\r\nSELECT id AS ticket,summary FROM ticket WHERE owner=$USER\r\n}}}\r\n\r\n\r\n\r\n== Advanced Reports: Custom Formatting ==\r\nTrac is also capable of more advanced reports, including custom layouts,\r\nresult grouping and user-defined CSS styles. To create such reports, we''ll use\r\nspecialized SQL statements to control the output of the Trac report engine.\r\n\r\n=== Special Columns ===\r\nTo format reports, TracReports looks for ''magic'' column names in the query\r\nresult. These ''magic'' names are processed and affect the layout and style of the \r\nfinal report.\r\n\r\n=== Automatically formatted columns ===\r\n * ''''''ticket'''''' — Ticket ID number. Becomes a hyperlink to that ticket. \r\n * ''''''id'''''' — same as ''''''ticket'''''' above when ''''''realm'''''' is not set\r\n * ''''''realm'''''' — together with ''''''id'''''', can be used to create links to other resources than tickets (e.g. a realm of ''''wiki'''' and an ''''id'''' to a page name will create a link to that wiki page)\r\n * ''''''created, modified, date, time'''''' — Format cell as a date and/or time.\r\n * ''''''description'''''' — Ticket description field, parsed through the wiki engine.\r\n\r\n''''''Example:''''''\r\n{{{\r\nSELECT id AS ticket, created, status, summary FROM ticket \r\n}}}\r\n\r\nThose columns can also be defined but marked as hidden, see [#column-syntax below].\r\n\r\nSee trac:wiki/CookBook/Configuration/Reports for some example of creating reports for realms other than ''''ticket''''.\r\n\r\n=== Custom formatting columns ===\r\nColumns whose names begin and end with 2 underscores (Example: ''''''`__color__`'''''') are\r\nassumed to be ''''formatting hints'''', affecting the appearance of the row.\r\n \r\n * ''''''`__group__`'''''' — Group results based on values in this column. Each group will have its own header and table.\r\n * ''''''`__grouplink__`'''''' — Make the header of each group a link to the specified URL. The URL is taken from the first row of each group.\r\n * ''''''`__color__`'''''' — Should be a numeric value ranging from 1 to 5 to select a pre-defined row color. Typically used to color rows by issue priority.\r\n{{{\r\n#!html\r\n<div style="margin-left:7.5em">Defaults: \r\n<span style="border: none; color: #333; background: transparent; font-size: 85%; background: #fdc; border-color: #e88; color: #a22">Color 1</span>\r\n<span style="border: none; color: #333; background: transparent; font-size: 85%; background: #ffb; border-color: #eea; color: #880">Color 2</span>\r\n<span style="border: none; color: #333; background: transparent; font-size: 85%; background: #fbfbfb; border-color: #ddd; color: #444">Color 3</span>\r\n<span style="border: none; color: #333; background: transparent; font-size: 85%; background: #e7ffff; border-color: #cee; color: #099">Color 4</span>\r\n<span style="border: none; color: #333; background: transparent; font-size: 85%; background: #e7eeff; border-color: #cde; color: #469">Color 5</span>\r\n</div>\r\n}}}\r\n * ''''''`__style__`'''''' — A custom CSS style expression to use on the `<tr>` element of the current row.\r\n * ''''''`__class__`'''''' — Zero or more space-separated CSS class names to be set on the `<tr>` element of the current row. These classes are added to the class name derived from `__color__` and the odd / even indicator.\r\n\r\n''''''Example:'''''' ''''List active tickets, grouped by milestone, group header linked to milestone page, colored by priority''''\r\n{{{\r\nSELECT p.value AS __color__,\r\n t.milestone AS __group__,\r\n ''../milestone/'' || t.milestone AS __grouplink__,\r\n (CASE owner WHEN ''daniel'' THEN ''font-weight: bold; background: red;'' ELSE '''' END) AS __style__,\r\n t.id AS ticket, summary\r\n FROM ticket t,enum p\r\n WHERE t.status IN (''new'', ''assigned'', ''reopened'') \r\n AND p.name=t.priority AND p.type=''priority''\r\n ORDER BY t.milestone, p.value, t.severity, t.time\r\n}}}\r\n\r\n''''''Note:'''''' A table join is used to match ''''ticket'''' priorities with their\r\nnumeric representation from the ''''enum'''' table.\r\n\r\n=== Changing layout of report rows === #column-syntax\r\nBy default, all columns on each row are display on a single row in the HTML\r\nreport, possibly formatted according to the descriptions above. However, it''s\r\nalso possible to create multi-line report entries.\r\n\r\n * ''''''`column_`'''''' — ''''Break row after this''''. By appending an underscore (''_'') to the column name, the remaining columns will be continued on a second line.\r\n\r\n * ''''''`_column_`'''''' — ''''Full row''''. By adding an underscore (''_'') both at the beginning and the end of a column name, the data will be shown on a separate row.\r\n\r\n * ''''''`_column`'''''' — ''''Hide data''''. Prepending an underscore (''_'') to a column name instructs Trac to hide the contents from the HTML output. This is useful for information to be visible only if downloaded in other formats (like CSV or RSS/XML).\r\n This can be used to hide any kind of column, even important ones required for identifying the resource, e.g. `id as _id` will hide the ''''''Id'''''' column but the link to the ticket will be present.\r\n\r\n''''''Example:'''''' ''''List active tickets, grouped by milestone, colored by priority, with description and multi-line layout''''\r\n\r\n{{{\r\nSELECT p.value AS __color__,\r\n t.milestone AS __group__,\r\n (CASE owner \r\n WHEN ''daniel'' THEN ''font-weight: bold; background: red;'' \r\n ELSE '''' END) AS __style__,\r\n t.id AS ticket, summary AS summary_, -- ## Break line here\r\n component,version, severity, milestone, status, owner,\r\n time AS created, changetime AS modified, -- ## Dates are formatted\r\n description AS _description_, -- ## Uses a full row\r\n changetime AS _changetime, reporter AS _reporter -- ## Hidden from HTML output\r\n FROM ticket t,enum p\r\n WHERE t.status IN (''new'', ''assigned'', ''reopened'') \r\n AND p.name=t.priority AND p.type=''priority''\r\n ORDER BY t.milestone, p.value, t.severity, t.time\r\n}}}\r\n\r\n=== Reporting on custom fields ===\r\n\r\nIf you have added custom fields to your tickets (a feature since v0.8, see TracTicketsCustomFields), you can write a SQL query to cover them. You''ll need to make a join on the ticket_custom table, but this isn''t especially easy.\r\n\r\nIf you have tickets in the database ''''before'''' you declare the extra fields in trac.ini, there will be no associated data in the ticket_custom table. To get around this, use SQL''s "LEFT OUTER JOIN" clauses. See [trac:TracIniReportCustomFieldSample TracIniReportCustomFieldSample] for some examples.\r\n\r\n=== A note about SQL rewriting #rewriting\r\n\r\nBeyond the relatively trivial replacement of dynamic variables, the SQL query is also altered in order to support two features of the reports:\r\n 1. [#sort-order changing the sort order]\r\n 2. pagination support (limitation of the number of result rows displayed on each page)\r\nIn order to support the first feature, the sort column is inserted in the `ORDER BY` clause in the first position or in the second position if a `__group__` column is specified (an `ORDER BY` clause is created if needed). In order to support pagination, a `LIMIT ... OFFSET ...` clause is appended.\r\nThe query might be too complex for the automatic rewrite to work correctly, resulting in an erroneous query. In this case you still have the possibility to control exactly how the rewrite is done by manually inserting the following tokens:\r\n - `@SORT_COLUMN@`, the place where the name of the selected sort column will be inserted,\r\n - `@LIMIT_OFFSET@`, the place where the pagination support clause will be added\r\nNote that if you write them after an SQL comment, `--`, you''ll effectively disable rewriting if this is what you want!\r\n\r\nLet''s take an example, consider the following SQL query:\r\n{{{\r\n-- ## 4: Assigned, Active Tickets by Owner ## --\r\n\r\n-- \r\n-- List assigned tickets, group by ticket owner, sorted by priority.\r\n-- \r\n\r\nSELECT p.value AS __color__,\r\n owner AS __group__,\r\n id AS ticket, summary, component, milestone, t.type AS type, severity, time AS created,\r\n changetime AS _changetime, description AS _description,\r\n reporter AS _reporter\r\n FROM ticket t,enum p\r\n WHERE status = ''assigned''\r\nAND p.name=t.priority AND p.type=''priority''\r\n ORDER BY __group__, p.value, severity, time\r\n}}}\r\n\r\nThe automatic rewrite will be the following (4 rows per page, page 2, sorted by `component`):\r\n{{{\r\nSELECT p.value AS __color__,\r\n owner AS __group__,\r\n id AS ticket, summary, component, milestone, t.type AS type, severity, time AS created,\r\n changetime AS _changetime, description AS _description,\r\n reporter AS _reporter\r\n FROM ticket t,enum p\r\n WHERE status = ''assigned''\r\nAND p.name=t.priority AND p.type=''priority''\r\n ORDER BY __group__ ASC, `component` ASC, __group__, p.value, severity, time\r\n LIMIT 4 OFFSET 4\r\n}}}\r\n\r\nThe equivalent SQL query with the rewrite tokens would have been:\r\n{{{\r\nSELECT p.value AS __color__,\r\n owner AS __group__,\r\n id AS ticket, summary, component, milestone, t.type AS type, severity, time AS created,\r\n changetime AS _changetime, description AS _description,\r\n reporter AS _reporter\r\n FROM ticket t,enum p\r\n WHERE status = ''assigned''\r\nAND p.name=t.priority AND p.type=''priority''\r\n ORDER BY __group__, @SORT_COLUMN@, p.value, severity, time\r\n@LIMIT_OFFSET@\r\n}}}\r\n\r\nIf you want to always sort first by priority and only then by the user selected sort column, simply use the following `ORDER BY` clause:\r\n{{{\r\n ORDER BY __group__, p.value, @SORT_COLUMN@, severity, time\r\n}}}\r\n\r\n----\r\nSee also: TracTickets, TracQuery, TracGuide, [http://www.sqlite.org/lang_expr.html Query Language Understood by SQLite]\r\n', NULL, NULL),
('TracFastCgi', 1, 1362994208288223, 'trac', '127.0.0.1', '[[PageOutline]]\r\n\r\n= Trac with FastCGI =\r\n\r\n[http://www.fastcgi.com/ FastCGI] interface allows Trac to remain resident much like with [wiki:TracModPython mod_python] or [wiki:TracModWSGI mod_wsgi]. It is faster than external CGI interfaces which must start a new process for each request. Additionally, it is supported by much wider variety of web servers.\r\n\r\nNote that unlike mod_python, FastCGI supports [http://httpd.apache.org/docs/suexec.html Apache SuEXEC], i.e. run with different permissions than web server running with (`mod_wsgi` supports the `WSGIDaemonProcess` with user / group parameters to achieve the same effect).\r\n\r\n''''''Note for Windows:'''''' Trac''s FastCGI does not run under Windows, as Windows does not implement `Socket.fromfd`, which is used by `_fcgi.py`. If you want to connect to IIS, you may want to try [trac:TracOnWindowsIisAjp AJP]/[trac:TracOnWindowsIisAjp ISAPI].\r\n\r\n[[PageOutline(2-3,Overview,inline)]]\r\n\r\n\r\n== Simple Apache configuration ==\r\n\r\nThere are two FastCGI modules commonly available for Apache: `mod_fastcgi` and\r\n`mod_fcgid` (preferred). The latter is more up-to-date.\r\n\r\nThe following sections focus on the FCGI specific setup, see also [wiki:TracModWSGI#ConfiguringAuthentication] for configuring the authentication in Apache.\r\n\r\nRegardless of which cgi module is used, be sure the web server has executable permissions on the cgi-bin folder. While FastCGI will throw specific permissions errors, mod_fcgid will throw an ambiguous error if this has not been done. (Connection reset by peer: mod_fcgid: error reading data from FastCGI server) \r\n\r\n=== Set up with `mod_fastcgi` ===\r\n`mod_fastcgi` uses `FastCgiIpcDir` and `FastCgiConfig` directives that should be added to an appropriate Apache configuration file:\r\n{{{\r\n# Enable fastcgi for .fcgi files\r\n# (If you''re using a distro package for mod_fcgi, something like\r\n# this is probably already present)\r\n<IfModule mod_fastcgi.c>\r\n AddHandler fastcgi-script .fcgi\r\n FastCgiIpcDir /var/lib/apache2/fastcgi \r\n</IfModule>\r\nLoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so\r\n}}}\r\nSetting `FastCgiIpcDir` is optional if the default is suitable. Note that the `LoadModule` line must be after the `IfModule` group.\r\n\r\nConfigure `ScriptAlias` or similar options as described in TracCgi, but\r\ncalling `trac.fcgi` instead of `trac.cgi`.\r\n\r\nAdd the following to the Apache configuration file (below the `FastCgiIpcDir` line) if you intend to set up the `TRAC_ENV` as an overall default:\r\n{{{\r\nFastCgiConfig -initial-env TRAC_ENV=/path/to/env/trac\r\n}}}\r\n\r\nAlternatively, you can serve multiple Trac projects in a directory by adding this:\r\n{{{\r\nFastCgiConfig -initial-env TRAC_ENV_PARENT_DIR=/parent/dir/of/projects\r\n}}}\r\n\r\n=== Set up with `mod_fcgid` ===\r\nConfigure `ScriptAlias` (see TracCgi for details), but call `trac.fcgi`\r\ninstead of `trac.cgi`. Note that slash at the end - it is important.\r\n{{{\r\nScriptAlias /trac /path/to/www/trac/cgi-bin/trac.fcgi/\r\n}}}\r\n\r\nTo set up Trac environment for `mod_fcgid` it is necessary to use\r\n`DefaultInitEnv` directive. It cannot be used in `Directory` or\r\n`Location` context, so if you need to support multiple projects, try\r\nalternative environment setup below.\r\n\r\n{{{\r\nDefaultInitEnv TRAC_ENV /path/to/env/trac/\r\n}}}\r\n\r\n=== alternative environment setup ===\r\nA better method to specify path to Trac environment is to embed the path\r\ninto `trac.fcgi` script itself. That doesn''t require configuration of server\r\nenvironment variables, works for both FastCgi modules\r\n(and for [http://www.lighttpd.net/ lighttpd] and CGI as well):\r\n{{{\r\nimport os\r\nos.environ[''TRAC_ENV''] = "/path/to/projectenv"\r\n}}}\r\nor\r\n{{{\r\nimport os\r\nos.environ[''TRAC_ENV_PARENT_DIR''] = "/path/to/project/parent/dir"\r\n}}}\r\n\r\nWith this method different projects can be supported by using different\r\n`.fcgi` scripts with different `ScriptAliases`.\r\n\r\nSee [https://coderanger.net/~coderanger/httpd/fcgi_example.conf this fcgid example config] which uses a !ScriptAlias directive with trac.fcgi with a trailing / like this:\r\n{{{\r\nScriptAlias / /srv/tracsite/cgi-bin/trac.fcgi/\r\n}}}\r\n\r\n== Simple Cherokee Configuration ==\r\n\r\nThe configuration on Cherokee''s side is quite simple. You will only need to know that you can spawn Trac as an SCGI process.\r\nYou can either start it manually, or better yet, automatically by letting Cherokee spawn the server whenever it is down.\r\nFirst set up an information source in cherokee-admin with a local interpreter.\r\n\r\n{{{\r\nHost:\r\nlocalhost:4433\r\n\r\nInterpreter:\r\n/usr/bin/tracd —single-env —daemonize —protocol=scgi —hostname=localhost —port=4433 /path/to/project/\r\n}}}\r\n\r\nIf the port was not reachable, the interpreter command would be launched. Note that, in the definition of the information source, you will have to manually launch the spawner if you use a ''''Remote host'''' as ''''Information source'''' instead of a ''''Local interpreter''''.\r\n\r\nAfter doing this, we will just have to create a new rule managed by the SCGI handler to access Trac. It can be created in a new virtual server, trac.example.net for instance, and will only need two rules. The ''''''default'''''' one will use the SCGI handler associated to the previously created information source.\r\nThe second rule will be there to serve the few static files needed to correctly display the Trac interface. Create it as ''''Directory rule'''' for ''''/common'''' and just set it to the ''''Static files'''' handler and with a ''''Document root'''' that points to the appropriate files: ''''$TRAC_LOCAL/htdocs/'''' (where $TRAC_LOCAL is a directory defined by the user or the system administrator to place local trac resources).\r\n\r\nNote:\\\\\r\nIf the tracd process fails to start up, and cherokee displays a 503 error page, you might be missing the [http://trac.saddi.com/flup python-flup] package.\\\\\r\nPython-flup is a dependency which provides trac with SCGI capability. You can install it on debian based systems with:\r\n{{{\r\nsudo apt-get install python-flup\r\n}}}\r\n\r\n\r\n== Simple Lighttpd Configuration ==\r\n\r\nThe FastCGI front-end was developed primarily for use with alternative webservers, such as [http://www.lighttpd.net/ lighttpd].\r\n\r\nlighttpd is a secure, fast, compliant and very flexible web-server that has been optimized for high-performance\r\nenvironments. It has a very low memory footprint compared to other web servers and takes care of CPU load.\r\n\r\nFor using `trac.fcgi`(prior to 0.11) / fcgi_frontend.py (0.11) with lighttpd add the following to your lighttpd.conf:\r\n{{{\r\n#var.fcgi_binary="/usr/bin/python /path/to/fcgi_frontend.py" # 0.11 if installed with easy_setup, it is inside the egg directory\r\nvar.fcgi_binary="/path/to/cgi-bin/trac.fcgi" # 0.10 name of prior fcgi executable\r\nfastcgi.server = ("/trac" =>\r\n \r\n ("trac" =>\r\n ("socket" => "/tmp/trac-fastcgi.sock",\r\n "bin-path" => fcgi_binary,\r\n "check-local" => "disable",\r\n "bin-environment" =>\r\n ("TRAC_ENV" => "/path/to/projenv")\r\n )\r\n )\r\n )\r\n}}}\r\n\r\nNote that you will need to add a new entry to `fastcgi.server` for each separate Trac instance that you wish to run. Alternatively, you may use the `TRAC_ENV_PARENT_DIR` variable instead of `TRAC_ENV` as described above,\r\nand you may set one of the two in `trac.fcgi` instead of in `lighttpd.conf`\r\nusing `bin-environment` (as in the section above on Apache configuration).\r\n\r\nNote that lighttpd has a bug related to ''SCRIPT_NAME'' and ''PATH_INFO'' when the uri of fastcgi.server is ''/'' instead of ''/trac'' in this example (see [trac:#2418]). This is fixed in lighttpd 1.5, and under lighttpd 1.4.23 or later the workaround is to add `"fix-root-scriptname" => "enable"` as a parameter of fastcgi.server.\r\n\r\nFor using two projects with lighttpd add the following to your `lighttpd.conf`:\r\n{{{\r\nfastcgi.server = ("/first" =>\r\n ("first" =>\r\n ("socket" => "/tmp/trac-fastcgi-first.sock",\r\n "bin-path" => fcgi_binary,\r\n "check-local" => "disable",\r\n "bin-environment" =>\r\n ("TRAC_ENV" => "/path/to/projenv-first")\r\n )\r\n ),\r\n "/second" =>\r\n ("second" =>\r\n ("socket" => "/tmp/trac-fastcgi-second.sock",\r\n "bin-path" => fcgi_binary,\r\n "check-local" => "disable",\r\n "bin-environment" =>\r\n ("TRAC_ENV" => "/path/to/projenv-second")\r\n )\r\n )\r\n )\r\n}}}\r\nNote that field values are different. If you prefer setting the environment\r\nvariables in the `.fcgi` scripts, then copy/rename `trac.fcgi`, e.g., to\r\n`first.fcgi` and `second.fcgi`, and reference them in the above settings.\r\nNote that the above will result in different processes in any event, even\r\nif both are running from the same `trac.fcgi` script.\r\n\r\n{{{\r\n#!div class=important\r\n''''''Note'''''' It''s very important the order on which server.modules are loaded, if mod_auth is not loaded ''''''BEFORE'''''' mod_fastcgi, then the server will fail to authenticate the user.\r\n}}}\r\n\r\nFor authentication you should enable mod_auth in lighttpd.conf ''server.modules'', select auth.backend and auth rules:\r\n{{{\r\nserver.modules = (\r\n...\r\n "mod_auth",\r\n...\r\n)\r\n\r\nauth.backend = "htpasswd"\r\n\r\n# Separated password files for each project\r\n# See "Conditional Configuration" in\r\n# http://trac.lighttpd.net/trac/file/branches/lighttpd-merge-1.4.x/doc/configuration.txt\r\n\r\n$HTTP["url"] =~ "^/first/" {\r\n auth.backend.htpasswd.userfile = "/path/to/projenv-first/htpasswd.htaccess"\r\n}\r\n$HTTP["url"] =~ "^/second/" {\r\n auth.backend.htpasswd.userfile = "/path/to/projenv-second/htpasswd.htaccess"\r\n}\r\n\r\n# Enable auth on trac URLs, see\r\n# http://trac.lighttpd.net/trac/file/branches/lighttpd-merge-1.4.x/doc/authentication.txt\r\n\r\nauth.require = ("/first/login" =>\r\n ("method" => "basic",\r\n "realm" => "First project",\r\n "require" => "valid-user"\r\n ),\r\n "/second/login" =>\r\n ("method" => "basic",\r\n "realm" => "Second project",\r\n "require" => "valid-user"\r\n )\r\n )\r\n\r\n\r\n}}}\r\nNote that lighttpd (I use version 1.4.3) stopped if password file doesn''t exist.\r\n\r\nNote that lighttpd doesn''t support ''valid-user'' in versions prior to 1.3.16.\r\n\r\nConditional configuration is also useful for mapping static resources, i.e. serving out images and CSS directly instead of through FastCGI:\r\n{{{\r\n# Aliasing functionality is needed\r\nserver.modules += ("mod_alias")\r\n\r\n# Set up an alias for the static resources\r\nalias.url = ("/trac/chrome/common" => "/usr/share/trac/htdocs")\r\n\r\n# Use negative lookahead, matching all requests that ask for any resource under /trac, EXCEPT in\r\n# /trac/chrome/common, and use FastCGI for those\r\n$HTTP["url"] =~ "^/trac(?!/chrome/common)" {\r\n# Even if you have other fastcgi.server declarations for applications other than Trac, do NOT use += here\r\nfastcgi.server = ("/trac" =>\r\n ("trac" =>\r\n ("socket" => "/tmp/trac-fastcgi.sock",\r\n "bin-path" => fcgi_binary,\r\n "check-local" => "disable",\r\n "bin-environment" =>\r\n ("TRAC_ENV" => "/path/to/projenv")\r\n )\r\n )\r\n )\r\n}\r\n}}}\r\nThe technique can be easily adapted for use with multiple projects by creating aliases for each of them, and wrapping the fastcgi.server declarations inside conditional configuration blocks.\r\nAlso there is another way to handle multiple projects and it''s to use TRAC_ENV_PARENT_DIR instead of TRAC_ENV and use global auth, let''s see an example:\r\n{{{\r\n# This is for handling multiple projects\r\n alias.url = ( "/trac/" => "/path/to/trac/htdocs/" )\r\n\r\n fastcgi.server += ("/projects" =>\r\n ("trac" =>\r\n (\r\n "socket" => "/tmp/trac.sock",\r\n "bin-path" => fcgi_binary,\r\n "check-local" => "disable",\r\n "bin-environment" =>\r\n ("TRAC_ENV_PARENT_DIR" => "/path/to/parent/dir/of/projects/" )\r\n )\r\n )\r\n )\r\n#And here starts the global auth configuration\r\n auth.backend = "htpasswd"\r\n auth.backend.htpasswd.userfile = "/path/to/unique/htpassword/file/trac.htpasswd"\r\n $HTTP["url"] =~ "^/projects/.*/login$" {\r\n auth.require = ("/" =>\r\n (\r\n "method" => "basic",\r\n "realm" => "trac",\r\n "require" => "valid-user"\r\n )\r\n )\r\n }\r\n}}}\r\n\r\nChanging date/time format also supported by lighttpd over environment variable LC_TIME\r\n{{{\r\nfastcgi.server = ("/trac" =>\r\n ("trac" =>\r\n ("socket" => "/tmp/trac-fastcgi.sock",\r\n "bin-path" => fcgi_binary,\r\n "check-local" => "disable",\r\n "bin-environment" =>\r\n ("TRAC_ENV" => "/path/to/projenv",\r\n "LC_TIME" => "ru_RU")\r\n )\r\n )\r\n )\r\n}}}\r\nFor details about languages specification see [trac:TracFaq TracFaq] question 2.13.\r\n\r\nOther important information like the [wiki:TracInstall#MappingStaticResources mapping static resources advices] are useful for non-fastcgi specific installation aspects.\r\n]\r\n\r\nRelaunch lighttpd, and browse to `http://yourhost.example.org/trac` to access Trac.\r\n\r\nNote about running lighttpd with reduced permissions:\r\n\r\nIf nothing else helps and trac.fcgi doesn''t start with lighttpd settings `server.username = "www-data"`, `server.groupname = "www-data"`, then in the `bin-environment` section set `PYTHON_EGG_CACHE` to the home directory of `www-data` or some other directory accessible to this account for writing.\r\n\r\n\r\n== Simple !LiteSpeed Configuration ==\r\n\r\nThe FastCGI front-end was developed primarily for use with alternative webservers, such as [http://www.litespeedtech.com/ LiteSpeed].\r\n\r\n!LiteSpeed web server is an event-driven asynchronous Apache replacement designed from the ground-up to be secure, scalable, and operate with minimal resources. !LiteSpeed can operate directly from an Apache config file and is targeted for business-critical environments.\r\n\r\n 1. Please make sure you have first have a working install of a Trac project. Test install with “tracd” first.\r\n\r\n 2. Create a Virtual Host for this setup. From now on we will refer to this vhost as !TracVhost. For this tutorial we will be assuming that your trac project will be accessible via:\r\n\r\n{{{\r\nhttp://yourdomain.com/trac/\r\n}}}\r\n\r\n 3. Go “!TracVhost → External Apps” tab and create a new “External Application”.\r\n\r\n{{{\r\nName: MyTracFCGI \r\nAddress: uds://tmp/lshttpd/mytracfcgi.sock\r\nMax Connections: 10\r\nEnvironment: TRAC_ENV=/fullpathto/mytracproject/ <--- path to root folder of trac project\r\nInitial Request Timeout (secs): 30\r\nRetry Timeout (secs): 0\r\nPersistent Connection Yes\r\nConnection Keepalive Timeout: 30\r\nResponse Bufferring: No \r\nAuto Start: Yes\r\nCommand: /usr/share/trac/cgi-bin/trac.fcgi <--- path to trac.fcgi\r\nBack Log: 50\r\nInstances: 10\r\n}}}\r\n\r\n 4. Optional. If you need to use htpasswd based authentication. Go to “!TracVhost → Security” tab and create a new security “Realm”.\r\n\r\n{{{\r\nDB Type: Password File\r\nRealm Name: MyTracUserDB <--- any name you wish and referenced later\r\nUser DB Location: /fullpathto/htpasswd <--- path to your htpasswd file\r\n}}}\r\n\r\nIf you don’t have a htpasswd file or don’t know how to create the entries within one, go to http://sherylcanter.com/encrypt.php, to generate the user:password combos.\r\n\r\n 5. Go to “!PythonVhost → Contexts” and create a new “FCGI Context”.\r\n\r\n{{{\r\nURI: /trac/ <--- URI path to bind to python fcgi app we created \r\nFast CGI App: [VHost Level] MyTractFCGI <--- select the trac fcgi extapp we just created\r\nRealm: TracUserDB <--- only if (4) is set. select realm created in (4)\r\n}}}\r\n\r\n 6. Modify `/fullpathto/mytracproject/conf/trac.ini`\r\n\r\n{{{\r\n#find/set base_rul, url, and link variables\r\nbase_url = http://yourdomain.com/trac/ <--- base url to generate correct links to\r\nurl = http://yourdomain.com/trac/ <--- link of project\r\nlink = http://yourdomain.com/trac/ <--- link of graphic logo\r\n}}}\r\n\r\n 7. Restart !LiteSpeed, “lswsctrl restart”, and access your new Trac project at: \r\n\r\n{{{\r\nhttp://yourdomain.com/trac/\r\n}}}\r\n\r\n\r\n== Simple Nginx Configuration ==\r\n\r\nNginx is able to communicate with FastCGI processes, but can not spawn them. So you need to start FastCGI server for Trac separately.\r\n\r\n 1. Nginx configuration with basic authentication handled by Nginx - confirmed to work on 0.6.32\r\n{{{\r\n server {\r\n listen 10.9.8.7:443;\r\n server_name trac.example;\r\n\r\n ssl on;\r\n ssl_certificate /etc/ssl/trac.example.crt;\r\n ssl_certificate_key /etc/ssl/trac.example.key;\r\n\r\n ssl_session_timeout 5m;\r\n\r\n ssl_protocols SSLv2 SSLv3 TLSv1;\r\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\r\n ssl_prefer_server_ciphers on;\r\n\r\n # (Or ``^/some/prefix/(.*)``.\r\n if ($uri ~ ^/(.*)) {\r\n set $path_info /$1;\r\n }\r\n\r\n # it makes sense to serve static resources through Nginx\r\n location /chrome/ {\r\n alias /home/trac/instance/static/htdocs/;\r\n }\r\n\r\n # You can copy this whole location to ``location [/some/prefix]/login``\r\n # and remove the auth entries below if you want Trac to enforce\r\n # authorization where appropriate instead of needing to authenticate\r\n # for accessing the whole site.\r\n # (Or ``location /some/prefix``.)\r\n location / {\r\n auth_basic "trac realm";\r\n auth_basic_user_file /home/trac/htpasswd;\r\n\r\n # socket address\r\n fastcgi_pass unix:/home/trac/run/instance.sock;\r\n\r\n # python - wsgi specific\r\n fastcgi_param HTTPS on;\r\n\r\n ## WSGI REQUIRED VARIABLES\r\n # WSGI application name - trac instance prefix.\r\n # (Or ``fastcgi_param SCRIPT_NAME /some/prefix``.)\r\n fastcgi_param SCRIPT_NAME "";\r\n fastcgi_param PATH_INFO $path_info;\r\n\r\n ## WSGI NEEDED VARIABLES - trac warns about them\r\n fastcgi_param REQUEST_METHOD $request_method;\r\n fastcgi_param SERVER_NAME $server_name;\r\n fastcgi_param SERVER_PORT $server_port;\r\n fastcgi_param SERVER_PROTOCOL $server_protocol;\r\n fastcgi_param QUERY_STRING $query_string;\r\n\r\n # For Nginx authentication to work - do not forget to comment these\r\n # lines if not using Nginx for authentication\r\n fastcgi_param AUTH_USER $remote_user;\r\n fastcgi_param REMOTE_USER $remote_user;\r\n\r\n # for ip to work\r\n fastcgi_param REMOTE_ADDR $remote_addr;\r\n\r\n # For attchments to work\r\n fastcgi_param CONTENT_TYPE $content_type;\r\n fastcgi_param CONTENT_LENGTH $content_length;\r\n }\r\n }\r\n}}}\r\n\r\n 2. Modified trac.fcgi:\r\n\r\n{{{\r\n#!/usr/bin/env python\r\nimport os\r\nsockaddr = ''/home/trac/run/instance.sock''\r\nos.environ[''TRAC_ENV''] = ''/home/trac/instance''\r\n\r\ntry:\r\n from trac.web.main import dispatch_request\r\n import trac.web._fcgi\r\n\r\n fcgiserv = trac.web._fcgi.WSGIServer(dispatch_request, \r\n bindAddress = sockaddr, umask = 7)\r\n fcgiserv.run()\r\n\r\nexcept SystemExit:\r\n raise\r\nexcept Exception, e:\r\n print ''Content-Type: text/plain\\r\\n\\r\\n'',\r\n print ''Oops...''\r\n print\r\n print ''Trac detected an internal error:''\r\n print\r\n print e\r\n print\r\n import traceback\r\n import StringIO\r\n tb = StringIO.StringIO()\r\n traceback.print_exc(file=tb)\r\n print tb.getvalue()\r\n\r\n}}}\r\n\r\n 3. reload nginx and launch trac.fcgi like that:\r\n\r\n{{{\r\ntrac@trac.example ~ $ ./trac-standalone-fcgi.py \r\n}}}\r\n\r\nThe above assumes that:\r\n * There is a user named ''trac'' for running trac instances and keeping trac environments in its home directory.\r\n * `/home/trac/instance` contains a trac environment\r\n * `/home/trac/htpasswd` contains authentication information\r\n * `/home/trac/run` is owned by the same group the nginx runs under\r\n * and if your system is Linux the `/home/trac/run` has setgid bit set (`chmod g+s run`)\r\n * and patch from ticket #T7239 is applied, or you''ll have to fix the socket file permissions every time\r\n\r\nUnfortunately nginx does not support variable expansion in fastcgi_pass directive. \r\nThus it is not possible to serve multiple trac instances from one server block. \r\n\r\nIf you worry enough about security, run trac instances under separate users. \r\n\r\nAnother way to run trac as a FCGI external application is offered in ticket #T6224\r\n\r\n----\r\nSee also: TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracCgi CGI], [wiki:TracModPython ModPython], [trac:TracNginxRecipe TracNginxRecipe]\r\n', NULL, NULL),
('WikiMacros', 1, 1362994208291144, 'trac', '127.0.0.1', '= Trac Macros =\r\n\r\n[[PageOutline]]\r\n\r\nTrac macros are plugins to extend the Trac engine with custom ''functions'' written in Python. A macro inserts dynamic HTML data in any context supporting WikiFormatting. Its syntax is `[[macro-name(optional-arguments)]]`.\r\n\r\nThe WikiProcessors are another kind of macros. They typically deal with alternate markup formats and transformation of larger "blocks" of information (like source code highlighting). They are used for processing the multiline `{{{#!wiki-processor-name ... }}}` blocks.\r\n\r\n== Using Macros ==\r\n\r\nMacro calls are enclosed in two ''''square brackets''''. Like Python functions, macros can also have arguments, a comma separated list within parentheses.\r\n\r\n=== Getting Detailed Help ===\r\nThe list of available macros and the full help can be obtained using the !MacroList macro, as seen [#AvailableMacros below].\r\n\r\nA brief list can be obtained via `[[MacroList(*)]]` or `[[?]]`.\r\n\r\nDetailed help on a specific macro can be obtained by passing it as an argument to !MacroList, e.g. `[[MacroList(MacroList)]]`, or, more conveniently, by appending a question mark (`?`) to the macro''s name, like in `[[MacroList?]]`.\r\n\r\n\r\n\r\n=== Example ===\r\n\r\nA list of 3 most recently changed wiki pages starting with ''Trac'':\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n [[RecentChanges(Trac,3)]]\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em;"\r\n[[RecentChanges(Trac,3)]]\r\n}}}\r\n|-----------------------------------\r\n{{{#!td\r\n {{{\r\n [[RecentChanges?(Trac,3)]]\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em;"\r\n[[RecentChanges?(Trac,3)]]\r\n}}}\r\n|-----------------------------------\r\n{{{#!td\r\n {{{\r\n [[?]]\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\n{{{#!html \r\n<div style="font-size: 80%" class="trac-macrolist">\r\n<h3><code>[[Image]]</code></h3>Embed an image in wiki-formatted text.\r\n\r\nThe first argument is the file …\r\n<h3><code>[[InterTrac]]</code></h3>Provide a list of known <a class="wiki" href="/wiki/InterTrac">InterTrac</a> prefixes.\r\n<h3><code>[[InterWiki]]</code></h3>Provide a description list for the known <a class="wiki" href="/wiki/InterWiki">InterWiki</a> prefixes.\r\n<h3><code>[[KnownMimeTypes]]</code></h3>List all known mime-types which can be used as <a class="wiki" href="/wiki/WikiProcessors">WikiProcessors</a>.\r\nCan be …</div>\r\n}}}\r\netc.\r\n}}}\r\n\r\n== Available Macros ==\r\n\r\n''''Note that the following list will only contain the macro documentation if you''ve not enabled `-OO` optimizations, or not set the `PythonOptimize` option for [wiki:TracModPython mod_python].''''\r\n\r\n[[MacroList]]\r\n\r\n== Macros from around the world ==\r\n\r\nThe [http://trac-hacks.org/ Trac Hacks] site provides a wide collection of macros and other Trac [TracPlugins plugins] contributed by the Trac community. If you''re looking for new macros, or have written one that you''d like to share with the world, please don''t hesitate to visit that site.\r\n\r\n== Developing Custom Macros ==\r\nMacros, like Trac itself, are written in the [http://python.org/ Python programming language] and are developed as part of TracPlugins.\r\n\r\nFor more information about developing macros, see the [trac:TracDev development resources] on the main project site.\r\n\r\n\r\nHere are 2 simple examples showing how to create a Macro with Trac 0.11. \r\n\r\nAlso, have a look at [trac:source:tags/trac-0.11/sample-plugins/Timestamp.py Timestamp.py] for an example that shows the difference between old style and new style macros and at the [trac:source:tags/trac-0.11/wiki-macros/README macros/README] which provides a little more insight about the transition.\r\n\r\n=== Macro without arguments ===\r\nTo test the following code, you should saved it in a `timestamp_sample.py` file located in the TracEnvironment''s `plugins/` directory.\r\n{{{\r\n#!python\r\nfrom datetime import datetime\r\n# Note: since Trac 0.11, datetime objects are used internally\r\n\r\nfrom genshi.builder import tag\r\n\r\nfrom trac.util.datefmt import format_datetime, utc\r\nfrom trac.wiki.macros import WikiMacroBase\r\n\r\nclass TimeStampMacro(WikiMacroBase):\r\n """Inserts the current time (in seconds) into the wiki page."""\r\n\r\n revision = "$Rev$"\r\n url = "$URL$"\r\n\r\n def expand_macro(self, formatter, name, text):\r\n t = datetime.now(utc)\r\n return tag.b(format_datetime(t, ''%c''))\r\n}}}\r\n\r\n=== Macro with arguments ===\r\nTo test the following code, you should saved it in a `helloworld_sample.py` file located in the TracEnvironment''s `plugins/` directory.\r\n{{{\r\n#!python\r\nfrom genshi.core import Markup\r\n\r\nfrom trac.wiki.macros import WikiMacroBase\r\n\r\nclass HelloWorldMacro(WikiMacroBase):\r\n """Simple HelloWorld macro.\r\n\r\n Note that the name of the class is meaningful:\r\n - it must end with "Macro"\r\n - what comes before "Macro" ends up being the macro name\r\n\r\n The documentation of the class (i.e. what you''re reading)\r\n will become the documentation of the macro, as shown by\r\n the !MacroList macro (usually used in the WikiMacros page).\r\n """\r\n\r\n revision = "$Rev$"\r\n url = "$URL$"\r\n\r\n def expand_macro(self, formatter, name, text, args):\r\n """Return some output that will be displayed in the Wiki content.\r\n\r\n `name` is the actual name of the macro (no surprise, here it''ll be\r\n `''HelloWorld''`),\r\n `text` is the text enclosed in parenthesis at the call of the macro.\r\n Note that if there are ''''no'''' parenthesis (like in, e.g.\r\n [[HelloWorld]]), then `text` is `None`.\r\n `args` are the arguments passed when HelloWorld is called using a\r\n `#!HelloWorld` code block.\r\n """\r\n return ''Hello World, text = %s, args = %s'' % \\\r\n (Markup.escape(text), Markup.escape(repr(args)))\r\n\r\n}}}\r\n\r\nNote that `expand_macro` optionally takes a 4^th^ parameter ''''`args`''''. When the macro is called as a [WikiProcessors WikiProcessor], it''s also possible to pass `key=value` [WikiProcessors#UsingProcessors processor parameters]. If given, those are stored in a dictionary and passed in this extra `args` parameter. On the contrary, when called as a macro, `args` is `None`. (''''since 0.12'''').\r\n\r\nFor example, when writing:\r\n{{{\r\n{{{#!HelloWorld style="polite" -silent verbose\r\n<Hello World!>\r\n}}}\r\n\r\n{{{#!HelloWorld\r\n<Hello World!>\r\n}}}\r\n\r\n[[HelloWorld(<Hello World!>)]]\r\n}}}\r\nOne should get:\r\n{{{\r\nHello World, text = <Hello World!> , args = {''style'': u''polite'', ''silent'': False, ''verbose'': True}\r\nHello World, text = <Hello World!> , args = {}\r\nHello World, text = <Hello World!> , args = None\r\n}}}\r\n\r\nNote that the return value of `expand_macro` is ''''''not'''''' HTML escaped. Depending on the expected result, you should escape it by yourself (using `return Markup.escape(result)`) or, if this is indeed HTML, wrap it in a Markup object (`return Markup(result)`) with `Markup` coming from Genshi, (`from genshi.core import Markup`). \r\n\r\nYou can also recursively use a wiki Formatter (`from trac.wiki import Formatter`) to process the `text` as wiki markup, for example by doing:\r\n\r\n{{{\r\n#!python\r\nfrom genshi.core import Markup\r\nfrom trac.wiki.macros import WikiMacroBase\r\nfrom trac.wiki import Formatter\r\nimport StringIO\r\n\r\nclass HelloWorldMacro(WikiMacroBase):\r\n def expand_macro(self, formatter, name, text, args):\r\n text = "whatever ''''''wiki'''''' markup you want, even containing other macros"\r\n # Convert Wiki markup to HTML, new style\r\n out = StringIO.StringIO()\r\n Formatter(self.env, formatter.context).format(text, out)\r\n return Markup(out.getvalue())\r\n}}}\r\n', NULL, NULL),
('TracSearch', 1, 1362994208293019, 'trac', '127.0.0.1', '= Using Search =\r\n\r\nTrac has a built-in search engine to allow finding occurrences of keywords and substrings in wiki pages, tickets and changeset properties (author, revision and log message).\r\n\r\nUsing the Trac search facility is straightforward and its interface should be familiar to most users.\r\n\r\nApart from the [search: Search module], you will also find a small search field above the navigation bar at all time. It provides convenient access to the search module from all pages.\r\n\r\nThe search results show the most recent modifications ranked first in the results rather than the most relevant result.\r\n\r\n== "Quickjump" searches ==\r\nFor quick access to various project resources, the quick-search field at the top of every page can be used to enter a [TracLinks wiki link], which will take you directly to the resource identified by that link.\r\n\r\nFor example:\r\n\r\n * ![42] -- Opens change set 42\r\n * !#42 -- Opens ticket number 42\r\n * !{1} -- Opens report 1\r\n * /trunk -- Opens the browser for the `trunk` directory\r\n\r\n== Advanced ==\r\n\r\n=== Disabling Quickjumps ===\r\nTo disable the quickjump feature for a search keyword - for example when searching for occurences of the literal word !TracGuide - begin the query with an exclamation mark (`!`).\r\n\r\n=== Search Links ===\r\nFrom the Wiki, it is possible to link to a specific search, using\r\n`search:` links:\r\n * `search:?q=crash` will search for the string "crash" \r\n * `search:?q=trac+link&wiki=on` will search for "trac" and "link" \r\n in wiki pages only\r\n\r\n----\r\nSee also: TracGuide, TracLinks, TracQuery', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('WikiHtml', 1, 1362994208294592, 'trac', '127.0.0.1', '= Using HTML in Wiki Text =\r\n\r\nTrac supports inserting HTML into any wiki context, accomplished using the `#!html` [wiki:WikiProcessors WikiProcessor]. \r\n\r\nHowever a constraint is that this HTML has to be well-formed.\r\nIn particular you can''t insert a start tag in an `#!html` block,\r\nresume normal wiki text and insert the corresponding end tag in a \r\nsecond `#!html` block. \r\n\r\nFortunately, for creating styled <div>s, <span>s or even complex tables\r\ncontaining arbitrary Wiki text, there''s a powerful alternative: use of\r\ndedicated `#!div`, `#!span` and `#!table`, `#!tr`, `#!td` and `#!th` blocks.\r\n\r\nThose Wiki processors are built-in, and does not require installing any additional packages.\r\n\r\n== How to use `#!html` == #HowtoUseHTML\r\nTo inform the wiki engine that a block of text should be treated as HTML, use the ''''html'''' processor. \r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n {{{\r\n #!html\r\n <h1 style="text-align: right; color: blue">HTML Test</h1>\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\n {{{\r\n #!html\r\n <h1 style="text-align: right; color: blue">HTML Test</h1>\r\n }}}\r\n}}}\r\n\r\nNote that Trac sanitizes your HTML code before displaying it. That means that if you try to use potentially dangerous constructs such as Javascript event handlers, those will be removed from the output. \r\n\r\nSince 0.11, the filtering is done by Genshi, and as such, the produced output will be a well-formed fragment of HTML. As noted above in the introduction, this mean that you can no longer use two HTML blocks, one for opening a <div>, the second for closing it, in order to wrap arbitrary wiki text.\r\nThe new way to wrap any wiki content inside a <div> is to use the `#!div` Wiki processor.\r\n\r\n== How to use `#!div` and `#!span` == #HowtoUseDivSpan\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n {{{\r\n #!div class="important" \r\n **important** is a predefined class.\r\n }}}\r\n }}}\r\n {{{\r\n {{{\r\n #!div style="border: 1pt dotted; margin: 1em"\r\n **wikipage** is another predefined class that will \r\n be used when no class is specified.\r\n }}}\r\n }}}\r\n {{{\r\n {{{\r\n #!div class="compact" style="border: 1pt dotted; margin: 1em"\r\n **compact** is another predefined class reducing\r\n the padding within the `<div>` to a minimum.\r\n }}}\r\n }}}\r\n {{{\r\n {{{\r\n #!div class="wikipage compact" style="border: 1pt dotted"\r\n Classes can be combined (here **wikipage** and **compact**)\r\n which results in this case in reduced //vertical// \r\n padding but there''s still some horizontal space for coping\r\n with headings.\r\n }}}\r\n }}}\r\n {{{\r\n {{{\r\n #!div class="" style="border: 1pt dotted; margin: 1em"\r\n Explicitly specifying no classes is //not// the same\r\n as specifying no class attribute, as this will remove\r\n the //wikipage// default class.\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td style="padding-left: 2em"\r\n\r\n {{{\r\n #!div class="important" \r\n **important** is a predefined class.\r\n }}}\r\n\r\n {{{\r\n #!div style="border: 1pt dotted; margin: 1em"\r\n **wikipage** is another predefined class that will \r\n be used when no class is specified.\r\n }}}\r\n\r\n {{{\r\n #!div class="compact" style="border: 1pt dotted; margin: 1em"\r\n **compact** is another predefined class reducing\r\n the padding within the `<div>` to a minimum.\r\n }}}\r\n\r\n {{{\r\n #!div class="wikipage compact" style="border: 1pt dotted"\r\n Classes can be combined (here **wikipage** and **compact**)\r\n which results in this case in reduced //vertical// \r\n padding but there''s still some horizontal space for coping\r\n with headings.\r\n }}}\r\n\r\n {{{\r\n #!div class="" style="border: 1pt dotted; margin: 1em"\r\n Explicitly specifying no classes is //not// the same\r\n as specifying no class attribute, as this will remove\r\n the //wikipage// default class.\r\n }}}\r\n\r\n}}}\r\n\r\nNote that the contents of a `#!div` block are contained in one or more paragraphs, which have a non-zero top and bottom margin. This leads to the top and bottom padding in the example above. To remove the top and bottom margin of the contents, add the `compact` class to the `#!div`. Another predefined class besides `wikipage` and `compact` is `important`, which can be used to make a paragraph stand out. Extra CSS classes can be defined via the `site/style.css` file for example, see TracInterfaceCustomization#SiteAppearance.\r\n\r\nFor spans, you should rather use the Macro call syntax:\r\n||= Wiki Markup =||\r\n{{{#!td\r\n {{{\r\n Hello \r\n [[span(''''WORLD'''' (click [#anchor here]), style=color: green; font-size: 120%, id=anchor)]]!\r\n }}}\r\n}}}\r\n|---------------------------------------------------------------------------------\r\n||= Display =||\r\n{{{#!td style="padding-left: 2em"\r\n Hello\r\n [[span(''''WORLD'''' (click [#anchor here]), style=color: green; font-size: 120%, id=anchor)]]!\r\n}}}\r\n\r\n== How to use `#!td` and other table related processors == #Tables\r\n\r\n`#!td` or `#!th` processors are actually the main ones, for creating table data and header cells, respectively. The other processors `#!table` and `#!tr` are not required for introducing a table structure, as `#!td` and `#!th` will do this automatically. The `|-` row separator can be used to start a new row when needed, but some may prefer to use a `#!tr` block for that, as this introduces a more formal grouping and offers the possibility to use an extra level of indentation. The main purpose of the `#!table` and `#!tr` is to give the possibility to specify HTML attributes, like ''''style'''' or ''''valign'''' to these elements.\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n Simple 2x2 table with rich content:\r\n {{{#!th align=left\r\n - Left\r\n - Header\r\n }}}\r\n {{{#!th align=left\r\n - Right\r\n - Header\r\n }}}\r\n |----------------------------------\r\n {{{#!td style="background: #ffd"\r\n - Left\r\n - Content\r\n }}}\r\n {{{#!td style="vertical-align: top"\r\n !RightContent\r\n }}}\r\n |----------------------------------\r\n || ... and this can be mixed||\\\r\n ||with pipe-based cells ||\r\n {{{#!td colspan=2\r\n Pick the style the more appropriate\r\n to your content\r\n \r\n See WikiFormatting#Tables for details\r\n on the pipe-based table syntax.\r\n }}}\r\n \r\n If one needs to add some \r\n attributes to the table itself...\r\n \r\n {{{\r\n #!table style="border:none;text-align:center;margin:auto"\r\n {{{#!tr ====================================\r\n {{{#!th style="border: none"\r\n Left header\r\n }}}\r\n {{{#!th style="border: none"\r\n Right header\r\n }}}\r\n }}}\r\n {{{#!tr ==== style="border: 1px dotted grey"\r\n {{{#!td style="border: none"\r\n 1.1\r\n }}}\r\n {{{#!td style="border: none"\r\n 1.2\r\n }}}\r\n }}}\r\n {{{#!tr ====================================\r\n {{{#!td style="border: none"\r\n 2.1\r\n }}}\r\n {{{#!td\r\n 2.2\r\n }}}\r\n }}}\r\n }}}\r\n\r\n\r\n }}}\r\n}}}\r\n{{{#!td valign=top\r\nSimple 2x2 table with rich content:\r\n{{{#!th align=left\r\n - Left\r\n - Header\r\n}}}\r\n{{{#!th align=left\r\n - Right\r\n - Header\r\n}}}\r\n|----------------------------------\r\n{{{#!td style="background: #ffd"\r\n - Left\r\n - Content\r\n}}}\r\n{{{#!td style="vertical-align: top"\r\n!RightContent\r\n}}}\r\n|----------------------------------\r\n|| ... and this can be mixed||\\\r\n||with pipe-based cells ||\r\n{{{#!td colspan=2\r\nPick the style the more appropriate\r\nto your content\r\n\r\nSee WikiFormatting#Tables for details\r\non the pipe-based table syntax.\r\n}}}\r\n\r\nIf one needs to add some \r\nattributes to the table itself...\r\n\r\n{{{\r\n#!table style="border:none;text-align:center;margin:auto"\r\n {{{#!tr ====================================\r\n {{{#!th style="border: none"\r\n Left header\r\n }}}\r\n {{{#!th style="border: none"\r\n Right header\r\n }}}\r\n }}}\r\n {{{#!tr ==== style="border: 1px dotted grey"\r\n {{{#!td style="border: none"\r\n 1.1\r\n }}}\r\n {{{#!td style="border: none"\r\n 1.2\r\n }}}\r\n }}}\r\n {{{#!tr ====================================\r\n {{{#!td style="border: none"\r\n 2.1\r\n }}}\r\n {{{#!td\r\n 2.2\r\n }}}\r\n }}}\r\n}}}\r\n}}}\r\n\r\nNote that by default tables are assigned the "wiki" CSS class, which gives a distinctive look to the header cells and a default border to the table and cells (as can be seen for the tables on this page). By removing this class (`#!table class=""`), one regains complete control on the table presentation. In particular, neither the table, the rows nor the cells will have a border, so this is a more effective way to get such an effect than having to specify a `style="border: no"` parameter everywhere. \r\n\r\n{{{#!table class=""\r\n||= Wiki Markup =||= Display =||\r\n {{{#!td\r\n {{{\r\n {{{#!table class=""\r\n || 0|| 1|| 2||\r\n || 10|| 20|| 30||\r\n || 11|| 22|| 33||\r\n ||||||= numbers =||\r\n }}}\r\n }}}\r\n }}}\r\n {{{#!td\r\n {{{#!table class=""\r\n || 0|| 1|| 2||\r\n || 10|| 20|| 30||\r\n || 11|| 22|| 33||\r\n ||||||= numbers =||\r\n }}}\r\n }}}\r\n}}}\r\n\r\nOther classes can be specified as alternatives (remember that you can define your own in [TracInterfaceCustomization#SiteAppearance site/style.css]).\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n {{{\r\n {{{#!table class="listing"\r\n || 0|| 1|| 2||\r\n || 10|| 20|| 30||\r\n || 11|| 22|| 33||\r\n ||||||= numbers =||\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td\r\n {{{#!table class="listing"\r\n || 0|| 1|| 2||\r\n || 10|| 20|| 30||\r\n || 11|| 22|| 33||\r\n ||||||= numbers =||\r\n }}}\r\n}}}\r\n\r\n\r\n== HTML comments ==\r\nHTML comments are stripped from the output of the `html` processor. To add an HTML comment to a wiki page, use the `htmlcomment` processor (available since 0.12). For example, the following code block:\r\n||= Wiki Markup =||\r\n{{{#!td\r\n {{{\r\n {{{\r\n #!htmlcomment\r\n This block is translated to an HTML comment.\r\n It can contain <tags> and &entities; that will not be escaped in the output.\r\n }}}\r\n }}}\r\n}}}\r\n|---------------------------------------------------------------------------------\r\n||= Display =||\r\n{{{#!td\r\n {{{\r\n <!--\r\n This block is translated to an HTML comment.\r\n It can contain <tags> and &entities; that will not be escaped in the output.\r\n -->\r\n }}}\r\n}}}\r\n\r\nPlease note that the character sequence "`--`" is not allowed in HTML comments, and will generate a rendering error.\r\n\r\n\r\n== More Information ==\r\n\r\n * http://www.w3.org/ -- World Wide Web Consortium\r\n * http://www.w3.org/MarkUp/ -- HTML Markup Home Page\r\n\r\n----\r\nSee also: WikiProcessors, WikiFormatting, WikiRestructuredText\r\n', NULL, NULL),
('TracImport', 1, 1362994208296441, 'trac', '127.0.0.1', '= Importing ticket data =\r\n[[PageOutline]]\r\n\r\nBy means of migrating from other issue-tracking systems, perform some external actions over tickets or simply synchronize different data bases, there are some available tools, plug-ins or scripts which lets you import or up-date tickets into Trac.\r\n\r\nBelow, follows a collection of some of those.\r\n\r\n== !TicketImportPlugin ==\r\n\r\n [http://trac-hacks.org/wiki/TicketImportPlugin TicketImportPlugin] :: mainly, but not only, this plug-in lets you import or up-date into Trac a series of tickets from a ''''''CSV file'''''' or (if the [http://pypi.python.org/pypi/xlrd xlrd library] is installed) from an ''''''Excel file''''''. \r\n\r\n== !ExportImportXlsPlugin ==\r\n\r\n [http://trac-hacks.org/wiki/ExportImportXlsPlugin ExportImportXlsPlugin] :: this plug-in add an admin panel for export and import tickets via ''''''XLS file''''''.\r\n * It depends on the python packages xlwt/rxld.\r\n\r\n== Bugzilla ==\r\n\r\n [http://trac-hacks.org/wiki/BugzillaIssueTrackingPlugin BugzillaIssueTrackingPlugin] :: integrates Bugzilla into Trac keeping TracLinks\r\n\r\nTicket data can be imported from Bugzilla using the [http://trac.edgewall.org/browser/trunk/contrib/bugzilla2trac.py bugzilla2trac.py] script, available in the contrib/ directory of the Trac distribution.\r\n\r\n{{{\r\n$ bugzilla2trac.py\r\nbugzilla2trac - Imports a bug database from Bugzilla into Trac.\r\n\r\nUsage: bugzilla2trac.py [options]\r\n\r\nAvailable Options:\r\n --db <MySQL dbname> - Bugzilla''s database\r\n --tracenv /path/to/trac/env - full path to Trac db environment\r\n -h | --host <MySQL hostname> - Bugzilla''s DNS host name\r\n -u | --user <MySQL username> - effective Bugzilla''s database user\r\n -p | --passwd <MySQL password> - Bugzilla''s user password\r\n -c | --clean - remove current Trac tickets before importing\r\n --help | help - this help info\r\n\r\nAdditional configuration options can be defined directly in the script.\r\n}}}\r\n\r\nCurrently, the following data is imported from Bugzilla:\r\n\r\n * bugs\r\n * bug activity (field changes)\r\n * bug attachments\r\n * user names and passwords (put into a htpasswd file)\r\n\r\nThe script provides a number of features to ease the conversion, such as:\r\n\r\n * PRODUCT_KEYWORDS: Trac doesn''t have the concept of products, so the script provides the ability to attach a ticket keyword instead.\r\n\r\n * IGNORE_COMMENTS: Don''t import Bugzilla comments that match a certain regexp.\r\n\r\n * STATUS_KEYWORDS: Attach ticket keywords for the Bugzilla statuses not available in Trac. By default, the ''VERIFIED'' and ''RELEASED'' Bugzilla statuses are translated into Trac keywords.\r\n\r\nFor more details on the available options, see the configuration section at the top of the script.\r\n\r\n== Jira ==\r\n\r\n [http://trac-hacks.org/wiki/JiraToTracIntegration JiraToTracIntegration] :: provides tools to import Atlassian Jira backup files into Trac. The plug-in consists of a Python 3.1 commandline tool that:\r\n - Parses the Jira backup XML file\r\n - Sends the imported Jira data and attachments to Trac using the [http://trac-hacks.org/wiki/XmlRpcPlugin XmlRpcPlugin]\r\n - Generates a htpasswd file containing the imported Jira users and their SHA-512 base64 encoded passwords\r\n\r\n== Mantis ==\r\n\r\n [http://trac-hacks.org/wiki/MantisImportScript MantisImportScript] :: script to import from Mantis into Trac the following data:\r\n * bugs\r\n * bug comments\r\n * bug activity (field changes)\r\n * attachments (as long as the files live in the mantis db, not on the filesystem) .\r\n\r\n== !PlanetForge ==\r\n\r\n [http://trac-hacks.org/wiki/PlanetForgeImportExportPlugin PlanetForgeImportExportPlugin] :: this plugin exports Trac data (wiki, tickets, compoments, permissions, repositories, etc.) using the open format designed by the COCLICO project. It extends the webadmin panel and the ''trac admin ...'' command. Still has no ''import'' feature. \r\n\r\n== Scarab ==\r\n\r\n [http://trac-hacks.org/wiki/ScarabToTracScript ScarabToTracScript] :: script that migrates Scarab issues to Trac tickets\r\n * Requires [http://trac-hacks.org/wiki/XmlRpcPlugin XmlRpcPlugin]\r\n\r\n== Sourceforge ==\r\n\r\n [http://trac-hacks.org/wiki/SfnToTracScript SfnToTracScript] :: importer of !SourceForge''s new backup file (originated from #Trac3521)\r\n\r\nAlso, ticket data can be imported from Sourceforge using the [http://trac.edgewall.org/browser/trunk/contrib/sourceforge2trac.py sourceforge2trac.py] script, available in the contrib/ directory of the Trac distribution.\r\n\r\n== Other ==\r\n\r\nSince trac uses a SQL database to store the data, you can import from other systems by examining the database tables. Just go into [http://www.sqlite.org/sqlite.html sqlite] command line to look at the tables and import into them from your application.\r\n\r\n=== Comma delimited file - CSV ===\r\nSee [http://trac.edgewall.org/attachment/wiki/TracSynchronize/csv2trac.2.py csv2trac.2.py] for details. This approach is particularly useful if one needs to enter a large number of tickets by hand. (note that the ticket type type field, (task etc...) is also needed for this script to work with more recent Trac releases)\r\nComments on script: The script has an error on line 168, (''Ticket'' needs to be ''ticket''). Also, the listed values for severity and priority are swapped. \r\n\r\n----\r\nSee also: \r\n * to import/export wiki pages: TracAdmin, \r\n * to export tickets: TracTickets, TracQuery', NULL, NULL),
('TracLinks', 1, 1362994208298042, 'trac', '127.0.0.1', '= Trac Links =\r\n[[TracGuideToc]]\r\n\r\nTracLinks are a fundamental feature of Trac, because they allow easy hyperlinking between the various entities in the system—such as tickets, reports, changesets, Wiki pages, milestones, and source files—from anywhere WikiFormatting is used.\r\n\r\nTracLinks are generally of the form ''''''type:id'''''' (where ''''id'''' represents the\r\nnumber, name or path of the item) though some frequently used kinds of items\r\nalso have short-hand notations.\r\n\r\n== Where to use TracLinks ==\r\nYou can use TracLinks in:\r\n\r\n * Source code (Subversion) commit messages\r\n * Wiki pages\r\n * Full descriptions for tickets, reports and milestones\r\n\r\nand any other text fields explicitly marked as supporting WikiFormatting.\r\n\r\n== Overview ==\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td\r\n Wiki pages :: `CamelCase` or `wiki:CamelCase`\r\n Parent page :: `[..]`\r\n Tickets :: `#1` or `ticket:1`\r\n Ticket comments :: `comment:1:ticket:2`\r\n Reports :: `{1}` or `report:1`\r\n Milestones :: `milestone:1.0`\r\n Attachment :: `attachment:example.tgz` (for current page attachment), `attachment:attachment.1073.diff:ticket:944` (absolute path)\r\n Changesets :: `r1`, `[1]`, `changeset:1` or (restricted) `[1/trunk]`, `changeset:1/trunk`\r\n Revision log :: `r1:3`, `[1:3]` or `log:@1:3`, `log:trunk@1:3`, `[2:5/trunk]`\r\n Diffs :: `diff:@1:3`, `diff:plugins/0.12/mercurial-plugin@9128:9953`,\r\n `diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` \r\n or `diff:trunk/trac@3538//sandbox/vc-refactoring@3539`\r\n Files :: `source:trunk/COPYING`, `source:/trunk/COPYING@200` (at version 200), `source:/trunk/COPYING@200#L25` (at version 200, line 25)\r\n}}}\r\n{{{#!td\r\n Wiki pages :: CamelCase or wiki:CamelCase\r\n Parent page :: [..]\r\n Tickets :: #1 or ticket:1\r\n Ticket comments :: comment:1:ticket:2 \r\n Reports :: {1} or report:1\r\n Milestones :: milestone:1.0\r\n Attachment :: attachment:example.tgz (for current page attachment), attachment:attachment.1073.diff:ticket:944 (absolute path)\r\n Changesets :: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk\r\n Revision log :: r1:3, [1:3] or log:@1:3, log:trunk@1:3, [2:5/trunk]\r\n Diffs :: diff:@1:3, diff:plugins/0.12/mercurial-plugin@9128:9953,\r\n diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default \r\n or diff:trunk/trac@3538//sandbox/vc-refactoring@3539\r\n Files :: source:trunk/COPYING, source:/trunk/COPYING@200 (at version 200), source:/trunk/COPYING@200#L25 (at version 200, line 25)\r\n}}}\r\n\r\n''''''Note:'''''' The wiki:CamelCase form is rarely used, but it can be convenient to refer to\r\npages whose names do not follow WikiPageNames rules, i.e., single words,\r\nnon-alphabetic characters, etc. See WikiPageNames for more about features specific\r\nto links to Wiki page names.\r\n\r\n\r\n{{{#!table class=""\r\n|||| Trac links using the full (non-shorthand) notation can also be given a custom link title like this: ||\r\n{{{#!td\r\n{{{\r\n[ticket:1 This is a link to ticket number one] or\r\n[[ticket:1|This is another link to ticket number one]].\r\n}}}\r\n}}}\r\n{{{#!td\r\n[ticket:1 This is a link to ticket number one] or\r\n[[ticket:1|This is another link to ticket number one]].\r\n}}}\r\n|--------------------------------------------------------------------------------------\r\n|||| If the title is omitted, only the id (the part after the colon) is displayed: ||\r\n{{{#!td\r\n{{{\r\n[ticket:1] or [[ticket:2]]\r\n}}}\r\n}}}\r\n{{{#!td\r\n[ticket:1] or [[ticket:2]]\r\n}}}\r\n|--------------------------------------------------------------------------------------\r\n|||| `wiki` is the default if the namespace part of a full link is omitted: || \r\n{{{#!td\r\n{{{\r\n[SandBox the sandbox] or\r\n[[SandBox|the sandbox]]\r\n}}}\r\n}}}\r\n{{{#!td\r\n[SandBox the sandbox] or\r\n[[SandBox|the sandbox]]\r\n}}}\r\n|--------------------------------------------------------------------------------------\r\n|||| The short form ''''realm:target'''' can also be wrapped within a <...> pair, [[br]] which allow for arbitrary characters (i.e. anything but >) ||\r\n{{{#!td\r\n{{{\r\n<wiki:Strange(page@!)>\r\n}}}\r\n}}}\r\n{{{#!td\r\n<wiki:Strange(page@!)>\r\n}}}\r\n}}}\r\n\r\nTracLinks are a very simple idea, but actually allow quite a complex network of information. In practice, it''s very intuitive and simple to use, and we''ve found the "link trail" extremely helpful to better understand what''s happening in a project or why a particular change was made.\r\n\r\n\r\n== Advanced use of TracLinks ==\r\n\r\n=== Relative links ===\r\n\r\nTo create a link to a [trac:SubWiki SubWiki]-page just use a ''/'':\r\n{{{\r\n WikiPage/SubWikiPage or ./SubWikiPage\r\n}}}\r\n\r\nTo link from a [trac:SubWiki SubWiki] page to a parent, simply use a ''..'':\r\n{{{\r\n [..] or [[..]]\r\n}}}\r\n [..] or [[..]]\r\n\r\nTo link from a [trac:SubWiki SubWiki] page to a [=#sibling sibling] page, use a ''../'':\r\n{{{\r\n [../Sibling see next sibling] or [[../Sibling|see next sibling]]\r\n}}}\r\n [../Sibling see next sibling] or [[../Sibling|see next sibling]]\r\n\r\nBut in practice you often won''t need to add the `../` prefix to link to a sibling page.\r\nFor resolving the location of a wiki link, it''s the target page closest in the hierarchy\r\nto the page where the link is written which will be selected. So for example, within \r\na sub-hierarchy, a sibling page will be targeted in preference to a toplevel page.\r\nThis makes it easy to copy or move pages to a sub-hierarchy by [[WikiNewPage#renaming|renaming]] without having to adapt the links.\r\n\r\nIn order to link explicitly to a [=#toplevel toplevel] Wiki page,\r\nuse the `wiki:/` prefix.\r\nBe careful **not** to use the `/` prefix alone, as this corresponds to the\r\n[#Server-relativelinks] syntax and with such a link you will lack the `/wiki/` \r\npart in the resulting URL.\r\n\r\n''''(Changed in 0.11)'''' Note that in Trac 0.10, using e.g. `[../newticket]` may have worked for linking to the `/newticket` top-level URL, but since 0.11, such a link will stay in the wiki namespace and therefore link to a sibling page. \r\nSee [#Server-relativelinks] for the new syntax.\r\n\r\n=== Link anchors ===\r\n\r\nTo create a link to a specific anchor in a page, use ''#'':\r\n{{{\r\n [#Linkanchors Link anchors] or [[#Linkanchors|Link anchors]]\r\n}}}\r\n [#Linkanchors Link anchors] or [[#Linkanchors|Link anchors]]\r\n\r\nHint: when you move your mouse over the title of a section, a ''¶'' character will be displayed. This is a link to that specific section and you can use this to copy the `#...` part inside a relative link to an anchor.\r\n\r\nTo create a link to the first or last occurrence of a term on a page, use a ''''pseudo anchor'''' starting with ''#/'' or ''#?'':\r\n{{{\r\n [#/Milestone first occurrence of Milestone] or\r\n [#?Milestone last occurrence of Milestone]\r\n}}}\r\n [#/Milestone first occurrence of Milestone] or\r\n [#?Milestone last occurrence of Milestone]\r\nThis will also highlight all other matches on the linked page. By default only case sensitive matches are considered. To include case insensitive matches append ''/i'':\r\n{{{\r\n [#/Milestone/i first occurrence of Milestone or milestone] or\r\n [#?Milestone/i last occurrence of Milestone or milestone]\r\n}}}\r\n [#/Milestone/i first occurrence of Milestone or milestone] or\r\n [#?Milestone/i last occurrence of Milestone or milestone]\r\n\r\n''''(since Trac 1.0)''''\r\n\r\nSuch anchors can be very useful for linking to specific lines in a file in the source browser:\r\n{{{\r\n [trac:source:tags/trac-0.12/trac/wiki/api.py#L127 Line 127] or\r\n [trac:source:tags/trac-0.12/trac/ticket/roadmap.py#L47 Line 47]\r\n}}}\r\n [trac:source:tags/trac-0.12/trac/wiki/api.py#L127 Line 127] or\r\n [trac:source:tags/trac-0.12/trac/ticket/roadmap.py#L47 Line 47]\r\n(Hint: The line numbers displayed in the source browser are links to anchors on the respective lines.)\r\n\r\nSince such links become outdated when the file changes, it can be useful to link using a ''#/'' pseudo anchor instead:\r\n{{{\r\n [trac:source:trunk/trac/wiki/api.py#/IWikiSyntaxProvider IWikiSyntaxProvider] or\r\n [trac:source:trunk/trac/env.py#/ISystemInfoProvider ISystemInfoProvider]\r\n}}}\r\n [trac:source:trunk/trac/wiki/api.py#/IWikiSyntaxProvider IWikiSyntaxProvider] or\r\n [trac:source:trunk/trac/env.py#/ISystemInfoProvider ISystemInfoProvider]\r\n\r\n=== InterWiki links ===\r\n\r\nOther prefixes can be defined freely and made to point to resources in other Web applications. The definition of those prefixes as well as the URLs of the corresponding Web applications is defined in a special Wiki page, the InterMapTxt page. Note that while this could be used to create links to other Trac environments, there''s a more specialized way to register other Trac environments which offers greater flexibility.\r\n\r\n=== InterTrac links ===\r\n\r\nThis can be seen as a kind of InterWiki link specialized for targeting other Trac projects.\r\n\r\nAny type of Trac link can be written in one Trac environment and actually refer to resources in another Trac environment. All that is required is to prefix the Trac link with the name of the other Trac environment followed by a colon. The other Trac environment must be registered on the InterTrac page. \r\n\r\nA distinctive advantage of InterTrac links over InterWiki links is that the shorthand form of Trac links (e.g. `{}`, `r`, `#`) can also be used. For example if T was set as an alias for Trac, links to Trac tickets can be written #T234, links to Trac changesets can be written [trac 1508].\r\nSee InterTrac for the complete details. \r\n\r\n=== Server-relative links ===\r\n\r\nIt is often useful to be able to link to objects in your project that\r\nhave no built-in Trac linking mechanism, such as static resources, `newticket`,\r\na shared `/register` page on the server, etc.\r\n\r\nTo link to resources inside the project, use either an absolute path from the project root, \r\nor a relative link from the URL of the current page (''''Changed in 0.11''''):\r\n\r\n{{{\r\n[/newticket Create a new ticket] or [[//newticket|Create a new ticket]]\r\n[/ home] or [[/|home]]\r\n}}}\r\n\r\nDisplay: [/newticket Create a new ticket] or [[//newticket|Create a new ticket]]\r\n[/ home] or [[/|home]]\r\n\r\nTo link to another location on the server (possibly outside the project but on the same host), use the `//` prefix (''''Changed in 0.11''''):\r\n\r\n{{{\r\n[//register Register Here] or [[//register|Register Here]]\r\n}}}\r\n\r\nDisplay: [//register Register Here] or [[//register|Register Here]]\r\n\r\n=== Quoting space in TracLinks ===\r\n\r\nImmediately after a TracLinks prefix, targets containing space characters should\r\nbe enclosed in a pair of quotes or double quotes.\r\nExamples:\r\n * !wiki:"The whitespace convention"\r\n * !attachment:''the file.txt'' or\r\n * !attachment:"the file.txt" \r\n * !attachment:"the file.txt:ticket:123" \r\n\r\nNote that by using [trac:WikiCreole] style links, it''s quite natural to write links containing spaces:\r\n * ![[The whitespace convention]]\r\n * ![[attachment:the file.txt]]\r\n\r\n=== Escaping Links ===\r\n\r\nTo prevent parsing of a !TracLink, you can escape it by preceding it with a ''!'' (exclamation mark).\r\n{{{\r\n !NoLinkHere.\r\n ![42] is not a link either.\r\n}}}\r\n\r\nDisplay:\r\n !NoLinkHere.\r\n ![42] is not a link either.\r\n\r\n\r\n=== Parameterized Trac links ===\r\n\r\nMany Trac resources have more than one way to be rendered, depending on some extra parameters. For example, a Wiki page can accept a `version` or a `format` parameter, a report can make use of dynamic variables, etc.\r\n\r\nTrac links can support an arbitrary set of parameters, written in the same way as they would be for the corresponding URL. Some examples:\r\n - `wiki:WikiStart?format=txt`\r\n - `ticket:1?version=1`\r\n - `[/newticket?component=module1 create a ticket for module1]`\r\n - `[/newticket?summary=Add+short+description+here create a ticket with URL with spaces]`\r\n\r\n\r\n== TracLinks Reference ==\r\nThe following sections describe the individual link types in detail, as well as notes on advanced usage of links.\r\n\r\n=== attachment: links ===\r\n\r\nThe link syntax for attachments is as follows:\r\n * !attachment:the_file.txt creates a link to the attachment the_file.txt of the current object\r\n * !attachment:the_file.txt:wiki:MyPage creates a link to the attachment the_file.txt of the !MyPage wiki page\r\n * !attachment:the_file.txt:ticket:753 creates a link to the attachment the_file.txt of the ticket 753\r\n\r\nNote that the older way, putting the filename at the end, is still supported: !attachment:ticket:753:the_file.txt.\r\n\r\nIf you''d like to create a direct link to the content of the attached file instead of a link to the attachment page, simply use `raw-attachment:` instead of `attachment:`.\r\n\r\nThis can be useful for pointing directly to an HTML document, for example. Note that for this use case, you''d have to allow the web browser to render the content by setting `[attachment] render_unsafe_content = yes` (see TracIni#attachment-section). Caveat: only do that in environments for which you''re 100% confident you can trust the people who are able to attach files, as otherwise this would open up your site to [wikipedia:Cross-site_scripting cross-site scripting] attacks.\r\n\r\nSee also [#export:links].\r\n\r\n=== comment: links ===\r\n\r\nWhen you''re inside a given ticket, you can simply write e.g. !comment:3 to link to the third change comment.\r\nIt is possible to link to a comment of a specific ticket from anywhere using one of the following syntax:\r\n - `comment:3:ticket:123` \r\n - `ticket:123#comment:3` (note that you can''t write `#123#!comment:3`!)\r\nIt is also possible to link to the ticket''s description using one of the following syntax:\r\n - `comment:description` (within the ticket)\r\n - `comment:description:ticket:123`\r\n - `ticket:123#comment:description`\r\n\r\n=== htdocs: links ===\r\n\r\nUse `htdocs:path/to/file` to reference files in the `htdocs` directory of the Trac environment, the [TracEnvironment#DirectoryStructure web resource directory].\r\n\r\n=== query: links ===\r\n\r\nSee TracQuery#UsingTracLinks and [#ticket:links].\r\n\r\n=== search: links ===\r\n\r\nSee TracSearch#SearchLinks \r\n\r\n=== ticket: links ===\r\n ''''alias:'''' `bug:`\r\n\r\nBesides the obvious `ticket:id` form, it is also possible to specify a list of tickets or even a range of tickets instead of the `id`. This generates a link to a custom query view containing this fixed set of tickets.\r\n\r\nExample: \r\n - `ticket:5000-6000`\r\n - `ticket:1,150`\r\n\r\n''''(since Trac 0.11)''''\r\n\r\n=== timeline: links ===\r\n\r\nLinks to the timeline can be created by specifying a date in the ISO:8601 format. The date can be optionally followed by a time specification. The time is interpreted as being UTC time, but alternatively you can specify your local time, followed by your timezone if you don''t want to compute the UTC time.\r\n\r\nExamples:\r\n - `timeline:2008-01-29`\r\n - `timeline:2008-01-29T15:48`\r\n - `timeline:2008-01-29T15:48Z`\r\n - `timeline:2008-01-29T16:48+01`\r\n\r\n''''(since Trac 0.11)''''\r\n\r\n=== wiki: links ===\r\n\r\nSee WikiPageNames and [#QuotingspaceinTracLinks quoting space in TracLinks] above. It is possible to create a link to a specific page revision using the syntax WikiStart@1.\r\n\r\n=== Version Control related links ===\r\n\r\nIt should be noted that multiple repository support works by creating a kind of virtual namespace for versioned files in which the toplevel folders correspond to the repository names. Therefore, in presence of multiple repositories, a ''''/path'''' specification in the syntax of links detailed below should start with the name of the repository. If omitted, the default repository is used. In case a toplevel folder of the default repository has the same name as a repository, the latter "wins". One can always access such folder by fully qualifying it (the default repository can be an alias of a named repository, or conversely, it is always possible to create an alias for the default repository, ask your Trac administrator).\r\n\r\nFor example, `source:/trunk/COPYING` targets the path `/trunk/COPYING` in the default repository, whereas `source:/projectA/trunk/COPYING` targets the path `/trunk/COPYING` in the repository named `projectA`. This can be the same file if `''projectA''` is an alias to the default repository or if `''''` (the default repository) is an alias to `''projectA''`.\r\n\r\n==== source: links ====\r\n ''''aliases:'''' `browser:`, `repos:`\r\n\r\nThe default behavior for a source:/some/path link is to open the browser in that directory directory \r\nif the path points to a directory or to show the latest content of the file.\r\n\r\nIt''s also possible to link directly to a specific revision of a file like this:\r\n - `source:/some/file@123` - link to the file''s revision 123\r\n - `source:/some/file@head` - link explicitly to the latest revision of the file\r\n\r\nIf the revision is specified, one can even link to a specific line number:\r\n - `source:/some/file@123#L10`\r\n - `source:/tag/0.10@head#L10`\r\n\r\nFinally, one can also highlight an arbitrary set of lines:\r\n - `source:/some/file@123:10-20,100,103#L99` - highlight lines 10 to 20, and lines 100 and 103.\r\n ''''(since 0.11)''''\r\n\r\nNote that in presence of multiple repositories, the name of the repository is simply integrated in the path you specify for `source:` (e.g. `source:reponame/trunk/README`). ''''(since 0.12)''''\r\n\r\n==== export: links ====\r\n\r\nTo force the download of a file in the repository, as opposed to displaying it in the browser, use the `export` link. Several forms are available:\r\n * `export:/some/file` - get the HEAD revision of the specified file\r\n * `export:123:/some/file` - get revision 123 of the specified file\r\n * `export:/some/file@123` - get revision 123 of the specified file\r\n\r\nThis can be very useful for displaying XML or HTML documentation with correct stylesheets and images, in case that has been checked in into the repository. Note that for this use case, you''d have to allow the web browser to render the content by setting `[browser] render_unsafe_content = yes` (see TracIni#browser-section), otherwise Trac will force the files to be downloaded as attachments for security concerns. \r\n\r\nIf the path is to a directory in the repository instead of a specific file, the source browser will be used to display the directory (identical to the result of `source:/some/dir`).\r\n\r\n==== log: links ====\r\n\r\nThe `log:` links are used to display revision ranges. In its simplest form, it can link to the latest revisions of the specified path, but it can also support displaying an arbitrary set of revisions.\r\n - `log:/` - the latest revisions starting at the root of the repository\r\n - `log:/trunk/tools` - the latest revisions in `trunk/tools`\r\n - `log:/trunk/tools@10000` - the revisions in `trunk/tools` starting from revision 10000\r\n - `log:@20788,20791:20795` - list revision 20788 and the revisions from 20791 to 20795 \r\n - `log:/trunk/tools@20788,20791:20795` - list revision 20788 and the revisions from 20791 to 20795 which affect the given path\r\n\r\nThere are short forms for revision ranges as well:\r\n - `[20788,20791:20795]`\r\n - `[20788,20791:20795/trunk/tools]`\r\n - `r20791:20795` (but not `r20788,20791:20795` nor `r20791:20795/trunk`)\r\n\r\nFinally, note that in all of the above, a revision range can be written either as `x:y` or `x-y`.\r\n\r\nIn the presence of multiple repositories, the name of the repository should be specified as the first part of the path, e.g. `log:repos/branches` or `[20-40/repos]`.\r\n\r\n----\r\nSee also: WikiFormatting, TracWiki, WikiPageNames, InterTrac, InterWiki\r\n \r\n', NULL, NULL),
('TracRoadmap', 1, 1362994208300458, 'trac', '127.0.0.1', '= The Trac Roadmap =\r\n[[TracGuideToc]]\r\n\r\nThe roadmap provides a view on the [wiki:TracTickets ticket system] that helps planning and managing the future development of a project.\r\n\r\n== The Roadmap View ==\r\n\r\nBasically, the roadmap is just a list of future milestones. You can add a description to milestones (using WikiFormatting) describing main objectives, for example. In addition, tickets targeted for a milestone are aggregated, and the ratio between active and resolved tickets is displayed as a milestone progress bar. It is possible to further [trac:TracRoadmapCustomGroups customise the ticket grouping] and have multiple ticket statuses shown on the progress bar.\r\n\r\nThe roadmap can be filtered to show or hide ''''completed milestones'''' and ''''milestones with no due date''''. In the case that both ''''show completed milestones'''' and ''''hide milestones with no due date'''' are selected, ''''completed'''' milestones with no due date __will__ be shown.\r\n\r\n== The Milestone View ==\r\n\r\nYou can add a description for each milestone (using WikiFormatting) describing main objectives, for example. In addition, tickets targeted for a milestone are aggregated, and the ratio between active and resolved tickets is displayed as a milestone progress bar. It is possible to further [trac:TracRoadmapCustomGroups customise the ticket grouping] and have multiple ticket statuses shown on the progress bar.\r\n\r\nIt is possible to drill down into this simple statistic by viewing the individual milestone pages. By default, the active/resolved ratio will be grouped and displayed by component. You can also regroup the status by other criteria, such as ticket owner or severity. Ticket numbers are linked to [wiki:TracQuery custom queries] listing corresponding tickets.\r\n\r\n== Roadmap Administration ==\r\n\r\nWith appropriate permissions it is possible to add, modify and remove milestones using either the web interface (roadmap and milestone pages), web administration interface or by using `trac-admin`. \r\n\r\n''''''Note:'''''' Milestone descriptions can not currently be edited using ''trac-admin''.\r\n\r\n== iCalendar Support ==\r\n\r\nThe Roadmap supports the [http://www.ietf.org/rfc/rfc2445.txt iCalendar] format to keep track of planned milestones and related tickets from your favorite calendar software. Many calendar applications support the iCalendar specification including\r\n * [http://www.apple.com/ical/ Apple iCal] for Mac OS X\r\n * the cross-platform [http://www.mozilla.org/projects/calendar/ Mozilla Calendar]\r\n * [http://chandlerproject.org Chandler]\r\n * [http://kontact.kde.org/korganizer/ Korganizer] (the calendar application of the [http://www.kde.org/ KDE] project)\r\n * [http://www.novell.com/de-de/products/desktop/features/evolution.html Evolution] also support iCalendar\r\n * [http://office.microsoft.com/en-us/outlook/ Microsoft Outlook] can also read iCalendar files (it appears as a new static calendar in Outlook)\r\n * [https://www.google.com/calendar/ Google Calendar] \r\n\r\nTo subscribe to the roadmap, copy the iCalendar link from the roadmap (found at the bottom of the page) and choose the "Subscribe to remote calendar" action (or similar) of your calendar application, and insert the URL just copied.\r\n\r\n''''''Note:'''''' For tickets to be included in the calendar as tasks, you need to be logged in when copying the link. You will only see tickets assigned to yourself, and associated with a milestone.\r\n\r\n''''''Note:'''''' To include the milestones in Google Calendar you might need to rewrite the URL.\r\n{{{\r\nRewriteEngine on\r\nRewriteRule ([^/.]+)/roadmap/([^/.]+)/ics /$1/roadmap?user=$2&format=ics\r\n}}}\r\n\r\nMore information about iCalendar can be found at [http://en.wikipedia.org/wiki/ICalendar Wikipedia].\r\n----\r\nSee also: TracTickets, TracReports, TracQuery, [trac:TracRoadmapCustomGroups]\r\n', NULL, NULL),
('TracAdmin', 1, 1362994208302060, 'trac', '127.0.0.1', '= TracAdmin =\r\n[[TracGuideToc]]\r\n\r\nTrac is distributed with a powerful command-line configuration tool. This tool can be used to configure and customize your Trac-installation to better fit your needs.\r\n\r\nSome of those operations can also be performed via the ''''Admin'''' web interface, an updated version of the [trac:WebAdmin] plugin now integrated within Trac (since version 0.11).\r\n\r\n== Usage ==\r\n\r\nFor nearly every `trac-admin` command, you''ll need to specify the path to the TracEnvironment that you want to administer as the first argument, for example:\r\n{{{\r\ntrac-admin /path/to/projenv wiki list\r\n}}}\r\n\r\nThe only exception is for the `help` command, but even in this case if you omit the environment, you''ll only get a very succinct list of commands (`help` and `initenv`), the same list you''d get when invoking `trac-admin` alone.\r\nAlso, `trac-admin --version` will tell you about the Trac version (e.g. 0.12) corresponding to the program.\r\n\r\nIf you want to get a comprehensive list of the available commands and sub-commands, you need to specify an existing environment:\r\n{{{\r\ntrac-admin /path/to/projenv help\r\n}}}\r\n\r\nSome commands have a more detailed help, which you can access by specifying the command''s name as a subcommand for `help`:\r\n\r\n{{{\r\ntrac-admin /path/to/projenv help <command>\r\n}}}\r\n\r\n=== `trac-admin <targetdir> initenv` === #initenv\r\n\r\nThis subcommand is very important as it''s the one used to create a TracEnvironment in the specified `<targetdir>`. That directory must not exist prior to the call.\r\n\r\n[[TracAdminHelp(initenv)]]\r\n\r\nIt supports an extra `--inherit` option, which can be used to specify a global configuration file which can be used share settings between several environments. You can also inherit from a shared configuration afterwards, by setting the `[inherit] file` option in the `conf/trac.ini` file in your newly created environment, but the advantage of specifying the inherited configuration file at environment creation time is that only the options ''''not'''' already specified in the global configuration file will be written in the created environment''s `conf/trac.ini` file.\r\nSee TracIni#GlobalConfiguration.\r\n\r\nNote that in version 0.11 of Trac, `initenv` lost an extra last argument `<templatepath>`, which was used in previous versions to point to the `templates` folder. If you are using the one-liner ''`trac-admin /path/to/trac/ initenv <projectname> <db> <repostype> <repospath>`'' in the above and getting an error that reads ''''''''`Wrong number of arguments to initenv: 4`'''''''', then this is because you''re using a `trac-admin` script from an ''''''older'''''' version of Trac.\r\n\r\n== Interactive Mode ==\r\n\r\nWhen passing the environment path as the only argument, `trac-admin` starts in interactive mode.\r\nCommands can then be executed on the selected environment using the prompt, which offers tab-completion\r\n(on non-Windows environments, and when the Python `readline` module is available) and automatic repetition of the last command issued.\r\n\r\nOnce you''re in interactive mode, you can also get help on specific commands or subsets of commands:\r\n\r\nFor example, to get an explanation of the `resync` command, run:\r\n{{{\r\n> help resync\r\n}}}\r\n\r\nTo get help on all the Wiki-related commands, run:\r\n{{{\r\n> help wiki\r\n}}}\r\n\r\n== Full Command Reference ==\r\n\r\nYou''ll find below the detailed help for all the commands available by default in `trac-admin`. Note that this may not match the list given by `trac-admin <yourenv> help`, as the commands pertaining to components disabled in that environment won''t be available and conversely some plugins activated in the environment can add their own commands.\r\n\r\n[[TracAdminHelp()]]\r\n\r\n----\r\nSee also: TracGuide, TracBackup, TracPermissions, TracEnvironment, TracIni, [trac:TracMigrate TracMigrate]\r\n', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracUpgrade', 1, 1362994208303649, 'trac', '127.0.0.1', '= Upgrade Instructions =\r\n[[TracGuideToc]]\r\n[[PageOutline(2-4,,inline,unnumbered)]]\r\n\r\n== Instructions ==\r\n\r\nTypically, there are seven steps involved in upgrading to a newer version of Trac:\r\n\r\n=== 1. Bring your server off-line\r\n\r\nIt is not a good idea to update a running server: the server processes may have parts of the current packages cached in memory, and updating the code will likely trigger [#ZipImportError internal errors]. \r\n\r\n=== 2. Update the Trac Code === #UpdatetheTracCode\r\n\r\nGet the new version as described in TracInstall, or your operating system specific procedure.\r\n\r\nIf you already have a 0.11 version of Trac installed via `easy_install`, it might be easiest to also use `easy_install` to upgrade your Trac installation:\r\n\r\n{{{\r\n# easy_install --upgrade Trac==0.12\r\n}}}\r\n\r\nIf you do a manual (not operating system-specific) upgrade, you should also stop any running Trac servers before the installation. Doing "hot" upgrades is not advised, especially on Windows ([trac:#7265]).\r\n\r\nYou may also want to remove the pre-existing Trac code by deleting the `trac` directory from the Python `lib/site-packages` directory, or remove Trac `.egg` files from former versions.\r\nThe location of the site-packages directory depends on the operating system and the location in which Python was installed. However, the following locations are typical:\r\n * on Linux: `/usr/lib/python2.X/site-packages`\r\n * on Windows: `C:\\Python2.X\\lib\\site-packages`\r\n * on MacOSX: `/Library/Python/2.X/site-packages`\r\n\r\nYou may also want to remove the Trac `cgi-bin`, `htdocs`, `templates` and `wiki-default` directories that are commonly found in a directory called `share/trac`. (The exact location depends on your platform.)\r\n\r\nThis cleanup is not mandatory, but makes it easier to troubleshoot issues later on, as you won''t waste your time looking at code or templates from a previous release that are not being used anymore... As usual, make a backup before actually deleting things.\r\n\r\n=== 3. Upgrade the Trac Environment === #UpgradetheTracEnvironment\r\n\r\nEnvironment upgrades are not necessary for minor version releases unless otherwise noted. \r\n\r\nAfter restarting, Trac should show the instances which need a manual upgrade via the automated upgrade scripts to ease the pain. These scripts are run via [TracAdmin trac-admin]:\r\n{{{\r\ntrac-admin /path/to/projenv upgrade\r\n}}}\r\n\r\nThis command will do nothing if the environment is already up-to-date.\r\n\r\nNote that a backup of your database will be performed automatically prior to the upgrade. \r\nThis feature is relatively new for the PostgreSQL or MySQL database backends, so if it fails, you will have to backup the database manually. Then, to perform the actual upgrade, run:\r\n{{{\r\ntrac-admin /path/to/projenv upgrade --no-backup\r\n}}}\r\n\r\n=== 4. Update the Trac Documentation === #UpdatetheTracDocumentation\r\n\r\nEvery [TracEnvironment Trac environment] includes a copy of the Trac documentation for the installed version. As you probably want to keep the included documentation in sync with the installed version of Trac, [TracAdmin trac-admin] provides a command to upgrade the documentation:\r\n{{{\r\ntrac-admin /path/to/projenv wiki upgrade\r\n}}}\r\n\r\nNote that this procedure will leave your `WikiStart` page intact.\r\n\r\n\r\n=== 5. Refresh static resources ===\r\n\r\nIf you have set up a web server to give out static resources directly (accessed using the `/chrome/` URL) then you will need to refresh them using the same command:\r\n{{{\r\ntrac-admin /path/to/env deploy /deploy/path\r\n}}}\r\nthis will extract static resources and CGI scripts (`trac.wsgi`, etc) from new Trac version and its plugins into `/deploy/path`.\r\n\r\nSome web browsers (IE, Opera) cache CSS and Javascript files aggressively, so you may need to instruct your users to manually erase the contents of their browser''s cache, a forced refreshed (`<F5>`) should be enough.\r\n{{{#!comment\r\nRemove above note once #9936 is fixed.\r\n}}}\r\n\r\n=== 6. Steps specific to a given Trac version ===\r\n==== Upgrading from Trac 0.12 to Trac 1.0 ==== #to1.0\r\n\r\nThe Trac components for Subversion support are no longer enabled by default. To enable the svn support, you need to make sure the `tracopt.versioncontrol.svn` components are enabled, for example by setting the following in the TracIni:\r\n{{{\r\n[components]\r\ntracopt.versioncontrol.svn.* = enabled\r\n}}}\r\nThe upgrade procedure should take care of this and change the TracIni appropriately, unless you already had the svn components explicitly disabled.\r\n\r\nAnother step in the automatic upgrade will change the way the attachments are stored. If you''re a bit paranoid, you might want to take a backup of the `attachments` directory before upgrading (but if you are, you already did a full copy of the environment, no?). In case the `attachments` directory contains some files which are //not// attachments, the last step of the migration to the new layout will fail: the deletion of the now unused `attachments` directory can''t be done if there are still files and folders in it. You may ignore this error, but better go have a look to these files, move them elsewhere and remove the `attachments` directory manually to cleanup the environment. The attachments themselves are now all located in your environment below the `files/attachments` directory.\r\n\r\n\r\n==== Upgrading from Trac 0.11 to Trac 0.12 ====\r\n\r\n===== Python 2.3 no longer supported =====\r\nThe minimum supported version of python is now 2.4\r\n\r\n===== SQLite v3.x required =====\r\nSQLite v2.x is no longer supported. If you still use a Trac database of this format, you''ll need to convert it to SQLite v3.x first. See [trac:PySqlite#UpgradingSQLitefrom2.xto3.x] for details.\r\n\r\n===== PySqlite 2 required =====\r\nPySqlite 1.1.x is no longer supported. Please install 2.5.5 or later if possible (see [#Tracdatabaseupgrade Trac database upgrade] below).\r\n\r\n===== Multiple Repository Support =====\r\nThe latest version includes support for multiple repositories. If you plan to add more repositories to your Trac instance, please refer to TracRepositoryAdmin#Migration.\r\n\r\nThis may be of interest to users with only one repository, since there''s now a way to avoid the potentially costly resync check at every request.\r\n\r\n===== Resynchronize the Trac Environment Against the Source Code Repository =====\r\n\r\nEach [TracEnvironment Trac environment] must be resynchronized against the source code repository in order to avoid errors such as "[http://trac.edgewall.org/ticket/6120 No changeset ??? in the repository]" while browsing the source through the Trac interface:\r\n\r\n{{{\r\ntrac-admin /path/to/projenv repository resync ''*''\r\n}}}\r\n\r\n===== Improved repository synchronization =====\r\nIn addition to supporting multiple repositories, there is now a more efficient method for synchronizing Trac and your repositories.\r\n\r\nWhile you can keep the same synchronization as in 0.11 adding the post-commit hook as outlined in TracRepositoryAdmin#Synchronization and TracRepositoryAdmin#ExplicitSync will allow more efficient synchronization and is more or less required for multiple repositories.\r\n\r\nNote that if you were using the `trac-post-commit-hook`, ''''you''re strongly advised to upgrade it'''' to the new hook documented in the above references and [TracWorkflow#Howtocombinethetracopt.ticket.commit_updaterwiththetestingworkflow here], as the old hook will not work with anything else than the default repository and even for this case, it won''t trigger the appropriate notifications.\r\n\r\n===== Authz permission checking =====\r\nThe authz permission checking has been migrated to a fine-grained permission policy. If you use authz permissions (aka `[trac] authz_file` and `authz_module_name`), you must add `AuthzSourcePolicy` in front of your permission policies in `[trac] permission_policies`. You must also remove `BROWSER_VIEW`, `CHANGESET_VIEW`, `FILE_VIEW` and `LOG_VIEW` from your global permissions (with `trac-admin $ENV permission remove` or the "Permissions" admin panel).\r\n\r\n===== Microsecond timestamps =====\r\nAll timestamps in database tables (except the `session` table) have been changed from "seconds since epoch" to "microseconds since epoch" values. This change should be transparent to most users, except for custom reports. If any of your reports use date/time columns in calculations (e.g. to pass them to `datetime()`), you must divide the values retrieved from the database by 1''000''000. Similarly, if a report provides a calculated value to be displayed as a date/time (i.e. with a column named "time", "datetime", "changetime", "date", "created" or "modified"), you must provide a microsecond timestamp, that is, multiply your previous calculation with 1''000''000.\r\n\r\n==== Upgrading from Trac 0.10 to Trac 0.11 ====\r\n===== Site Templates and Styles =====\r\nThe templating engine has changed in 0.11 to Genshi, please look at TracInterfaceCustomization for more information.\r\n\r\nIf you are using custom CSS styles or modified templates in the `templates` directory of the TracEnvironment, you will need to convert them to the Genshi way of doing things. To continue to use your style sheet, follow the instructions at TracInterfaceCustomization#SiteAppearance.\r\n\r\n===== Trac Macros, Plugins =====\r\nThe Trac macros will need to be adapted, as the old-style wiki-macros are not supported anymore (due to the drop of [trac:ClearSilver] and the HDF); they need to be converted to the new-style macros, see WikiMacros. When they are converted to the new style, they need to be placed into the plugins directory instead and not wiki-macros, which is no longer scanned for macros or plugins.\r\n\r\n===== For FCGI/WSGI/CGI users =====\r\nFor those who run Trac under the CGI environment, run this command in order to obtain the trac.*gi file:\r\n{{{\r\ntrac-admin /path/to/env deploy /deploy/directory/path\r\n}}}\r\n\r\nThis will create a deploy directory with the following two subdirectories: `cgi-bin` and `htdocs`. Then update your Apache configuration file `httpd.conf` with this new `trac.cgi` location and `htdocs` location.\r\n\r\n===== Web Admin plugin integrated =====\r\nIf you had the webadmin plugin installed, you can uninstall it as it is part of the Trac code base since 0.11.\r\n\r\n=== 7. Restart the Web Server === #RestarttheWebServer\r\n\r\nIf you are not running [wiki:TracCgi CGI], reload the new Trac code by restarting your web server.\r\n\r\n== Known Issues ==\r\n\r\nThings you should pay attention to, while upgrading.\r\n\r\n=== Customized Templates\r\n\r\nTrac supports customization of its Genshi templates by placing copies of the templates in the `<env>/templates` folder of your [TracEnvironment environment] or in a common location specified in the [[TracIni#GlobalConfiguration| [inherit] templates_dir]] configuration setting. If you choose to do so, be wary that you will need to repeat your changes manually on a copy of the new templates when you upgrade to a new release of Trac (even a minor one), as the templates will likely evolve. So keep a diff around ;-)\r\n\r\nThe preferred way to perform TracInterfaceCustomization is to write a custom plugin doing an appropriate `ITemplateStreamFilter` transformation, as this is more robust in case of changes: we usually won''t modify element `id`s or change CSS `class`es, and if we have to do so, this will be documented in the TracDev/ApiChanges pages.\r\n\r\n=== !ZipImportError ===\r\n\r\nDue to internal caching of zipped packages, whenever the content of the packages change on disk, the in-memory zip index will no longer match and you''ll get irrecoverable !ZipImportError errors. Better anticipate and bring your server down for maintenance before upgrading.\r\nSee [trac:#7014] for details.\r\n\r\n=== Wiki Upgrade ===\r\n`trac-admin` will not delete or remove default wiki pages that were present in a previous version but are no longer in the new version.\r\n\r\n=== Trac database upgrade ===\r\n\r\nA known issue in some versions of PySqlite (2.5.2-2.5.4) prevents the trac-admin upgrade script from successfully upgrading the database format. It is advised to use either a newer or older version of the sqlite python bindings to avoid this error. For more details see ticket [trac:#9434].\r\n\r\n=== parent dir ===\r\nIf you use a trac parent env configuration and one of the plugins in one child does not work, none of the children work.\r\n\r\n== Related topics\r\n\r\n=== Upgrading Python ===\r\n\r\nUpgrading Python to a newer version will require reinstallation of Python packages: Trac of course; also [http://pypi.python.org/pypi/setuptools easy_install], if you''ve been using that. Assuming you''re using Subversion, you''ll also need to upgrade the Python bindings for svn.\r\n\r\n==== Windows and Python 2.6 ====\r\n\r\nIf you''ve been using !CollabNet''s Subversion package, you may need to uninstall that in favor of [http://alagazam.net/ Alagazam], which has the Python bindings readily available (see TracSubversion). The good news is, that works with no tweaking.\r\n\r\n=== Changing Database Backend ===\r\n==== SQLite to PostgreSQL ====\r\n\r\nThe [http://trac-hacks.org/wiki/SqliteToPgScript sqlite2pg] script on [http://trac-hacks.org trac-hacks.org] has been written to assist in migrating a SQLite database to a PostgreSQL database\r\n\r\n=== Upgrading from older versions of Trac === #OlderVersions\r\n\r\nFor upgrades from versions older than Trac 0.10, refer first to [trac:wiki:0.10/TracUpgrade#SpecificVersions].\r\n\r\n-----\r\nSee also: TracGuide, TracInstall\r\n', NULL, NULL),
('TracLogging', 1, 1362994208305818, 'trac', '127.0.0.1', '= Trac Logging =\r\n[[TracGuideToc]]\r\n\r\nTrac supports logging of system messages using the standard [http://docs.python.org/library/logging.html logging module] that comes with Python.\r\n\r\nLogging is configured in the `[logging]` section in [wiki:TracIni#logging-section trac.ini].\r\n\r\n== Supported Logging Methods ==\r\n\r\nThe log method is set using the `log_type` option in [wiki:TracIni#logging-section trac.ini], which takes any of the following values:\r\n\r\n ''''''none'''':: Suppress all log messages.\r\n ''''''file'''''':: Log messages to a file, specified with the `log_file` option in [wiki:TracIni#logging-section trac.ini]. Relative paths in `log_file` are resolved relative to the `log` directory of the environment.\r\n ''''''stderr'''''':: Output all log entries to console ([wiki:TracStandalone tracd] only).\r\n ''''''syslog'''''':: (UNIX) Send all log messages to the local syslogd via named pipe `/dev/log`. By default, syslog will write them to the file /var/log/messages.\r\n ''''''eventlog'''''':: (Windows) Use the system''s NT Event Log for Trac logging.\r\n\r\n== Log Levels ==\r\n\r\nThe verbosity level of logged messages can be set using the `log_level` option in [wiki:TracIni#logging-section trac.ini]. The log level defines the minimum level of urgency required for a message to be logged, and those levels are:\r\n\r\n ''''''CRITICAL'''''':: Log only the most critical (typically fatal) errors.\r\n ''''''ERROR'''''':: Log failures, bugs and errors. \r\n ''''''WARN'''''':: Log warnings, non-interrupting events.\r\n ''''''INFO'''''':: Diagnostic information, log information about all processing.\r\n ''''''DEBUG'''''':: Trace messages, profiling, etc.\r\n\r\nNote that starting with Trac 0.11.5 you can in addition enable logging of SQL statements, at debug level. This is turned off by default, as it''s very verbose (set `[trac] debug_sql = yes` in TracIni to activate).\r\n\r\n== Log Format ==\r\n\r\nStarting with Trac 0.10.4 (see [trac:#2844 #2844]), it is possible to set the output format for log entries. This can be done through the `log_format` option in [wiki:TracIni#logging-section trac.ini]. The format is a string which can contain any of the [http://docs.python.org/library/logging.html#logrecord-attributes Python logging Formatter variables]. Additonally, the following Trac-specific variables can be used:\r\n ''''''$(basename)s'''''':: The last path component of the current environment.\r\n ''''''$(path)s'''''':: The absolute path for the current environment.\r\n ''''''$(project)s'''''':: The originating project''s name.\r\n\r\nNote that variables are identified using a dollar sign (`$(...)s`) instead of percent sign (`%(...)s`).\r\n\r\nThe default format is:\r\n{{{\r\nlog_format = Trac[$(module)s] $(levelname)s: $(message)s\r\n}}}\r\n\r\nIn a multi-project environment where all logs are sent to the same place (e.g. `syslog`), it makes sense to add the project name. In this example we use `basename` since that can generally be used to identify a project:\r\n{{{\r\nlog_format = Trac[$(basename)s:$(module)s] $(levelname)s: $(message)s\r\n}}}\r\n\r\n----\r\nSee also: TracIni, TracGuide, TracEnvironment', NULL, NULL),
('TracTickets', 1, 1362994208307778, 'trac', '127.0.0.1', '= The Trac Ticket System =\r\n[[TracGuideToc]]\r\n\r\nThe Trac ticket database provides simple but effective tracking of issues and bugs within a project.\r\n\r\nAs the central project management element of Trac, tickets can be used for ''''''project tasks'''''', ''''''feature requests'''''', ''''''bug reports'''''', ''''''software support issues'''''' among others. \r\n\r\nAs with the TracWiki, this subsystem has been designed with the goal of making user contribution and participation as simple as possible. It should be as easy as possible to report bugs, ask questions, suggest improvements and discuss resolutions.\r\n\r\nAn issue is assigned to a person who must resolve it or reassign the ticket to someone else.\r\nAll tickets can be edited, annotated, assigned, prioritized and discussed at any time.\r\n\r\n[=#edit-permissions]\r\nHowever, some Trac installations may put restrictions in place about who can change what. For example, the default installation doesn''t permit to non-authenticated users ("anonymous" users) to change anything, even to comment on an issue, for obvious spam prevention reasons. Check the local contributing policy, which you can usually find on the front page WikiStart, or contact your local Trac administrator.\r\n\r\n== Ticket Fields ==\r\n\r\nA ticket contains the following information attributes:\r\n \r\n * ''''''Reporter'''''' — The author of the ticket.\r\n * ''''''Type'''''' — The nature of the ticket (for example, defect or enhancement request). See TicketTypes for more details.\r\n * ''''''Component'''''' — The project module or subsystem this ticket concerns.\r\n * ''''''Version'''''' — Version of the project that this ticket pertains to.\r\n * ''''''Keywords'''''' — Keywords that a ticket is marked with. Useful for searching and report generation.\r\n * ''''''Priority'''''' — The importance of this issue, ranging from ''''trivial'''' to ''''blocker''''. A pull-down if different priorities where defined.\r\n * ''''''Milestone'''''' — When this issue should be resolved at the latest. A pull-down menu containing a list of milestones.\r\n * ''''''Assigned to/Owner'''''' — Principal person responsible for handling the issue.\r\n * ''''''Cc'''''' — A comma-separated list of other users or E-Mail addresses to notify. ''''Note that this does not imply responsiblity or any other policy.''''\r\n * ''''''Resolution'''''' — Reason for why a ticket was closed. One of {{{fixed}}}, {{{invalid}}}, {{{wontfix}}}, {{{duplicate}}}, {{{worksforme}}}.\r\n * ''''''Status'''''' — What is the current status? One of {{{new}}}, {{{assigned}}}, {{{closed}}}, {{{reopened}}}.\r\n * ''''''Summary'''''' — A brief description summarizing the problem or issue. Simple text without WikiFormatting.\r\n * ''''''Description'''''' — The body of the ticket. A good description should be specific, descriptive and to the point. Accepts WikiFormatting.\r\n\r\n''''''Notes:'''''' \r\n - Versions of Trac prior to 0.9 did not have the ''''type'''' field, but instead provided a ''''severity'''' field and different default values for the ''''priority'''' field. This change was done to simplify the ticket model by removing the somewhat blurry distinction between ''''priority'''' and ''''severity''''. However, the old model is still available if you prefer it: just add/modify the default values of the ''''priority'''' and ''''severity'''', and optionally hide the ''''type'''' field by removing all the possible values through [wiki:TracAdmin trac-admin].\r\n\r\n - the [trac:TicketTypes type], [trac:TicketComponent component], version, priority and severity fields can be managed with [wiki:TracAdmin trac-admin] or with the [trac:WebAdmin WebAdmin] plugin.\r\n\r\n - Description of the builtin ''''priority'''' values is available at [trac:TicketTypes#Whyistheseverityfieldgone TicketTypes]\r\n\r\n== Changing and Commenting Tickets ==\r\n\r\nWith appropriate permissions, as already mentioned [#edit-permissions above], a ticket entered into Trac can at any time be modified by ''''''annotating''''''.\r\n\r\nThen, annotations like changes and comments to the ticket are logged as a part of the ticket itself. When viewing a ticket, the history of changes will appear below the main ticket area.\r\n\r\nComment editing (available since 0.12) is meant to be used to make small corrections to comments, like fixing formatting, forgotten WikiFormatting or spelling errors, not major edits. For longer edits, you should be adding a new comment instead. Editing a comment will not produce a new entry on [/timeline] while entering a new comment or other changes will do.\r\n\r\nAll edits (field changes, new comments, comment edits) update the "last changed" time of the ticket.\r\n\r\n\r\n''''''Notes:'''''' \r\n - An important feature is being able to use TracLinks and WikiFormatting in ticket descriptions and comments. Use TracLinks to refer to other issues, changesets or files to make your ticket more specific and easier to understand.\r\n\r\n - See TracNotification for how to configure email notifications of ticket changes.\r\n\r\n - See TracWorkflow for information about the state transitions (ticket lifecycle), and how this workflow can be customized.\r\n\r\n== Default Values for Drop-Down Fields ==\r\n\r\nThe option selected by default for the various drop-down fields can be set in [wiki:TracIni trac.ini], in the `[ticket]` section:\r\n\r\n * `default_component`: Name of the component selected by default\r\n * `default_milestone`: Name of the default milestone\r\n * `default_priority`: Default priority value\r\n * `default_severity`: Default severity value\r\n * `default_type`: Default ticket type\r\n * `default_version`: Name of the default version\r\n * `default_owner`: Name of the default owner. If set to the text "< default >" (the default value), the component owner is used.\r\n\r\nIf any of these options are omitted, the default value will either be the first in the list, or an empty value, depending on whether the field in question is required to be set. Some of these can be chosen through the [trac:WebAdmin WebAdmin] plugin in the "Ticket System" section (others in the [[wiki:TracIni#ticket-section|"[ticket]"]] section in `trac.ini`).\r\n\r\n\r\n== Hiding Fields and Adding Custom Fields ==\r\n\r\nMany of the default ticket fields can be hidden from the ticket web interface simply by removing all the possible values through [wiki:TracAdmin trac-admin]. This of course only applies to drop-down fields, such as ''''type'''', ''''priority'''', ''''severity'''', ''''component'''', ''''version'''' and ''''milestone''''.\r\n\r\nTrac also lets you add your own custom ticket fields. See TracTicketsCustomFields for more information.\r\n\r\n\r\n== Assign-to as Drop-Down List ==\r\n\r\nIf the list of possible ticket owners is finite, you can change the ''''assign-to'''' ticket field from a text input to a drop-down list. This is done by setting the `restrict_owner` option of the `[ticket]` section in [wiki:TracIni trac.ini] to “true”. In that case, Trac will use the list of all users who have accessed the project to populate the drop-down field.\r\n\r\nTo appear in the dropdown list, a user needs be registered with the project, ''''i.e.'''' a user session should exist in the database. Such an entry is automatically created in the database the first time the user submits a change in the project, for example when editing the user''s details in the ''''Settings'''' page, or simply by authenticating if the user has a login. Also, the user must have `TICKET_MODIFY` [TracPermissions permissions].\r\n\r\n''''''Notes:'''''' \r\n - See [http://pacopablo.com/wiki/pacopablo/blog/set-assign-to-drop-down Populating Assign To Drop Down] on how to add user entries at database level\r\n\r\n - If you need serious flexibility and aren''t afraid of a little plugin coding of your own, see [http://trac-hacks.org/wiki/FlexibleAssignToPlugin FlexibleAssignTo] (disclosure: I''m the author)\r\n\r\n - Activating this option may cause some performance degradation, read more about this in the [trac:TracPerformance#Configuration Trac performance] page.\r\n\r\n== Preset Values for New Tickets ==\r\n\r\nTo create a link to the new-ticket form filled with preset values, you need to call the `/newticket?` URL with `variable=value` separated by `&`. \r\n\r\nPossible variables are :\r\n\r\n * ''''''type'''''' — The type droplist\r\n * ''''''reporter'''''' — Name or email of the reporter\r\n * ''''''summary'''''' — Summary line for the ticket\r\n * ''''''description'''''' — Long description of the ticket\r\n * ''''''component'''''' — The component droplist\r\n * ''''''version'''''' — The version droplist\r\n * ''''''severity'''''' — The severity droplist\r\n * ''''''keywords'''''' — The keywords \r\n * ''''''priority'''''' — The priority droplist\r\n * ''''''milestone'''''' — The milestone droplist\r\n * ''''''owner'''''' — The person responsible for the ticket\r\n * ''''''cc'''''' — The list of emails for notifying about the ticket change\r\n\r\nExample: ''''`[/newticket?summary=Compile%20Error&version=1.0&component=gui]`''''[[BR]]\r\n\r\n----\r\nSee also: TracGuide, TracWiki, TracTicketsCustomFields, TracNotification, TracReports, TracQuery\r\n', NULL, NULL),
('TracWiki', 1, 1362994208309431, 'trac', '127.0.0.1', '\r\n= The Trac Wiki System =\r\n[[TracGuideToc]]\r\n\r\nTrac has a built-in wiki system which you can use for organizing knowledge and information in a very flexible way by [WikiNewPage creating pages] containing an intuitive and easy to learn textual markup. This text markup is also used in all other parts of the system, not only in [wiki:TitleIndex wiki pages], but also in [wiki:TracTickets ticket] description and comments, [wiki:TracChangeset check-in log messages], [wiki:TracRoadmap milestone] descriptions and [wiki:TracReports report] descriptions, even in third-party extensions.\r\nIt allows for formatted text and hyperlinks in and between all Trac modules.\r\n\r\nEditing wiki text is easy, using any web browser and a simple [WikiFormatting formatting system], rather than more complex markup languages like HTML. The reasoning behind its design is that HTML, with its large collection of nestable tags, is too complicated to allow fast-paced editing, and distracts from the actual content of the pages. Note though that Trac also supports [WikiHtml HTML], [WikiRestructuredText reStructuredText] and [http://www.textism.com/tools/textile/ Textile] as alternative markup formats, which can eventually be used in parts of a page (so called wiki “blocks”).\r\n\r\nThe main goal of the wiki is to make editing text easier and ''''encourage'''' people to contribute and annotate text content for a project. Trac also provides a simple toolbar to make formatting text even easier, and supports the [http://universaleditbutton.org/Universal_Edit_Button universal edit button] of your browser.\r\n\r\nThe wiki itself does not enforce any structure, but rather resembles a stack of empty sheets of paper, where you can organize information and documentation as you see fit, and later reorganize if necessary. \r\nAs contributing to a wiki is essentially building hypertext, \r\ngeneral advice regarding HTML authoring apply here as well.\r\nFor example, the ''''[http://www.w3.org/Provider/Style Style Guide for online hypertext]'''' explains how to think about the\r\n[http://www.w3.org/Provider/Style/Structure.html overall structure of a work] \r\nand how to organize information [http://www.w3.org/Provider/Style/WithinDocument.html within each document]. One of the most important tip is “make your HTML page such that you can read it even if you don''t follow any links.”\r\n\r\nLearn more about:\r\n * WikiFormatting rules, including advanced topics like WikiMacros and WikiProcessors\r\n * How to use WikiPageNames and other forms of TracLinks which are used to refer in a precise way to any resource within Trac\r\n\r\nIf you want to practice editing, please use the SandBox. Note that not all Trac wikis are editable by anyone, this depends on the local policy; check with your Trac administrators.\r\n\r\nBefore saving your changes, you can ''''Preview'''' the page or ''''Review the Changes'''' you''ve made.\r\nYou can get an automatic preview of the formatting as you type when you activate the ''''Edit Side-by-side'''' mode (you have to Preview the page for the setting to take effect). '''' There is a [wiki:/TracIni#trac-section configurable delay] between when you make your edit and when the automatic preview will update.''''\r\n\r\nSome more information about wikis on the web:\r\n * A definition of [http://wikipedia.org/wiki/Wiki Wiki], in a famous wiki encyclopedia\r\n * The [http://c2.com/cgi/wiki?WikiHistory History] of the original wiki\r\n * A wiki page explaining [http://www.usemod.com/cgi-bin/mb.pl?WhyWikiWorks why wiki works]\r\n\r\n----\r\nSee also: TracGuide\r\n', NULL, NULL),
('WikiRestructuredTextLinks', 1, 1362994208310893, 'trac', '127.0.0.1', '= TracLinks in reStructuredText =\r\n\r\nThis document illustrates how to use the `:trac:` role in reStructuredText. The page is written like:\r\n\r\n{{{\r\n{{{\r\n#!rst \r\nExamples:\r\n\r\n * Tickets: :trac:`#1` or :trac:`ticket:1`\r\n * Ticket comments: :trac:`comment:ticket:1:2`\r\n * Reports: :trac:`{1}` or :trac:`report:1`\r\n * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1`\r\n * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3`\r\n * Diffs (since version 0.10): :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539`\r\n * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase`\r\n * Milestones: :trac:`milestone:1.0`\r\n * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff`\r\n * Files: :trac:`source:trunk/COPYING`\r\n * A specific file revision: :trac:`source:/trunk/COPYING@200`\r\n * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25`\r\n\r\nAn explicit label can be specified, separated from the link by a space:\r\n\r\n * See :trac:`#1 ticket 1` and the :trac:`source:trunk/COPYING license`.\r\n}}}\r\n}}}\r\n\r\nProvided you have docutils installed, the above block will render as:\r\n----\r\n{{{\r\n#!rst \r\nExamples:\r\n\r\n * Tickets: :trac:`#1` or :trac:`ticket:1`\r\n * Ticket comments: :trac:`comment:ticket:1:2`\r\n * Reports: :trac:`{1}` or :trac:`report:1`\r\n * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1`\r\n * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3`\r\n * Diffs (since version 0.10): :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539`\r\n * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase`\r\n * Milestones: :trac:`milestone:1.0`\r\n * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff`\r\n * Files: :trac:`source:trunk/COPYING`\r\n * A specific file revision: :trac:`source:/trunk/COPYING@200`\r\n * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25`\r\n\r\nAn explicit label can be specified, separated from the link by a space:\r\n\r\n * See :trac:`#1 ticket 1` and the :trac:`source:trunk/COPYING license`.\r\n}}}\r\n----\r\n\r\nNote also that any of the above could have been written using substitution references and the `trac::` directive:\r\n{{{\r\n{{{\r\n#!rst\r\nSee |ticket123|.\r\n\r\n .. |ticket123| trac:: ticket:123 this ticket\r\n}}}\r\n}}}\r\n\r\nThis renders as:\r\n----\r\n\r\n{{{\r\n#!rst\r\nSee |ticket123|.\r\n\r\n .. |ticket123| trac:: ticket:123 this ticket\r\n}}}\r\n\r\n----\r\nSee also: WikiRestructuredText, TracLinks', NULL, NULL),
('TracEnvironment', 1, 1362994208312317, 'trac', '127.0.0.1', '= The Trac Environment =\r\n\r\nTrac uses a directory structure and a database for storing project data. The directory is referred to as the “environment”.\r\n\r\n== Creating an Environment ==\r\n\r\nA new Trac environment is created using [TracAdmin#initenv trac-admin''s initenv]:\r\n{{{\r\n$ trac-admin /path/to/myproject initenv\r\n}}}\r\n\r\n`trac-admin` will ask you for the name of the project and the\r\ndatabase connection string (explained below).\r\n\r\n=== Some Useful Tips\r\n - The user under which the web server runs will require file system write permission to \r\n the environment directory and all the files inside. Please remember to set\r\n the appropriate permissions. The same applies to the source code repository, \r\n although the user under which Trac runs will only require write access to a Subversion repository created with the BDB file system; for other repository types, check the corresponding plugin''s documentation. \r\n \r\n - `initenv`, when using an svn repository, does not imply that trac-admin will perform `svnadmin create` for the specified repository path. You need to perform the `svnadmin create` prior to `trac-admin initenv` if you''re creating a new svn repository altogether with a new trac environment, otherwise you will see a message "Warning: couldn''t index the repository" when initializing the environment.\r\n\r\n - Non-ascii environment paths are not supported\r\n \r\n - Also, it seems that project names with spaces can be problematic for authentication (see [trac:#7163]).\r\n\r\n - TracPlugins located in a [TracIni#inherit-section shared plugins folder] that is defined in an [TracIni#GlobalConfiguration inherited configuration] are currently not loaded during creation, and hence, if they need to create extra tables for example, you''ll need to [TracUpgrade#UpgradetheTracEnvironment upgrade the environment] before being able to use it.\r\n\r\n== Database Connection Strings ==\r\n\r\nSince version 0.9, Trac supports both [http://sqlite.org/ SQLite] and\r\n[http://www.postgresql.org/ PostgreSQL] database backends. Preliminary\r\nsupport for [http://mysql.com/ MySQL] was added in 0.10. The default is\r\nto use SQLite, which is probably sufficient for most projects. The database\r\nfile is then stored in the environment directory, and can easily be \r\n[wiki:TracBackup backed up] together with the rest of the environment.\r\n\r\n=== SQLite Connection String ===\r\nThe connection string for an SQLite database is:\r\n{{{\r\nsqlite:db/trac.db\r\n}}}\r\nwhere `db/trac.db` is the path to the database file within the Trac environment.\r\n\r\n=== PostgreSQL Connection String ===\r\nIf you want to use PostgreSQL or MySQL instead, you''ll have to use a\r\ndifferent connection string. For example, to connect to a PostgreSQL\r\ndatabase on the same machine called `trac`, that allows access to the\r\nuser `johndoe` with the password `letmein`, use:\r\n{{{\r\npostgres://johndoe:letmein@localhost/trac\r\n}}}\r\n''''Note that due to the way the above string is parsed, the "/" and "@" characters cannot be part of the password.''''\r\n\r\nIf PostgreSQL is running on a non-standard port (for example 9342), use:\r\n{{{\r\npostgres://johndoe:letmein@localhost:9342/trac\r\n}}}\r\n\r\nOn UNIX, you might want to select a UNIX socket for the transport,\r\neither the default socket as defined by the PGHOST environment variable:\r\n{{{\r\npostgres://user:password@/database\r\n}}}\r\nor a specific one:\r\n{{{\r\npostgres://user:password@/database?host=/path/to/socket/dir\r\n}}}\r\n\r\nNote that with PostgreSQL you will have to create the database before running\r\n`trac-admin initenv`.\r\n\r\nSee the [http://www.postgresql.org/docs/ PostgreSQL documentation] for detailed instructions on how to administer [http://postgresql.org PostgreSQL].\r\nGenerally, the following is sufficient to create a database user named `tracuser`, and a database named `trac`.\r\n{{{\r\ncreateuser -U postgres -E -P tracuser\r\ncreatedb -U postgres -O tracuser -E UTF8 trac\r\n}}}\r\nWhen running `createuser` you will be prompted for the password for the user ''tracuser''. This new user will not be a superuser, will not be allowed to create other databases and will not be allowed to create other roles. These privileges are not needed to run a trac instance. If no password is desired for the user, simply remove the `-P` and `-E` options from the `createuser` command. Also note that the database should be created as UTF8. LATIN1 encoding causes errors trac''s use of unicode in trac. SQL_ASCII also seems to work.\r\n\r\nUnder some default configurations (debian) one will have run the `createuser` and `createdb` scripts as the `postgres` user. For example:\r\n{{{\r\nsudo su - postgres -c ''createuser -U postgres -S -D -R -E -P tracuser''\r\nsudo su - postgres -c ''createdb -U postgres -O tracuser -E UTF8 trac''\r\n}}}\r\n\r\nTrac uses the `public` schema by default but you can specify a different schema in the connection string:\r\n{{{\r\npostgres://user:pass@server/database?schema=yourschemaname\r\n}}}\r\n\r\n=== MySQL Connection String ===\r\n\r\nIf you want to use MySQL instead, you''ll have to use a\r\ndifferent connection string. For example, to connect to a MySQL\r\ndatabase on the same machine called `trac`, that allows access to the\r\nuser `johndoe` with the password `letmein`, the mysql connection string is:\r\n{{{\r\nmysql://johndoe:letmein@localhost:3306/trac\r\n}}}\r\n\r\n== Source Code Repository ==\r\n\r\nSince version 0.12, a single Trac environment can be connected to more than one repository. There are many different ways to connect repositories to an environment, see TracRepositoryAdmin. This page also details the various attributes that can be set for a repository (like `type`, `url`, `description`).\r\n\r\nIn Trac 0.12 `trac-admin` no longer asks questions related to repositories. Therefore, by default Trac is not connected to any source code repository, and the ''''Browse Source'''' toolbar item will not be displayed.\r\nYou can also explicitly disable the `trac.versioncontrol.*` components (which are otherwise still loaded)\r\n{{{\r\n[components]\r\ntrac.versioncontrol.* = disabled\r\n}}}\r\n\r\nFor some version control systems, it is possible to specify not only the path to the repository,\r\nbut also a ''''scope'''' within the repository. Trac will then only show information\r\nrelated to the files and changesets below that scope. The Subversion backend for\r\nTrac supports this; for other types, check the corresponding plugin''s documentation.\r\n\r\nExample of a configuration for a Subversion repository used as the default repository:\r\n{{{\r\n[trac]\r\nrepository_type = svn\r\nrepository_dir = /path/to/your/repository\r\n}}}\r\n\r\nThe configuration for a scoped Subversion repository would be:\r\n{{{\r\n[trac]\r\nrepository_type = svn\r\nrepository_dir = /path/to/your/repository/scope/within/repos\r\n}}}\r\n\r\n== Directory Structure ==\r\n\r\nAn environment directory will usually consist of the following files and directories:\r\n\r\n * `README` - Brief description of the environment.\r\n * `VERSION` - Contains the environment version identifier.\r\n * `attachments` - Attachments to wiki pages and tickets are stored here.\r\n * `conf`\r\n * `trac.ini` - Main configuration file. See TracIni.\r\n * `db`\r\n * `trac.db` - The SQLite database (if you''re using SQLite).\r\n * `htdocs` - directory containing web resources, which can be referenced in Genshi templates using `/htdocs/site/...` URLs. ''''(since 0.11)''''\r\n * `log` - default directory for log files, if logging is turned on and a relative path is given.\r\n * `plugins` - Environment-specific [wiki:TracPlugins plugins] (Python eggs or single file plugins, since [trac:milestone:0.10 0.10])\r\n * `templates` - Custom Genshi environment-specific templates. ''''(since 0.11)''''\r\n * `site.html` - method to customize header, footer, and style, described in TracInterfaceCustomization#SiteAppearance\r\n\r\n=== Caveat: don''t confuse a ''''Trac environment directory'''' with the ''''source code repository directory'''' #Caveat\r\n\r\nThis is a common beginners'' mistake.\r\nIt happens that the structure for a Trac environment is loosely modelled after the Subversion repository directory \r\nstructure, but those are two disjoint entities and they are not and ''''must not'''' be located at the same place.\r\n\r\n----\r\nSee also: TracAdmin, TracBackup, TracIni, TracGuide\r\n', NULL, NULL),
('TracIni', 1, 1362994208314163, 'trac', '127.0.0.1', '= The Trac Configuration File =\r\n\r\n ''''[Note To Editors] Please discuss documentation changes in the [#Discussion] section. Even better, send us [TracDev/SubmittingPatches documentation patches] against the ''''code'''' (i.e. where the configuration entries are documented), either on Trac-dev or on new tickets. ''''\r\n\r\n[[TracGuideToc]]\r\n[[PageOutline]]\r\n\r\nTrac configuration is done by editing the ''''''`trac.ini`'''''' config file, located in `<projectenv>/conf/trac.ini`. Changes to the configuration are usually reflected immediately, though changes to the `[components]` or `[logging]` sections will require restarting the web server. You may also need to restart the web server after creating a global configuration file when none was previously present.\r\n\r\nThe `trac.ini` configuration file and its parent directory should be writable by the web server, as Trac currently relies on the possibility to trigger a complete environment reload to flush its caches.\r\n\r\n== Global Configuration ==\r\n\r\nIn versions prior to 0.11, the global configuration was by default located in `$prefix/share/trac/conf/trac.ini` or /etc/trac/trac.ini, depending on the distribution. If you''re upgrading, you may want to specify that file to inherit from. Literally, when you''re upgrading to 0.11, you have to add an `[inherit]` section to your project''s `trac.ini` file. Additionally, you have to move your customized templates and common images from `$prefix/share/trac/...` to the new location.\r\n\r\nGlobal options will be merged with the environment-specific options, where local options override global options. The options file is specified as follows:\r\n{{{\r\n[inherit]\r\nfile = /path/to/global/trac.ini\r\n}}}\r\nMultiple files can be specified using a comma-separated list.\r\n\r\nNote that you can also specify a global option file when creating a new project, by adding the option `--inherit=/path/to/global/trac.ini` to [TracAdmin#initenv trac-admin]''s `initenv` command. If you do not do this but nevertheless intend to use a global option file with your new environment, you will have to go through the newly generated `conf/trac.ini` file and delete the entries that will otherwise override those set in the global file.\r\n\r\nThere are two more entries in the [[#inherit-section| [inherit] ]] section, `templates_dir` for sharing global templates and `plugins_dir`, for sharing plugins. Those entries can themselves be specified in the shared configuration file, and in fact, configuration files can even be chained if you specify another `[inherit] file` there.\r\n\r\nNote that the templates found in the `templates/` directory of the TracEnvironment have precedence over those found in `[inherit] templates_dir`. In turn, the latter have precedence over the installed templates, so be careful about what you put there, notably if you override a default template be sure to refresh your modifications when you upgrade to a new version of Trac (the preferred way to perform TracInterfaceCustomization being still to write a custom plugin doing an appropriate `ITemplateStreamFilter` transformation).\r\n\r\n== Reference for settings\r\n\r\nThis is a brief reference of available configuration options, and their default settings.\r\n\r\n[[TracIni]]\r\n\r\n----\r\nSee also: TracGuide, TracAdmin, TracEnvironment\r\n', NULL, NULL),
('TracRss', 1, 1362994208315774, 'trac', '127.0.0.1', '= Using RSS with Trac =\r\n[[TracGuideToc]]\r\n\r\nSeveral of the Trac modules support content syndication using the RSS (Really Simple Syndication) XML format.\r\nUsing the RSS subscription feature in Trac, you can easily monitor progress of the project, a set of issues or even changes to a single file.\r\n\r\nTrac supports RSS feeds in:\r\n\r\n * TracTimeline — Use the RSS feed to ''''''subscribe to project events''''''.[[br]]Monitor overall project progress in your favorite RSS reader.\r\n * TracTickets, TracReports, and TracQuery — Allows syndication of report and ticket query results.[[br]]Be notified about important and relevant issue tickets.\r\n * TracBrowser and TracRevisionLog — Syndication of file changes.[[br]]Stay up to date with changes to a specific file or directory.\r\n\r\n== How to access RSS data ==\r\nAnywhere in Trac where RSS is available, you should find a small orange ''''''XML'''''' icon, typically placed at the bottom of the page. Clicking the icon will access the RSS feed for that specific resource.\r\n\r\n''''''Note:'''''' Different modules provide different data in their RSS feeds. Usually, the syndicated information corresponds to the current view. For example, if you click the RSS link on a report page, the feed will be based on that report. It might be explained by thinking of the RSS feeds as an ''''alternate view of the data currently displayed''''.\r\n\r\n== Links ==\r\n * ''''Specifications:''''\r\n * http://blogs.law.harvard.edu/tech/rss — RSS 2.0 Specification\r\n\r\n * ''''Multi-platform RSS readers:''''\r\n * http://www.rssowl.org/ — Open source, Eclipse-based, RSS reader for Linux, Mac and Windows systems that supports https and authenticated feeds.\r\n\r\n * ''''Linux/BSD/*n*x systems:''''\r\n * http://liferea.sourceforge.net/ — Open source GTK2 RSS Reader for Linux\r\n * [http://akregator.sourceforge.net/ Akregator] — Open source KDE RSS Reader (part of KDE-PIM)\r\n\r\n * ''''Mac OS X systems:''''\r\n * http://ranchero.com/netnewswire/ — An excellent RSS reader for Mac OS X (has both free and pay versions)\r\n * http://www.utsire.com/shrook/ — An RSS reader for Max OS X that supports https (even with self signed certificates) and authenticated feeds.\r\n * http://vienna-rss.sourceforge.net/ — Open source Feed Reader for Mac OS X with smart folders support\r\n * http://www.mesadynamics.com/Tickershock.html — Non-intrusive "news ticker" style RSS reader for Mac OS X\r\n\r\n * ''''Windows systems:''''\r\n * http://www.rssreader.com/ — Free and powerful RSS Reader for Windows\r\n * http://www.sharpreader.net/ — A free RSS Reader written in .NET for Windows\r\n\r\n * ''''Firefox:''''\r\n * http://www.mozilla.org/products/firefox/ — Mozilla Firefox features plenty [https://addons.mozilla.org/en-US/firefox/search/?q=rss&appver=&platform= add-ons] for supporting RSS\r\n\r\n----\r\nSee also: TracGuide, TracTimeline, TracReports, TracBrowser\r\n', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracPermissions', 1, 1362994208317356, 'trac', '127.0.0.1', '= Trac Permissions =\r\n[[TracGuideToc]]\r\n\r\nTrac uses a simple, case sensitive, permission system to control what users can and can''t access.\r\n\r\nPermission privileges are managed using the [TracAdmin trac-admin] tool or (new in version 0.11) the ''''General / Permissions'''' panel in the ''''Admin'''' tab of the web interface.\r\n\r\nIn addition to the default permission policy described in this page, it is possible to activate additional permission policies by enabling plugins and listing them in the `[trac] permission_policies` configuration entry in the TracIni. See TracFineGrainedPermissions for more details.\r\n\r\nNon-authenticated users accessing the system are assigned the name "anonymous". Assign permissions to the "anonymous" user to set privileges for anonymous/guest users. The parts of Trac that a user does not have the privileges for will not be displayed in the navigation.\r\nIn addition to these privileges, users can be granted additional individual rights in effect when authenticated and logged into the system. All logged in users belong to the virtual group "authenticated", which inherits permissions from "anonymous".\r\n\r\n== Graphical Admin Tab ==\r\n''''This feature is new in version 0.11.''''\r\n\r\nTo access this tab, a user must have one of the following permissions: `TRAC_ADMIN`, `PERMISSION_ADMIN`, `PERMISSION_ADD`, `PERMISSION_REMOVE`. The permissions can granted using the `trac-admin` command (more on `trac-admin` below):\r\n{{{\r\n $ trac-admin /path/to/projenv permission add bob TRAC_ADMIN\r\n}}}\r\n\r\nThen, the user `bob` will be able to see the Admin tab, and can then access the permissions menu. This menu will allow you to perform all the following actions, but from the browser without requiring root access to the server (just the correct permissions for your user account). ''''''Use at least one lowercase character in user names, as all-uppercase names are reserved for permissions.''''''\r\n\r\n 1. [[Image(htdocs:../common/guide/admin.png)]]\r\n 1. [[Image(htdocs:../common/guide/admin-permissions.png)]]\r\n 1. [[Image(htdocs:../common/guide/admin-permissions-TICKET_ADMIN.png)]]\r\n\r\nAn easy way to quickly secure a new Trac install is to run the above command on the anonymous user, install the [http://trac-hacks.org/wiki/AccountManagerPlugin AccountManagerPlugin], create a new admin account graphically and then remove the TRAC_ADMIN permission from the anonymous user.\r\n\r\n== Available Privileges ==\r\n\r\nTo enable all privileges for a user, use the `TRAC_ADMIN` permission. Having `TRAC_ADMIN` is like being `root` on a *NIX system: it will allow you to perform any operation.\r\n\r\nOtherwise, individual privileges can be assigned to users for the various different functional areas of Trac (''''''note that the privilege names are case-sensitive''''''):\r\n\r\n=== Repository Browser ===\r\n\r\n|| `BROWSER_VIEW` || View directory listings in the [wiki:TracBrowser repository browser] ||\r\n|| `LOG_VIEW` || View revision logs of files and directories in the [wiki:TracBrowser repository browser] ||\r\n|| `FILE_VIEW` || View files in the [wiki:TracBrowser repository browser] ||\r\n|| `CHANGESET_VIEW` || View [wiki:TracChangeset repository check-ins] ||\r\n\r\n=== Ticket System ===\r\n\r\n|| `TICKET_VIEW` || View existing [wiki:TracTickets tickets] and perform [wiki:TracQuery ticket queries] ||\r\n|| `TICKET_CREATE` || Create new [wiki:TracTickets tickets] ||\r\n|| `TICKET_APPEND` || Add comments or attachments to [wiki:TracTickets tickets] ||\r\n|| `TICKET_CHGPROP` || Modify [wiki:TracTickets ticket] properties (priority, assignment, keywords, etc.) with the following exceptions: edit description field, add/remove other users from cc field when logged in, and set email to pref ||\r\n|| `TICKET_MODIFY` || Includes both `TICKET_APPEND` and `TICKET_CHGPROP`, and in addition allows resolving [wiki:TracTickets tickets]. Tickets can be assigned to users through a [TracTickets#Assign-toasDrop-DownList drop-down list] when the list of possible owners has been restricted. ||\r\n|| `TICKET_EDIT_CC` || Full modify cc field ||\r\n|| `TICKET_EDIT_DESCRIPTION` || Modify description field ||\r\n|| `TICKET_EDIT_COMMENT` || Modify comments ||\r\n|| `TICKET_BATCH_MODIFY` || [wiki:TracBatchModify Batch modify] tickets ||\r\n|| `TICKET_ADMIN` || All `TICKET_*` permissions, plus the deletion of ticket attachments and modification of the reporter and description fields. It also allows managing ticket properties in the WebAdmin panel. ||\r\n\r\nAttention: the "view tickets" button appears with the `REPORT_VIEW` permission.\r\n\r\n=== Roadmap ===\r\n\r\n|| `MILESTONE_VIEW` || View milestones and assign tickets to milestones. ||\r\n|| `MILESTONE_CREATE` || Create a new milestone ||\r\n|| `MILESTONE_MODIFY` || Modify existing milestones ||\r\n|| `MILESTONE_DELETE` || Delete milestones ||\r\n|| `MILESTONE_ADMIN` || All `MILESTONE_*` permissions ||\r\n|| `ROADMAP_VIEW` || View the [wiki:TracRoadmap roadmap] page, is not (yet) the same as MILESTONE_VIEW, see [trac:#4292 #4292] ||\r\n|| `ROADMAP_ADMIN` || to be removed with [trac:#3022 #3022], replaced by MILESTONE_ADMIN ||\r\n\r\n=== Reports ===\r\n\r\n|| `REPORT_VIEW` || View [wiki:TracReports reports], i.e. the "view tickets" link. ||\r\n|| `REPORT_SQL_VIEW` || View the underlying SQL query of a [wiki:TracReports report] ||\r\n|| `REPORT_CREATE` || Create new [wiki:TracReports reports] ||\r\n|| `REPORT_MODIFY` || Modify existing [wiki:TracReports reports] ||\r\n|| `REPORT_DELETE` || Delete [wiki:TracReports reports] ||\r\n|| `REPORT_ADMIN` || All `REPORT_*` permissions ||\r\n\r\n=== Wiki System ===\r\n\r\n|| `WIKI_VIEW` || View existing [wiki:TracWiki wiki] pages ||\r\n|| `WIKI_CREATE` || Create new [wiki:TracWiki wiki] pages ||\r\n|| `WIKI_MODIFY` || Change [wiki:TracWiki wiki] pages ||\r\n|| `WIKI_RENAME` || Rename [wiki:TracWiki wiki] pages ||\r\n|| `WIKI_DELETE` || Delete [wiki:TracWiki wiki] pages and attachments ||\r\n|| `WIKI_ADMIN` || All `WIKI_*` permissions, plus the management of ''''readonly'''' pages. ||\r\n\r\n=== Permissions ===\r\n\r\n|| `PERMISSION_GRANT` || add/grant a permission ||\r\n|| `PERMISSION_REVOKE` || remove/revoke a permission ||\r\n|| `PERMISSION_ADMIN` || All `PERMISSION_*` permissions ||\r\n\r\n=== Others ===\r\n\r\n|| `TIMELINE_VIEW` || View the [wiki:TracTimeline timeline] page ||\r\n|| `SEARCH_VIEW` || View and execute [wiki:TracSearch search] queries ||\r\n|| `CONFIG_VIEW` || Enables additional pages on ''''About Trac'''' that show the current configuration or the list of installed plugins ||\r\n|| `EMAIL_VIEW` || Shows email addresses even if [wiki:TracIni#trac-section trac show_email_addresses] configuration option is false ||\r\n\r\n== Creating New Privileges ==\r\n\r\nTo create custom permissions, for example to be used in a custom workflow, enable the optional [trac:ExtraPermissionsProvider tracopt.perm.config_perm_provider.ExtraPermissionsProvider] component in the "Plugins" admin panel, and add the desired permissions to the `[extra-permissions]` section in your [wiki:TracIni#extra-permissions-section trac.ini]. For more information, please refer to the documentation of the component in the admin panel.\r\n\r\n== Granting Privileges ==\r\n\r\nYou grant privileges to users using [wiki:TracAdmin trac-admin]. The current set of privileges can be listed with the following command:\r\n{{{\r\n $ trac-admin /path/to/projenv permission list\r\n}}}\r\n\r\nThis command will allow the user ''''bob'''' to delete reports:\r\n{{{\r\n $ trac-admin /path/to/projenv permission add bob REPORT_DELETE\r\n}}}\r\n\r\nThe `permission add` command also accepts multiple privilege names:\r\n{{{\r\n $ trac-admin /path/to/projenv permission add bob REPORT_DELETE WIKI_CREATE\r\n}}}\r\n\r\nOr add all privileges:\r\n{{{\r\n $ trac-admin /path/to/projenv permission add bob TRAC_ADMIN\r\n}}}\r\n\r\n== Permission Groups ==\r\n\r\nThere are two built-in groups, "authenticated" and "anonymous".\r\nAny user who has not logged in is automatically in the "anonymous" group.\r\nAny user who has logged in is also in the "authenticated" group.\r\nThe "authenticated" group inherits permissions from the "anonymous" group.\r\nFor example, if the "anonymous" group has permission WIKI_MODIFY, \r\nit is not necessary to add the WIKI_MODIFY permission to the "authenticated" group as well.\r\n\r\nCustom groups may be defined that inherit permissions from the two built-in groups.\r\n\r\nPermissions can be grouped together to form roles such as ''''developer'''', ''''admin'''', etc.\r\n{{{\r\n $ trac-admin /path/to/projenv permission add developer WIKI_ADMIN\r\n $ trac-admin /path/to/projenv permission add developer REPORT_ADMIN\r\n $ trac-admin /path/to/projenv permission add developer TICKET_MODIFY\r\n $ trac-admin /path/to/projenv permission add bob developer\r\n $ trac-admin /path/to/projenv permission add john developer\r\n}}}\r\n\r\nGroup membership can be checked by doing a {{{permission list}}} with no further arguments; the resulting output will include group memberships. ''''''Use at least one lowercase character in group names, as all-uppercase names are reserved for permissions''''''.\r\n\r\n== Adding a New Group and Permissions ==\r\nPermission groups can be created by assigning a user to a group you wish to create, then assign permissions to that group.\r\n\r\nThe following will add ''''bob'''' to the new group called ''''beta_testers'''' and then will assign WIKI_ADMIN permissions to that group. (Thus, ''''bob'''' will inherit the WIKI_ADMIN permission)\r\n{{{ \r\n $ trac-admin /path/to/projenv permission add bob beta_testers\r\n $ trac-admin /path/to/projenv permission add beta_testers WIKI_ADMIN\r\n\r\n}}}\r\n\r\n== Removing Permissions ==\r\n\r\nPermissions can be removed using the ''remove'' command. For example:\r\n\r\nThis command will prevent the user ''''bob'''' from deleting reports:\r\n{{{\r\n $ trac-admin /path/to/projenv permission remove bob REPORT_DELETE\r\n}}}\r\n\r\nJust like `permission add`, this command accepts multiple privilege names.\r\n\r\nYou can also remove all privileges for a specific user:\r\n{{{\r\n $ trac-admin /path/to/projenv permission remove bob ''*''\r\n}}}\r\n\r\nOr one privilege for all users:\r\n{{{\r\n $ trac-admin /path/to/projenv permission remove ''*'' REPORT_ADMIN\r\n}}}\r\n\r\n== Default Permissions ==\r\n\r\nBy default on a new Trac installation, the `anonymous` user will have ''''view'''' access to everything in Trac, but will not be able to create or modify anything.\r\nOn the other hand, the `authenticated` users will have the permissions to ''''create and modify tickets and wiki pages''''.\r\n\r\n''''''anonymous''''''\r\n{{{\r\n BROWSER_VIEW \r\n CHANGESET_VIEW \r\n FILE_VIEW \r\n LOG_VIEW \r\n MILESTONE_VIEW \r\n REPORT_SQL_VIEW \r\n REPORT_VIEW \r\n ROADMAP_VIEW \r\n SEARCH_VIEW \r\n TICKET_VIEW \r\n TIMELINE_VIEW\r\n WIKI_VIEW\r\n}}}\r\n\r\n''''''authenticated''''''\r\n{{{\r\n TICKET_CREATE \r\n TICKET_MODIFY \r\n WIKI_CREATE \r\n WIKI_MODIFY \r\n}}}\r\n----\r\nSee also: TracAdmin, TracGuide and TracFineGrainedPermissions\r\n', NULL, NULL),
('RecentChanges', 1, 1362994208319707, 'trac', '127.0.0.1', ''''''' [TitleIndex Index by Title] '''''' | '''''' Index by Date ''''''\r\n\r\n[[RecentChanges]]', NULL, NULL),
('TracBackup', 1, 1362994208320928, 'trac', '127.0.0.1', '= Trac Backup =\r\n[[TracGuideToc]]\r\n\r\nSince Trac uses a database backend, some extra care is required to safely create a backup of a [wiki:TracEnvironment project environment]. Luckily, [wiki:TracAdmin trac-admin] has a command to make backups easier: `hotcopy`.\r\n\r\n ''''Note: Trac uses the `hotcopy` nomenclature to match that of [http://subversion.tigris.org/ Subversion], to make it easier to remember when managing both Trac and Subversion servers.''''\r\n\r\n== Creating a Backup ==\r\n\r\nTo create a backup of a live TracEnvironment, simply run:\r\n{{{\r\n\r\n $ trac-admin /path/to/projenv hotcopy /path/to/backupdir\r\n\r\n}}}\r\n\r\n[wiki:TracAdmin trac-admin] will lock the database while copying.''''\r\n\r\nThe resulting backup directory is safe to handle using standard file-based backup tools like `tar` or `dump`/`restore`.\r\n\r\nPlease, note, that hotcopy command does not overwrite target directory and when such exists, hotcopy ends with error: `Command failed: [Errno 17] File exists:` This is discussed in [trac:ticket:3198 #3198].\r\n\r\n=== Restoring a Backup ===\r\n\r\nBackups are simply a copied snapshot of the entire [wiki:TracEnvironment project environment] directory, including the SQLite database. \r\n\r\nTo restore an environment from a backup, stop the process running Trac (i.e. the Web server or [wiki:TracStandalone tracd]), restore the contents of your backup (path/to/backupdir) to your [wiki:TracEnvironment project environment] directory and restart the service.\r\n\r\n----\r\nSee also: TracAdmin, TracEnvironment, TracGuide, [trac:TracMigrate TracMigrate]\r\n', NULL, NULL),
('TracSyntaxColoring', 1, 1362994208322350, 'trac', '127.0.0.1', '= Syntax Coloring of Source Code =\r\nTrac supports language-specific syntax highlighting of source code within wiki formatted text in [WikiProcessors#CodeHighlightingSupport wiki processors] blocks and in the [TracBrowser repository browser].\r\n\r\nTo do this, Trac uses external libraries with support for a great number of programming languages.\r\n\r\nCurrently Trac supports syntax coloring using one or more of the following packages:\r\n\r\n * [http://pygments.pocoo.org/ Pygments], by far the preferred system, as it covers a wide range of programming languages and other structured texts and is actively supported\r\n * [http://www.codento.com/people/mtr/genscript/ GNU Enscript], commonly available on Unix but somewhat unsupported on Windows\r\n * [http://silvercity.sourceforge.net/ SilverCity], legacy system, some versions can be [http://trac.edgewall.org/wiki/TracFaq#why-is-my-css-code-not-being-highlighted-even-though-i-have-silvercity-installed problematic]\r\n\r\n\r\nTo activate syntax coloring, simply install either one (or more) of these packages (see [#ExtraSoftware] section below).\r\nIf none of these packages is available, Trac will display the data as plain text. \r\n\r\n\r\n=== About Pygments ===\r\n\r\nStarting with trac 0.11 [http://pygments.org/ pygments] will be the new default highlighter. It''s a highlighting library implemented in pure python, very fast, easy to extend and [http://pygments.org/docs/ well documented].\r\n\r\nThe Pygments default style can specified in the [TracIni#mimeviewer-section mime-viewer] section of trac.ini. The default style can be overridden by setting a Style preference on the [/prefs/pygments preferences page]. \r\n\r\nIt''s very likely that the list below is outdated because the list of supported pygments lexers is growing weekly. Just have a look at the page of [http://pygments.org/docs/lexers/ supported lexers] on the pygments webpage.\r\n\r\n\r\n== Syntax Coloring Support ==\r\n\r\n=== Known MIME Types\r\n\r\n[[KnownMimeTypes]]\r\n\r\nNote that the rich content may be directly //rendered// instead of syntax highlighted. This usually depends on which auxiliary packages are installed and on which components are activated in your setup. For example a `text/x-rst` document will be rendered via `docutils` if it is installed and the `trac.mimeview.rst.ReStructuredTextRenderer` is not disabled, and will be syntax highlighted otherwise.\r\n\r\nIn a similar way, a document with the mimetype `text/x-trac-wiki` is rendered using the Trac wiki formatter, unless the `trac.mimeview.api.WikiTextRenderer` component is disabled.\r\n\r\nHTML documents are directly rendered only if the `render_unsafe_html` settings are enabled in the TracIni (those settings are present in multiple sections, as there are different security concerns depending where the document comes from). If you want to ensure that an HTML document gets syntax highlighted and not rendered, use the `text/xml` mimetype.\r\n\r\nIf mimetype such as ''svn:mime-type'' is set to ''text/plain'', there is no coloring even if file is known type like ''java''.\r\n\r\n=== List of Languages Supported, by Highlighter #language-supported\r\n\r\nThis list is only indicative.\r\n\r\n|| ||= !SilverCity =||= Enscript =||= Pygments =||\r\n|| Ada || || ✓ || ||\r\n|| Asm || || ✓ || ||\r\n|| Apache Conf || || || ✓ ||\r\n|| ASP || ✓ || ✓ || ||\r\n|| C || ✓ || ✓ || ✓ ||\r\n|| C# || || ✓ ^[#a1 (1)]^ || ✓ ||\r\n|| C++ || ✓ || ✓ || ✓ ||\r\n|| CMake || ? || ? || ✓ ||\r\n|| Java || ✓ ^[#a2 (2)]^ || ✓ || ✓ ||\r\n|| Awk || || ✓ || ||\r\n|| Boo || || || ✓ ||\r\n|| CSS || ✓ || || ✓ ||\r\n|| Python Doctests || || || ✓ ||\r\n|| Diff || || ✓ || ✓ ||\r\n|| Eiffel || || ✓ || ||\r\n|| Elisp || || ✓ || ||\r\n|| Fortran || || ✓ ^[#a1 (1)]^ || ✓ ||\r\n|| Haskell || || ✓ || ✓ ||\r\n|| Genshi || || || ✓ ||\r\n|| HTML || ✓ || ✓ || ✓ ||\r\n|| IDL || || ✓ || ||\r\n|| INI || || || ✓ ||\r\n|| Javascript || ✓ || ✓ || ✓ ||\r\n|| Lua || || || ✓ ||\r\n|| m4 || || ✓ || ||\r\n|| Makefile || || ✓ || ✓ ||\r\n|| Mako || || || ✓ ||\r\n|| Matlab ^[#a3 (3)]^ || || ✓ || ✓ ||\r\n|| Mygthy || || || ✓ ||\r\n|| Objective-C || || ✓ || ✓ ||\r\n|| OCaml || || || ✓ ||\r\n|| Pascal || || ✓ || ✓ ||\r\n|| Perl || ✓ || ✓ || ✓ ||\r\n|| PHP || ✓ || || ✓ ||\r\n|| PSP || ✓ || || ||\r\n|| Pyrex || || ✓ || ||\r\n|| Python || ✓ || ✓ || ✓ ||\r\n|| Ruby || ✓ || ✓ ^[#a1 (1)]^ || ✓ ||\r\n|| Scheme || || ✓ || ✓ ||\r\n|| Shell || || ✓ || ✓ ||\r\n|| Smarty || || || ✓ ||\r\n|| SQL || ✓ || ✓ || ✓ ||\r\n|| Troff || || ✓ || ✓ ||\r\n|| TCL || || ✓ || ||\r\n|| Tex || || ✓ || ✓ ||\r\n|| Verilog || ✓ ^[#a2 (2)]^ || ✓ || ||\r\n|| VHDL || || ✓ || ||\r\n|| Visual Basic || || ✓ || ✓ ||\r\n|| VRML || || ✓ || ||\r\n|| XML || ✓ || || ✓ ||\r\n\r\n\r\n\r\n''''[=#a1 (1)] Not included in the Enscript distribution. Additional highlighting rules can be obtained for\r\n[http://neugierig.org/software/ruby/ Ruby],\r\n[http://wiki.hasno.info/index.php/Csharp.st C#],\r\n[http://wiki.hasno.info/index.php/F90.st Fortran 90x/2003]\r\n\r\n''''[=#a2 (2)] since Silvercity 0.9.7 released on 2006-11-23\r\n\r\n''''[=#a3 (3)] By default `.m` files are considered Objective-C files. In order to treat `.m` files as MATLAB files, add "text/matlab:m" to the "mime_map" setting in the [wiki:TracIni#mimeviewer-section "[mimeviewer] section of trac.ini"].\r\n\r\n== Extra Software ==\r\n * GNU Enscript — http://directory.fsf.org/GNU/enscript.html\r\n * GNU Enscript for Windows — http://gnuwin32.sourceforge.net/packages/enscript.htm\r\n * !SilverCity — http://silvercity.sf.net/\r\n * **Pygments — http://pygments.org/**\r\n\r\n----\r\nSee also: WikiProcessors, WikiFormatting, TracWiki, TracBrowser\r\n', NULL, NULL),
('TracChangeset', 1, 1362994208324007, 'trac', '127.0.0.1', '= Trac Changeset Module =\r\n[[TracGuideToc]]\r\n\r\nTrac has a built-in functionality for visualizing “diffs” - changes to files.\r\n\r\nThere are different kinds of ''''change sets''''. \r\nSome can correspond to revisions made in the repositories,\r\nothers can aggregate changes made in several revisions, \r\nbut in the end, any kind of differences can be shown.\r\n\r\nThe changeset view consists of two parts, the ''''header'''' \r\nand the ''''diff views''''.\r\n\r\n== Changeset Header ==\r\n\r\nThe header shows an overview of the whole changeset.\r\nHere you will find information such as:\r\n\r\n * Timestamp — When the changeset was commited\r\n * Author — Who commited the changeset\r\n * Message — A brief description from the author (the commit log message)\r\n * Location — Parent directory of all files affected by this changeset\r\n * Files — A list of files affected by this changeset\r\n\r\nIf more than one revision is involved in the set of changes being\r\ndisplayed, the ''''Timestamp'''', ''''Author'''' and ''''Message'''' fields \r\nwon''t be shown.\r\n\r\nIn front of each listed file, you''ll find a colored rectangle. The color\r\nindicates how the file is affected by the changeset.\r\n \r\n [[span(style=background:#bfb;border:1px solid #999;font-size:80%;margin-right:.5em,'''' '''')]] Green: Added \\\\\r\n [[span(style=background:#f88;border:1px solid #999;font-size:80%;margin-right:.5em,'''' '''')]] Red: Removed \\\\\r\n [[span(style=background:#fd8;border:1px solid #999;font-size:80%;margin-right:.5em,'''' '''')]] Yellow: Modified \\\\\r\n [[span(style=background:#88f;border:1px solid #999;font-size:80%;margin-right:.5em,'''' '''')]] Blue: Copied \\\\\r\n [[span(style=background:#ccc;border:1px solid #999;font-size:80%;margin-right:.5em,'''' '''')]] Gray: Moved \\\\\r\nThe color legend is located below the header as a reminder.\r\n\r\n== Diff Views ==\r\n\r\nBelow the header is the main part of the changeset, the diff view. Each file is shown in a separate section, each of which will contain only the regions of the file that are affected by the changeset. There are two different styles of displaying the diffs: ''''inline'''' or ''''side-by-side'''' (you can switch between those styles using the preferences form):\r\n\r\n * The ''''inline'''' style shows the changed regions of a file underneath each other. A region removed from the file will be colored red, an added region will be colored green. If a region was modified, the old version is displayed above the new version. Line numbers on the left side indicate the exact position of the change in both the old and the new version of the file.\r\n * The ''''side-by-side'''' style shows the old version on the left and the new version on the right (this will typically require more screen width than the inline style.) Added and removed regions will be colored in the same way as with the inline style (green and red, respectively), but modified regions will have a yellow background.\r\n\r\nIn addition, various advanced options are available in the preferences form for adjusting the display of the diffs:\r\n * You can set how many lines are displayed before and after every change\r\n (if the value ''''all'''' is used, then the full file will be shown)\r\n * You can toggle whether blank lines, case changes and white space changes are ignored, thereby letting you find the functional changes more quickly\r\n\r\n\r\n== The Different Ways to Get a Diff ==\r\n\r\n=== Examining a Changeset ===\r\n\r\nWhen viewing a repository check-in, such as when following a\r\nchangeset [wiki:TracLinks link] or a changeset event in the \r\n[wiki:TracTimeline timeline], Trac will display the exact changes\r\nmade by the check-in.\r\n\r\nThere will be also navigation links to the ''''Previous Changeset''''\r\nto and ''''Next Changeset''''.\r\n\r\n=== Examining Differences Between Revisions ===\r\n\r\nOften you''ll want to look at changes made on a file \r\nor on a directory spanning multiple revisions. The easiest way\r\nto get there is from the TracRevisionLog, where you can select\r\nthe ''''old'''' and the ''''new'''' revisions of the file or directory, and\r\nthen click the ''''View changes'''' button.\r\n\r\n=== Examining Differences Between Branches ===\r\n\r\nOne of the core features of version control systems is the possibility\r\nto work simultaneously on different ''''Lines of Developments'''', commonly\r\ncalled “branches”. Trac enables you to examine the exact differences\r\nbetween such branches.\r\n\r\nUsing the ''''''View changes ...'''''' button in the TracBrowser allows you to enter\r\n''''From:'''' and ''''To:'''' path/revision pairs. The resulting set of differences consist\r\nof the changes that should be applied to the ''''From:'''' content in order\r\nto get to the ''''To:'''' content.\r\n\r\nFor convenience, it is possible to invert the roles of the ''''old'''' and the ''''new''''\r\npath/revision pairs by clicking the ''''Reverse Diff'''' link on the changeset page.\r\n\r\n=== Checking the Last Change ===\r\n\r\nThe last possibility for examining changes is to use the ''''Last Change''''\r\nlink provided by the TracBrowser.\r\n\r\nThis link will take you to the last change that was made on that path.\r\nFrom there, you can use the ''''Previous Change'''' and ''''Next Change'''' links\r\nto traverse the change history of the file or directory.\r\n\r\n----\r\nSee also: TracGuide, TracBrowser\r\n', NULL, NULL),
('WikiRestructuredText', 1, 1362994208325755, 'trac', '127.0.0.1', '= reStructuredText Support in Trac =\r\n\r\nTrac supports using ''''reStructuredText'''' (RST) as an alternative to wiki markup in any context WikiFormatting is used.\r\n\r\nFrom the reStucturedText webpage:\r\n "''''reStructuredText is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system. It is useful for in-line program documentation (such as Python docstrings), for quickly creating simple web pages, and for standalone documents. reStructuredText is designed for extensibility for specific application domains. ''''"\r\n\r\nIf you want a file from your Subversion repository be displayed as reStructuredText in Trac''s source browser, set `text/x-rst` as value for the Subversion property `svn:mime-type`. See [trac:source:/trunk/INSTALL this example].\r\n\r\n=== Requirements ===\r\nNote that to activate RST support in Trac, the python docutils package must be installed. \r\nIf not already available on your operating system, you can download it at the [http://docutils.sourceforge.net/rst.html RST Website].\r\n\r\nInstall docutils using `easy_install docutils`. Do not use the package manager of your OS (e.g. `apt-get install python-docutils`), because Trac will not find docutils then.\r\n\r\n=== More information on RST ===\r\n\r\n * reStructuredText Website -- http://docutils.sourceforge.net/rst.html\r\n * RST Quick Reference -- http://docutils.sourceforge.net/docs/rst/quickref.html\r\n\r\n----\r\n\r\n== Using RST in Trac ==\r\nTo specify that a block of text should be parsed using RST, use the ''''rst'''' processor. \r\n\r\n=== TracLinks in reStructuredText ===\r\n\r\n * Trac provides a custom RST directive `trac::` to allow TracLinks from within RST text.\r\n ||= Wiki Markup ||= Display ||\r\n {{{#!td\r\n {{{\r\n {{{\r\n #!rst\r\n This is a reference to |a ticket|\r\n\r\n .. |a ticket| trac:: #42\r\n }}}\r\n }}}\r\n }}}\r\n {{{#!td\r\n {{{\r\n #!rst\r\n This is a reference to |a ticket|\r\n\r\n .. |a ticket| trac:: #42\r\n }}}\r\n }}}\r\n\r\n * Trac allows an even easier way of creating TracLinks in RST, using the custom `:trac:` role.\r\n ||= Wiki Markup ||= Display ||\r\n {{{#!td\r\n {{{\r\n {{{\r\n #!rst\r\n This is a reference to ticket `#12`:trac:\r\n\r\n To learn how to use Trac, see `TracGuide`:trac:\r\n }}}\r\n }}}\r\n }}}\r\n {{{#!td\r\n {{{\r\n #!rst\r\n This is a reference to ticket `#12`:trac:\r\n\r\n To learn how to use Trac, see `TracGuide`:trac:\r\n }}}\r\n }}}\r\n\r\n For a complete example of all uses of the `:trac:` role, please see WikiRestructuredTextLinks. \r\n\r\n\r\n=== Syntax highlighting in reStructuredText ===\r\n\r\nThere is a directive for doing TracSyntaxColoring in RST as well. The directive is called\r\ncode-block\r\n\r\n||= Wiki Markup ||= Display ||\r\n{{{#!td\r\n {{{\r\n {{{\r\n #!rst\r\n\r\n .. code-block:: python\r\n\r\n class Test:\r\n\r\n def TestFunction(self):\r\n pass\r\n \r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td\r\n {{{\r\n #!rst\r\n\r\n .. code-block:: python\r\n\r\n class Test:\r\n\r\n def TestFunction(self):\r\n pass\r\n\r\n }}}\r\n}}}\r\nNote the need to indent the code at least one character after the `.. code-block` directive.\r\n\r\n=== Wiki Macros in reStructuredText ===\r\n\r\nFor doing [WikiMacros Wiki Macros] in RST you use the same directive as for syntax highlighting i.e code-block.\r\n\r\n||= Wiki Markup ||= Display ||\r\n{{{#!td\r\n {{{\r\n {{{\r\n #!rst\r\n\r\n .. code-block:: RecentChanges\r\n\r\n Trac,3\r\n\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td\r\n {{{\r\n #!rst\r\n\r\n .. code-block:: RecentChanges\r\n\r\n Trac,3\r\n\r\n }}}\r\n}}}\r\n\r\nOr a more concise Wiki Macro like syntax is also available, using the `:code-block:` role:\r\n\r\n||= Wiki Markup ||= Display ||\r\n{{{#!td\r\n {{{\r\n {{{\r\n #!rst\r\n\r\n :code-block:`RecentChanges:Trac,3`\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td\r\n {{{\r\n #!rst\r\n\r\n :code-block:`RecentChanges:Trac,3`\r\n }}}\r\n}}}\r\n\r\n=== Bigger RST Example ===\r\nThe example below should be mostly self-explanatory:\r\n\r\n||= Wiki Markup ||= Display ||\r\n{{{#!td\r\n{{{\r\n#!html\r\n<pre class="wiki">{{{\r\n#!rst\r\nFooBar Header\r\n=============\r\nreStructuredText is **nice**. It has its own webpage_.\r\n\r\nA table:\r\n\r\n===== ===== ======\r\n Inputs Output\r\n------------ ------\r\n A B A or B\r\n===== ===== ======\r\nFalse False False\r\nTrue False True\r\nFalse True True\r\nTrue True True\r\n===== ===== ======\r\n\r\nRST TracLinks\r\n-------------\r\n\r\nSee also ticket `#42`:trac:.\r\n\r\n.. _webpage: http://docutils.sourceforge.net/rst.html\r\n}}}</pre>\r\n}}}\r\n}}}\r\n{{{#!td\r\n{{{\r\n#!rst\r\nFooBar Header\r\n=============\r\nreStructuredText is **nice**. It has its own webpage_.\r\n\r\nA table:\r\n\r\n===== ===== ======\r\n Inputs Output\r\n------------ ------\r\n A B A or B\r\n===== ===== ======\r\nFalse False False\r\nTrue False True\r\nFalse True True\r\nTrue True True\r\n===== ===== ======\r\n\r\nRST TracLinks\r\n-------------\r\n\r\nSee also ticket `#42`:trac:.\r\n\r\n.. _webpage: http://docutils.sourceforge.net/rst.html\r\n}}}\r\n}}}\r\n\r\n----\r\nSee also: WikiRestructuredTextLinks, WikiProcessors, WikiFormatting\r\n', NULL, NULL),
('TracAccessibility', 1, 1362994208328046, 'trac', '127.0.0.1', '= Accessibility Support in Trac =\r\n\r\nNot every user has a graphic environment with a mouse or other pointing device. Some users rely on keyboard, alternative keyboard or voice input to navigate links, activate form controls, etc. In Trac, we work to assure users may interact with devices other than a pointing device.\r\n\r\nThe keyboard shortcuts must be enabled for a session through the [/prefs/keybindings Keyboard Shortcuts] preferences panel.\r\n\r\nTrac supports accessibility keys for the most common operations.\r\n - on Linux platforms, press any of the keys listed below in combination with the `<Alt>` key \r\n - on a Mac, use the `<ctrl>` key instead\r\n - on Windows, you need to hit `<Shift> + <Alt> + <Key>`. This works for most browsers (Firefox, Chrome, Safari and Internet Explorer)\r\n\r\n== Global Access Keys ==\r\n\r\n * `1` - WikiStart\r\n * `2` - [wiki:TracTimeline Timeline]\r\n * `3` - [wiki:TracRoadmap Roadmap]\r\n * `4` - [wiki:TracSearch Search]\r\n * `6` - [wiki:TracGuide Trac Guide / Documentation]\r\n * `7` - [wiki:TracTickets New Ticket]\r\n * `9` - [/about About Trac]\r\n * `0` - This page\r\n * `e` - Edit this page\r\n * `f` - Search\r\n\r\n\r\n----\r\nSee also: TracGuide', NULL, NULL),
('TracUnicode', 1, 1362994208329584, 'trac', '127.0.0.1', '= Unicode Support in Trac =\r\n[[TracGuideToc]]\r\n\r\nTrac stores all text using UTF-8 encoding, including text in tickets and wiki pages. Internal processing of text uses true Unicode representations.\r\n\r\nAs such, it supports most (all?) commonly used character encodings.\r\n\r\nIf the default encoding in your source code repository is not UTF-8, you can specify it in the [TracIni#trac-section trac.ini], for example:\r\n{{{\r\ndefault_charset = gbk\r\n}}}\r\n\r\nYou also must make sure that your [trac:DatabaseBackend database backend] stores its data in UTF-8; otherwise strange things will happen.\r\n\r\nTo convert your database to UTF-8, the easiest way is to dump the database, convert the dump into UTF-8 and then import the converted dump back into the database.[[BR]]\r\nYou can use [http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html iconv] to convert the dump.\r\n\r\n\r\n== Examples ==\r\n\r\n=== Arabic ===\r\nتراك يقوم بحفظ كل الكلمات باستخدام صيغة UTF-8، بما في ذلك الكلمات المستخدمة في صفحات التيكت والويكي.\r\n\r\n=== Bulgarian ===\r\nБългарският език работи ли?\r\n\r\n=== Česky ===\r\nČeština v kódování UTF-8, žádný problém.\r\n\r\n=== Chinese ===\r\nTraditional: 繁體中文, 漢字測試; Simplified: 简体中文,汉字测试\r\n\r\n=== Croatian ===\r\nAko podržava srpski i slovenski mora podržavati i Hrvatski - čćžšđ ČĆŽŠĐ \r\n\r\n=== English ===\r\nYes indeed, Trac supports English. Fully.\r\n\r\n=== Français ===\r\nIl est possible d''écrire en Français : à, ç, û, ...\r\n\r\n=== German ===\r\nTrac-Wiki muß auch deutsche Umlaute richtig anzeigen: ö, ä, ü, Ä, Ö, Ü; und das scharfe ß\r\n\r\n=== Greek ===\r\nΤα Ελληνικά υποστηρίζονται επαρκώς επίσης.\r\n\r\n=== Hebrew ===\r\nאני יכול לאכול זכוכית וזה לא מזיק לי\r\n\r\n=== Hindi ===\r\nअब हिन्दी में।\r\n\r\n=== Hungarian ===\r\nÁrvíztűrő tükörfúrógép\r\n\r\n=== Icelandic ===\r\nÆvar sagði við ömmu sína: Sjáðu hvað ég er stór!\r\n\r\n=== Japanese ===\r\n漢字 ひらがな カタカナ ハンカクカナ 日本語試験\r\n\r\n=== Korean ===\r\n이번에는 한글로 써보겠습니다. 잘 보이나요? 한글\r\n\r\n=== Latvian ===\r\n\r\nLatviešu valoda arī strādā!\r\n\r\n=== Lithuanian ===\r\nSudalyvaukime ir mes. Ar veikia lietuviškos raidės? ąčęėįšųūž ĄČĘĖĮŠŲŪŽ Žinoma, kad veikia :)\r\nKas tie mes?\r\n\r\n=== Persian (Farsi) ===\r\nاین یک متن فارسی است ولی امکان نوشتن مستقیم فارسی نیست چون حالت متن از راست به چپ و جود ندارد برای فارسی نوشتن باید از HTML استفاده کنید.\r\n{{{\r\n#!html\r\n<div dir="rtl">\r\n}}}\r\nاین نمونه یک متن از راست به چپ فارسی است که در HTML نوشته شده تا اعداد 12345 و حروف لاتین ABCDEF در محل خودشان نمایش داده شوند.\r\n{{{\r\n#!html\r\n</div>\r\n}}}\r\n\r\n=== Polish ===\r\nPchnąć w tę łódź jeża lub osiem skrzyń fig; Nocna gżegżółka zawsze dzienną przekuka.\r\n\r\n=== Portuguese ===\r\nÉ possível guardar caracteres especias da língua portuguesa, incluindo o símbolo da moeda européia ''€'', trema ''ü'', crase ''à'', agudos ''áéíóú'', circunflexos ''âêô'', til ''ãõ'', cedilha ''ç'', ordinais ''ªº'', grau ''°¹²³''.\r\n\r\n=== Russian ===\r\nПроверка русского языка: кажется работает... И буква "ё" есть...\r\n\r\n=== Serbian ===\r\nPodržan, uprkos činjenici da se za njegovo pisanje koriste чак два алфабета.\r\n\r\n=== Slovenian ===\r\nTa suhi škafec pušča vodo že od nekdaj!\r\n\r\n=== Spanish ===\r\nEsto es un pequeño texto en Español, donde el veloz murciélago hindú comía cardlllo y kiwi\r\n\r\n=== Swedish ===\r\nRäven raskar över isen med luva på.\r\n\r\n=== Thai ===\r\nTrac แสดงภาษาไทยได้อย่างถูกต้อง!\r\n\r\n=== Ukrainian ===\r\nПеревірка української мови...\r\n\r\n=== Urdu ===\r\nٹریک اردو بھی سپورٹ کرتا ہے۔\r\n\r\n=== Vietnamese ===\r\nViết tiếng Việt cũng được.\r\n', NULL, NULL),
('TracTimeline', 1, 1362994208331354, 'trac', '127.0.0.1', '= The Trac Timeline =\r\n[[TracGuideToc]]\r\n\r\nThe timeline provides a historic view of the project in a single report.\r\n\r\nIt lists all Trac events that have occurred in chronological order, a\r\nbrief description of each event and if applicable, the person responsible for\r\nthe change.\r\n\r\nThe timeline lists these kinds of events:\r\n * ''''''Wiki page events'''''' — Creation and changes\r\n * ''''''Ticket events'''''' — Creation and resolution/closing (and optionally other changes)\r\n * ''''''Source code changes '''''' — Repository check-ins\r\n * ''''''Milestone '''''' — Milestone completed\r\n\r\nEach event entry provides a hyperlink to the specific event in question, who authored the change as well as\r\na brief excerpt of the actual comment or text, if available.\r\n\r\nIt is possible to filter the displayed events with the various filters in the option panel:\r\n * ''''View changes from'''' — the date from which to start displaying events (current date if empty). Events that occurred after this date will not be shown, only those that occurred before that date.\r\n * ''''and X days back'''' — how many days backwards in time to get events.\r\n * ''''done by'''' — the author of an event. It accepts a space-separated list of authors for which events should be included. Alternatively, if the author names are prefixed by a "-" character, then the events having those authors will be excluded, and all the others included. Single or double quotes can be used for specifying author names containing space characters. ''''(since 0.12)''''\r\n * ''''Changesets in all repositories'''' — if you have more than one repository connected to your Trac project, then you can filter the output so events from specific repositories are not shown. ''''(since 0.12)''''\r\n * ''''Milestones reached'''' — display or hide milestones reached.\r\n * ''''Opened and closed tickets'''' — display or hide ticket open or close events.\r\n * ''''Wiki changes'''' — display or hide Wiki change events.\r\n\r\nSee !TracIni''s [wiki:TracIni#timeline-section "[timeline] section"] for timeline configuration options.\r\n\r\n== RSS Support ==\r\n\r\nThe Timeline module supports subscription using RSS 2.0 syndication. To subscribe to project events, click the orange ''''''XML'''''' icon at the bottom of the page. See TracRss for more information on RSS support in Trac.\r\n\r\n----\r\nSee also: TracGuide, TracIni, TracWiki, WikiFormatting, TracRss, TracNotification\r\n', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracPlugins', 1, 1362994208332815, 'trac', '127.0.0.1', '= Trac plugins =\r\n[[TracGuideToc]]\r\n\r\nFrom version 0.9 onwards, Trac is extensible with [trac:PluginList plugins]. Plugin functionality is based on the [trac:TracDev/ComponentArchitecture component architecture], with peculiarities described in the [TracDev/PluginDevelopment plugin development] page.\r\n\r\n== Plugin discovery ==\r\n\r\nFrom the user''s point of view, a plugin is either a standalone .py file or an .egg package. Trac looks for plugins in the global shared plugins directory (see [TracIni#GlobalConfiguration Global Configuration]) and in the `plugins` directory of the local TracEnvironment. Components defined in globally-installed plugins should be explicitly enabled in the [[TracIni#components-section| [components] ]] section of the trac.ini file.\r\n\r\n== Requirements for Trac eggs ==\r\n\r\nTo use egg-based plugins in Trac, you need to have [http://peak.telecommunity.com/DevCenter/setuptools setuptools] (version 0.6) installed.\r\n\r\nTo install `setuptools`, download the bootstrap module [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] and execute it as follows:\r\n\r\n{{{\r\n$ python ez_setup.py\r\n}}}\r\n\r\nIf the `ez_setup.py` script fails to install the setuptools release, you can download it from [http://www.python.org/pypi/setuptools PyPI] and install it manually.\r\n\r\nPlugins can also consist of a single `.py` file dropped directly into either the project''s or the shared `plugins` directory.\r\n\r\n== Installing a Trac plugin ==\r\n\r\n=== For a single project ===\r\n\r\nPlugins are typically packaged as [http://peak.telecommunity.com/DevCenter/PythonEggs Python eggs]. That means they are .zip archives with the file extension `.egg`.\r\n\r\nIf you have downloaded a source distribution of a plugin, and want to build the `.egg` file:\r\n\r\n * Unpack the source. It should provide `setup.py`.\r\n * Run:\r\n\r\n{{{\r\n$ python setup.py bdist_egg\r\n}}}\r\n\r\nYou should have a *.egg file. Examine the output of running python to find where this was created.\r\n\r\nOnce you have the plugin archive, copy it into the `plugins` directory of the [wiki:TracEnvironment project environment]. Also, make sure that the web server has sufficient permissions to read the plugin egg. Then restart the web server. If you are running as a [wiki:TracStandalone "tracd" standalone server], restart tracd (kill and run again).\r\n\r\nTo uninstall a plugin installed this way, remove the egg from the `plugins` directory and restart the web server.\r\n\r\nNote: the Python version that the egg is built with ''''must'''' match the Python version with which Trac is run. For example, if you''re running Trac under Python 2.5, but have upgraded your standalone Python to 2.6, the eggs won''t be recognized.\r\n\r\nNote also: in a multi-project setup, a pool of Python interpreter instances will be dynamically allocated to projects based on need; since plugins occupy a place in Python''s module system, the first version of any given plugin to be loaded will be used for all projects. In other words, you cannot use different versions of a single plugin in two projects of a multi-project setup. It may be safer to install plugins for all projects (see below), and then enable them selectively on a project-by-project basis.\r\n\r\n=== For all projects ===\r\n\r\n==== With an .egg file ====\r\n\r\nSome plugins (such as [trac:SpamFilter SpamFilter]) are downloadable as an `.egg` file that can be installed with the `easy_install` program:\r\n{{{\r\neasy_install TracSpamFilter\r\n}}}\r\n\r\nIf `easy_install` is not on your system, see the Requirements section above to install it. Windows users will need to add the `Scripts` directory of their Python installation (for example, `C:\\Python24\\Scripts`) to their `PATH` environment variable (see [http://peak.telecommunity.com/DevCenter/EasyInstall#windows-notes easy_install Windows notes] for more information).\r\n\r\nIf Trac reports permission errors after installing a zipped egg, and you would rather not bother providing a egg cache directory writable by the web server, you can get around it by simply unzipping the egg. Just pass `--always-unzip` to `easy_install`:\r\n{{{\r\neasy_install --always-unzip TracSpamFilter-0.4.1_r10106-py2.6.egg\r\n}}}\r\nYou should end up with a directory having the same name as the zipped egg (complete with `.egg` extension) and containing its uncompressed contents.\r\n\r\nTrac also searches for plugins installed in the shared plugins directory ''''(since 0.10)''''; see TracIni#GlobalConfiguration. This is a convenient way to share the installation of plugins across several, but not all, environments.\r\n\r\n==== From source ====\r\n\r\n`easy_install` makes installing from source a snap. Just give it the URL to either a Subversion repository or a tarball/zip of the source:\r\n{{{\r\neasy_install http://svn.edgewall.com/repos/trac/plugins/0.12/spam-filter-captcha\r\n}}}\r\n\r\n==== Enabling the plugin ====\r\n\r\nUnlike plugins installed per-environment, you''ll have to explicitly enable globally installed plugins via [wiki:TracIni trac.ini]. This also applies to plugins installed in the shared plugins directory, i.e. the path specified in the `[inherit] plugins_dir` configuration option. \r\n\r\nThis is done in the `[components]` section of the configuration file. For example:\r\n{{{\r\n[components]\r\ntracspamfilter.* = enabled\r\n}}}\r\n\r\nThe name of the option is the Python package of the plugin. This should be specified in the documentation of the plugin, but can also be easily discovered by looking at the source (look for a top-level directory that contains a file named `__init__.py`).\r\n\r\nNote: After installing the plugin, you must restart your web server.\r\n\r\n==== Uninstalling ====\r\n\r\n`easy_install` or `python setup.py` does not have an uninstall feature. Hower, it is usually quite trivial to remove a globally-installed egg and reference:\r\n\r\n 1. Do `easy_install -m [plugin name]` to remove references from `$PYTHONLIB/site-packages/easy-install.pth` when the plugin installed by setuptools.\r\n 1. Delete executables from `/usr/bin`, `/usr/local/bin`, or `C:\\\\Python*\\Scripts`. To find what executables are involved, refer to the `[console-script]` section of `setup.py`.\r\n 1. Delete the .egg file or folder from where it''s installed (usually inside `$PYTHONLIB/site-packages/`).\r\n 1. Restart the web server.\r\n\r\nIf you are uncertain about the location of the egg, here''s a small tip to help locate an egg (or any package). Just replace `myplugin` with whatever namespace the plugin uses (as used when enabling the plugin):\r\n{{{\r\n>>> import myplugin\r\n>>> print myplugin.__file__\r\n/opt/local/python24/lib/site-packages/myplugin-0.4.2-py2.4.egg/myplugin/__init__.pyc\r\n}}}\r\n\r\n== Setting up the plugin cache ==\r\n\r\nSome plugins will need to be extracted by the Python eggs runtime (`pkg_resources`), so that their contents are actual files on the file system. The directory in which they are extracted defaults to `.python-eggs` in the home directory of the current user, which may or may not be a problem. You can, however, override the default location using the `PYTHON_EGG_CACHE` environment variable.\r\n\r\nTo do this from the Apache configuration, use the `SetEnv` directive:\r\n{{{\r\nSetEnv PYTHON_EGG_CACHE /path/to/dir\r\n}}}\r\n\r\nThis works whether you''re using the [wiki:TracCgi CGI] or the [wiki:TracModPython mod_python] front-end. Put this directive next to where you set the path to the [wiki:TracEnvironment Trac environment], i.e. in the same `<Location>` block.\r\n\r\nFor example (for CGI):\r\n{{{\r\n <Location /trac>\r\n SetEnv TRAC_ENV /path/to/projenv\r\n SetEnv PYTHON_EGG_CACHE /path/to/dir\r\n </Location>\r\n}}}\r\n\r\nOr (for mod_python):\r\n{{{\r\n <Location /trac>\r\n SetHandler mod_python\r\n ...\r\n SetEnv PYTHON_EGG_CACHE /path/to/dir\r\n </Location>\r\n}}}\r\n\r\n ''''Note: !SetEnv requires the `mod_env` module which needs to be activated for Apache. In this case the !SetEnv directive can also be used in the `mod_python` Location block.''''\r\n\r\nFor [wiki:TracFastCgi FastCGI], you''ll need to `-initial-env` option, or whatever is provided by your web server for setting environment variables. \r\n\r\n ''''Note: that if you already use -initial-env to set the project directory for either a single project or parent you will need to add an additional -initial-env directive to the !FastCgiConfig directive. I.e.\r\n\r\n{{{\r\nFastCgiConfig -initial-env TRAC_ENV=/var/lib/trac -initial-env PYTHON_EGG_CACHE=/var/lib/trac/plugin-cache\r\n}}}\r\n\r\n=== About hook scripts ===\r\n\r\nIf you''ve set up some subversion hook scripts that call the Trac engine, such as the post-commit hook script provided in the `/contrib` directory, make sure you define the `PYTHON_EGG_CACHE` environment variable within these scripts as well.\r\n\r\n== Troubleshooting ==\r\n\r\n=== Is setuptools properly installed? ===\r\n\r\nTry this from the command line:\r\n{{{\r\n$ python -c "import pkg_resources"\r\n}}}\r\n\r\nIf you get ''''''no output'''''', setuptools ''''''is'''''' installed. Otherwise, you''ll need to install it before plugins will work in Trac.\r\n\r\n=== Did you get the correct version of the Python egg? ===\r\n\r\nPython eggs have the Python version encoded in their filename. For example, `MyPlugin-1.0-py2.5.egg` is an egg for Python 2.5, and will ''''''not'''''' be loaded if you''re running a different Python version (such as 2.4 or 2.6).\r\n\r\nAlso, verify that the egg file you downloaded is indeed a .zip archive. If you downloaded it from a Trac site, chances are you downloaded the HTML preview page instead.\r\n\r\n=== Is the plugin enabled? ===\r\n\r\nIf you install a plugin globally (i.e., ''''not'''' inside the `plugins` directory of the Trac project environment), you must explicitly enable it in [TracIni trac.ini]. Make sure that:\r\n\r\n * ...you actually added the necessary line(s) to the `[components]` section.\r\n * ...the package/module names are correct.\r\n * ...the value is "enabled", not "enable" or "Enable".\r\n\r\n=== Check the permissions on the .egg file ===\r\n\r\nTrac must be able to read the .egg file. \r\n\r\n=== Check the log files ===\r\n\r\nEnable [wiki:TracLogging logging] and set the log level to `DEBUG`, then watch the log file for messages about loading plugins.\r\n\r\n=== Verify you have proper permissions ===\r\n\r\nSome plugins require you have special permissions in order to use them. [trac:WebAdmin WebAdmin], for example, requires the user to have TRAC_ADMIN permissions for it to show up on the navigation bar.\r\n\r\n=== Is the wrong version of the plugin loading? ===\r\n\r\nIf you put your plugins inside plugins directories, and certainly if you have more than one project, you need to make sure that the correct version of the plugin is loading. Here are some basic rules:\r\n\r\n * Only one version of the plugin can be loaded for each running Trac server (i.e., each Python process). The Python namespaces and module list will be shared, and it cannot handle duplicates. Whether a plugin is `enabled` or `disabled` makes no difference.\r\n * A globally-installed plugin (typically `setup.py install`) will override any version in the global or project plugins directories. A plugin from the global plugins directory will be located ''''before'''' any project plugins directory.\r\n * If your Trac server hosts more than one project (as with `TRAC_ENV_PARENT_DIR` setups), having two versions of a plugin in two different projects will give uncertain results. Only one of them will load, and the one loaded will be shared by both projects. Trac will load the first plugin found, usually from the project that receives the first request.\r\n * Having more than one version listed inside Python site-packages is fine (i.e., installed with `setup.py install`) -- setuptools will make sure you get the version installed most recently. However, don''t store more than one version inside a global or project plugins directory -- neither version number nor installed date will matter at all. There is no way to determine which one will be located first when Trac searches the directory for plugins.\r\n\r\n=== If all of the above failed ===\r\n\r\nOkay, so the logs don''t mention plugins, the egg is readable, the Python version is correct, ''''and'''' the egg has been installed globally (and is enabled in trac.ini)... and it ''''still'''' doesn''t work or give any error messages or any other indication as to why. Hop on the [trac:IrcChannel IrcChannel] and ask away!\r\n\r\n== Web-based plugin administration ==\r\n\r\nThe WebAdmin plugin (part of the core since 0.11) offers limited support for plugin configuration through the web to users with `TRAC_ADMIN` permission:\r\n\r\n* en/disabling installed plugins\r\n* installing plugins by uploading them as eggs\r\n\r\nYou probably want to disable the second function for security reasons: in `trac.ini`, in the `[components]` section, add the line\r\n{{{\r\ntrac.admin.web_ui.PluginAdminPanel = disabled\r\n}}}\r\nThis disables the whole panel, so the first function will no longer be available either.\r\n\r\n----\r\nSee also TracGuide, [trac:PluginList plugin list], [trac:TracDev/ComponentArchitecture component architecture].', NULL, NULL),
('TracTicketsCustomFields', 1, 1362994208335124, 'trac', '127.0.0.1', '= Custom Ticket Fields =\r\nTrac supports adding custom, user-defined fields to the ticket module. Using custom fields, you can add typed, site-specific properties to tickets.\r\n\r\n== Configuration ==\r\nConfiguring custom ticket fields is done in the [wiki:TracIni trac.ini] file. All field definitions should be under a section named `[ticket-custom]`.\r\n\r\nThe syntax of each field definition is:\r\n{{{\r\n FIELD_NAME = TYPE\r\n (FIELD_NAME.OPTION = VALUE)\r\n ...\r\n}}}\r\nThe example below should help to explain the syntax.\r\n\r\n=== Available Field Types and Options ===\r\n * ''''''text'''''': A simple (one line) text field.\r\n * label: Descriptive label.\r\n * value: Default value.\r\n * order: Sort order placement. (Determines relative placement in forms with respect to other custom fields.)\r\n * format: One of: \r\n * `plain` for plain text \r\n * `wiki` to interpret the content as WikiFormatting (''''since 0.11.3'''') \r\n * `reference` to treat the content as a queryable value (''''since 1.0'''') \r\n * `list` to interpret the content as a list of queryable values, separated by whitespace (''''since 1.0'''')\r\n * ''''''checkbox'''''': A boolean value check box.\r\n * label: Descriptive label.\r\n * value: Default value (0 or 1).\r\n * order: Sort order placement.\r\n * ''''''select'''''': Drop-down select box. Uses a list of values.\r\n * label: Descriptive label.\r\n * options: List of values, separated by ''''''|'''''' (vertical pipe).\r\n * value: Default value (one of the values from options).\r\n * order: Sort order placement.\r\n * ''''''radio'''''': Radio buttons. Essentially the same as ''''''select''''''.\r\n * label: Descriptive label.\r\n * options: List of values, separated by ''''''|'''''' (vertical pipe).\r\n * value: Default value (one of the values from options).\r\n * order: Sort order placement.\r\n * ''''''textarea'''''': Multi-line text area.\r\n * label: Descriptive label.\r\n * value: Default text.\r\n * cols: Width in columns.\r\n * rows: Height in lines.\r\n * order: Sort order placement.\r\n * format: Either `plain` for plain text or `wiki` to interpret the content as WikiFormatting. (''''since 0.11.3'''')\r\n\r\n=== Sample Config ===\r\n{{{\r\n[ticket-custom]\r\n\r\ntest_one = text\r\ntest_one.label = Just a text box\r\n\r\ntest_two = text\r\ntest_two.label = Another text-box\r\ntest_two.value = Default [mailto:joe@nospam.com owner]\r\ntest_two.format = wiki\r\n\r\ntest_three = checkbox\r\ntest_three.label = Some checkbox\r\ntest_three.value = 1\r\n\r\ntest_four = select\r\ntest_four.label = My selectbox\r\ntest_four.options = one|two|third option|four\r\ntest_four.value = two\r\n\r\ntest_five = radio\r\ntest_five.label = Radio buttons are fun\r\ntest_five.options = uno|dos|tres|cuatro|cinco\r\ntest_five.value = dos\r\n\r\ntest_six = textarea\r\ntest_six.label = This is a large textarea\r\ntest_six.value = Default text\r\ntest_six.cols = 60\r\ntest_six.rows = 30\r\n}}}\r\n\r\n''''Note: To make entering an option for a `select` type field optional, specify a leading `|` in the `fieldname.options` option.''''\r\n\r\n=== Reports Involving Custom Fields ===\r\n\r\nCustom ticket fields are stored in the `ticket_custom` table, not in the `ticket` table. So to display the values from custom fields in a report, you will need a join on the 2 tables. Let''s use an example with a custom ticket field called `progress`.\r\n\r\n{{{\r\n#!sql\r\nSELECT p.value AS __color__,\r\n id AS ticket, summary, owner, c.value AS progress\r\n FROM ticket t, enum p, ticket_custom c\r\n WHERE status IN (''assigned'') AND t.id = c.ticket AND c.name = ''progress''\r\nAND p.name = t.priority AND p.type = ''priority''\r\n ORDER BY p.value\r\n}}}\r\n''''''Note'''''' that this will only show tickets that have progress set in them, which is ''''''not the same as showing all tickets''''''. If you created this custom ticket field ''''after'''' you have already created some tickets, they will not have that field defined, and thus they will never show up on this ticket query. If you go back and modify those tickets, the field will be defined, and they will appear in the query. If that''s all you want, you''re set.\r\n\r\nHowever, if you want to show all ticket entries (with progress defined and without), you need to use a `JOIN` for every custom field that is in the query.\r\n{{{\r\n#!sql\r\nSELECT p.value AS __color__,\r\n id AS ticket, summary, component, version, milestone, severity,\r\n (CASE status WHEN ''assigned'' THEN owner||'' *'' ELSE owner END) AS owner,\r\n time AS created,\r\n changetime AS _changetime, description AS _description,\r\n reporter AS _reporter,\r\n (CASE WHEN c.value = ''0'' THEN ''None'' ELSE c.value END) AS progress\r\n FROM ticket t\r\n LEFT OUTER JOIN ticket_custom c ON (t.id = c.ticket AND c.name = ''progress'')\r\n JOIN enum p ON p.name = t.priority AND p.type=''priority''\r\n WHERE status IN (''new'', ''assigned'', ''reopened'')\r\n ORDER BY p.value, milestone, severity, time\r\n}}}\r\n\r\nNote in particular the `LEFT OUTER JOIN` statement here.\r\n\r\n=== Updating the database ===\r\n\r\nAs noted above, any tickets created before a custom field has been defined will not have a value for that field. Here''s a bit of SQL (tested with SQLite) that you can run directly on the Trac database to set an initial value for custom ticket fields. Inserts the default value of ''None'' into a custom field called ''request_source'' for all tickets that have no existing value:\r\n\r\n{{{\r\n#!sql\r\nINSERT INTO ticket_custom\r\n (ticket, name, value)\r\n SELECT \r\n id AS ticket,\r\n ''request_source'' AS name,\r\n ''None'' AS value\r\n FROM ticket \r\n WHERE id NOT IN (\r\n SELECT ticket FROM ticket_custom\r\n );\r\n}}}\r\n\r\nIf you added multiple custom fields at different points in time, you should be more specific in the subquery on table {{{ticket}}} by adding the exact custom field name to the query:\r\n\r\n{{{\r\n#!sql\r\nINSERT INTO ticket_custom\r\n (ticket, name, value)\r\n SELECT \r\n id AS ticket,\r\n ''request_source'' AS name,\r\n ''None'' AS value\r\n FROM ticket \r\n WHERE id NOT IN (\r\n SELECT ticket FROM ticket_custom WHERE name = ''request_source''\r\n );\r\n}}}\r\n\r\n----\r\nSee also: TracTickets, TracIni', NULL, NULL),
('WikiStart', 1, 1362994208337041, 'trac', '127.0.0.1', '= Welcome to Trac 1.0.1 =\r\n\r\nTrac is a ''''''minimalistic'''''' approach to ''''''web-based'''''' management of\r\n''''''software projects''''''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress.\r\n\r\nAll aspects of Trac have been designed with the single goal to \r\n''''''help developers write great software'''''' while ''''''staying out of the way''''''\r\nand imposing as little as possible on a team''s established process and\r\nculture.\r\n\r\nAs all Wiki pages, this page is editable, this means that you can\r\nmodify the contents of this page simply by using your\r\nweb-browser. Simply click on the "Edit this page" link at the bottom\r\nof the page. WikiFormatting will give you a detailed description of\r\navailable Wiki formatting commands.\r\n\r\n"[wiki:TracAdmin trac-admin] ''''yourenvdir'''' initenv" created\r\na new Trac environment, containing a default set of wiki pages and some sample\r\ndata. This newly created environment also contains \r\n[wiki:TracGuide documentation] to help you get started with your project.\r\n\r\nYou can use [wiki:TracAdmin trac-admin] to configure\r\n[http://trac.edgewall.org/ Trac] to better fit your project, especially in\r\nregard to ''''components'''', ''''versions'''' and ''''milestones''''. \r\n\r\n\r\nTracGuide is a good place to start.\r\n\r\nEnjoy! [[BR]]\r\n''''The Trac Team''''\r\n\r\n== Starting Points ==\r\n\r\n * TracGuide -- Built-in Documentation\r\n * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project\r\n * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions\r\n * TracSupport -- Trac Support\r\n\r\nFor a complete list of local wiki pages, see TitleIndex.\r\n', NULL, NULL),
('WikiNewPage', 1, 1362994208338509, 'trac', '127.0.0.1', '= Steps to Add a New Wiki Page =\r\n[[TracGuideToc]]\r\n\r\nNote: make sure you actually have the rights to edit wiki pages. If you don''t see the **Edit this page** button, read the information relative to the editing policy for your Trac installation (usually on the front page WikiStart), or contact your local Trac administrator.\r\n\r\n 1. Choose a name for your new page. See WikiPageNames for naming conventions.\r\n 2. Edit an existing page (or any other resources that support WikiFormatting and add a [TracLinks link] to your new page. Save your changes.\r\n 3. Follow the link you created to take you to the new page. Trac will display a "describe !PageName here" message.\r\n 4. Click the "Edit this page" button to edit and add content to your new page. Save your changes.\r\n 5. All done. Your new page is published.\r\n\r\nYou can skip the second step by entering the CamelCase name of the page in the quick-search field at the top of the page. But note that the page will effectively be "orphaned" unless you link to it from somewhere else.\r\n\r\n== Rename a page #renaming\r\n\r\nWhile picking up good WikiPageNames is important, you can always change your mind\r\nand rename the page later.\r\n\r\nYou''ll need to ask for the WIKI_RENAME permission in order to be allowed to do this.\r\nWhen renaming a page, you''ll be offered the possibility to create a redirection page, so that links pointing to the old location will not be left dangling.\r\n\r\n----\r\nSee also: TracWiki, PageTemplates, WikiFormatting, TracLinks, WikiDeletePage\r\n', NULL, NULL),
('InterTrac', 1, 1362994208339918, 'trac', '127.0.0.1', '= InterTrac Links =\r\n\r\nTrac supports a convenient way to refer to resources of other Trac servers, from within the Wiki markup, since version 0.10.\r\n\r\n== Definitions ==\r\n\r\nAn InterTrac link can be seen as a scoped TracLinks.\r\nIt is used for referring to a Trac resource \r\n(Wiki page, changeset, ticket, ...) located in another\r\nTrac environment.\r\n\r\n== List of Active InterTrac Prefixes ==\r\n\r\n[[InterTrac]]\r\n\r\n== Link Syntax ==\r\n\r\nSimply use the name of the other Trac environment as a prefix, \r\nfollowed by a colon, ending with the resource located in the other environment.\r\n\r\n{{{\r\n<target_environment>:<TracLinks>\r\n}}}\r\n\r\nThe other resource is specified using a regular TracLinks, of any flavor.\r\n\r\nThat target environment name is either the real name of the \r\nenvironment, or an alias for it. \r\nThe aliases are defined in `trac.ini` (see below).\r\nThe prefix is case insensitive.\r\n\r\nIf the InterTrac link is enclosed in square brackets (like `[th:WikiExtrasPlugin]`), the InterTrac prefix is removed in the displayed link, like a normal link resolver would be (i.e. the above would be displayed as `WikiExtrasPlugin`).\r\n\r\nFor convenience, there''s also some alternative short-hand form, \r\nwhere one can use an alias as an immediate prefix \r\nfor the identifier of a ticket, changeset or report:\r\n(e.g. `#T234`, `[T1508]`, `[trac 1508]`, ...)\r\n\r\n== Examples ==\r\n\r\nIt is necessary to setup a configuration for the InterTrac facility.\r\nThis configuration has to be done in the TracIni file, `[intertrac]` section.\r\n\r\nExample configuration:\r\n{{{\r\n...\r\n[intertrac]\r\n# -- Example of setting up an alias:\r\nt = trac\r\n\r\n# -- Link to an external Trac:\r\ntrac.title = Edgewall''s Trac for Trac\r\ntrac.url = http://trac.edgewall.org\r\n}}}\r\n\r\nThe `.url` is mandatory and is used for locating the other Trac.\r\nThis can be a relative URL in case that Trac environment is located \r\non the same server.\r\n\r\nThe `.title` information will be used for providing an useful tooltip\r\nwhen moving the cursor over an InterTrac links.\r\n\r\nFinally, the `.compat` option can be used to activate or disable\r\na ''''compatibility'''' mode:\r\n * If the targeted Trac is running a version below [trac:milestone:0.10 0.10] \r\n ([trac:r3526 r3526] to be precise), then it doesn''t know how to dispatch an InterTrac \r\n link, and it''s up to the local Trac to prepare the correct link. \r\n Not all links will work that way, but the most common do. \r\n This is called the compatibility mode, and is `true` by default. \r\n * If you know that the remote Trac knows how to dispatch InterTrac links, \r\n you can explicitly disable this compatibility mode and then ''''any'''' \r\n TracLinks can become an InterTrac link.\r\n\r\nNow, given the above configuration, one could create the following links:\r\n * to this InterTrac page:\r\n * `trac:wiki:InterTrac` trac:wiki:InterTrac\r\n * `t:wiki:InterTrac` t:wiki:InterTrac\r\n * Keys are case insensitive: `T:wiki:InterTrac` T:wiki:InterTrac\r\n * to the ticket #234:\r\n * `trac:ticket:234` trac:ticket:234\r\n * `trac:#234` trac:#234 \r\n * `#T234` #T234\r\n * to the changeset [1912]:\r\n * `trac:changeset:1912` trac:changeset:1912\r\n * `[T1912]` [T1912]\r\n * to the log range [3300:3330]: ''''''(Note: the following ones need `trac.compat=false`)''''''\r\n * `trac:log:@3300:3330` trac:log:@3300:3330 \r\n * `[trac 3300:3330]` [trac 3300:3330] \r\n * finally, to link to the start page of a remote trac, simply use its prefix followed by '':'', inside an explicit link. Example: `[th: Trac Hacks]` (''''since 0.11; note that the ''''remote'''' Trac has to run 0.11 for this to work'''')\r\n\r\nThe generic form `intertrac_prefix:module:id` is translated\r\nto the corresponding URL `<remote>/module/id`, shorthand links\r\nare specific to some modules (e.g. !#T234 is processed by the\r\nticket module) and for the rest (`intertrac_prefix:something`),\r\nwe rely on the TracSearch#quickjump facility of the remote Trac.\r\n\r\n----\r\nSee also: TracLinks, InterWiki\r\n', NULL, NULL),
('TracQuery', 1, 1362994208341578, 'trac', '127.0.0.1', '= Trac Ticket Queries =\r\n[[TracGuideToc]]\r\n\r\nIn addition to [wiki:TracReports reports], Trac provides support for ''''custom ticket queries'''', used to display lists of tickets meeting a specified set of criteria. \r\n\r\nTo configure and execute a custom query, switch to the ''''View Tickets'''' module from the navigation bar, and select the ''''Custom Query'''' link.\r\n\r\n== Filters ==\r\n\r\nWhen you first go to the query page the default filter will display tickets relevant to you:\r\n * If logged in then all open tickets it will display open tickets assigned to you.\r\n * If not logged in but you have specified a name or email address in the preferences then it will display all open tickets where your email (or name if email not defined) is in the CC list.\r\n * If not logged and no name/email defined in the preferences then all open issues are displayed.\r\n\r\nCurrent filters can be removed by clicking the button to the left with the minus sign on the label. New filters are added from the pulldown lists at the bottom corners of the filters box (''And'' conditions on the left, ''Or'' conditions on the right). Filters with either a text box or a pulldown menu of options can be added multiple times to perform an ''''or'''' of the criteria.\r\n\r\nYou can use the fields just below the filters box to group the results based on a field, or display the full description for each ticket.\r\n\r\nOnce you''ve edited your filters click the ''''Update'''' button to refresh your results.\r\n\r\n== Navigating Tickets ==\r\nClicking on one of the query results will take you to that ticket. You can navigate through the results by clicking the ''''Next Ticket'''' or ''''Previous Ticket'''' links just below the main menu bar, or click the ''''Back to Query'''' link to return to the query page. \r\n\r\nYou can safely edit any of the tickets and continue to navigate through the results using the ''''!Next/Previous/Back to Query'''' links after saving your results. When you return to the query ''''any tickets which were edited'''' will be displayed with italicized text. If one of the tickets was edited such that [[html(<span style="color: grey">it no longer matches the query criteria </span>)]] the text will also be greyed. Lastly, if ''''''a new ticket matching the query criteria has been created'''''', it will be shown in bold. \r\n\r\nThe query results can be refreshed and cleared of these status indicators by clicking the ''''Update'''' button again.\r\n\r\n== Saving Queries ==\r\n\r\nTrac allows you to save the query as a named query accessible from the reports module. To save a query ensure that you have ''''Updated'''' the view and then click the ''''Save query'''' button displayed beneath the results.\r\nYou can also save references to queries in Wiki content, as described below.\r\n\r\n''''Note:'''' one way to easily build queries like the ones below, you can build and test the queries in the Custom report module and when ready - click ''''Save query''''. This will build the query string for you. All you need to do is remove the extra line breaks.\r\n\r\n''''Note:'''' you must have the ''''''REPORT_CREATE'''''' permission in order to save queries to the list of default reports. The ''''Save query'''' button will only appear if you are logged in as a user that has been granted this permission. If your account does not have permission to create reports, you can still use the methods below to save a query.\r\n\r\n\r\n=== Using TracLinks ===\r\n\r\nYou may want to save some queries so that you can come back to them later. You can do this by making a link to the query from any Wiki page.\r\n{{{\r\n[query:status=new|assigned|reopened&version=1.0 Active tickets against 1.0]\r\n}}}\r\n\r\nWhich is displayed as:\r\n [query:status=new|assigned|reopened&version=1.0 Active tickets against 1.0]\r\n\r\nThis uses a very simple query language to specify the criteria (see [wiki:TracQuery#QueryLanguage Query Language]).\r\n\r\nAlternatively, you can copy the query string of a query and paste that into the Wiki link, including the leading `?` character:\r\n{{{\r\n[query:?status=new&status=assigned&status=reopened&group=owner Assigned tickets by owner]\r\n}}}\r\n\r\nWhich is displayed as:\r\n [query:?status=new&status=assigned&status=reopened&group=owner Assigned tickets by owner]\r\n\r\n=== Using the `[[TicketQuery]]` Macro ===\r\n\r\nThe [trac:TicketQuery TicketQuery] macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.\r\n\r\nExample:\r\n{{{\r\n[[TicketQuery(version=0.6|0.7&resolution=duplicate)]]\r\n}}}\r\n\r\nThis is displayed as:\r\n [[TicketQuery(version=0.6|0.7&resolution=duplicate)]]\r\n\r\nJust like the [wiki:TracQuery#UsingTracLinks query: wiki links], the parameter of this macro expects a query string formatted according to the rules of the simple [wiki:TracQuery#QueryLanguage ticket query language]. This also allows displaying the link and description of a single ticket:\r\n{{{\r\n[[TicketQuery(id=123)]]\r\n}}}\r\n\r\nThis is displayed as:\r\n [[TicketQuery(id=123)]]\r\n\r\nA more compact representation without the ticket summaries is also available:\r\n{{{\r\n[[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]\r\n}}}\r\n\r\nThis is displayed as:\r\n [[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]\r\n\r\nFinally, if you wish to receive only the number of defects that match the query, use the ``count`` parameter.\r\n\r\n{{{\r\n[[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]]\r\n}}}\r\n\r\nThis is displayed as:\r\n [[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]]\r\n\r\n=== Customizing the ''''table'''' format ===\r\nYou can also customize the columns displayed in the table format (''''format=table'''') by using ''''col=<field>'''' - you can specify multiple fields and what order they are displayed by placing pipes (`|`) between the columns like below:\r\n\r\n{{{\r\n[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]\r\n}}}\r\n\r\nThis is displayed as:\r\n[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]\r\n\r\n==== Full rows ====\r\nIn ''''table'''' format you can also have full rows by using ''''rows=<field>'''' like below:\r\n\r\n{{{\r\n[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter,rows=description)]]\r\n}}}\r\n\r\nThis is displayed as:\r\n[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter,rows=description)]]\r\n\r\n\r\n=== Query Language ===\r\n\r\n`query:` TracLinks and the `[[TicketQuery]]` macro both use a mini “query language” for specifying query filters. Basically, the filters are separated by ampersands (`&`). Each filter then consists of the ticket field name, an operator, and one or more values. More than one value are separated by a pipe (`|`), meaning that the filter matches any of the values. To include a literal `&` or `|` in a value, escape the character with a backslash (`\\`).\r\n\r\nThe available operators are:\r\n|| ''''''`=`'''''' || the field content exactly matches one of the values ||\r\n|| ''''''`~=`'''''' || the field content contains one or more of the values ||\r\n|| ''''''`^=`'''''' || the field content starts with one of the values ||\r\n|| ''''''`$=`'''''' || the field content ends with one of the values ||\r\n\r\nAll of these operators can also be negated:\r\n|| ''''''`!=`'''''' || the field content matches none of the values ||\r\n|| ''''''`!~=`'''''' || the field content does not contain any of the values ||\r\n|| ''''''`!^=`'''''' || the field content does not start with any of the values ||\r\n|| ''''''`!$=`'''''' || the field content does not end with any of the values ||\r\n\r\nThe date fields `created` and `modified` can be constrained by using the `=` operator and specifying a value containing two dates separated by two dots (`..`). Either end of the date range can be left empty, meaning that the corresponding end of the range is open. The date parser understands a few natural date specifications like "3 weeks ago", "last month" and "now", as well as Bugzilla-style date specifications like "1d", "2w", "3m" or "4y" for 1 day, 2 weeks, 3 months and 4 years, respectively. Spaces in date specifications can be left out to avoid having to quote the query string. \r\n|| ''''''`created=2007-01-01..2008-01-01`'''''' || query tickets created in 2007 ||\r\n|| ''''''`created=lastmonth..thismonth`'''''' || query tickets created during the previous month ||\r\n|| ''''''`modified=1weekago..`'''''' || query tickets that have been modified in the last week ||\r\n|| ''''''`modified=..30daysago`'''''' || query tickets that have been inactive for the last 30 days ||\r\n\r\n----\r\nSee also: TracTickets, TracReports, TracGuide\r\n', NULL, NULL),
('WikiProcessors', 1, 1362994208343496, 'trac', '127.0.0.1', '= Wiki Processors =\r\n\r\nProcessors are WikiMacros designed to provide alternative markup formats for the [TracWiki Wiki engine]. Processors can be thought of as ''''macro functions to process user-edited text''''. \r\n\r\nWiki processors can be used in any Wiki text throughout Trac,\r\nfor various different purposes, like:\r\n - [#CodeHighlightingSupport syntax highlighting] or for rendering text verbatim,\r\n - rendering [#HTMLrelated Wiki markup inside a context], \r\n like inside <div> blocks or <span> or within <td> or <th> table cells,\r\n - using an alternative markup syntax, like [wiki:WikiHtml raw HTML] and\r\n [wiki:WikiRestructuredText Restructured Text],\r\n or [http://www.textism.com/tools/textile/ textile]\r\n\r\n\r\n== Using Processors ==\r\n\r\nTo use a processor on a block of text, first delimit the lines using\r\na Wiki ''''code block'''':\r\n{{{\r\n{{{\r\nThe lines\r\nthat should be processed...\r\n}}}\r\n}}}\r\n\r\nImmediately after the `{{{` or on the line just below, \r\nadd `#!` followed by the ''''processor name''''.\r\n\r\n{{{\r\n{{{\r\n#!processorname\r\nThe lines\r\nthat should be processed...\r\n}}}\r\n}}}\r\n\r\nThis is the "shebang" notation, familiar to most UNIX users.\r\n\r\nBesides their content, some Wiki processors can also accept ''''parameters'''',\r\nwhich are then given as `key=value` pairs after the processor name, \r\non the same line. If `value` has to contain space, as it''s often the case for\r\nthe style parameter, a quoted string can be used (`key="value with space"`).\r\n\r\nAs some processors are meant to process Wiki markup, it''s quite possible to\r\n''''nest'''' processor blocks.\r\nYou may want to indent the content of nested blocks for increased clarity,\r\nthis extra indentation will be ignored when processing the content.\r\n\r\n\r\n== Examples ==\r\n\r\n||= Wiki Markup =||= Display =||\r\n{{{#!td colspan=2 align=center style="border: none"\r\n\r\n __Example 1__: Inserting raw HTML\r\n}}}\r\n|-----------------------------------------------------------------\r\n{{{#!td style="border: none"\r\n{{{\r\n{{{\r\n#!html\r\n<h1 style="color: grey">This is raw HTML</h1>\r\n}}}\r\n}}}\r\n}}}\r\n{{{#!td valign=top style="border: none; padding-left: 2em"\r\n{{{\r\n#!html\r\n<h1 style="color: grey">This is raw HTML</h1>\r\n}}}\r\n}}}\r\n|-----------------------------------------------------------------\r\n{{{#!td colspan=2 align=center style="border: none"\r\n\r\n __Example 2__: Highlighted Python code in a <div> block with custom style\r\n}}}\r\n|-----------------------------------------------------------------\r\n{{{#!td style="border: none"\r\n {{{\r\n {{{#!div style="background: #ffd; border: 3px ridge"\r\n\r\n This is an example of embedded "code" block:\r\n\r\n {{{\r\n #!python\r\n def hello():\r\n return "world"\r\n }}}\r\n\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td valign=top style="border: none; padding: 1em"\r\n {{{#!div style="background: #ffd; border: 3px ridge"\r\n\r\n This is an example of embedded "code" block:\r\n\r\n {{{\r\n #!python\r\n def hello():\r\n return "world"\r\n }}}\r\n\r\n }}}\r\n}}}\r\n|-----------------------------------------------------------------\r\n{{{#!td colspan=2 align=center style="border: none"\r\n\r\n __Example 3__: Searching tickets from a wiki page, by keywords.\r\n}}}\r\n|-----------------------------------------------------------------\r\n{{{#!td style="border: none"\r\n {{{\r\n {{{\r\n #!html\r\n <form action="/query" method="get"><div>\r\n <input type="text" name="keywords" value="~" size="30"/>\r\n <input type="submit" value="Search by Keywords"/>\r\n <!-- To control what fields show up use hidden fields\r\n <input type="hidden" name="col" value="id"/>\r\n <input type="hidden" name="col" value="summary"/>\r\n <input type="hidden" name="col" value="status"/>\r\n <input type="hidden" name="col" value="milestone"/>\r\n <input type="hidden" name="col" value="version"/>\r\n <input type="hidden" name="col" value="owner"/>\r\n <input type="hidden" name="col" value="priority"/>\r\n <input type="hidden" name="col" value="component"/>\r\n -->\r\n </div></form>\r\n }}}\r\n }}}\r\n}}}\r\n{{{#!td valign=top style="border: none; padding: 1em"\r\n {{{\r\n #!html\r\n <form action="/query" method="get"><div>\r\n <input type="text" name="keywords" value="~" size="30"/>\r\n <input type="submit" value="Search by Keywords"/>\r\n <!-- To control what fields show up use hidden fields\r\n <input type="hidden" name="col" value="id"/>\r\n <input type="hidden" name="col" value="summary"/>\r\n <input type="hidden" name="col" value="status"/>\r\n <input type="hidden" name="col" value="milestone"/>\r\n <input type="hidden" name="col" value="version"/>\r\n <input type="hidden" name="col" value="owner"/>\r\n <input type="hidden" name="col" value="priority"/>\r\n <input type="hidden" name="col" value="component"/>\r\n -->\r\n </div></form>\r\n }}}\r\n}}}\r\n== Available Processors ==\r\n\r\nThe following processors are included in the Trac distribution:\r\n\r\n|| ''''''`#!default`'''''' || Present the text verbatim in a preformatted text block. This is the same as specifying ''''no'''' processor name (and no `#!`) ||\r\n|| ''''''`#!comment`'''''' || Do not process the text in this section (i.e. contents exist only in the plain text - not in the rendered page). ||\r\n|||| ||\r\n||||= ''''''HTML related'''''' =||\r\n|| ''''''`#!html`'''''' || Insert custom HTML in a wiki page. ||\r\n|| ''''''`#!htmlcomment`'''''' || Insert an HTML comment in a wiki page (''''since 0.12''''). ||\r\n|| || Note that `#!html` blocks have to be ''''self-contained'''', i.e. you can''t start an HTML element in one block and close it later in a second block. Use the following processors for achieving a similar effect. ||\r\n|| ''''''`#!div`'''''' || Wrap an arbitrary Wiki content inside a <div> element (''''since 0.11''''). ||\r\n|| ''''''`#!span`'''''' || Wrap an arbitrary Wiki content inside a <span> element (''''since 0.11''''). ||\r\n|| ''''''`#!td`'''''' || Wrap an arbitrary Wiki content inside a <td> element (''''since 0.12'''') ||\r\n|| ''''''`#!th`'''''' || Wrap an arbitrary Wiki content inside a <th> element (''''since 0.12'''') ||\r\n|| ''''''`#!tr`'''''' || Can optionally be used for wrapping `#!td` and `#!th` blocks, either for specifying row attributes of better visual grouping (''''since 0.12'''') ||\r\n|| || See WikiHtml for example usage and more details about these processors. ||\r\n|||| ||\r\n||||= ''''''Other Markups'''''' =||\r\n|| ''''''`#!rst`'''''' || Trac support for Restructured Text. See WikiRestructuredText. ||\r\n|| ''''''`#!textile`'''''' || Supported if [http://cheeseshop.python.org/pypi/textile Textile] is installed. See [http://www.textism.com/tools/textile/ a Textile reference]. ||\r\n|||| ||\r\n||||= ''''''Code Highlighting Support'''''' =||\r\n|| ''''''`#!c`'''''' [[BR]] ''''''`#!cpp`'''''' (C++) [[BR]] ''''''`#!python`'''''' [[BR]] ''''''`#!perl`'''''' [[BR]] ''''''`#!ruby`'''''' [[BR]] ''''''`#!php`'''''' [[BR]] ''''''`#!asp`'''''' [[BR]] ''''''`#!java`'''''' [[BR]] ''''''`#!js`'''''' (Javascript) [[BR]] ''''''`#!sql`'''''' [[BR]] ''''''`#!xml`'''''' (XML or HTML) [[BR]] ''''''`#!sh`'''''' (!Bourne/Bash shell) [[BR]] ''''''etc.'''''' [[BR]] || Trac includes processors to provide inline syntax highlighting for source code in various languages. [[BR]] [[BR]] Trac relies on external software packages for syntax coloring, like [http://pygments.org Pygments]. [[BR]] [[BR]] See TracSyntaxColoring for information about which languages are supported and how to enable support for more languages. ||\r\n|||| ||\r\n\r\nUsing the MIME type as processor, it is possible to syntax-highlight the same languages that are supported when browsing source code.\r\n\r\n||||= ''''''MIME Type Processors'''''' =||\r\n{{{#!tr\r\n{{{#!td\r\nSome examples:\r\n {{{\r\n{{{\r\n#!text/html\r\n<h1>text</h1>\r\n}}}\r\n }}}\r\n}}}\r\n{{{#!td\r\nThe result will be syntax highlighted HTML code:\r\n {{{\r\n#!text/html\r\n<h1>text</h1>\r\n }}}\r\n\r\nThe same is valid for all other [TracSyntaxColoring#SyntaxColoringSupport mime types supported].\r\n}}}\r\n}}}\r\n{{{#!td\r\n {{{\r\n{{{\r\n#!diff\r\n--- Version 55\r\n+++ Version 56\r\n@@ -115,8 +115,9 @@\r\n name=''TracHelloWorld'', version=''1.0'',\r\n packages=find_packages(exclude=[''*.tests*'']),\r\n- entry_points = """\r\n- [trac.plugins]\r\n- helloworld = myplugs.helloworld\r\n- """,\r\n+ entry_points = {\r\n+ ''trac.plugins'': [\r\n+ ''helloworld = myplugs.helloworld'',\r\n+ ],\r\n+ },\r\n )\r\n}}}\r\n }}}\r\n}}}\r\n{{{#!td\r\n''''''`#!diff`'''''' has a particularly nice renderer:\r\n {{{\r\n#!diff\r\n--- Version 55\r\n+++ Version 56\r\n@@ -115,8 +115,9 @@\r\n name=''TracHelloWorld'', version=''1.0'',\r\n packages=find_packages(exclude=[''*.tests*'']),\r\n- entry_points = """\r\n- [trac.plugins]\r\n- helloworld = myplugs.helloworld\r\n- """,\r\n+ entry_points = {\r\n+ ''trac.plugins'': [\r\n+ ''helloworld = myplugs.helloworld'',\r\n+ ],\r\n+ },\r\n )\r\n }}}\r\n}}}\r\n\r\nFor more processor macros developed and/or contributed by users, visit: \r\n * [trac:ProcessorBazaar]\r\n * [trac:MacroBazaar]\r\n * [http://trac-hacks.org Trac Hacks] community site\r\n\r\nDeveloping processors is no different from Wiki macros. \r\nIn fact they work the same way, only the usage syntax differs. \r\nSee WikiMacros#DevelopingCustomMacros for more information.\r\n\r\n\r\n----\r\nSee also: WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracWorkflow', 1, 1362994208345414, 'trac', '127.0.0.1', '= The Trac Ticket Workflow System =\r\n[[TracGuideToc]]\r\n\r\nThe Trac issue database provides a configurable workflow.\r\n\r\n== The Default Ticket Workflow ==\r\n=== Environments upgraded from 0.10 ===\r\nWhen you run `trac-admin <env> upgrade`, your `trac.ini` will be modified to include a `[ticket-workflow]` section.\r\nThe workflow configured in this case is the original workflow, so that ticket actions will behave like they did in 0.10.\r\n\r\nGraphically, that looks like this:\r\n\r\n{{{#!Workflow width=500 height=240\r\nleave = * -> *\r\nleave.operations = leave_status\r\nleave.default = 1\r\naccept = new -> assigned\r\naccept.permissions = TICKET_MODIFY\r\naccept.operations = set_owner_to_self\r\nresolve = new,assigned,reopened -> closed\r\nresolve.permissions = TICKET_MODIFY\r\nresolve.operations = set_resolution\r\nreassign = new,assigned,reopened -> new\r\nreassign.permissions = TICKET_MODIFY\r\nreassign.operations = set_owner\r\nreopen = closed -> reopened\r\nreopen.permissions = TICKET_CREATE\r\nreopen.operations = del_resolution\r\n}}}\r\n\r\nThere are some significant "warts" in this; such as accepting a ticket sets it to ''assigned'' state, and assigning a ticket sets it to ''new'' state. Perfectly obvious, right?\r\nSo you will probably want to migrate to "basic" workflow; [trac:source:trunk/contrib/workflow/migrate_original_to_basic.py contrib/workflow/migrate_original_to_basic.py] may be helpful.\r\n\r\n=== Environments created with 0.11 ===\r\nWhen a new environment is created, a default workflow is configured in your trac.ini. This workflow is the basic workflow (described in `basic-workflow.ini`), which is somewhat different from the workflow of the 0.10 releases.\r\n\r\nGraphically, it looks like this:\r\n\r\n{{{#!Workflow width=700 height=300\r\nleave = * -> *\r\nleave.operations = leave_status\r\nleave.default = 1\r\naccept = new,assigned,accepted,reopened -> accepted\r\naccept.permissions = TICKET_MODIFY\r\naccept.operations = set_owner_to_self\r\nresolve = new,assigned,accepted,reopened -> closed\r\nresolve.permissions = TICKET_MODIFY\r\nresolve.operations = set_resolution\r\nreassign = new,assigned,accepted,reopened -> assigned\r\nreassign.permissions = TICKET_MODIFY\r\nreassign.operations = set_owner\r\nreopen = closed -> reopened\r\nreopen.permissions = TICKET_CREATE\r\nreopen.operations = del_resolution\r\n}}}\r\n\r\n== Additional Ticket Workflows ==\r\n\r\nThere are several example workflows provided in the Trac source tree; look in [trac:source:trunk/contrib/workflow contrib/workflow] for `.ini` config sections. One of those may be a good match for what you want. They can be pasted into the `[ticket-workflow]` section of your `trac.ini` file. However if you have existing tickets then there may be issues if those tickets have states that are not in the new workflow. \r\n\r\nHere are some [http://trac.edgewall.org/wiki/WorkFlow/Examples diagrams] of the above examples.\r\n\r\n== Basic Ticket Workflow Customization ==\r\n\r\nNote: Ticket "statuses" or "states" are not separately defined. The states a ticket can be in are automatically generated by the transitions defined in a workflow. Therefore, creating a new ticket state simply requires defining a state transition in the workflow that starts or ends with that state.\r\n\r\nCreate a `[ticket-workflow]` section in `trac.ini`.\r\nWithin this section, each entry is an action that may be taken on a ticket. \r\nFor example, consider the `accept` action from `simple-workflow.ini`:\r\n{{{\r\naccept = new,accepted -> accepted\r\naccept.permissions = TICKET_MODIFY\r\naccept.operations = set_owner_to_self\r\n}}}\r\nThe first line in this example defines the `accept` action, along with the states the action is valid in (`new` and `accepted`), and the new state of the ticket when the action is taken (`accepted`).\r\nThe `accept.permissions` line specifies what permissions the user must have to use this action.\r\nThe `accept.operations` line specifies changes that will be made to the ticket in addition to the status change when this action is taken. In this case, when a user clicks on `accept`, the ticket owner field is updated to the logged in user. Multiple operations may be specified in a comma separated list.\r\n\r\nThe available operations are:\r\n - del_owner -- Clear the owner field.\r\n - set_owner -- Sets the owner to the selected or entered owner.\r\n - ''''actionname''''`.set_owner` may optionally be set to a comma delimited list or a single value.\r\n - set_owner_to_self -- Sets the owner to the logged in user.\r\n - del_resolution -- Clears the resolution field\r\n - set_resolution -- Sets the resolution to the selected value.\r\n - ''''actionname''''`.set_resolution` may optionally be set to a comma delimited list or a single value. Example:\r\n {{{\r\nresolve_new = new -> closed\r\nresolve_new.name = resolve\r\nresolve_new.operations = set_resolution\r\nresolve_new.permissions = TICKET_MODIFY\r\nresolve_new.set_resolution = invalid,wontfix\r\n }}}\r\n - leave_status -- Displays "leave as <current status>" and makes no change to the ticket.\r\n''''''Note:'''''' Specifying conflicting operations (such as `set_owner` and `del_owner`) has unspecified results.\r\n\r\n{{{\r\nresolve_accepted = accepted -> closed\r\nresolve_accepted.name = resolve\r\nresolve_accepted.permissions = TICKET_MODIFY\r\nresolve_accepted.operations = set_resolution\r\n}}}\r\n\r\nIn this example, we see the `.name` attribute used. The action here is `resolve_accepted`, but it will be presented to the user as `resolve`.\r\n\r\nFor actions that should be available in all states, `*` may be used in place of the state. The obvious example is the `leave` action:\r\n{{{\r\nleave = * -> *\r\nleave.operations = leave_status\r\nleave.default = 1\r\n}}}\r\nThis also shows the use of the `.default` attribute. This value is expected to be an integer, and the order in which the actions are displayed is determined by this value. The action with the highest `.default` value is listed first, and is selected by default. The rest of the actions are listed in order of decreasing `.default` values.\r\nIf not specified for an action, `.default` is 0. The value may be negative.\r\n\r\nThere are a couple of hard-coded constraints to the workflow. In particular, tickets are created with status `new`, and tickets are expected to have a `closed` state. Further, the default reports/queries treat any state other than `closed` as an open state.\r\n\r\nWhile creating or modifying a ticket workflow, `contrib/workflow/workflow_parser.py` may be useful. It can create `.dot` files that [http://www.graphviz.org GraphViz] understands to provide a visual description of the workflow.\r\n\r\nThis can be done as follows (your install path may be different).\r\n{{{\r\ncd /var/local/trac_devel/contrib/workflow/\r\nsudo ./showworkflow /srv/trac/PlannerSuite/conf/trac.ini\r\n}}}\r\nAnd then open up the resulting `trac.pdf` file created by the script (it will be in the same directory as the `trac.ini` file).\r\n\r\nAn online copy of the workflow parser is available at http://foss.wush.net/cgi-bin/visual-workflow.pl\r\n\r\nAfter you have changed a workflow, you need to restart apache for the changes to take effect. This is important, because the changes will still show up when you run your script, but all the old workflow steps will still be there until the server is restarted.\r\n\r\n== Example: Adding optional Testing with Workflow ==\r\n\r\nBy adding the following to your [ticket-workflow] section of trac.ini you get optional testing. When the ticket is in new, accepted or needs_work status you can choose to submit it for testing. When it''s in the testing status the user gets the option to reject it and send it back to needs_work, or pass the testing and send it along to closed. If they accept it then it gets automatically marked as closed and the resolution is set to fixed. Since all the old work flow remains, a ticket can skip this entire section.\r\n\r\n{{{\r\ntesting = new,accepted,needs_work,assigned,reopened -> testing\r\ntesting.name = Submit to reporter for testing\r\ntesting.permissions = TICKET_MODIFY\r\n\r\nreject = testing -> needs_work\r\nreject.name = Failed testing, return to developer\r\n\r\npass = testing -> closed\r\npass.name = Passes Testing\r\npass.operations = set_resolution\r\npass.set_resolution = fixed\r\n}}}\r\n\r\n=== How to combine the `tracopt.ticket.commit_updater` with the testing workflow ===\r\n\r\nThe [[trac:source:trunk/tracopt/ticket/commit_updater.py|tracopt.ticket.commit_updater]] is the optional component that [[TracRepositoryAdmin#trac-post-commit-hook|replaces the old trac-post-commit-hook]], in Trac 0.12.\r\n\r\nBy default it reacts on some keywords found in changeset message logs like ''''close'''', ''''fix'''' etc. and performs the corresponding workflow action.\r\n\r\nIf you have a more complex workflow, like the testing stage described above and you want the ''''closes'''' keyword to move the ticket to the ''''testing'''' status instead of the ''''closed'''' status, you need to adapt the code a bit. \r\n\r\nHave a look at the [[trac:wiki:0.11/TracWorkflow#How-ToCombineSVNtrac-post-commit-hookWithTestWorkflow|Trac 0.11 recipe]] for the `trac-post-commit-hook`, this will give you some ideas about how to modify the component.\r\n\r\n== Example: Add simple optional generic review state ==\r\n\r\nSometimes Trac is used in situations where "testing" can mean different things to different people so you may want to create an optional workflow state that is between the default workflow''s `assigned` and `closed` states, but does not impose implementation-specific details. The only new state you need to add for this is a `reviewing` state. A ticket may then be "submitted for review" from any state that it can be reassigned. If a review passes, you can re-use the `resolve` action to close the ticket, and if it fails you can re-use the `reassign` action to push it back into the normal workflow.\r\n\r\nThe new `reviewing` state along with its associated `review` action looks like this:\r\n\r\n{{{\r\nreview = new,assigned,reopened -> reviewing\r\nreview.operations = set_owner\r\nreview.permissions = TICKET_MODIFY\r\n}}}\r\n\r\nThen, to integrate this with the default Trac 0.11 workflow, you also need to add the `reviewing` state to the `accept` and `resolve` actions, like so:\r\n\r\n{{{\r\naccept = new,reviewing -> assigned\r\n[…]\r\nresolve = new,assigned,reopened,reviewing -> closed\r\n}}}\r\n\r\nOptionally, you can also add a new action that allows you to change the ticket''s owner without moving the ticket out of the `reviewing` state. This enables you to reassign review work without pushing the ticket back to the `new` status.\r\n\r\n{{{\r\nreassign_reviewing = reviewing -> *\r\nreassign_reviewing.name = reassign review\r\nreassign_reviewing.operations = set_owner\r\nreassign_reviewing.permissions = TICKET_MODIFY\r\n}}}\r\n\r\nThe full `[ticket-workflow]` configuration will thus look like this:\r\n\r\n{{{\r\n[ticket-workflow]\r\naccept = new,reviewing -> assigned\r\naccept.operations = set_owner_to_self\r\naccept.permissions = TICKET_MODIFY\r\nleave = * -> *\r\nleave.default = 1\r\nleave.operations = leave_status\r\nreassign = new,assigned,accepted,reopened -> assigned\r\nreassign.operations = set_owner\r\nreassign.permissions = TICKET_MODIFY\r\nreopen = closed -> reopened\r\nreopen.operations = del_resolution\r\nreopen.permissions = TICKET_CREATE\r\nresolve = new,assigned,reopened,reviewing -> closed\r\nresolve.operations = set_resolution\r\nresolve.permissions = TICKET_MODIFY\r\nreview = new,assigned,reopened -> reviewing\r\nreview.operations = set_owner\r\nreview.permissions = TICKET_MODIFY\r\nreassign_reviewing = reviewing -> *\r\nreassign_reviewing.operations = set_owner\r\nreassign_reviewing.name = reassign review\r\nreassign_reviewing.permissions = TICKET_MODIFY\r\n}}}\r\n\r\n== Example: Limit the resolution options for a new ticket ==\r\n\r\nThe above resolve_new operation allows you to set the possible resolutions for a new ticket. By modifying the existing resolve action and removing the new status from before the `->` we then get two resolve actions. One with limited resolutions for new tickets, and then the regular one once a ticket is accepted.\r\n\r\n{{{\r\nresolve_new = new -> closed\r\nresolve_new.name = resolve\r\nresolve_new.operations = set_resolution\r\nresolve_new.permissions = TICKET_MODIFY\r\nresolve_new.set_resolution = invalid,wontfix,duplicate\r\n\r\nresolve = assigned,accepted,reopened -> closed\r\nresolve.operations = set_resolution\r\nresolve.permissions = TICKET_MODIFY\r\n}}}\r\n\r\n== Advanced Ticket Workflow Customization ==\r\n\r\nIf the customization above is not extensive enough for your needs, you can extend the workflow using plugins. These plugins can provide additional operations for the workflow (like code_review), or implement side-effects for an action (such as triggering a build) that may not be merely simple state changes. Look at [trac:source:trunk/sample-plugins/workflow sample-plugins/workflow] for a few simple examples to get started.\r\n\r\nBut if even that is not enough, you can disable the !ConfigurableTicketWorkflow component and create a plugin that completely replaces it.\r\n\r\n== Adding Workflow States to Milestone Progress Bars ==\r\n\r\nIf you add additional states to your workflow, you may want to customize your milestone progress bars as well. See [TracIni#milestone-groups-section TracIni].\r\n\r\n== some ideas for next steps ==\r\n\r\nNew enhancement ideas for the workflow system should be filed as enhancement tickets against the `ticket system` component. If desired, add a single-line link to that ticket here. Also look at the [http://trac-hacks.org/wiki/AdvancedTicketWorkflowPlugin AdvancedTicketWorkflowPlugin] as it provides experimental operations.\r\n\r\nIf you have a response to the comments below, create an enhancement ticket, and replace the description below with a link to the ticket.\r\n\r\n * the "operation" could be on the nodes, possible operations are:\r\n * ''''''preops'''''': automatic, before entering the state/activity\r\n * ''''''postops'''''': automatic, when leaving the state/activity\r\n * ''''''actions'''''': can be chosen by the owner in the list at the bottom, and/or drop-down/pop-up together with the default actions of leaving the node on one of the arrows.\r\n''''This appears to add complexity without adding functionality; please provide a detailed example where these additions allow something currently impossible to implement.''''\r\n\r\n * operations could be anything: sum up the time used for the activity, or just write some statistical fields like \r\n''''A workflow plugin can add an arbitrary workflow operation, so this is already possible.''''\r\n\r\n * set_actor should be an operation allowing to set the owner, e.g. as a "preop":\r\n * either to a role, a person\r\n * entered fix at define time, or at run time, e.g. out of a field, or select.\r\n''''This is either duplicating the existing `set_owner` operation, or needs to be clarified.''''\r\n\r\n * Actions should be selectable based on the ticket type (different Workflows for different tickets)\r\n''''Look into the [http://trac-hacks.org/wiki/AdvancedTicketWorkflowPlugin AdvancedTicketWorkflowPlugin]''s `triage` operation.''''\r\n\r\n * I''d wish to have an option to perform automatic status changes. In my case, I do not want to start with "new", but with "assigned". So tickets in state "new" should automatically go into state "assigned". Or is there already a way to do this and I just missed it?\r\n''''Have a look at [http://trac-hacks.org/wiki/TicketCreationStatusPlugin TicketCreationStatusPlugin] and [http://trac-hacks.org/wiki/TicketConditionalCreationStatusPlugin TicketConditionalCreationStatusPlugin]''''\r\n\r\n * I added a ''testing'' state. A tester can close the ticket or reject it. I''d like the transition from testing to rejected to set the owner to the person that put the ticket in ''testing''. The [http://trac-hacks.org/wiki/AdvancedTicketWorkflowPlugin AdvancedTicketWorkflowPlugin] is close with set_owner_to_field, but we need something like set_field_to_owner.\r\n\r\n * I''d like to track the time a ticket is in each state, adding up ''disjoints'' intervals in the same state.\r\n', NULL, NULL),
('TracGuide', 1, 1362994208347378, 'trac', '127.0.0.1', '= The Trac User and Administration Guide =\r\n[[TracGuideToc]]\r\n{{{#!span style="font-size:90%"\r\n//The TracGuide is meant to serve as a starting point for all documentation regarding Trac usage and development. The guide is a free document, a collaborative effort, and a part of the [http://trac.edgewall.org Trac Project] itself.//\r\n}}}\r\n\r\n== Introduction\r\n\r\nTrac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. It strives to help developers write great software while staying out of the way. Trac should impose as little as possible on a team''s established development process and policies.\r\n\r\nIt provides an interface to Subversion (and other version control systems), an integrated Wiki and convenient reporting facilities.\r\n\r\nTrac allows wiki markup in issue descriptions and commit messages, creating links and seamless references between bugs, tasks, changesets, files and wiki pages. A timeline shows all current and past project events in order, making the acquisition of an overview of the project and tracking progress very easy. The roadmap shows the road ahead, listing the upcoming milestones.\r\n== User Guide\r\n * Using the Wiki subsystem\r\n * TracWiki — How to use the built-in Wiki.\r\n * WikiFormatting — Reference to the wiki syntax used throughout.\r\n * Using the Version Control subsystem\r\n * TracBrowser — Browsing source code with Trac.\r\n * TracChangeset — Viewing changes to source code.\r\n * TracRevisionLog — Viewing change history.\r\n * Using the Ticket subsystem\r\n * TracTickets — Using the issue tracker.\r\n * TracRoadmap — The roadmap helps tracking project progress.\r\n * TracReports — Writing and using reports.\r\n * TracQuery — Executing custom ticket queries.\r\n * TracBatchModify - Modifying a batch of tickets in one request.\r\n * Other modules and general topics\r\n * TracSearch — Full text search in all content.\r\n * TracTimeline — The timeline provides a historic perspective on a project.\r\n * TracRss — RSS content syndication in Trac.\r\n * TracAccessibility — Accessibility keys support\r\n\r\n\r\n== Administrator Guide\r\n * Installation and upgrade\r\n * TracInstall — How to install and run Trac.\r\n * TracUpgrade — How to upgrade existing installations.\r\n * TracImport — Importing tickets from other bug databases.\r\n * TracPlugins — Installing and managing Trac extensions.\r\n * Configuration and customization\r\n * TracIni — Trac configuration file reference. \r\n * TracPermissions — Access control and permissions.\r\n * TracNavigation — Customize main navigation menus.\r\n * TracInterfaceCustomization — Customizing the Trac interface.\r\n * TracLogging — The Trac logging facility.\r\n * Administering the Version Control subsystem\r\n * TracRepositoryAdmin — Management of Source Code Repositories.\r\n * Administering the Ticket subsystem\r\n * TracTicketsCustomFields — Expanding tickets with customized fields.\r\n * TracNotification — Email notification.\r\n * TracWorkflow — Configurable Ticket Workflow.\r\n * Reference\r\n * TracEnvironment — All you need to know about Trac environments\r\n * TracAdmin — Administering a Trac project via the command-line.\r\n\r\n== Support and Other Sources of Information ==\r\n\r\n * [trac:TracFaq Trac FAQ] — A collection of Frequently Asked Questions (on the project website).\r\n * [trac:TracDev] and [trac:TracDev/ApiDocs API docs] — Trac Developer documentation\r\n * TracSupport — How to get more information\r\n\r\nIf you are looking for a good place to ask a question about Trac, look no further than the [http://trac.edgewall.org/wiki/MailingList MailingList]. It provides a friendly environment to discuss openly among Trac users and developers.\r\n', NULL, NULL),
('TracInstall', 1, 1362994208348711, 'trac', '127.0.0.1', '= Trac Installation Guide for 1.0 = \r\n[[TracGuideToc]]\r\n\r\nTrac is written in the Python programming language and needs a database, [http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL], or [http://mysql.com/ MySQL]. For HTML rendering, Trac uses the [http://genshi.edgewall.org Genshi] templating system.\r\n\r\nSince version 0.12, Trac can also be localized, and there''s probably a translation available for your language. If you want to be able to use the Trac interface in other languages, then make sure you have installed the optional package [#OtherPythonPackages Babel]. Pay attention to the extra steps for localization support in the [#InstallingTrac Installing Trac] section below. Lacking Babel, you will only get the default english version, as usual.\r\n\r\nIf you''re interested in contributing new translations for other languages or enhance the existing translations, then please have a look at [[trac:TracL10N]].\r\n\r\nWhat follows are generic instructions for installing and setting up Trac and its requirements. While you may find instructions for installing Trac on specific systems at [trac:TracInstallPlatforms TracInstallPlatforms] on the main Trac site, please be sure to ''''''first read through these general instructions'''''' to get a good understanding of the tasks involved.\r\n\r\n[[PageOutline(2-3,Installation Steps,inline)]]\r\n\r\n== Dependencies ==\r\n=== Mandatory Dependencies\r\nTo install Trac, the following software packages must be installed:\r\n\r\n * [http://www.python.org/ Python], version >= 2.5 and < 3.0\r\n (note that we dropped the support for Python 2.4 in this release)\r\n * [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.6, or better yet, [http://pypi.python.org/pypi/distribute distribute]\r\n * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.6 (unreleased version 0.7dev should work as well)\r\n\r\nYou also need a database system and the corresponding python bindings.\r\nThe database can be either SQLite, PostgreSQL or MySQL.\r\n\r\n==== For the SQLite database #ForSQLite\r\n\r\nAs you must be using Python 2.5, 2.6 or 2.7, you already have the SQLite database bindings bundled with the standard distribution of Python (the `sqlite3` module).\r\n\r\nHowever, if you''d like, you can download the latest and greatest version of [[trac:Pysqlite]] from \r\n[http://code.google.com/p/pysqlite/downloads/list google code], where you''ll find the Windows\r\ninstallers or the `tar.gz` archive for building from source: \r\n{{{\r\n$ tar xvfz <version>.tar.gz \r\n$ cd <version> \r\n$ python setup.py build_static install \r\n}}}\r\n \r\nThis will download the latest SQLite code and build the bindings. \r\n\r\nSQLite 2.x is no longer supported.\r\n\r\nA known bug PySqlite versions 2.5.2-4 prohibits upgrade of trac databases\r\nfrom 0.11.x to 0.12. Please use versions 2.5.5 and newer or 2.5.1 and\r\nolder. See #9434 for more detail.\r\n\r\nSee additional information in [trac:PySqlite PySqlite].\r\n\r\n==== For the PostgreSQL database #ForPostgreSQL\r\n\r\nYou need to install the database and its Python bindings:\r\n * [http://www.postgresql.org/ PostgreSQL], version 8.0 or later\r\n * [http://pypi.python.org/pypi/psycopg2 psycopg2]\r\n\r\nSee [trac:DatabaseBackend#Postgresql DatabaseBackend] for details.\r\n\r\n\r\n==== For the MySQL database #ForMySQL\r\n\r\nTrac can now work quite well with MySQL, provided you follow the guidelines.\r\n\r\n * [http://mysql.com/ MySQL], version 5.0 or later\r\n * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.2 or later\r\n\r\nIt is ''''''very'''''' important to read carefully the [trac:MySqlDb] page before creating the database.\r\n\r\n=== Optional Dependencies\r\n\r\n==== Version Control System ====\r\n\r\n===== Subversion =====\r\n * [http://subversion.apache.org/ Subversion], 1.5.x or 1.6.x and the ''''''''''corresponding'''''''''' Python bindings. Older versions starting from 1.0, like 1.2.4, 1.3.2 or 1.4.2, etc. should still work. For troubleshooting information, check the [trac:TracSubversion#Troubleshooting TracSubversion] page.\r\n\r\nThere are [http://subversion.apache.org/packages.html pre-compiled SWIG bindings] available for various platforms. (Good luck finding precompiled SWIG bindings for any Windows package at that listing. TracSubversion points you to [http://alagazam.net Algazam], which works for me under Python 2.6.)\r\n\r\nNote that Trac ''''''doesn''t'''''' use [http://pysvn.tigris.org/ PySVN], neither does it work yet with the newer `ctype`-style bindings. \r\n\r\n\r\n''''''Please note:'''''' if using Subversion, Trac must be installed on the ''''''same machine''''''. Remote repositories are currently [trac:ticket:493 not supported].\r\n\r\n\r\n===== Others =====\r\n\r\nSupport for other version control systems is provided via third-parties. See [trac:PluginList] and [trac:VersionControlSystem].\r\n\r\n==== Web Server ====\r\nA web server is optional because Trac is shipped with a server included, see the [#RunningtheStandaloneServer Running the Standalone Server ] section below.\r\n\r\nAlternatively you configure Trac to run in any of the following environments.\r\n * [http://httpd.apache.org/ Apache] with \r\n - [http://code.google.com/p/modwsgi/ mod_wsgi], see [wiki:TracModWSGI] and \r\n http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac\r\n - [http://modpython.org/ mod_python 3.3.1], deprecated: see TracModPython)\r\n * a [http://www.fastcgi.com/ FastCGI]-capable web server (see TracFastCgi)\r\n * an [http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html AJP]-capable web\r\n server (see [trac:TracOnWindowsIisAjp TracOnWindowsIisAjp])\r\n * a CGI-capable web server (see TracCgi), ''''''but usage of Trac as a cgi script \r\n is highly discouraged'''''', better use one of the previous options. \r\n \r\n\r\n==== Other Python Packages ====\r\n\r\n * [http://babel.edgewall.org Babel], version >= 0.9.5, \r\n needed for localization support (unreleased version 1.0dev should work as well)\r\n * [http://docutils.sourceforge.net/ docutils], version >= 0.3.9 \r\n for WikiRestructuredText.\r\n * [http://pygments.pocoo.org Pygments] for \r\n [wiki:TracSyntaxColoring syntax highlighting].\r\n [http://silvercity.sourceforge.net/ SilverCity] and/or \r\n [http://gnu.org/software/enscript/enscript.html Enscript] may still be used\r\n but are deprecated and you really should be using Pygments.\r\n * [http://pytz.sf.net pytz] to get a complete list of time zones,\r\n otherwise Trac will fall back on a shorter list from \r\n an internal time zone implementation.\r\n\r\n''''''Attention'''''': The various available versions of these dependencies are not necessarily interchangable, so please pay attention to the version numbers above. If you are having trouble getting Trac to work please double-check all the dependencies before asking for help on the [trac:MailingList] or [trac:IrcChannel].\r\n\r\nPlease refer to the documentation of these packages to find out how they are best installed. In addition, most of the [trac:TracInstallPlatforms platform-specific instructions] also describe the installation of the dependencies. Keep in mind however that the information there ''''probably concern older versions of Trac than the one you''re installing'''' (there are even some pages that are still talking about Trac 0.8!).\r\n\r\n\r\n== Installing Trac ==\r\n=== Using `easy_install`\r\nOne way to install Trac is using [http://pypi.python.org/pypi/setuptools setuptools].\r\nWith setuptools you can install Trac from the subversion repository; \r\n\r\nA few examples:\r\n\r\n - install Trac 1.0:\r\n {{{\r\n easy_install Trac==1.0\r\n }}}\r\n (NOT YET ENABLED)\r\n - install latest development version 1.0dev:\r\n {{{\r\n easy_install Trac==dev\r\n }}}\r\n Note that in this case you won''t have the possibility to run a localized version of Trac;\r\n either use a released version or install from source \r\n\r\n=== Using `pip`\r\n''pip'' is an easy_install replacement that is very useful to quickly install python packages.\r\nTo get a trac installation up and running in less than 5 minutes:\r\n\r\nAssuming you want to have your entire pip installation in `/opt/user/trac`\r\n\r\n - \r\n{{{\r\npip -E /opt/user/trac install trac psycopg2 \r\n}}}\r\nor\r\n - \r\n{{{\r\npip -E /opt/user/trac install trac mysql-python \r\n}}}\r\n\r\nMake sure your OS specific headers are available for pip to automatically build PostgreSQL (libpq-dev) or MySQL (libmysqlclient-dev) bindings.\r\n\r\npip will automatically resolve all dependencies (like Genshi, pygments, etc.) and download the latest packages on pypi.python.org and create a self contained installation in `/opt/user/trac`.\r\n\r\nAll commands (`tracd`, `trac-admin`) are available in `/opt/user/trac/bin`. This can also be leveraged for `mod_python` (using `PythonHandler` directive) and `mod_wsgi` (using `WSGIDaemonProcess` directive)\r\n\r\nAdditionally, you can install several trac plugins (listed [http://pypi.python.org/pypi?:action=search&term=trac&submit=search here]) through pip.\r\n\r\n\r\n\r\n=== From source\r\nOf course, using the python-typical setup at the top of the source directory also works.\r\n\r\nYou can obtain the source for a .tar.gz or .zip file corresponding to a release (e.g. Trac-1.0.tar.gz), or you can get the source directly from the repository (see Trac:SubversionRepository for details).\r\n\r\n{{{\r\n$ python ./setup.py install\r\n}}}\r\n\r\n''''You''ll need root permissions or equivalent for this step.''''\r\n\r\nThis will byte-compile the python source code and install it as an .egg file or folder in the `site-packages` directory\r\nof your Python installation. The .egg will also contain all other resources needed by standard Trac, such as htdocs and templates.\r\n\r\nThe script will also install the [wiki:TracAdmin trac-admin] command-line tool, used to create and maintain [wiki:TracEnvironment project environments], as well as the [wiki:TracStandalone tracd] standalone server.\r\n\r\nIf you install from source and want to make Trac available in other languages, make sure Babel is installed. Only then, perform the `install` (or simply redo the `install` once again afterwards if you realize Babel was not yet installed):\r\n{{{\r\n$ python ./setup.py install\r\n}}}\r\nAlternatively, you can do a `bdist_egg` and copy the .egg from dist/ to the place of your choice, or you can create a Windows installer (`bdist_wininst`).\r\n\r\n=== Advanced Options ===\r\n\r\nTo install Trac to a custom location, or find out about other advanced installation options, run:\r\n{{{\r\neasy_install --help\r\n}}}\r\n\r\nAlso see [http://docs.python.org/inst/inst.html Installing Python Modules] for detailed information.\r\n\r\nSpecifically, you might be interested in:\r\n{{{\r\neasy_install --prefix=/path/to/installdir\r\n}}}\r\nor, if installing Trac to a Mac OS X system:\r\n{{{\r\neasy_install --prefix=/usr/local --install-dir=/Library/Python/2.5/site-packages\r\n}}}\r\nNote: If installing on Mac OS X 10.6 running {{{ easy_install http://svn.edgewall.org/repos/trac/trunk }}} will install into {{{ /usr/local }}} and {{{ /Library/Python/2.6/site-packages }}} by default\r\n\r\nThe above will place your `tracd` and `trac-admin` commands into `/usr/local/bin` and will install the Trac libraries and dependencies into `/Library/Python/2.5/site-packages`, which is Apple''s preferred location for third-party Python application installations.\r\n\r\n\r\n== Creating a Project Environment ==\r\n\r\nA [TracEnvironment Trac environment] is the backend storage where Trac stores information like wiki pages, tickets, reports, settings, etc. An environment is basically a directory that contains a human-readable [TracIni configuration file], and various other files and directories.\r\n\r\nA new environment is created using [wiki:TracAdmin trac-admin]:\r\n{{{\r\n$ trac-admin /path/to/myproject initenv\r\n}}}\r\n\r\n[TracAdmin trac-admin] will prompt you for the information it needs to create the environment, such as the name of the project and the [TracEnvironment#DatabaseConnectionStrings database connection string]. If you''re not sure what to specify for one of these options, just press `<Enter>` to use the default value. \r\n\r\nUsing the default database connection string in particular will always work as long as you have SQLite installed.\r\nFor the other [DatabaseBackend database backends] you should plan ahead and already have a database ready to use at this point.\r\n\r\nSince 0.12, Trac doesn''t ask for a [TracEnvironment#SourceCodeRepository source code repository] anymore when creating an environment. Repositories can be [TracRepositoryAdmin added] afterward, or the version control support can be disabled completely if you don''t need it.\r\n\r\nAlso note that the values you specify here can be changed later by directly editing the [TracIni conf/trac.ini] configuration file.\r\n\r\nFinally, make sure the user account under which the web front-end runs will have ''''''write permissions'''''' to the environment directory and all the files inside. This will be the case if you run `trac-admin ... initenv` as this user. If not, you should set the correct user afterwards. For example on Linux, with the web server running as user `apache` and group `apache`, enter:\r\n{{{\r\n# chown -R apache.apache /path/to/myproject\r\n}}}\r\n\r\n{{{#!div class=important\r\n''''''Warning:'''''' Please only use ASCII-characters for account name and project path, unicode characters are not supported there.\r\n}}}\r\n\r\n\r\n== Deploying Trac\r\n\r\n=== Running the Standalone Server ===\r\n\r\nAfter having created a Trac environment, you can easily try the web interface by running the standalone server [wiki:TracStandalone tracd]:\r\n{{{\r\n$ tracd --port 8000 /path/to/myproject\r\n}}}\r\n\r\nThen, fire up a browser and visit `http://localhost:8000/`. You should get a simple listing of all environments that `tracd` knows about. Follow the link to the environment you just created, and you should see Trac in action. If you only plan on managing a single project with Trac you can have the standalone server skip the environment list by starting it like this:\r\n{{{\r\n$ tracd -s --port 8000 /path/to/myproject\r\n}}}\r\n\r\n=== Running Trac on a Web Server ===\r\n\r\nTrac provides various options for connecting to a "real" web server: \r\n - [wiki:TracFastCgi FastCGI]\r\n - [wiki:TracModWSGI mod_wsgi] \r\n - //[wiki:TracModPython mod_python] (no longer recommended, as mod_python is not actively maintained anymore)//\r\n - //[wiki:TracCgi CGI] (should not be used, as the performance is far from optimal)//\r\n\r\nTrac also supports [trac:TracOnWindowsIisAjp AJP] which may be your choice if you want to connect to IIS. Other deployment scenarios are possible: [trac:TracNginxRecipe nginx], [http://projects.unbit.it/uwsgi/wiki/Example#Traconapacheinasub-uri uwsgi], [trac:TracOnWindowsIisIsapi Isapi-wsgi] etc.\r\n\r\n==== Generating the Trac cgi-bin directory ==== #cgi-bin\r\n\r\nIn order for Trac to function properly with FastCGI you need to have a `trac.fcgi` file and for mod_wsgi a `trac.wsgi` file. These are Python scripts which load the appropriate Python code. They can be generated using the `deploy` option of [wiki:TracAdmin trac-admin].\r\n\r\nThere is, however, a bit of a chicken-and-egg problem. The [wiki:TracAdmin trac-admin] command requires an existing environment to function, but complains if the deploy directory already exists. This is a problem, because environments are often stored in a subdirectory of the deploy. The solution is to do something like this:\r\n{{{\r\nmkdir -p /usr/share/trac/projects/my-project\r\ntrac-admin /usr/share/trac/projects/my-project initenv\r\ntrac-admin /usr/share/trac/projects/my-project deploy /tmp/deploy\r\nmv /tmp/deploy/* /usr/share/trac\r\n}}}\r\n\r\n\r\n==== Mapping Static Resources ====\r\n\r\nOut of the box, Trac will pass static resources such as style sheets or images through itself. For anything but a tracd only based deployment, this is far from optimal as the web server could be set up to directly serve those static resources (for CGI setup, this is ''''''highly undesirable'''''' and will cause abysmal performance).\r\n\r\nWeb servers such as [http://httpd.apache.org/ Apache] allow you to create “Aliases” to resources, giving them a virtual URL that doesn''t necessarily reflect the layout of the servers file system. We also can map requests for static resources directly to the directory on the file system, avoiding processing these requests by Trac itself.\r\n\r\nThere are two primary URL paths for static resources - `/chrome/common` and `/chrome/site`. Plugins can add their own resources, usually accessible by `/chrome/<plugin>` path, so its important to override only known paths and not try to make universal `/chrome` alias for everything.\r\n\r\nNote that in order to get those static resources on the filesystem, you need first to extract the relevant resources from Trac using the [TracAdmin trac-admin]` <environment> deploy` command:\r\n[[TracAdminHelp(deploy)]]\r\n\r\nThe target `<directory>` will then contain an `htdocs` directory with:\r\n - `site/` - a copy of the environment''s directory `htdocs/` \r\n - `common/` - the static resources of Trac itself\r\n - `<plugins>/` - one directory for each resource directory managed by the plugins enabled for this environment\r\n\r\n===== Example: Apache and `ScriptAlias` ===== #ScriptAlias-example\r\n\r\nAssuming the deployment has been done this way:\r\n{{{\r\n$ trac-admin /var/trac/env deploy /path/to/trac/htdocs/common\r\n}}}\r\n\r\nAdd the following snippet to Apache configuration ''''before'''' the `ScriptAlias` or `WSGIScriptAlias` (which map all the other requests to the Trac application), changing paths to match your deployment:\r\n{{{\r\nAlias /trac/chrome/common /path/to/trac/htdocs/common\r\nAlias /trac/chrome/site /path/to/trac/htdocs/site\r\n\r\n<Directory "/path/to/www/trac/htdocs">\r\n Order allow,deny\r\n Allow from all\r\n</Directory>\r\n}}}\r\n\r\nIf using mod_python, you might want to add this too (otherwise, the alias will be ignored):\r\n{{{\r\n<Location "/trac/chrome/common/">\r\n SetHandler None\r\n</Location>\r\n}}}\r\n\r\nNote that we mapped `/trac` part of the URL to the `trac.*cgi` script, and the path `/trac/chrome/common` is the path you have to append to that location to intercept requests to the static resources. \r\n\r\nSimilarly, if you have static resources in a project''s `htdocs` directory (which is referenced by `/trac/chrome/site` URL in themes), you can configure Apache to serve those resources (again, put this ''''before'''' the `ScriptAlias` or `WSGIScriptAlias` for the .*cgi scripts, and adjust names and locations to match your installation):\r\n{{{\r\nAlias /trac/chrome/site /path/to/projectenv/htdocs\r\n\r\n<Directory "/path/to/projectenv/htdocs">\r\n Order allow,deny\r\n Allow from all\r\n</Directory>\r\n}}}\r\n\r\nAlternatively to aliasing `/trac/chrome/common`, you can tell Trac to generate direct links for those static resources (and only those), using the [[wiki:TracIni#trac-section| [trac] htdocs_location]] configuration setting:\r\n{{{\r\n[trac]\r\nhtdocs_location = http://static.example.org/trac-common/\r\n}}}\r\nNote that this makes it easy to have a dedicated domain serve those static resources (preferentially [http://code.google.com/speed/page-speed/docs/request.html#ServeFromCookielessDomain cookie-less]).\r\n\r\nOf course, you still need to make the Trac `htdocs/common` directory available through the web server at the specified URL, for example by copying (or linking) the directory into the document root of the web server:\r\n{{{\r\n$ ln -s /path/to/trac/htdocs/common /var/www/static.example.org/trac-common\r\n}}}\r\n\r\n\r\n==== Setting up the Plugin Cache ====\r\n\r\nSome Python plugins need to be extracted to a cache directory. By default the cache resides in the home directory of the current user. When running Trac on a Web Server as a dedicated user (which is highly recommended) who has no home directory, this might prevent the plugins from starting. To override the cache location you can set the PYTHON_EGG_CACHE environment variable. Refer to your server documentation for detailed instructions on how to set environment variables.\r\n\r\n== Configuring Authentication ==\r\n\r\nTrac uses HTTP authentication. You''ll need to configure your webserver to request authentication when the `.../login` URL is hit (the virtual path of the "login" button). Trac will automatically pick the REMOTE_USER variable up after you provide your credentials. Therefore, all user management goes through your web server configuration. Please consult the documentation of your web server for more info.\r\n\r\nThe process of adding, removing, and configuring user accounts for authentication depends on the specific way you run Trac. \r\n\r\nPlease refer to one of the following sections:\r\n * TracStandalone#UsingAuthentication if you use the standalone server, `tracd`.\r\n * [wiki:TracModWSGI#ConfiguringAuthentication TracModWSGI#ConfiguringAuthentication] if you use the Apache web server, with any of its front end: `mod_wsgi` of course, but the same instructions applies also for `mod_python`, `mod_fcgi` or `mod_fastcgi`.\r\n * TracFastCgi if you''re using another web server with FCGI support (Cherokee, Lighttpd, !LiteSpeed, nginx)\r\n\r\n== Granting admin rights to the admin user\r\nGrant admin rights to user admin:\r\n{{{\r\n$ trac-admin /path/to/myproject permission add admin TRAC_ADMIN\r\n}}}\r\nThis user will have an "Admin" entry menu that will allow you to admin your trac project.\r\n\r\n== Finishing the install\r\n\r\n=== Automatic reference to the SVN changesets in Trac tickets ===\r\n\r\nYou can configure SVN to automatically add a reference to the changeset into the ticket comments, whenever changes are committed to the repository. The description of the commit needs to contain one of the following formulas:\r\n * ''''''`Refs #123`'''''' - to reference this changeset in `#123` ticket\r\n * ''''''`Fixes #123`'''''' - to reference this changeset and close `#123` ticket with the default status ''''fixed''''\r\n\r\nThis functionality requires a post-commit hook to be installed as described in [wiki:TracRepositoryAdmin#ExplicitSync TracRepositoryAdmin], and enabling the optional commit updater components by adding the following line to the `[components]` section of your [wiki:TracIni#components-section trac.ini], or enabling the components in the "Plugins" admin panel.\r\n{{{\r\ntracopt.ticket.commit_updater.* = enabled\r\n}}}\r\nFor more information, see the documentation of the `CommitTicketUpdater` component in the "Plugins" admin panel.\r\n\r\n=== Using Trac ===\r\n\r\nOnce you have your Trac site up and running, you should be able to create tickets, view the timeline, browse your version control repository if configured, etc.\r\n\r\nKeep in mind that //anonymous// (not logged in) users can by default access only a few of the features, in particular they will have a read-only access to the resources. You will need to configure authentication and grant additional [wiki:TracPermissions permissions] to authenticated users to see the full set of features.\r\n\r\n'''' Enjoy! ''''\r\n\r\n[trac:TracTeam The Trac Team]\r\n\r\n----\r\nSee also: [trac:TracInstallPlatforms TracInstallPlatforms], TracGuide, TracUpgrade, TracPermissions\r\n', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracBrowser', 1, 1362994208351603, 'trac', '127.0.0.1', '= The Trac Repository Browser =\r\n[[TracGuideToc]]\r\n\r\nThe Trac repository browser can be used to browse specific revisions of directories \r\nand files stored in the repositories associated with the Trac environment.\r\n\r\n''''(since 0.12)'''': \r\nAt the top-level of the repository browser is the ''''''Repository Index'''''', \r\nlisting all the configured repositories. \r\nEach repository has a name which is used as a path prefix in a \r\n"virtual" file hierarchy encompassing all the available repositories.\r\nOne of the repositories can be configured with an empty name; this is the default repository. When such a default repository is present, its top-level files and directories \r\nare also listed, in a ''''''Default Repository'''''' section placed before the \r\nrepository index. If the default repository is the only repository associated \r\nwith the Trac environment the ''''''Repository Index'''''' will be omitted ^[#note-multirepos (1)]^.\r\n\r\nDirectory entries are displayed in a list with sortable columns. The list \r\nentries can be sorted by ''''Name'''', ''''Size'''', ''''Age'''' or ''''Author'''' by clicking on the column\r\nheaders. The sort order can be reversed by clicking on a given column\r\nheader again.\r\n\r\nThe browser can be used to navigate through the directory structure \r\nby clicking on the directory names. \r\nClicking on a file name will show the contents of the file. \r\nClicking on the revision number of a file or directory will take \r\nyou to the TracRevisionLog for that file.\r\nNote that there''s also a ''''Revision Log'''' navigation link that will do the \r\nsame for the path currently being examined.\r\nClicking on the ''''diff'''' icon after revision number will display the changes made \r\nto the files modified in that revision.\r\nClicking on the ''''Age'''' of the file - will take you to that changeset in the timeline.\r\n\r\nIt''s also possible to browse directories or files as they were in history,\r\nat any given repository revision. The default behavior is to display the\r\nlatest revision but another revision number can easily be selected using\r\nthe ''''View revision'''' input field at the top of the page.\r\n\r\nThe color bar next to the ''''Age'''' column gives a visual indication of the age\r\nof the last change to a file or directory, following the convention that\r\n''''''[[span(style=color:#88f,blue)]]'''''' is oldest and ''''''[[span(style=color:#f88,red)]]''''''\r\nis newest, but this can be [TracIni#browser-section configured].\r\n\r\nAt the top of the browser page, there''s a ''''Visit'''' drop-down menu which you can use \r\nto select some interesting places in the repository, for example branches or tags. \r\nThis is sometimes referred to as the ''''browser quickjump'''' facility.\r\nThe precise meaning and content of this menu depends on your repository backend.\r\nFor Subversion, this list contains by default the top-level trunk directory \r\nand sub-directories of the top-level branches and tags directories \r\n(`/trunk`, `/branches/*`, and `/tags/*`). This can be [TracIni#svn-section configured] \r\nfor more advanced cases.\r\n\r\nIf you''re using a Javascript enabled browser, you''ll be able to expand and \r\ncollapse directories in-place by clicking on the arrow head at the right side of a \r\ndirectory. Alternatively, the [trac:TracKeys keyboard] can also be used for this: \r\n - use `''j''` and `''k''` to select the next or previous entry, starting with the first\r\n - `''o''` (open) to toggle between expanded and collapsed state of the selected \r\n directory or for visiting the selected file \r\n - `''v''` (view, visit) and `''<Enter>''`, same as above\r\n - `''r''` can be used to force the reload of an already expanded directory\r\n - `''A''` can be used to directly visit a file in annotate (blame) mode\r\n - `''L''` to view the log for the selected entry\r\nIf no row has been selected using `''j''` or `''k''` these keys will operate on the entry under the mouse.\r\n\r\n{{{#!comment\r\nMMM: I guess that some keys are upper case and some lower to avoid conflicts with browser defined keys.\r\nI find for example in Firefox and IE on windows that ''a'' works as well as ''A'' but ''l'' does not work for ''L''.\r\n cboos: ''l'' is reserved for Vim like behavior, see #7867\r\n}}}\r\n\r\nFor the Subversion backend, some advanced additional features are available:\r\n - The `svn:needs-lock` property will be displayed\r\n - Support for the `svn:mergeinfo` property showing the merged and eligible information\r\n - Support for browsing the `svn:externals` property \r\n (which can be [TracIni#svn:externals-section configured])\r\n - The `svn:mime-type` property is used to select the syntax highlighter for rendering \r\n the file. For example, setting `svn:mime-type` to `text/html` will ensure the file is \r\n highlighted as HTML, regardless of the file extension. It also allows selecting the character \r\n encoding used in the file content. For example, if the file content is encoded in UTF-8, \r\n set `svn:mime-type` to `text/html;charset=utf-8`. The `charset=` specification overrides the \r\n default encoding defined in the `default_charset` option of the `[trac]` section \r\n of [TracIni#trac-section trac.ini].\r\n{{{#!comment\r\nMMM: I found this section a bit hard to understand. I changed the first item as I understood that well.\r\nbut I think the other items could be changed also\r\n cboos: in the meantime, I''ve added the ''''advanced'''' word as a hint this can be a bit complex...\r\n}}}\r\n\r\n\r\n----\r\n{{{#!div style="font-size:85%"\r\n[=#note-multirepos (1)] This means that after upgrading a single-repository Trac of version \r\n0.11 (or below) to a multi-repository Trac (0.12), the repository browser will look and feel \r\nthe same, that single repository becoming automatically the "default" repository.\r\n}}}\r\n\r\nSee also: TracGuide, TracChangeset, TracFineGrainedPermissions\r\n', NULL, NULL),
('TracNotification', 1, 1362994208355130, 'trac', '127.0.0.1', '= Email Notification of Ticket Changes =\r\n[[TracGuideToc]]\r\n\r\nTrac supports notification of ticket changes via email. \r\n\r\nEmail notification is useful to keep users up-to-date on tickets/issues of interest, and also provides a convenient way to post all ticket changes to a dedicated mailing list. For example, this is how the [http://lists.edgewall.com/archive/trac-tickets/ Trac-tickets] mailing list is set up.\r\n\r\nDisabled by default, notification can be activated and configured in [wiki:TracIni trac.ini].\r\n\r\n== Receiving Notification Mails ==\r\nWhen reporting a new ticket or adding a comment, enter a valid email address or your username in the ''''reporter'''', ''''assigned to/owner'''' or ''''cc'''' field. Trac will automatically send you an email when changes are made to the ticket (depending on how notification is configured).\r\n\r\nThis is useful to keep up-to-date on an issue or enhancement request that interests you.\r\n\r\n=== How to use your username to receive notification mails ===\r\n\r\nTo receive notification mails, you can either enter a full email address or your username. To get notified with a simple username or login, you need to specify a valid email address in the ''''Preferences'''' page. \r\n\r\nAlternatively, a default domain name (''''''`smtp_default_domain`'''''') can be set in the TracIni file (see [#ConfigurationOptions Configuration Options] below). In this case, the default domain will be appended to the username, which can be useful for an "Intranet" kind of installation.\r\n\r\nWhen using apache and mod_kerb for authentication against Kerberos / Active Directory, usernames take the form (''''''`username@EXAMPLE.LOCAL`''''''). To avoid this being interpreted as an email address, add the Kerberos domain to (''''''`ignore_domains`'''''').\r\n\r\n== Configuring SMTP Notification ==\r\n\r\n''''''Important:'''''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini]. \r\n\r\n=== Configuration Options ===\r\nThese are the available options for the `[notification]` section in trac.ini.\r\n\r\n * ''''''`smtp_enabled`'''''': Enable email notification.\r\n * ''''''`smtp_from`'''''': Email address to use for ''''Sender''''-headers in notification emails.\r\n * ''''''`smtp_from_name`'''''': Sender name to use for ''''Sender''''-headers in notification emails.\r\n * ''''''`smtp_from_author`'''''': (''''since 1.0'''') Use the author of a change (the reporter of a new ticket, or the author of a comment) as the `From:` header value in notification e-mails (default: false). If the author hasn''t set an e-mail address, `smtp_from` and `smtp_from_name` are used instead.\r\n * ''''''`smtp_replyto`'''''': Email address to use for ''''Reply-To''''-headers in notification emails.\r\n * ''''''`smtp_default_domain`'''''': (''''since 0.10'''') Append the specified domain to addresses that do not contain one. Fully qualified addresses are not modified. The default domain is appended to all username/login for which an email address cannot be found from the user settings.\r\n * ''''''`smtp_always_cc`'''''': List of email addresses to always send notifications to. ''''Typically used to post ticket changes to a dedicated mailing list.''''\r\n * ''''''`smtp_always_bcc`'''''': (''''since 0.10'''') List of email addresses to always send notifications to, but keeps addresses not visible from other recipients of the notification email \r\n * ''''''`smtp_subject_prefix`'''''': (''''since 0.10.1'''') Text that is inserted before the subject of the email. Set to "!__default!__" by default.\r\n * ''''''`always_notify_reporter`'''''': Always send notifications to any address in the reporter field (default: false).\r\n * ''''''`always_notify_owner`'''''': (''''since 0.9'''') Always send notifications to the address in the owner field (default: false).\r\n * ''''''`always_notify_updater`'''''': (''''since 0.10'''') Always send a notification to the updater of a ticket (default: true).\r\n * ''''''`use_public_cc`'''''': (''''since 0.10'''') Addresses in To: (owner, reporter) and Cc: lists are visible by all recipients (default is ''''Bcc:'''' - hidden copy).\r\n * ''''''`use_short_addr`'''''': (''''since 0.10'''') Enable delivery of notifications to addresses that do not contain a domain (i.e. do not end with ''''@<domain.com>'''').This option is useful for intranets, where the SMTP server can handle local addresses and map the username/login to a local mailbox. See also `smtp_default_domain`. Do not use this option with a public SMTP server. \r\n * ''''''`ignore_domains`'''''': Comma-separated list of domains that should not be considered part of email addresses (for usernames with Kerberos domains).\r\n * ''''''`mime_encoding`'''''': (''''since 0.10'''') This option allows selecting the MIME encoding scheme. Supported values:\r\n * `none`: default value, uses 7bit encoding if the text is plain ASCII, or 8bit otherwise. \r\n * `base64`: works with any kind of content. May cause some issues with touchy anti-spam/anti-virus engines.\r\n * `qp` or `quoted-printable`: best for european languages (more compact than base64) if 8bit encoding cannot be used.\r\n * ''''''`ticket_subject_template`'''''': (''''since 0.11'''') A [http://genshi.edgewall.org/wiki/Documentation/text-templates.html Genshi text template] snippet used to get the notification subject.\r\n * ''''''`email_sender`'''''': (''''since 0.12'''') Name of the component implementing `IEmailSender`. This component is used by the notification system to send emails. Trac currently provides the following components:\r\n * `SmtpEmailSender`: connects to an SMTP server (default).\r\n * `SendmailEmailSender`: runs a `sendmail`-compatible executable.\r\n\r\nEither ''''''`smtp_from`'''''' or ''''''`smtp_replyto`'''''' (or both) ''''must'''' be set, otherwise Trac refuses to send notification mails.\r\n\r\nThe following options are specific to email delivery through SMTP.\r\n * ''''''`smtp_server`'''''': SMTP server used for notification messages.\r\n * ''''''`smtp_port`'''''': (''''since 0.9'''') Port used to contact the SMTP server.\r\n * ''''''`smtp_user`'''''': (''''since 0.9'''') User name for authentication SMTP account.\r\n * ''''''`smtp_password`'''''': (''''since 0.9'''') Password for authentication SMTP account.\r\n * ''''''`use_tls`'''''': (''''since 0.10'''') Toggle to send notifications via a SMTP server using [http://en.wikipedia.org/wiki/Transport_Layer_Security TLS], such as GMail.\r\n\r\nThe following option is specific to email delivery through a `sendmail`-compatible executable.\r\n * ''''''`sendmail_path`'''''': (''''since 0.12'''') Path to the sendmail executable. The sendmail program must accept the `-i` and `-f` options.\r\n\r\n=== Example Configuration (SMTP) ===\r\n{{{\r\n[notification]\r\nsmtp_enabled = true\r\nsmtp_server = mail.example.com\r\nsmtp_from = notifier@example.com\r\nsmtp_replyto = myproj@projects.example.com\r\nsmtp_always_cc = ticketmaster@example.com, theboss+myproj@example.com\r\n}}}\r\n\r\n=== Example Configuration (`sendmail`) ===\r\n{{{\r\n[notification]\r\nsmtp_enabled = true\r\nemail_sender = SendmailEmailSender\r\nsendmail_path = /usr/sbin/sendmail\r\nsmtp_from = notifier@example.com\r\nsmtp_replyto = myproj@projects.example.com\r\nsmtp_always_cc = ticketmaster@example.com, theboss+myproj@example.com\r\n}}}\r\n\r\n=== Customizing the e-mail subject ===\r\nThe e-mail subject can be customized with the `ticket_subject_template` option, which contains a [http://genshi.edgewall.org/wiki/Documentation/text-templates.html Genshi text template] snippet. The default value is:\r\n{{{\r\n$prefix #$ticket.id: $summary\r\n}}}\r\nThe following variables are available in the template:\r\n\r\n * `env`: The project environment (see [trac:source:/trunk/trac/env.py env.py]).\r\n * `prefix`: The prefix defined in `smtp_subject_prefix`.\r\n * `summary`: The ticket summary, with the old value if the summary was edited.\r\n * `ticket`: The ticket model object (see [trac:source:/trunk/trac/ticket/model.py model.py]). Individual ticket fields can be addressed by appending the field name separated by a dot, e.g. `$ticket.milestone`.\r\n\r\n=== Customizing the e-mail content ===\r\n\r\nThe notification e-mail content is generated based on `ticket_notify_email.txt` in `trac/templates`. You can add your own version of this template by adding a `ticket_notify_email.txt` to the templates directory of your environment. The default looks like this:\r\n\r\n{{{\r\n$ticket_body_hdr\r\n$ticket_props\r\n{% choose ticket.new %}\\\r\n{% when True %}\\\r\n$ticket.description\r\n{% end %}\\\r\n{% otherwise %}\\\r\n{% if changes_body %}\\\r\n${_(''Changes (by %(author)s):'', author=change.author)}\r\n\r\n$changes_body\r\n{% end %}\\\r\n{% if changes_descr %}\\\r\n{% if not changes_body and not change.comment and change.author %}\\\r\n${_(''Description changed by %(author)s:'', author=change.author)}\r\n{% end %}\\\r\n$changes_descr\r\n--\r\n{% end %}\\\r\n{% if change.comment %}\\\r\n\r\n${changes_body and _(''Comment:'') or _(''Comment (by %(author)s):'', author=change.author)}\r\n\r\n$change.comment\r\n{% end %}\\\r\n{% end %}\\\r\n{% end %}\\\r\n\r\n-- \r\n${_(''Ticket URL: <%(link)s>'', link=ticket.link)}\r\n$project.name <${project.url or abs_href()}>\r\n$project.descr\r\n}}}\r\n== Sample Email ==\r\n{{{\r\n#42: testing\r\n---------------------------+------------------------------------------------\r\n Id: 42 | Status: assigned \r\nComponent: report system | Modified: Fri Apr 9 00:04:31 2004\r\n Severity: major | Milestone: 0.9 \r\n Priority: lowest | Version: 0.6 \r\n Owner: anonymous | Reporter: jonas@example.com \r\n---------------------------+------------------------------------------------\r\nChanges:\r\n * component: changset view => search system\r\n * priority: low => highest\r\n * owner: jonas => anonymous\r\n * cc: daniel@example.com =>\r\n daniel@example.com, jonas@example.com\r\n * status: new => assigned\r\n\r\nComment:\r\nI''m interested too!\r\n\r\n--\r\nTicket URL: <http://example.com/trac/ticket/42>\r\nMy Project <http://myproj.example.com/>\r\n}}}\r\n\r\n\r\n== Customizing e-mail content for MS Outlook ==\r\n\r\nOut-of-the-box, MS Outlook normally presents plain text e-mails with a variable-width font; the ticket properties table will most certainly look like a mess in MS Outlook. This can be fixed with some customization of the [#Customizingthee-mailcontent e-mail template].\r\n\r\nReplace the following second row in the template:\r\n{{{\r\n$ticket_props\r\n}}}\r\n\r\nwith this instead (''''requires Python 2.6 or later''''):\r\n{{{\r\n--------------------------------------------------------------------------\r\n{% with\r\n pv = [(a[0].strip(), a[1].strip()) for a in [b.split('':'') for b in\r\n [c.strip() for c in \r\n ticket_props.replace(''|'', ''\\n'').splitlines()[1:-1]] if '':'' in b]];\r\n sel = [''Reporter'', ''Owner'', ''Type'', ''Status'', ''Priority'', ''Milestone'', \r\n ''Component'', ''Severity'', ''Resolution'', ''Keywords''] %}\\\r\n${''\\n''.join(''%s\\t%s'' % (format(p[0]+'':'', '' <12''), p[1]) for p in pv if p[0] in sel)}\r\n{% end %}\\\r\n--------------------------------------------------------------------------\r\n}}}\r\n\r\nThe table of ticket properties is replaced with a list of a selection of the properties. A tab character separates the name and value in such a way that most people should find this more pleasing than the default table, when using MS Outlook.\r\n{{{#!div style="margin: 1em 1.75em; border:1px dotted"\r\n{{{#!html\r\n#42: testing<br />\r\n--------------------------------------------------------------------------<br />\r\n<table cellpadding=0>\r\n<tr><td>Reporter:</td><td>jonas@example.com</td></tr>\r\n<tr><td>Owner:</td><td>anonymous</td></tr>\r\n<tr><td>Type:</td><td>defect</td></tr>\r\n<tr><td>Status:</td><td>assigned</td></tr>\r\n<tr><td>Priority:</td><td>lowest</td></tr>\r\n<tr><td>Milestone:</td><td>0.9</td></tr>\r\n<tr><td>Component:</td><td>report system</td></tr>\r\n<tr><td>Severity:</td><td>major</td></tr>\r\n<tr><td>Resolution:</td><td> </td></tr>\r\n<tr><td>Keywords:</td><td> </td></tr>\r\n</table>\r\n--------------------------------------------------------------------------<br />\r\nChanges:<br />\r\n<br />\r\n * component: changset view => search system<br />\r\n * priority: low => highest<br />\r\n * owner: jonas => anonymous<br />\r\n * cc: daniel@example.com =><br />\r\n daniel@example.com, jonas@example.com<br />\r\n * status: new => assigned<br />\r\n<br />\r\nComment:<br />\r\nI''m interested too!<br />\r\n<br />\r\n--<br />\r\nTicket URL: <http://example.com/trac/ticket/42><br />\r\nMy Project <http://myproj.example.com/><br />\r\n}}}\r\n}}}\r\n\r\n**Important**: Only those ticket fields that are listed in `sel` are part of the HTML mail. If you have defined custom ticket fields which shall be part of the mail they have to be added to `sel`, example:\r\n{{{\r\n sel = [''Reporter'', ..., ''Keywords'', ''Custom1'', ''Custom2'']\r\n}}}\r\n\r\nHowever, it''s not as perfect as an automatically HTML-formatted e-mail would be, but presented ticket properties are at least readable by default in MS Outlook...\r\n\r\n\r\n== Using GMail as the SMTP relay host ==\r\n\r\nUse the following configuration snippet\r\n{{{\r\n[notification]\r\nsmtp_enabled = true\r\nuse_tls = true\r\nmime_encoding = base64\r\nsmtp_server = smtp.gmail.com\r\nsmtp_port = 587\r\nsmtp_user = user\r\nsmtp_password = password\r\n}}}\r\n\r\nwhere ''''user'''' and ''''password'''' match an existing GMail account, ''''i.e.'''' the ones you use to log in on [http://gmail.com]\r\n\r\nAlternatively, you can use `smtp_port = 25`.[[br]]\r\nYou should not use `smtp_port = 465`. It will not work and your ticket submission may deadlock. Port 465 is reserved for the SMTPS protocol, which is not supported by Trac. See [comment:ticket:7107:2 #7107] for details.\r\n \r\n== Filtering notifications for one''s own changes ==\r\nIn Gmail, use the filter:\r\n\r\n{{{\r\nfrom:(<smtp_from>) (("Reporter: <username>" -Changes) OR "Changes (by <username>)")\r\n}}}\r\n\r\nFor Trac .10, use the filter:\r\n{{{\r\nfrom:(<smtp_from>) (("Reporter: <username>" -Changes -Comment) OR "Changes (by <username>)" OR "Comment (by <username>)")\r\n}}}\r\n\r\nto delete these notifications.\r\n\r\nIn Thunderbird, there is no such solution if you use IMAP\r\n(see http://kb.mozillazine.org/Filters_(Thunderbird)#Filtering_the_message_body).\r\n\r\nThe best you can do is to set "always_notify_updater" in conf/trac.ini to false.\r\nYou will however still get an email if you comment a ticket that you own or have reported.\r\n\r\nYou can also add this plugin:\r\nhttp://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin\r\n\r\n== Troubleshooting ==\r\n\r\nIf you cannot get the notification working, first make sure the log is activated and have a look at the log to find if an error message has been logged. See TracLogging for help about the log feature.\r\n\r\nNotification errors are not reported through the web interface, so the user who submit a change or a new ticket never gets notified about a notification failure. The Trac administrator needs to look at the log to find the error trace.\r\n\r\n=== ''''Permission denied'''' error ===\r\n\r\nTypical error message:\r\n{{{\r\n ...\r\n File ".../smtplib.py", line 303, in connect\r\n raise socket.error, msg\r\n error: (13, ''Permission denied'')\r\n}}}\r\n\r\nThis error usually comes from a security settings on the server: many Linux distributions do not let the web server (Apache, ...) to post email message to the local SMTP server.\r\n\r\nMany users get confused when their manual attempts to contact the SMTP server succeed:\r\n{{{\r\ntelnet localhost 25\r\n}}}\r\nThe trouble is that a regular user may connect to the SMTP server, but the web server cannot:\r\n{{{\r\nsudo -u www-data telnet localhost 25\r\n}}}\r\n\r\nIn such a case, you need to configure your server so that the web server is authorized to post to the SMTP server. The actual settings depend on your Linux distribution and current security policy. You may find help browsing the Trac [trac:MailingList MailingList] archive.\r\n\r\nRelevant ML threads:\r\n * SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518\r\n\r\nFor SELinux in Fedora 10:\r\n{{{\r\n$ setsebool -P httpd_can_sendmail 1\r\n}}}\r\n=== ''''Suspected spam'''' error ===\r\n\r\nSome SMTP servers may reject the notification email sent by Trac.\r\n\r\nThe default Trac configuration uses Base64 encoding to send emails to the recipients. The whole body of the email is encoded, which sometimes trigger ''''false positive'''' SPAM detection on sensitive email servers. In such an event, it is recommended to change the default encoding to "quoted-printable" using the `mime_encoding` option.\r\n\r\nQuoted printable encoding works better with languages that use one of the Latin charsets. For Asian charsets, it is recommended to stick with the Base64 encoding.\r\n\r\n=== ''''501, 5.5.4 Invalid Address'''' error ===\r\n\r\nOn IIS 6.0 you could get a \r\n{{{\r\nFailure sending notification on change to ticket #1: SMTPHeloError: (501, ''5.5.4 Invalid Address'')\r\n}}}\r\nin the trac log. Have a look [http://support.microsoft.com/kb/291828 here] for instructions on resolving it.\r\n\r\n\r\n----\r\nSee also: TracTickets, TracIni, TracGuide\r\n', NULL, NULL),
('TracBatchModify', 1, 1362994208359649, 'trac', '127.0.0.1', '= Trac Ticket Batch Modification =\n[[TracGuideToc]]\n\nFrom [wiki:TracQuery custom query] results Trac provides support for modifying a batch of tickets in one request.\n\nTo perform a batch modification select the tickets you wish to modify and set the new field values using the section underneath the query results. \n\n== List fields\n\nThe `Keywords` and `Cc` fields are treated as lists, where list items can be added and/or removed in addition of replacing the entire list value. All list field controls accept multiple items (i.e. multiple keywords or cc addresses).\n', NULL, NULL),
('TracRepositoryAdmin', 1, 1362994208361398, 'trac', '127.0.0.1', '= Repository Administration =\r\n[[PageOutline(2-3)]]\r\n\r\n== Quick start == #QuickStart\r\n\r\n * Manage repositories in the "Repository" admin panel, with `trac-admin` or in the `[repositories]` section of [wiki:TracIni#repositories-section trac.ini].\r\n * Set up a call to `trac-admin $ENV changeset added $REPO $REV` in the post-commit hook of each repository. Additionally, add a call to `trac-admin $ENV changeset modified $REPO $REV` in the post-revprop-change hook of repositories allowing revision property changes.\r\n * Set the `[trac] repository_sync_per_request` option to an empty value to disable per-request syncing.\r\n * Make sure the user under which your Subversion hooks are run has write access to the Trac environment, or use a tool like `sudo` to temporarily elevate privileges.\r\n\r\n== Specifying repositories == #Repositories\r\nStarting with 0.12, Trac can handle more than one repository per environment. The pre-0.12 way of specifying the repository with the `repository_dir` and `repository_type` options in the `[trac]` section of [wiki:TracIni trac.ini] is still supported, but two new mechanisms allow including additional repositories into an environment.\r\n\r\nIt is also possible to define aliases of repositories, that act as "pointers" to real repositories. This can be useful when renaming a repository, to avoid breaking all the links to the old name.\r\n\r\nA number of attributes can be associated with each repository, which define the repository''s location, type, name and how it is displayed in the source browser. The following attributes are supported:\r\n\r\n||=''''''Attribute'''''' =||=''''''Description'''''' =||\r\n||`alias` ||\\\r\n||A repository having an `alias` attribute is an alias to a real repository. All TracLinks referencing the alias resolve to the aliased repository. Note that multiple indirection is not supported, so an alias must always point to a real repository. The `alias` and `dir` attributes are mutually exclusive. ||\r\n||`description` ||\\\r\n||The text specified in the `description` attribute is displayed below the top-level entry for the repository in the source browser. It supports WikiFormatting. ||\r\n||`dir` ||\\\r\n||The `dir` attribute specifies the location of the repository in the filesystem. It corresponds to the value previously specified in the option `[trac] repository_dir`. The `alias` and `dir` attributes are mutually exclusive. ||\r\n||`hidden` ||When set to `true`, the repository is hidden from the repository index page in the source browser. Browsing the repository is still possible, and links referencing the repository remain valid. ||\r\n||`type` ||The `type` attribute sets the type of version control system used by the repository. Trac supports Subversion and Git out-of-the-box, and plugins add support for many other systems. If `type` is not specified, it defaults to the value of the `[trac] repository_type` option. ||\r\n||`url` ||The `url` attribute specifies the root URL to be used for checking out from the repository. When specified, a "Repository URL" link is added to the context navigation links in the source browser, that can be copied into the tool used for creating the working copy. ||\r\n\r\nA repository `name` and one of `alias` or `dir` attributes are mandatory. All others are optional.\r\n\r\nAfter adding a repository, the cache for that repository must be re-synchronized once with the `trac-admin $ENV repository resync` command.\r\n\r\n `repository resync <repos>`::\r\n Re-synchronize Trac with a repository.\r\n\r\n\r\n=== In `trac.ini` === #ReposTracIni\r\nRepositories and repository attributes can be specified in the `[repositories]` section of [wiki:TracIni#repositories-section trac.ini]. Every attribute consists of a key structured as `{name}.{attribute}` and the corresponding value separated with an equal sign (`=`). The name of the default repository is empty.\r\n\r\nThe main advantage of specifying repositories in `trac.ini` is that they can be inherited from a global configuration (see the [wiki:TracIni#GlobalConfiguration global configuration] section of TracIni). One drawback is that, due to limitations in the `ConfigParser` class used to parse `trac.ini`, the repository name is always all-lowercase.\r\n\r\nThe following example defines two Subversion repositories named `project` and `lib`, and an alias to `project` as the default repository. This is a typical use case where a Trac environment previously had a single repository (the `project` repository), and was converted to multiple repositories. The alias ensures that links predating the change continue to resolve to the `project` repository.\r\n{{{\r\n#!ini\r\n[repositories]\r\nproject.dir = /var/repos/project\r\nproject.description = This is the ''''main'''' project repository.\r\nproject.type = svn\r\nproject.url = http://example.com/svn/project\r\nproject.hidden = true\r\n\r\nlib.dir = /var/repos/lib\r\nlib.description = This is the secondary library code.\r\nlib.type = svn\r\nlib.url = http://example.com/svn/lib\r\n\r\n.alias = project\r\n}}}\r\nNote that `name.alias = target` makes `name` an alias for the `target` repo, not the other way around.\r\n\r\n=== In the database === #ReposDatabase\r\nRepositories can also be specified in the database, using either the "Repositories" admin panel under "Version Control", or the `trac-admin $ENV repository` commands.\r\n\r\nThe admin panel shows the list of all repositories defined in the Trac environment. It allows adding repositories and aliases, editing repository attributes and removing repositories. Note that repositories defined in `trac.ini` are displayed but cannot be edited.\r\n\r\nThe following [wiki:TracAdmin trac-admin] commands can be used to perform repository operations from the command line.\r\n\r\n `repository add <repos> <dir> [type]`::\r\n Add a repository `<repos>` located at `<dir>`, and optionally specify its type.\r\n\r\n `repository alias <name> <target>`::\r\n Create an alias `<name>` for the repository `<target>`.\r\n\r\n `repository remove <repos>`::\r\n Remove the repository `<repos>`.\r\n\r\n `repository set <repos> <key> <value>`::\r\n Set the attribute `<key>` to `<value>` for the repository `<repos>`. \r\n\r\nNote that the default repository has an empty name, so it will likely need to be quoted when running `trac-admin` from a shell. Alternatively, the name "`(default)`" can be used instead, for example when running `trac-admin` in interactive mode.\r\n\r\n\r\n== Repository synchronization == #Synchronization\r\nPrior to 0.12, Trac synchronized its cache with the repository on every HTTP request. This approach is not very efficient and not practical anymore with multiple repositories. For this reason, explicit synchronization through post-commit hooks was added. \r\n\r\nThere is also new functionality in the form of a repository listener extension point ''''(IRepositoryChangeListener)'''' that is triggered by the post-commit hook when a changeset is added or modified, and can be used by plugins to perform actions on commit.\r\n\r\n=== Mercurial Repositories ===\r\nPlease note that at the time of writing, no initial resynchronization or any hooks are necessary for Mercurial repositories - see [trac:#9485] for more information. \r\n\r\n=== Explicit synchronization === #ExplicitSync\r\nThis is the preferred method of repository synchronization. It requires setting the `[trac] repository_sync_per_request` option in [wiki:TracIni#trac-section trac.ini] to an empty value, and adding a call to `trac-admin` in the post-commit hook of each repository. Additionally, if a repository allows changing revision metadata, a call to `trac-admin` must be added to the post-revprop-change hook as well.\r\n\r\n `changeset added <repos> <rev> [...]`::\r\n Notify Trac that one or more changesets have been added to a repository.\r\n\r\n `changeset modified <repos> <rev> [...]`::\r\n Notify Trac that metadata on one or more changesets in a repository has been modified.\r\n\r\nThe `<repos>` argument can be either a repository name (use "`(default)`" for the default repository) or the path to the repository.\r\n\r\nNote that you may have to set the environment variable PYTHON_EGG_CACHE to the same value as was used for the web server configuration before calling trac-admin, if you changed it from its default location. See [wiki:TracPlugins Trac Plugins] for more information.\r\n\r\nThe following examples are complete post-commit and post-revprop-change scripts for Subversion. They should be edited for the specific environment, marked executable (where applicable) and placed in the `hooks` directory of each repository. On Unix (`post-commit`):\r\n{{{#!sh\r\n#!/bin/sh\r\nexport PYTHON_EGG_CACHE="/path/to/dir"\r\n/usr/bin/trac-admin /path/to/env changeset added "$1" "$2"\r\n}}}\r\nNote: Ubuntu doesn''t seem to like /usr/bin/trac-admin, so just use:\r\n{{{#!sh\r\n#!/bin/sh\r\nexport PYTHON_EGG_CACHE="/path/to/dir"\r\ntrac-admin /path/to/env/ changeset added "$1" "$2"\r\n}}}\r\nOn Windows (`post-commit.cmd`):\r\n{{{#!application/x-dos-batch\r\n@C:\\Python26\\Scripts\\trac-admin.exe C:\\path\\to\\env changeset added "%1" "%2"\r\n}}}\r\n\r\nThe post-revprop-change hook for Subversion is very similar. On Unix (`post-revprop-change`):\r\n{{{#!sh\r\n#!/bin/sh\r\nexport PYTHON_EGG_CACHE="/path/to/dir"\r\n/usr/bin/trac-admin /path/to/env changeset modified "$1" "$2"\r\n}}}\r\nOn Windows (`post-revprop-change.cmd`):\r\n{{{#!application/x-dos-batch\r\n@C:\\Python26\\Scripts\\trac-admin.exe C:\\path\\to\\env changeset modified "%1" "%2"\r\n}}}\r\n\r\nThe Unix variants above assume that the user running the Subversion commit has write access to the Trac environment, which is the case in the standard configuration where both the repository and Trac are served by the web server. If you access the repository through another means, for example `svn+ssh://`, you may have to run `trac-admin` with different privileges, for example by using `sudo`.\r\n\r\nNote that calling `trac-admin` in your Subversion hooks can slow down the commit and log editing operations on the client side. You might want to use the [trac:source:trunk/contrib/trac-svn-hook contrib/trac-svn-hook] script which starts `trac-admin` in an asynchronous way. The script also comes with a number of safety checks and usage advices which should make it easier to set up and test your hooks. There''s no equivalent `trac-svn-hook.bat` for Windows yet, but the script can be run by Cygwin''s bash.\r\n\r\nSee the [http://svnbook.red-bean.com/en/1.5/svn.reposadmin.create.html#svn.reposadmin.create.hooks section about hooks] in the Subversion book for more information. Other repository types will require different hook setups.\r\n\r\nGit hooks can be used in the same way for explicit syncing of git repositories. Add the following to `.git/hooks/post-commit`:\r\n{{{#!sh\r\nREV=$(git rev-parse HEAD)\r\ntrac-admin /path/to/env changeset added <my-repository> $REV\r\n}}}\r\n\r\nFor Mercurial, add the following entries to the `.hgrc` file of each repository accessed by Trac (if [trac:TracMercurial] is installed in a Trac `plugins` directory, download [trac:source:mercurial-plugin/tracext/hg/hooks.py hooks.py] and place it somewhere accessible):\r\n{{{#!ini\r\n[hooks]\r\n; If mercurial-plugin is installed globally\r\ncommit = python:tracext.hg.hooks.add_changesets\r\nchangegroup = python:tracext.hg.hooks.add_changesets\r\n\r\n; If mercurial-plugin is installed in a Trac plugins directory\r\ncommit = python:/path/to/hooks.py:add_changesets\r\nchangegroup = python:/path/to/hooks.py:add_changesets\r\n\r\n[trac]\r\nenv = /path/to/env\r\ntrac-admin = /path/to/trac-admin\r\n}}}\r\n\r\n=== Per-request synchronization === #PerRequestSync\r\nIf the post-commit hooks are not available, the environment can be set up for per-request synchronization. In that case, the `[trac] repository_sync_per_request` option in [wiki:TracIni#trac-section trac.ini] must be set to a comma-separated list of repository names to be synchronized.\r\n\r\nNote that in this case, the changeset listener extension point is not called, and therefore plugins using it will not work correctly.\r\n\r\n\r\n== Migration from a single-repository setup (Subversion) == #Migration\r\nThe following procedure illustrates a typical migration from a Subversion single-repository setup to multiple repositories.\r\n\r\n 1. Remove the default repository specification from the `[trac] repository_dir` option.\r\n 1. Add the main repository as a named repository.\r\n 1. Re-synchronize the main repository.\r\n 1. Set up post-commit and post-revprop-change hooks on the "main" repository, and set `[trac] repository_sync_per_request` to an empty value.\r\n 1. Add an alias to the main repository as the default repository (by leaving out the the `name`, e.g. `.alias = main`). This ensures that all links predating the migration still resolve to the main repository.\r\n 1. Repeat steps 2, 3 and 4 to add other "named" repositories as needed.\r\n\r\n== Migration from a single-repository setup (Mercurial) == #MigrationMercurial\r\nThe following procedure illustrates a typical migration from a Mercurial single-repository setup to multiple repositories. Please note that at the time of writing, no initial resynchronization or any hooks are necessary for Mercurial repositories - see [trac:ticket:9485 #9485] for more information.\r\n\r\n 1. Upgrade to the latest version of the TracMercurial plugin.\r\n 1. Remove the default repository specification from the `[trac] repository_dir` option.\r\n 1. Add the main repository as a named repository.\r\n 1. Add an alias to the main repository as the default repository (by leaving out the the `name`, e.g. `.alias = main`). This ensures that all links predating the migration still resolve to the main repository.\r\n 1. Repeat step 3 to add other "named" repositories as needed.\r\n\r\n== Troubleshooting ==\r\n\r\n=== My trac-post-commit-hook doesn''t work anymore === #trac-post-commit-hook\r\n\r\nYou must now use the optional components from `tracopt.ticket.commit_updater.*`, which you can activate through the Plugins panel in the Administrative part of the web interface, or by directly modifying the [TracIni#components-section "[components]"] section in the trac.ini. Be sure to use [#ExplicitSync explicit synchronization] as explained above.\r\n', NULL, NULL),
('TracSupport', 1, 1362994208363747, 'trac', '127.0.0.1', '= Trac Support =\r\n\r\nLike in most [http://www.opensource.org/ open source projects], "free" Trac support is available primarily through the community itself, mainly through the [trac:MailingList mailing list] and the [trac: project wiki]. The latter is the authoritative source for the TracGuide (administrator and user guides for Trac).\r\n\r\nThere is also an [trac:IrcChannel IRC channel], where people might be able to help out. Much of the ''live'' development discussions also happen there.\r\n\r\nBefore you start a new support query, make sure you''ve done the appropriate searching:\r\n * in the project''s [trac:TracFaq FAQ]\r\n * in past messages to the [http://groups.google.com/group/trac-users Trac Users Mailing List]\r\n * in the Trac ticket system, using either a [trac:search:?q=&ticket=on&wiki=on full search] or a [trac:query: ticket query].\r\n\r\nPlease ''''''don''t'''''' create a ticket in trac.egdewall.org for asking a support question about Trac. Only use it when you face a ''''real'''' and ''''new'''' bug in Trac, and do so only after having read the [trac:NewTicketGuidelines NewTicketGuidelines]. The more a bug report or enhancement request complies with those guidelines, the higher the chances are that it will be fixed or implemented promptly!\r\n\r\n----\r\nSee also: [trac:MailingList], [trac:TracTroubleshooting], [trac:CommercialServices]\r\n', NULL, NULL),
('TracNavigation', 1, 1362994208365240, 'trac', '127.0.0.1', '= Trac Navigation =\r\n\r\nStarting with Trac 0.11, it is now possible to customize the main and meta navigation entries in some basic ways.\r\n\r\nThe new `[mainnav]` and `[metanav]` configuration sections can now be used to customize the text and link used for the navigation items, or even to disable them. The `mainnav` and `metanav` options in the `[trac]` configuration section can also be used to change the order.\r\n\r\n=== `[mainnav]` #mainnav-bar\r\n`[mainnav]` corresponds to the ''''''main navigation bar'''''', the one containing entries such as ''''Wiki'''', ''''Timeline'''', ''''Roadmap'''', ''''Browse Source'''' and so on. This navigation bar is meant to access the default page of the main modules enabled in Trac that are accessible for the current user.\r\n\r\n\r\n** [=#Example Example] ** \r\n\r\nIn the following example, we rename the link to the Wiki start "Home", and make the "View Tickets" entry link to a specific report. The second example (below) also hides the "!Help/Guide" link.\r\n\r\nRelevant excerpt from the TracIni:\r\n{{{\r\n[mainnav]\r\nwiki.label = Home\r\ntickets.href = /report/24\r\n}}}\r\n\r\n=== `[metanav]` #metanav-bar\r\n`[metanav]` corresponds to the ''''''meta navigation bar'''''', by default positioned above the main navigation bar and below the ''''Search'''' box. It contains the ''''Log in'''', ''''Logout'''', ''''!Help/Guide'''' etc. entries. This navigation bar is meant to access some global information about the Trac project and the current user.\r\n\r\nThere is one special entry in the `[metanav]` section: `logout.redirect` is the page the user sees after hitting the logout button. \r\n[[comment(see also #Trac3808)]]\r\n\r\n** Example ** \r\n\r\n{{{\r\n[metanav]\r\nhelp = disabled\r\nlogout.redirect = wiki/Logout\r\n}}}\r\n\r\n\r\n=== Notes\r\nPossible URL formats (for `.href` or `.redirect`):\r\n|| ''''''config'''''' || ''''''redirect to'''''' ||\r\n|| `wiki/Logout` || `/projects/env/wiki/Logout` ||\r\n|| `http://hostname/` || `http://hostname/` ||\r\n|| `/projects` || `/projects` ||\r\n\r\n\r\n=== `[trac]` #nav-order\r\nThe `mainnav` and `metanav` options in the `[trac]` configuration section control the order in which the navigation items are displayed (left to right). This can be useful with plugins that add navigation items.\r\n\r\n** Example ** \r\n\r\nIn the following example, we change the order to prioritise the ticket related items further left.\r\n\r\nRelevant excerpt from the TracIni:\r\n{{{\r\n[trac]\r\nmainnav = wiki,tickets,newticket,timeline,roadmap,browser,search,admin\r\n}}}\r\n\r\nThe default order and item names can be viewed in the [TracIni#trac-section trac section of TracIni].\r\n\r\n=== Context Navigation #ctxtnav-bar\r\n\r\nNote that it is still not possible to customize the ''''''contextual navigation bar'''''', i.e. the one usually placed below the main navigation bar.\r\n\r\n\r\n----\r\nSee also: TracInterfaceCustomization, and the [http://trac-hacks.org/wiki/NavAddPlugin TracHacks:NavAddPlugin] or [http://trac-hacks.org/wiki/MenusPlugin TracHacks:MenusPlugin] (still needed for adding entries)', NULL, NULL),
('SandBox', 1, 1362994208366886, 'trac', '127.0.0.1', '= The Sandbox =\r\n\r\nThis is just a page to practice and learn WikiFormatting. \r\n\r\nGo ahead, edit it freely.\r\n', NULL, NULL),
('TracRevisionLog', 1, 1362994208368308, 'trac', '127.0.0.1', '= Viewing Revision Logs =\r\n[[TracGuideToc]]\r\n\r\nWhen you browse the repository, it''s always possible to query the \r\n''''Revision Log'''' view corresponding to the path you''re currently seeing.\r\nThis will display a list of the most recent changesets in which the \r\ncurrent path or any other path below it has been modified.\r\n\r\n== The Revision Log Form ==\r\n\r\nIt''s possible to set the revision at which the revision log should\r\nstart, using the ''''View log starting at'''' field. An empty value\r\nor a value of ''''head'''' is taken to be the newest changeset. \r\n\r\nIt''s also possible to specify the revision at which the log should\r\nstop, using the ''''back to'''' field. By default, it''s left empty, \r\nwhich means the revision log will stop as soon as 100 revisions have \r\nbeen listed.\r\n\r\nAlso, there are three modes of operation of the revision log.\r\n\r\nBy default, the revision log ''''stops on copy'''', which means that \r\nwhenever an ''''Add'''', ''''Copy'''' or ''''Rename'''' operation is detected, \r\nno older revision will be shown. That''s very convenient when working\r\nwith branches, as one only sees the history corresponding to what\r\nhas been done on the branch.\r\n\r\nIt''s also possible to indicate that one wants to see what happened\r\nbefore a ''''Copy'''' or ''''Rename'''' change, by selecting the \r\n''''Follow copies'''' mode. This will cross all copies or renames changes.\r\nEach time the name of the path changes, there will be an additional\r\nindentation level. That way, the changes on the different paths\r\nare easily grouped together visually.\r\n\r\nIt''s even possible to go past an ''''Add'''' change, in order to see \r\nif there has been a ''''Delete'''' change on that path, before \r\nthat ''''Add''''. This mode corresponds to the mode called \r\n''''Show only adds, moves and deletes''''. \r\nWhile quite useful at times, be aware that this operation is quite \r\nresource intensive.\r\n\r\nFinally, there''s also a checkbox ''''Show full log messages'''',\r\nwhich controls whether the full content of the commit log message\r\nshould be displayed for each change, or only a shortened version of it.\r\n\r\n== The Revision Log Information ==\r\n\r\nFor each revision log entry, there are 7 columns:\r\n 1. The first column contains a pair of radio buttons and should be used \r\n for selecting the ''''old'''' and the ''''new'''' revisions that will be \r\n used for [wiki:TracRevisionLog#viewingtheactualchanges viewing the actual changes].\r\n 1. A color code (similar to the one used for the\r\n [wiki:TracChangeset#ChangesetHeader changesets]) indicating kind of change.\r\n Clicking on this column refreshes the revision log so that it restarts\r\n with this change.\r\n 1. The ''''''Revision'''''' number, displayed as `@xyz`.\r\n This is a link to the TracBrowser, using the displayed revision as the base line.\r\n Next to it, you can see a little "wheel" icon [[Image(htdocs:../common/changeset.png)]], which is clickable and leads to the TracChangeset view for that revision.\r\n 1. The ''''''Date'''''' at which the change was made.\r\n The date is displayed as the time elapsed from the date of the revision. The time\r\n elapsed is displayed as the number of hours, days, weeks, months, or years.\r\n 1. The ''''''Author'''''' of the change.\r\n 1. The ''''''Log Message'''''', which contains either the truncated or full commit \r\n log message, depending on the value of the ''''Show full log messages'''' \r\n checkbox in the form above.\r\n \r\n\r\n== Inspecting Changes Between Revisions ==\r\n\r\nThe ''''View changes...'''' buttons (placed above and below the list\r\nof changes, on the left side) will show the set of differences\r\ncorresponding to the aggregated changes starting from the ''''old''''\r\nrevision (first radio-button) to the ''''new'''' revision (second\r\nradio-button), in the TracChangeset view.\r\n\r\nNote that the ''''old'''' revision doesn''t need to be actually \r\n''''older'''' than the ''''new'''' revision: it simply gives a base\r\nfor the diff. It''s therefore entirely possible to easily \r\ngenerate a ''''reverse diff'''', for reverting what has been done\r\nin the given range of revisions.\r\n\r\nFinally, if the two revisions are identical, the corresponding\r\nchangeset will be shown (same effect as clicking on the !ChangeSet number).\r\n\r\n== Alternative Formats ==\r\n\r\n=== The !ChangeLog Text ===\r\n\r\nAt the bottom of the page, there''s a ''''!ChangeLog'''' link\r\nthat will show the range of revisions as currently shown,\r\nbut as a simple text, matching the usual conventions for\r\n!ChangeLog files.\r\n\r\n=== RSS Support ===\r\n\r\nThe revision log also provides a RSS feed to monitor the changes.\r\nTo subscribe to a RSS feed for a file or directory, open its\r\nrevision log in the browser and click the orange ''XML'' icon at the bottom\r\nof the page. For more information on RSS support in Trac, see TracRss.\r\n\r\n----\r\nSee also: TracBrowser, TracChangeset, TracGuide', NULL, NULL),
('TitleIndex', 1, 1362994208369859, 'trac', '127.0.0.1', ''''''' Index by Title '''''' | '''''' [RecentChanges Index by Date] ''''''\r\n\r\n[[TitleIndex(format=group,min=4)]]', NULL, NULL);
INSERT INTO `wiki` (`name`, `version`, `time`, `author`, `ipnr`, `text`, `comment`, `readonly`) VALUES
('TracFineGrainedPermissions', 1, 1362994208371393, 'trac', '127.0.0.1', '[[PageOutline(2-5, Contents, floated)]]\r\n= Fine grained permissions =\r\n\r\nBefore Trac 0.11, it was only possible to define fine-grained permissions checks on the repository browser sub-system.\r\n\r\nSince 0.11, there''s a general mechanism in place that allows custom **permission policy plugins** to grant or deny any action on any kind of Trac resources, even at the level of specific versions of such resources.\r\n\r\nNote that for Trac 0.12, `authz_policy` has been integrated as an optional module (in `tracopt.perm.authz_policy.*`), so it''s installed by default and can simply be activated via the //Plugins// panel in the Trac administration module.\r\n\r\n\r\n== Permission Policies ==\r\n\r\nA great diversity of permission policies can be implemented, and Trac comes with a few examples. \r\n\r\nWhich policies are currently active is determined by a configuration setting in TracIni:\r\ne.g.\r\n{{{\r\n[trac]\r\npermission_policies = AuthzSourcePolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy\r\n}}}\r\nThis lists the [#AuthzSourcePolicy] described below as the first policy, followed by the !DefaultPermissionPolicy which checks for the traditional coarse grained style permissions described in TracPermissions, and the !LegacyAttachmentPolicy which knows how to use the coarse grained permissions for checking the permissions available on attachments.\r\n\r\nAmong the possible optional choices, there is [#AuthzPolicy], a very generic permission policy, based on an Authz-style system. See\r\n[trac:source:branches/0.12-stable/tracopt/perm/authz_policy.py authz_policy.py] for details. \r\n\r\nAnother popular permission policy [#AuthzSourcePolicy], re-implements the pre-0.12 support for checking fine-grained permissions limited to Subversion repositories in terms of the new system.\r\n\r\nSee also [trac:source:branches/0.12-stable/sample-plugins/permissions sample-plugins/permissions] for more examples.\r\n\r\n\r\n=== !AuthzPolicy === \r\n==== Configuration ====\r\n* Install [http://www.voidspace.org.uk/python/configobj.html ConfigObj] (still needed for 0.12).\r\n* Copy authz_policy.py into your plugins directory (only for Trac 0.11).\r\n* Put a [http://swapoff.org/files/authzpolicy.conf authzpolicy.conf] file somewhere, preferably on a secured location on the server, not readable for others than the webuser. If the file contains non-ASCII characters, the UTF-8 encoding should be used.\r\n* Update your `trac.ini`:\r\n 1. modify the [TracIni#trac-section permission_policies] entry in the `[trac]` section\r\n{{{\r\n[trac]\r\n...\r\npermission_policies = AuthzPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy\r\n}}}\r\n 1. add a new `[authz_policy]` section\r\n{{{\r\n[authz_policy]\r\nauthz_file = /some/trac/env/conf/authzpolicy.conf\r\n}}}\r\n 1. enable the plugin through [/admin/general/plugin WebAdmin] or by editing the `[components]` section\r\n{{{\r\n[components]\r\n...\r\n# Trac 0.12\r\ntracopt.perm.authz_policy.* = enabled\r\n# for Trac 0.11 use this\r\n#authz_policy.* = enabled \r\n}}}\r\n\r\n\r\n==== Usage Notes ====\r\nNote that the order in which permission policies are specified is quite critical, \r\nas policies will be examined in the sequence provided.\r\n\r\nA policy will return either `True`, `False` or `None` for a given permission check. `True` is returned if the policy explicitly grants the permission. `False` is returned if the policy explicitly denies the permission. `None` is returned if the policy is unable to either grant or deny the permission.\r\n\r\nNOTE: Only if the return value is `None` will the ''''next'''' permission policy be consulted.\r\nIf none of the policies explicitly grants the permission, the final result will be `False` \r\n(i.e. permission denied).\r\n\r\nThe `authzpolicy.conf` file is a `.ini` style configuration file:\r\n{{{\r\n[wiki:PrivatePage@*]\r\njohn = WIKI_VIEW, !WIKI_MODIFY\r\njack = WIKI_VIEW\r\n* =\r\n}}}\r\n* Each section of the config is a glob pattern used to match against a Trac resource\r\n descriptor. These descriptors are in the form:\r\n{{{\r\n<realm>:<id>@<version>[/<realm>:<id>@<version> ...]\r\n}}}\r\n Resources are ordered left to right, from parent to child. If any\r\n component is inapplicable, `*` is substituted. If the version pattern is\r\n not specified explicitely, all versions (`@*`) is added implicitly\r\n\r\n Example: Match the WikiStart page\r\n{{{\r\n[wiki:*]\r\n[wiki:WikiStart*]\r\n[wiki:WikiStart@*]\r\n[wiki:WikiStart]\r\n}}}\r\n\r\n Example: Match the attachment `wiki:WikiStart@117/attachment/FOO.JPG@*`\r\n on WikiStart\r\n{{{\r\n[wiki:*]\r\n[wiki:WikiStart*]\r\n[wiki:WikiStart@*]\r\n[wiki:WikiStart@*/attachment/*]\r\n[wiki:WikiStart@117/attachment/FOO.JPG]\r\n}}}\r\n\r\n* Sections are checked against the current Trac resource descriptor ''''''IN ORDER'''''' of\r\n appearance in the configuration file. ''''''ORDER IS CRITICAL''''''.\r\n\r\n* Once a section matches, the current username is matched against the keys \r\n (usernames) of the section, ''''''IN ORDER''''''. \r\n * If a key (username) is prefixed with a `@`, it is treated as a group. \r\n * If a value (permission) is prefixed with a `!`, the permission is\r\n denied rather than granted.\r\n\r\n The username will match any of ''anonymous'', ''authenticated'', <username> or ''*'', using normal Trac permission rules. || ''''''Note:'''''' Other groups which are created by user (e.g. by ''adding subjects to groups'' on web interface page //Admin / Permissions//) cannot be used. See [trac:ticket:5648 #5648] for details about this missing feature ||\r\n\r\nFor example, if the `authz_file` contains:\r\n{{{\r\n[wiki:WikiStart@*]\r\n* = WIKI_VIEW\r\n\r\n[wiki:PrivatePage@*]\r\njohn = WIKI_VIEW\r\n* = !WIKI_VIEW\r\n}}}\r\nand the default permissions are set like this:\r\n{{{\r\njohn WIKI_VIEW\r\njack WIKI_VIEW\r\n# anonymous has no WIKI_VIEW\r\n}}}\r\n\r\nThen: \r\n * All versions of WikiStart will be viewable by everybody (including anonymous)\r\n * !PrivatePage will be viewable only by john\r\n * other pages will be viewable only by john and jack\r\n\r\nGroups:\r\n{{{\r\n[groups]\r\nadmins = john, jack\r\ndevs = alice, bob\r\n\r\n[wiki:Dev@*]\r\n@admins = TRAC_ADMIN\r\n@devs = WIKI_VIEW\r\n* =\r\n\r\n[*]\r\n@admins = TRAC_ADMIN\r\n* =\r\n}}}\r\n\r\nThen:\r\n- everything is blocked (whitelist approach), but\r\n- admins get all TRAC_ADMIN everywhere and\r\n- devs can view wiki pages.\r\n\r\nSome repository examples (Browse Source specific):\r\n{{{\r\n# A single repository:\r\n[repository:test_repo@*]\r\njohn = BROWSER_VIEW, FILE_VIEW\r\n# John has BROWSER_VIEW and FILE_VIEW for the entire test_repo\r\n\r\n# All repositories:\r\n[repository:*@*]\r\njack = BROWSER_VIEW, FILE_VIEW\r\n# John has BROWSER_VIEW and FILE_VIEW for all repositories\r\n}}}\r\n\r\nVery fine grain repository access:\r\n{{{\r\n# John has BROWSER_VIEW and FILE_VIEW access to trunk/src/some/location/ only\r\n[repository:test_repo@*/source:trunk/src/some/location/*@*]\r\njohn = BROWSER_VIEW, FILE_VIEW\r\n\r\n\r\n# John has BROWSER_VIEW and FILE_VIEW access to only revision 1 of all files at trunk/src/some/location only\r\n[repository:test_repo@*/source:trunk/src/some/location/*@1]\r\njohn = BROWSER_VIEW, FILE_VIEW\r\n\r\n\r\n# John has BROWSER_VIEW and FILE_VIEW access to all revisions of ''somefile'' at trunk/src/some/location only \r\n[repository:test_repo@*/source:trunk/src/some/location/somefile@*]\r\njohn = BROWSER_VIEW, FILE_VIEW\r\n\r\n\r\n# John has BROWSER_VIEW and FILE_VIEW access to only revision 1 of ''somefile'' at trunk/src/some/location only\r\n[repository:test_repo@*/source:trunk/src/some/location/somefile@1]\r\njohn = BROWSER_VIEW, FILE_VIEW\r\n}}}\r\n\r\nNote: In order for Timeline to work/visible for John, we must add CHANGESET_VIEW to the above permission list.\r\n\r\n\r\n==== Missing Features ====\r\nAlthough possible with the !DefaultPermissionPolicy handling (see Admin panel), fine-grained permissions still miss those grouping features (see [trac:ticket:9573 #9573], [trac:ticket:5648 #5648]). Patches are partially available, see forgotten authz_policy.2.patch part of [trac:ticket:6680 #6680]).\r\n\r\nYou cannot do the following:\r\n{{{\r\n[groups]\r\nteam1 = a, b, c\r\nteam2 = d, e, f\r\nteam3 = g, h, i\r\ndepartmentA = team1, team2\r\n}}}\r\n\r\nPermission groups are not supported either. You cannot do the following:\r\n{{{\r\n[groups]\r\npermission_level_1 = WIKI_VIEW, TICKET_VIEW\r\npermission_level_2 = permission_level_1, WIKI_MODIFY, TICKET_MODIFY\r\n[*]\r\n@team1 = permission_level_1\r\n@team2 = permission_level_2\r\n@team3 = permission_level_2, TICKET_CREATE\r\n}}}\r\n\r\n=== !AuthzSourcePolicy (mod_authz_svn-like permission policy) === #AuthzSourcePolicy\r\n\r\nAt the time of this writing, the old fine grained permissions system from Trac 0.11 and before used for restricting access to the repository has been converted to a permission policy component, but from the user point of view, this makes little if no difference.\r\n\r\nThat kind of fine-grained permission control needs a definition file, which is the one used by Subversion''s mod_authz_svn. \r\nMore information about this file format and about its usage in Subversion is available in the [http://svnbook.red-bean.com/en/1.5/svn.serverconfig.pathbasedauthz.html Path-Based Authorization] section in the Server Configuration chapter of the svn book.\r\n\r\nExample:\r\n{{{\r\n[/]\r\n* = r\r\n\r\n[/branches/calc/bug-142]\r\nharry = rw\r\nsally = r\r\n\r\n[/branches/calc/bug-142/secret]\r\nharry =\r\n}}}\r\n\r\n * ''''''/'''''' = ''''Everyone has read access by default''''\r\n * ''''''/branches/calc/bug-142'''''' = ''''harry has read/write access, sally read only''''\r\n * ''''''/branches/calc/bug-142/secret'''''' = ''''harry has no access, sally has read access (inherited as a sub folder permission)''''\r\n\r\n==== Trac Configuration ====\r\n\r\nTo activate fine grained permissions you __must__ specify the {{{authz_file}}} option in the {{{[trac]}}} section of trac.ini. If this option is set to null or not specified the permissions will not be used.\r\n\r\n{{{\r\n[trac]\r\nauthz_file = /path/to/svnaccessfile\r\n}}}\r\n\r\nIf you want to support the use of the `[`''''modulename''''`:/`''''some''''`/`''''path''''`]` syntax within the `authz_file`, add \r\n\r\n{{{\r\nauthz_module_name = modulename\r\n}}}\r\n\r\nwhere ''''modulename'''' refers to the same repository indicated by the `repository_dir` entry in the `[trac]` section. As an example, if the `repository_dir` entry in the `[trac]` section is {{{/srv/active/svn/blahblah}}}, that would yield the following:\r\n\r\n{{{ \r\n[trac]\r\nauthz_file = /path/to/svnaccessfile\r\nauthz_module_name = blahblah\r\n...\r\nrepository_dir = /srv/active/svn/blahblah \r\n}}}\r\n\r\nwhere the svn access file, {{{/path/to/svnaccessfile}}}, contains entries such as {{{[blahblah:/some/path]}}}.\r\n\r\n''''''Note:'''''' Usernames inside the Authz file __must__ be the same as those used inside trac. \r\n\r\nAs of version 0.12, make sure you have ''''!AuthzSourcePolicy'''' included in the permission_policies list in trac.ini, otherwise the authz permissions file will be ignored.\r\n\r\n{{{ \r\n[trac]\r\npermission_policies = AuthzSourcePolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy\r\n}}}\r\n\r\n==== Subversion Configuration ====\r\n\r\nThe same access file is typically applied to the corresponding Subversion repository using an Apache directive like this:\r\n{{{\r\n<Location /repos>\r\n DAV svn\r\n SVNParentPath /usr/local/svn\r\n\r\n # our access control policy\r\n AuthzSVNAccessFile /path/to/svnaccessfile\r\n</Location>\r\n}}}\r\n\r\nFor information about how to restrict access to entire projects in a multiple project environment see [trac:wiki:TracMultipleProjectsSVNAccess]\r\n\r\n== Debugging permissions\r\nIn trac.ini set:\r\n{{{\r\n[logging]\r\nlog_file = trac.log\r\nlog_level = DEBUG\r\nlog_type = file\r\n}}}\r\n\r\nAnd watch:\r\n{{{\r\ntail -n 0 -f log/trac.log | egrep ''\\[perm\\]|\\[authz_policy\\]''\r\n}}}\r\n\r\nto understand what checks are being performed. See the sourced documentation of the plugin for more info.\r\n\r\n\r\n----\r\nSee also: TracPermissions,\r\n[http://trac-hacks.org/wiki/FineGrainedPageAuthzEditorPlugin TracHacks:FineGrainedPageAuthzEditorPlugin] for a simple editor plugin.', NULL, NULL);