Subversion Repositories DevTools

Rev

Rev 1295 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1293 dpurdie 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2
<HTML
3
><HEAD
4
><TITLE
5
>Configuration</TITLE
6
><META
7
NAME="GENERATOR"
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9
REL="HOME"
10
TITLE="The Codestriker Guide"
11
HREF="book1.html"><LINK
12
REL="UP"
13
TITLE="Installation"
14
HREF="c49.html"><LINK
15
REL="PREVIOUS"
16
TITLE="Installation"
17
HREF="c49.html"><LINK
18
REL="NEXT"
19
TITLE="Running install.pl"
20
HREF="x234.html"></HEAD
21
><BODY
22
CLASS="SECT1"
23
BGCOLOR="#FFFFFF"
24
TEXT="#000000"
25
LINK="#0000FF"
26
VLINK="#840084"
27
ALINK="#0000FF"
28
><DIV
29
CLASS="NAVHEADER"
30
><TABLE
31
SUMMARY="Header navigation table"
32
WIDTH="100%"
33
BORDER="0"
34
CELLPADDING="0"
35
CELLSPACING="0"
36
><TR
37
><TH
38
COLSPAN="3"
39
ALIGN="center"
40
>The Codestriker Guide: Version 1.9.3</TH
41
></TR
42
><TR
43
><TD
44
WIDTH="10%"
45
ALIGN="left"
46
VALIGN="bottom"
47
><A
48
HREF="c49.html"
49
ACCESSKEY="P"
50
>Prev</A
51
></TD
52
><TD
53
WIDTH="80%"
54
ALIGN="center"
55
VALIGN="bottom"
56
>Chapter 2. Installation</TD
57
><TD
58
WIDTH="10%"
59
ALIGN="right"
60
VALIGN="bottom"
61
><A
62
HREF="x234.html"
63
ACCESSKEY="N"
64
>Next</A
65
></TD
66
></TR
67
></TABLE
68
><HR
69
ALIGN="LEFT"
70
WIDTH="100%"></DIV
71
><DIV
72
CLASS="SECT1"
73
><H1
74
CLASS="SECT1"
75
><A
76
NAME="AEN107"
77
>2.2. Configuration</A
78
></H1
79
><P
80
>        This section is concerned with unpacking the Codestriker
81
        distribution into a suitable location, and then configuring
82
        it.  For UNIX distribution, the following commands may be
83
        appropriate on your system:
84
	<PRE
85
CLASS="PROGRAMLISTING"
86
>% mkdir /var/www/codestriker
87
% cd /var/www/codestriker
88
% tar zxvf /from/installed/location/codestriker-X.Y.Z.tar.gz
89
% chown -R apache.apache /var/www/codestriker/codestriker-X.Y.Z
90
	</PRE
91
>
92
	Here "apache" is the user which runs the Apache server.  It
93
	could be "nobody" under different systems.  Check with the
94
	<B
95
CLASS="COMMAND"
96
>ps auxww</B
97
> command, or check your Apache
98
	configuration files.  Under Windows, the Codestriker
99
	distribution could be unzipped into a suitable location under
100
	<TT
101
CLASS="FILENAME"
102
>c:\program files</TT
103
>, or just
104
	<TT
105
CLASS="FILENAME"
106
>c:\codestriker</TT
107
>.
108
      </P
109
><P
110
>        The next task is to edit the
111
        <TT
112
CLASS="FILENAME"
113
>codestriker.conf</TT
114
> configuration file to
115
        reflect the settings on your site.  The file is documented
116
        with examples to assist in setting appropriate values.  The
117
        file is in Perl syntax, so lines starting with a '#' indicate
118
        a comment.
119
      </P
120
><DIV
121
CLASS="SECT2"
122
><H2
123
CLASS="SECT2"
124
><A
125
NAME="AEN116"
126
>2.2.1. Codestriker Database</A
127
></H2
128
><P
129
>	  The <CODE
130
CLASS="VARNAME"
131
>$db</CODE
132
> variable should be set to a DBI
133
	  URL representing the Codestriker database that was created,
134
	  as specified in <A
135
HREF="c49.html#CODESTRIKER-DATABASE-CREATION"
136
>Section 2.1</A
137
>.  Basically, if you
138
	  are using PostgreSQL, this should be:
139
<PRE
140
CLASS="PROGRAMLISTING"
141
>$db = 'DBI:Pg:dbname=codestrikerdb';</PRE
142
>
143
          For MySQL, this would be:
144
<PRE
145
CLASS="PROGRAMLISTING"
146
>$db = 'DBI:mysql:dbname=codestrikerdb';</PRE
147
>
148
          If your database is situated on a different host, for
149
          example "dbhost", this could be modified to:
150
<PRE
151
CLASS="PROGRAMLISTING"
152
>$db = 'DBI:mysql:dbname=codestrikerdb;host=dbhost';</PRE
153
>
154
        In this situation, you need to ensure that the webserver host
155
        has permission to connect to the database on dbhost.  Check
156
        the MySQL documentation for further details.  The database
157
        user and password also need to be specified.  If your username
158
        was "codestriker", and the password was "cspasswd", the
159
        settings would be just:
160
<PRE
161
CLASS="PROGRAMLISTING"
162
># Database user.
163
$dbuser = 'codestriker';
164
 
165
# Database password.
166
$dbpasswd = 'cspasswd';</PRE
167
>
168
        Other examples for other database systems are present in the
169
        configuration file.
170
	</P
171
></DIV
172
><DIV
173
CLASS="SECT2"
174
><H2
175
CLASS="SECT2"
176
><A
177
NAME="AEN125"
178
>2.2.2. Email</A
179
></H2
180
><P
181
>	  When a code review topic is created, or a comment against a
182
	  review is made, an email is sent out as a notification
183
	  mechanism.  Codestriker needs to know what mail host it can
184
	  use for sending email messages.  The configuration file
185
	  default is "localhost":
186
	  <PRE
187
CLASS="PROGRAMLISTING"
188
># Location of the mailing host.  This is used when sending out codestriker
189
# comments.
190
$mailhost = 'localhost';
191
           </PRE
192
>
193
	   If your mail server requires SMTP authentication for
194
	   sending emails, the username and password can be set via
195
	   the
196
	   <CODE
197
CLASS="VARNAME"
198
>$mailuser</CODE
199
> and
200
	   <CODE
201
CLASS="VARNAME"
202
>$mailpasswd</CODE
203
> parameters.
204
	  <PRE
205
CLASS="PROGRAMLISTING"
206
># Set the user and password parameters if $mailhost requires SMTP
207
# authentication.  If commented out, it is assumed authentication is 
208
# not required.
209
$mailuser = 'smtpuser';
210
$mailpasswd = 'smtppasswd';
211
           </PRE
212
>
213
	   If these values are commented out, it is assumed SMTP
214
	   authentication is not required.
215
	</P
216
></DIV
217
><DIV
218
CLASS="SECT2"
219
><H2
220
CLASS="SECT2"
221
><A
222
NAME="AEN132"
223
>2.2.3. Compression</A
224
></H2
225
><P
226
>	  Some of the HTML pages generated by Codestriker can be quite
227
	  large, depending on the review size.  If your deployment is
228
	  operating to users outside an intranet, it may be worth
229
	  enabling this option to enable compression.  Note, IE
230
	  doesn't support receiving compressed HTML, so setting this
231
	  option will have no effect.  Initially, it is best to leave
232
	  this option turned off (the default), and only to enable it
233
	  if there is a significant performance problem.
234
	  <PRE
235
CLASS="PROGRAMLISTING"
236
># Indicate whether to try and compress output if the client browser
237
# supports it.  This can make a tremendous difference in bandwidth,
238
# especially over slow links.
239
$use_compression = 0;
240
	  </PRE
241
>
242
	</P
243
></DIV
244
><DIV
245
CLASS="SECT2"
246
><H2
247
CLASS="SECT2"
248
><A
249
NAME="AEN136"
250
>2.2.4. Source Code Management Systems</A
251
></H2
252
><P
253
>	  This part of the configuration deals with informing
254
	  Codestriker what source code control systems you use.  By
255
	  doing this, Codestriker can then display reviews with
256
	  revision information, and then allow the reviewer to view
257
	  the entire contents of a file before a change, and with a
258
	  change applied.  When a review is created, the user
259
	  specifies which source control system it is applied against
260
	  (there may not be any, if it is just a simple patch or text
261
	  file).  For many Codestriker deployments, there may only be
262
	  a single SCM system.  There is currently support for CVS,
263
	  Subversion, Perforce, Visual Source Safe, and ClearCase.
264
	  Here are examples from the codestriker.conf file:
265
	  <PRE
266
CLASS="PROGRAMLISTING"
267
># Valid repositories which may be selected at the create topic screen.
268
# The order shown here is the order presented in the option list.  Most
269
# deployments will only require a single repository to be specified.
270
# Comment out / modify entries appropriate for your deployment.
271
#
272
# If this list is empty it won't be possible to view the entire contents of a
273
# file before the proposed change and/or after. All of the places 
274
# in the application that ask for, or display repository information will
275
# be hidden and lastly, it will be impossible to make a diff review topic
276
# on files that already checked in.
277
#
278
# You also need to make sure that the user running your webserver has
279
# permission to run the client SCM program (eg, cvs, p4, svn), and to
280
# connect to the repository.
281
@valid_repositories =
282
    (
283
     # Example CVSROOT of a CVS repository on the same machine as the
284
     # codestriker server.
285
     '/home/sits/cvs',
286
 
287
     # Example of a CVS repository which contains the URL to a viewcvs
288
     # installation (CVS web is also supported), followed by the
289
     # CVSROOT of the repository.
290
     'http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi /cvsroot',
291
 
292
     # The next example is the syntax used for specifying a Subversion
293
     # repository, which is simply the subversion repository URL
294
     # prefixed # by svn:
295
     'svn:http://svn.collab.net/repos/svn/trunk',
296
 
297
     # Subversion server with authentication.  The user name and
298
     # password should be added to the end and separated by
299
     # semicolons.
300
     'svn:http://svn.collab.net/repos/svn/trunk;username;password',
301
 
302
     # Subversion server that uses the Subversion protocol.
303
     'svn://my.subversion.server/repos/product/trunk',
304
 
305
     # Example CVS pserver config with username and password
306
     # specified.
307
     ':pserver:sits:password@cvs.sourceforge.net:/cvsroot',
308
 
309
     # Example CVS pserver config with proxy options.
310
     ':pserver;proxy=abc.com;proxyport=8080:sits:pwd@cvs.dev.net',
311
 
312
     # Example CVS pserver with empty password.
313
     ':pserver:anonymous:@cvs.sourceforge.net:/cvsroot',
314
 
315
     # Example CVS server which will be connected to with SSH.  This
316
     # assumes the appropriate ssh keys have been created so that the
317
     # process running the Codestriker application can connect to the
318
     # CVS server without requiring a password to be entered.
319
     ':ext:sits@localhost:/home/sits/cvs',
320
 
321
     # Visual SourceSafe repository on same machine at default
322
     # location.  Username "admin", password "password".
323
     'vss:admin;password',
324
 
325
     # Visual SourceSafe repository on same machine, but with specific
326
     # repository location specified.
327
     'vss:c:\\Program Files\\Microsoft Visual Studio\\VSS;admin;password',
328
 
329
     # Visual SourceSafe repository located on a network fileshare.
330
     'vss:\\\\VisualSourceSafeMachineName\\SharedRepositoryPath;admin;password',
331
     # Example Win32 CVS repository on the same machine.
332
     ':local:c:\\cvsrep',
333
 
334
     # Another Win32 CVS repository on the same machine.
335
     'c:/cvsrep2',
336
 
337
     # The next example is for a Perforce repository.  After the
338
     # leading :perforce identifier, the next two components are the
339
     # Perforce user and password parameters.  The last two parameters
340
     # after the '@' symbol represent the host and port number of
341
     # the Perforce server.
342
     'perforce:sits:password@localhost:1666',
343
 
344
     # The next example is a ClearCase repository, where the path is
345
     # the location of a shared snapshot view.  From this view, it
346
     # should be  possible to a file of any version can be 
347
     # retrieved from the vob using the "cleartool get" command.  It
348
     # is important that this snapshot view is accessible with the
349
     # same path specification for all developers.  This is because
350
     # a diff file created by a developer will refer to the snapshot
351
     # view, and will allow Codestriker to retrieve specific files
352
     # and versions mentioned in the review text, when necessary.
353
     # It is also important that the user account running the
354
     # webserver process has permission to access to the snapshot
355
     # view.
356
     'clearcase:c:\\stuff\\view_name\\vob_name',
357
 
358
     # The next example is a repository based off a ClearCase dynamic view.
359
     # The clearcase identifier is followed by the dyn indicator,
360
     # followed by the view name, followed by the location where the
361
     # view is loaded.
362
     # 'clearcase:dyn:viewname:/vobs'
363
    );
364
        </PRE
365
>
366
        </P
367
><P
368
>	As explained by the comment in the codestriker.conf file,
369
	sometimes there is a benefit for displaying a name instead of
370
	a repository URL in the Codestriker UI.
371
	<PRE
372
CLASS="PROGRAMLISTING"
373
># A mapping of repository URLs to names.  In any screen where a
374
# repository is displayed, if there is a mapping for the repository
375
# defined here, then the symbolic name will be displayed instead of
376
# its raw URL.  This is useful when the URL contains sensitive
377
# username/password information, or the symbolic name is more
378
# meaningful to the end-user.  If there is no mapping defined for a
379
# specific repository, its URL will be displayed.
380
$repository_name_map =
381
{
382
    '/home/sits/cvs' =&#62; 'Local CVS',
383
    ':pserver:sits:password@cvs.sourceforge.net:/cvsroot' =&#62; 'SF CVS'
384
};
385
 
386
	</PRE
387
>
388
	</P
389
><P
390
>	  During a review, it is sometimes beneficial to see the
391
	  revision history of a file, such as information provided by
392
	  CVSweb or ViewCVS.  You can specify a mapping of repository
393
	  names to URLs for this purpose, for example:
394
	  <PRE
395
CLASS="PROGRAMLISTING"
396
>$file_viewer =
397
{
398
    '/home/sits/cvs' =&#62; 'http://localhost/cgi-bin/cvsweb.cgi'
399
};
400
	  </PRE
401
>
402
	  This indicates that for any review made against the
403
	  <TT
404
CLASS="FILENAME"
405
>/home/sits/cvs</TT
406
> repository, file
407
	  revision information can be found using the URL specified.
408
	</P
409
><P
410
>	  If you are using CVS, make sure the
411
	  <CODE
412
CLASS="VARNAME"
413
>$cvs</CODE
414
> setting is set to the correct path.
415
	  For UNIX, this is likely to be something like:
416
	  <PRE
417
CLASS="PROGRAMLISTING"
418
># Location of the cvs binary.
419
$cvs = '/usr/bin/cvs';
420
	  </PRE
421
>
422
	  For Windows, this could be something like:
423
	  <PRE
424
CLASS="PROGRAMLISTING"
425
># Location of the cvs binary.
426
$cvs = 'c:/gnu/bin/cvs';
427
	  </PRE
428
>
429
	  <SPAN
430
CLASS="emphasis"
431
><I
432
CLASS="EMPHASIS"
433
>Note the use of '/' (forward-slash) characters,
434
	  rather than '\' (back-slash).  Even under Windows, when
435
	  setting filenames, you should always use forward
436
	  slashes.</I
437
></SPAN
438
>
439
	</P
440
><P
441
>	 If you are using Subversion, make sure the
442
	 <CODE
443
CLASS="VARNAME"
444
>$svn</CODE
445
> setting is set to the correct path.
446
	</P
447
><P
448
>	 If you are using Perforce, make sure the
449
	 <CODE
450
CLASS="VARNAME"
451
>$p4</CODE
452
> setting is set to the correct path.
453
	</P
454
><P
455
>	 If you are using Visual SourceSafe, make sure the
456
	 <CODE
457
CLASS="VARNAME"
458
>$vss</CODE
459
> setting is set to the correct path.
460
	</P
461
></DIV
462
><DIV
463
CLASS="SECT2"
464
><H2
465
CLASS="SECT2"
466
><A
467
NAME="AEN156"
468
>2.2.5. Bug-Tracking Integration</A
469
></H2
470
><P
471
>	  It is often useful to link the creation of code review
472
	  topics with the associated bug records that the code is
473
	  fixing.  That way, it is possible to read a bug record, and
474
	  apart from reading the textual description as to how it has
475
	  been resolved, Codestriker can add in a link to the code
476
	  review topic, which shows the actual code which fixed the
477
	  bug (and any important decisions made in the Codestriker
478
	  comments).  Currently, there is support for Bugzilla and Flyspray,
479
	  but it is not difficult to add in support for other systems.
480
	</P
481
><P
482
>	  If you don't use Bugzilla (<A
483
HREF="http://bugzilla.mozilla.org"
484
TARGET="_top"
485
>http://bugzilla.mozilla.org</A
486
>)
487
          or Flyspray,
488
	  you can skip this section, as by default, there is no
489
	  linking to a bug tracking system.  An example configuration
490
	  could be as follows:
491
	  <PRE
492
CLASS="PROGRAMLISTING"
493
># Bug tracking type.
494
$bug_db = 'bugzilla';
495
 
496
# Bug database connection details.
497
$bug_db_host = 'localhost';
498
$bug_db_name = 'bugs';
499
$bug_db_password = 'bugs_password';
500
$bug_db_dbname = 'bugs';
501
 
502
# Bugzilla codestriker user id.
503
$bug_db_user_id = '2';
504
	  </PRE
505
>
506
	  The <CODE
507
CLASS="VARNAME"
508
>$bug_db</CODE
509
> setting indicates to use
510
	  Bugzilla.  If this value is set to '', then no linkage to a
511
	  bug tracking system is performed (the default).
512
	</P
513
><P
514
>	  The <CODE
515
CLASS="VARNAME"
516
>$bug_db_host</CODE
517
> setting indicates the
518
	  hostname that holds the bugzilla database, while
519
	  <CODE
520
CLASS="VARNAME"
521
>$bug_db_name</CODE
522
> and
523
	  <CODE
524
CLASS="VARNAME"
525
>$bug_db_password</CODE
526
> contain the database
527
	  username and password to connect to the Bugzilla database.
528
	  The <CODE
529
CLASS="VARNAME"
530
>$bug_db_dbname</CODE
531
> setting contains the
532
	  Bugzilla database name, which by default is "bugs".  You can
533
	  verify these settings by using
534
	  <B
535
CLASS="COMMAND"
536
>mysql</B
537
> to connect to the Bugzilla
538
	  database interactively.
539
	</P
540
><P
541
>	  Codestriker adds "comments" to the appropriate bug record
542
	  whenever a code review topic has been created against it, or
543
	  the review's state has changed.  To do this, a special
544
	  Bugzilla user needs to be created which the comments will be
545
	  created against.  Create the user using the Bugzilla
546
	  interface, and call it "codestriker@yourhost.yourdomain".
547
	  Then connect to the Bugzilla database using
548
	  <B
549
CLASS="COMMAND"
550
>mysql</B
551
>, and execute the following command
552
	  to determine the userid of the user just created:
553
	  <PRE
554
CLASS="PROGRAMLISTING"
555
>SELECT userid FROM profiles WHERE
556
login_name = 'codestriker@yourhost.yourdomain';
557
	  </PRE
558
>
559
	  This value should be set into the
560
	  <CODE
561
CLASS="VARNAME"
562
>$bug_db_user_id</CODE
563
> setting.
564
	  <PRE
565
CLASS="PROGRAMLISTING"
566
># Bugzilla codestriker user id.
567
$bug_db_user_id = '2';
568
	  </PRE
569
>
570
	</P
571
></DIV
572
><DIV
573
CLASS="SECT2"
574
><H2
575
CLASS="SECT2"
576
><A
577
NAME="AEN174"
578
>2.2.6. LXR Integration</A
579
></H2
580
><P
581
>	  Codestriker has been integrated with LXR, so that when
582
	  performing a review, those identifiers known to LXR will be
583
	  automatically hyperlinked.  This is an enormous aid to the
584
	  code reviewing process, as you can quickly determine where a
585
	  variable/function/method/class is defined and where it is
586
	  used quickly, while studying the proposed changes.
587
	</P
588
><P
589
>	  The LXR home page is located at <A
590
HREF="http://lxr.sourceforge.net"
591
TARGET="_top"
592
>http://lxr.sourceforge.net</A
593
>.
594
	  The integration has been tested with LXR version 0.9.2.
595
	</P
596
><P
597
>	  Its possible that each source code repository is associated
598
	  with a different LXR deployment.  The default configuration
599
	  file shows an example:
600
	  <PRE
601
CLASS="PROGRAMLISTING"
602
>$lxr_map = 
603
{
604
    '/home/sits/cvs' =&#62; { db =&#62; 'DBI:Pg:dbname=lxr',
605
			  user =&#62; 'lxr',
606
			  password =&#62; '',
607
			  url =&#62; 'http://localhost.localdomain/lxr/ident?i='
608
			},
609
 
610
     'svn:http://svn.collab.net/repos/svn/trunk' =&#62;
611
                        { db =&#62; 'DBI:Pg:dbname=lxr2',
612
			  user =&#62; 'lxr',
613
			  password =&#62; '',
614
			  url =&#62; 'http://localhost.localdomain/lxr2/ident?i='
615
			}
616
 
617
};
618
	  </PRE
619
>
620
	  This is basically fancy Perl syntax for a map.  In this
621
	  instance, there are two keys,
622
	  <TT
623
CLASS="FILENAME"
624
>/home/sits/cvs</TT
625
> and
626
	  <TT
627
CLASS="FILENAME"
628
>'svn:http://svn.collab.net/repos/svn/trunk</TT
629
>,
630
	  which represent the source control repositories specified
631
	  above within the <CODE
632
CLASS="VARNAME"
633
>@valid_repositories</CODE
634
>
635
	  setting.
636
	</P
637
><P
638
>	  Each key is mapped to an object containing four attributes.
639
	  The <CODE
640
CLASS="VARNAME"
641
>db</CODE
642
> attribute is a DBI URL of the LXR
643
	  database, <CODE
644
CLASS="VARNAME"
645
>user</CODE
646
> is the database username,
647
	  <CODE
648
CLASS="VARNAME"
649
>password</CODE
650
> is the database password, and
651
	  <CODE
652
CLASS="VARNAME"
653
>url</CODE
654
> is the URL of the LXR deployment for
655
	  the identifier search page.
656
	</P
657
><P
658
>	  If you don't have LXR installed, you can simply set this
659
	  variable as follows:
660
	  <PRE
661
CLASS="PROGRAMLISTING"
662
>$lxr_map = 
663
{
664
};
665
	  </PRE
666
>
667
	</P
668
><P
669
>	  Also note, LXR at present doesn't seem to work with Taint
670
	  checking.  To avoid warning messages, you'll need to comment
671
	  out the "PerlTaintCheck On" line in your Apache
672
	  <TT
673
CLASS="FILENAME"
674
>httpd.conf</TT
675
> file, and remove the -T
676
	  switch at the top of the
677
	  <TT
678
CLASS="FILENAME"
679
>bin/codestriker.pl.base</TT
680
> file.
681
	</P
682
></DIV
683
><DIV
684
CLASS="SECT2"
685
><H2
686
CLASS="SECT2"
687
><A
688
NAME="AEN194"
689
>2.2.7. Topic Text Encoding</A
690
></H2
691
><P
692
>	  Codestriker stores the topic text, description and comments
693
          as UTF-8.  When creating a topic, Codestriker needs to be
694
          told what encoding your files are stored in.  By default,
695
          Codestriker assumes it is UTF-8 (compatible with ASCII).
696
          If your source code files are stored in another encoding
697
          (for example, gb2312 for a Chinese team), this needs to be
698
          specified in the <CODE
699
CLASS="VARNAME"
700
>$topic_text_encoding</CODE
701
>
702
          variable.
703
	  <PRE
704
CLASS="PROGRAMLISTING"
705
># Character encoding to use when reading topic text.  Default is utf8
706
# (compatible with ASCII) if not set, but this can be over-ridden here.
707
# List of example encoding names can be retrieved from the following
708
# URL: http://perldoc.perl.org/Encode/Supported.html.
709
#$topic_text_encoding = 'utf8';
710
#$topic_text_encoding = 'gb2312';
711
	  </PRE
712
>
713
	</P
714
></DIV
715
><DIV
716
CLASS="SECT2"
717
><H2
718
CLASS="SECT2"
719
><A
720
NAME="AEN199"
721
>2.2.8. Deployment Options</A
722
></H2
723
><P
724
>	  There are a number of other options which affect how
725
	  Codestriker runs.  The most important ones are shown below.
726
	  Unless you have specific reasons to, most intranet
727
	  deployments of Codestriker can leave these options as is.
728
	  <PRE
729
CLASS="PROGRAMLISTING"
730
># Exclude these file types from review topics.   
731
# You will generally want to exclude any non-human-readable files.
732
@exclude_file_types = ('rtf', 'doc', 'gif', 'bmp', 'jpeg', 'jpg', 'mdb',
733
		       'ppt', 'vsd', 'xls', 'zip', 'tgz', 'tar', 'gz',
734
		       'opt', 'aps', 'ncb', 'a', 'so', 'dll', 'lib',
735
		       'exe', 'png', 'pdf', 'bin', 'out', 'ld', 'fm',
736
		       'indd', 'wav', 'o', 'obj', 'mpp', 'vsw', 'jfif',
737
		       'tif', 'tiff', 'xbm', 'fnt', 'ttf', 'pfm', 'pfb',
738
		       'eps', 'wpj', 'sxi');
739
 
740
# Indicate if topics can be listed/searched.  Turning this to false can be
741
# useful for "anonymous" installations of Codestriker.
742
$allow_searchlist = 1;
743
 
744
# Indicate if the repository attribute can be set to a topic.  If this
745
# is disabled, it won't be possible to view the entire contents of a
746
# file before the proposed change and/or after.  On some servers (such
747
# as sourceforge), the firewall doesn't allow CGI scripts to make
748
# remote connections.
749
$allow_repositories = 1;
750
 
751
# The following controls project configuration.  Each Codestriker topic is
752
# a member of a specific project.  Uncomment the option you want
753
# below.  Note the textual state names below cannot be changed.
754
 
755
# Default option, projects are enabled, but they have no state
756
# changing operations (ie, projects are always in state 'Open').
757
@project_states = ('Open');
758
 
759
# Don't use projects at all.  Effectively, an implicit "default
760
# project" is created and associated with all topics behind the scenes.
761
# @project_states = ();
762
#
763
# Allow for projects to be closed.  Closing a project will
764
# not allow new topics to be created in that project.
765
# @project_states = ('Open', 'Closed');
766
#
767
# Allow for projects to be deleted.  This is potentially a dangerous
768
# option to allow, as deleting a project will delete all of its member
769
# topics as well.  Use with caution.
770
# @project_states = ('Open', 'Deleted');
771
#
772
# Allow for projects to be closed and deleted.  Use with caution.
773
# @project_states = ('Open', 'Closed', 'Deleted');
774
 
775
# If true, don't display any email addresses in their true form, but
776
# truncate them, to beat SPAM harvesters.
777
$antispam_email = 0;
778
	  </PRE
779
>
780
	</P
781
></DIV
782
><DIV
783
CLASS="SECT2"
784
><H2
785
CLASS="SECT2"
786
><A
787
NAME="AEN203"
788
>2.2.9. Topic Length Restrictions</A
789
></H2
790
><P
791
>	  As explained by the comments in the configuration file, it
792
	  is possible to limit the size of code review topics that
793
	  will be accepted by the system:
794
	  <PRE
795
CLASS="PROGRAMLISTING"
796
># The number of problems found per line drops if the size of the 
797
# topic is too large. A common inspection pitfall is for authors to 
798
# attempt to review too much material and then miss problems. 
799
# These two options allow the Codestriker administrator to limit 
800
# the length of the topics. Topics that have more lines than 
801
# $maximum_topic_size_lines are rejected when they are created. 
802
# Topics that are larger than $suggested_topic_size_lines generate 
803
# a warning displayed in the topic page, but are accepted into the 
804
# system. Codestriker measures that length of the topic by counting 
805
# the number of lines in the topic text.
806
#
807
# The Codestriker default of not enforcing any limits is specified by
808
# settings either option to an empty string. If you are not sure 
809
# what a reasonable limit would be, start with a suggested_topic_size_lines
810
# set to 350, and adjust with experience.
811
$maximum_topic_size_lines = '';
812
$suggested_topic_size_lines = '';
813
	  </PRE
814
>
815
	</P
816
></DIV
817
><DIV
818
CLASS="SECT2"
819
><H2
820
CLASS="SECT2"
821
><A
822
NAME="AEN207"
823
>2.2.10. Comment Email Configuration</A
824
></H2
825
><P
826
>	  By default, whenever a comment it submitted, an email will
827
	  be sent to the author of the comment, the author of the
828
	  review, and anyone else who has submitted a comment on the
829
	  line of code in question.  This may not be appropriate for
830
	  some team processes, and can be changed by setting
831
	  <CODE
832
CLASS="VARNAME"
833
>$allow_comment_email</CODE
834
> to 0.
835
	   <PRE
836
CLASS="PROGRAMLISTING"
837
># If true, Codestriker will send out emails to the topic owner and
838
# comment submitter when a comment is added. If this option is false,
839
# no email will be sent to either the topic owner or the comment
840
# submitter. Emails about each comment may not be needed if a meeting
841
# is planned to discuss the topic. If the comment submitter specifies
842
# a cc user, an email is always sent out, regardless of this setting.
843
$allow_comment_email = 1;
844
	   </PRE
845
>
846
	</P
847
></DIV
848
><DIV
849
CLASS="SECT2"
850
><H2
851
CLASS="SECT2"
852
><A
853
NAME="AEN212"
854
>2.2.11. Default View Topic Line Break Mode</A
855
></H2
856
><P
857
>	  As explained by the comments in the configuration file, it
858
	  is possible to set the default view topic line break mode,
859
	  by setting the <CODE
860
CLASS="VARNAME"
861
>$default_topic_br_mode</CODE
862
>
863
	  variable.  There is usually no need to change the default
864
	  setting unless you regularly review code with very long
865
	   lines.
866
	  <PRE
867
CLASS="PROGRAMLISTING"
868
># The default line break viewing mode to use in the URL when viewing a
869
# topic.  Can be either $LINE_BREAK_NORMAL_MODE or $LINE_BREAK_ASSIST_MODE.
870
# Using $LINE_BREAK_ASSIST_MODE indicates that extra line breaks may be
871
# used in the topic display if the review has very long code lines.  Using
872
# $LINE_BREAK_NORMAL_MODE will ensure that the display matches the line
873
# breaks present in the code.  The line break mode can also be changed
874
# dynamically in the view topic screen.  There is usually no need to
875
# change this setting unless you regularly review code with very long
876
# lines.
877
$LINE_BREAK_NORMAL_MODE = 1;
878
$LINE_BREAK_ASSIST_MODE = 2;
879
 
880
$default_topic_br_mode = $LINE_BREAK_NORMAL_MODE;
881
	  </PRE
882
>
883
	</P
884
></DIV
885
><DIV
886
CLASS="SECT2"
887
><H2
888
CLASS="SECT2"
889
><A
890
NAME="AEN217"
891
>2.2.12. Default View Topic File View Mode</A
892
></H2
893
><P
894
>	  As explained by the comments in the configuration file, it
895
	  it possible to specify by default, whether topics display
896
	  the deltas for all files in the review, or just a single
897
	  file at a time by default.  The viewing mode can be changed
898
	  dynamically on the view topic screen.
899
	  <PRE
900
CLASS="PROGRAMLISTING"
901
># When displaying a topic, if this value is -1, then all files in the
902
# topic are displayed in the one page (default old Codestriker
903
# behaviour).  If the value is 0, then only the first file is shown,
904
# with links to display the other files.  This is useful for those
905
# deployments that review a large amount of code.
906
$default_file_to_view = -1;
907
	  </PRE
908
>
909
	</P
910
></DIV
911
><DIV
912
CLASS="SECT2"
913
><H2
914
CLASS="SECT2"
915
><A
916
NAME="AEN221"
917
>2.2.13. Comment Thread Metrics</A
918
></H2
919
><P
920
>	  As explained by the comments in the configuration file, it
921
	  is possible to defined a number of metrics associated with
922
	  each comment thread (issue) created in the review.
923
	  <PRE
924
CLASS="PROGRAMLISTING"
925
># Each comment thread (or issue) that is created against a specific
926
# code line in Codestriker can have a configurable number of
927
# user-defined metrics recorded against it.
928
#
929
# Every site has their own requirements, below are a number of example
930
# configurations.  The "name" attribute refers to the name of the
931
# metric being recorded.  The "values" attribute is a list of values
932
# that this metric can be assigned to.  The "default_value" attribute
933
# is optional, and indicates what the default value of the metric is
934
# assigned to.  If this attribute is not specified, then the user will
935
# be required to specify a value for a metric when creating a new
936
# comment thread.  This is recommended, so that users think about what
937
# these values should be, rather than blindly accepting default
938
# values.  For the "Status" metric below however, it is recording the
939
# "state" of the thread, so an initial state of "Submitted" is reasonable.
940
# For the other metrics below, an initial value makes no sense.
941
# Metric items can have an optional show_on_main_page list that will
942
# force the numbers of comments with the metric settings to be reported
943
# on the main page of codestriker. 
944
$comment_state_metrics =
945
    [ 
946
      { name             =&#62; 'Status', 
947
	values           =&#62; ['Submitted', 'Invalid', 'Completed'],
948
	default_value    =&#62; 'Submitted',
949
	show_on_mainpage =&#62; ['Submitted' ] 
950
      }
951
    ];
952
 
953
# Two metrics defined: Status and Type.
954
#$comment_state_metrics =
955
#    [
956
#      { name=&#62;'Status', values=&#62;['Submitted', 'Invalid', 'Completed'],
957
#	                default_value=&#62;'Submitted' },
958
#      { name=&#62;'Type', values=&#62;['Style', 'Minor', 'Major', 'Severe'] }
959
#    ];
960
#
961
# Four metrics defined: Status, Level, Mode and Type.
962
#$comment_state_metrics =
963
#    [
964
#      { name=&#62;'Status', values=&#62;['Submitted', 'Invalid', 'Completed'],
965
#	                default_value=&#62;'Submitted' },
966
#      { name=&#62;'Level', values=&#62;['Major', 'Minor'] },
967
#      { name=&#62;'Mode', values=&#62;['Missing', 'Wrong', 'Unclear', 'Suggestion'] },
968
#      { name=&#62;'Type', values=&#62;['Logic', 'Data Handling', 'Interface',
969
#			       'Error Handling', 'Performance', 'Comments',
970
#			       'Standards'] }
971
#    ];
972
#
973
# Case where no comment thread metrics are to be used.
974
#$comment_state_metrics = [];
975
	  </PRE
976
>
977
	</P
978
></DIV
979
><DIV
980
CLASS="SECT2"
981
><H2
982
CLASS="SECT2"
983
><A
984
NAME="AEN225"
985
>2.2.14. Metrics Support</A
986
></H2
987
><P
988
>	  As explained by the comments in the configuration file, it
989
	  is possible to maintain software metrics obtained from the
990
	  code reviewing process.  There is also scope for customising
991
	  Codestriker to track your own software metrics.
992
	  <PRE
993
CLASS="PROGRAMLISTING"
994
># This options configures the metric support in codestriker. You have
995
# the following options:
996
#
997
# $metric_config = "none", "basic", "all", "metric name, metric name, etc"
998
#
999
# "none" - turns off all extra metric support in the application. The
1000
# metric page will only display and manage data that is strictly
1001
# required to perform the review.  Codestriker will not require any
1002
# addition data input from the reviewers and authors.  This is the
1003
# default. However, you still get basic data like how many topics are
1004
# being created and how problems are being found.
1005
#
1006
# "basic" - Turns on the metrics that are considered to be essential
1007
# for a metric program. It will require that reviewers and authors
1008
# enter the time spent reviewing the topic, the time spent in the
1009
# review meeting, and the time spent preparing for the review. The
1010
# metric selection assumes that you are following a formal review
1011
# process with a preparation meeting, and a defect review meeting.
1012
#   
1013
#   kickoff time - time spent preparing for the review
1014
#   checking time - time spent actually reviewing the topic.
1015
#   logging meeting duration - the time spent in the logging meeting.
1016
#
1017
# "all" - Turns on all of the metrics that one could possibly want to
1018
# track. The list of metrics is from the book "Software Inspection" by
1019
# Gilb and Graham.  You should probably not use this unless you are
1020
# using a formal process that is well established. You may want to
1021
# enable this temporally to get a idea of the types of metrics that
1022
# are supported.
1023
#
1024
# "name,name" - Lastly, you can pick and chose what metrics you would
1025
# like to enable.  just list the metric names in a comma separated
1026
# list. You can see all of the build in metrics in the
1027
# lib/Codestriker.pm file. For example, if you don't hold a kick off
1028
# meeting, and but do hold a logging meeting, the basic option will not
1029
# quit fit. You should set the $metric_config as:
1030
# $metric_config = "checking time,logging meeting duration".
1031
#
1032
# If you don't like our choices of metrics, the names, descriptions,
1033
# etc feel free to edit the lib/Codestriker.pm. It contains
1034
# documentations on how to add your own metrics into codestriker. It
1035
# is easy to do, and does not require any coding.
1036
 
1037
$metric_config = "none";
1038
	  </PRE
1039
>
1040
        </P
1041
></DIV
1042
><DIV
1043
CLASS="SECT2"
1044
><H2
1045
CLASS="SECT2"
1046
><A
1047
NAME="AEN229"
1048
>2.2.15. RSS Support</A
1049
></H2
1050
><P
1051
>          If you install the <TT
1052
CLASS="FILENAME"
1053
>XML::RSS</TT
1054
> module, and re-run
1055
          <TT
1056
CLASS="FILENAME"
1057
>install.pl</TT
1058
>, Codestriker will display an
1059
          RSS link on the topic list page, which can be used as a URL
1060
          into your RSS reader, to keep track of new topics being
1061
          added to the system.
1062
	</P
1063
></DIV
1064
></DIV
1065
><DIV
1066
CLASS="NAVFOOTER"
1067
><HR
1068
ALIGN="LEFT"
1069
WIDTH="100%"><TABLE
1070
SUMMARY="Footer navigation table"
1071
WIDTH="100%"
1072
BORDER="0"
1073
CELLPADDING="0"
1074
CELLSPACING="0"
1075
><TR
1076
><TD
1077
WIDTH="33%"
1078
ALIGN="left"
1079
VALIGN="top"
1080
><A
1081
HREF="c49.html"
1082
ACCESSKEY="P"
1083
>Prev</A
1084
></TD
1085
><TD
1086
WIDTH="34%"
1087
ALIGN="center"
1088
VALIGN="top"
1089
><A
1090
HREF="book1.html"
1091
ACCESSKEY="H"
1092
>Home</A
1093
></TD
1094
><TD
1095
WIDTH="33%"
1096
ALIGN="right"
1097
VALIGN="top"
1098
><A
1099
HREF="x234.html"
1100
ACCESSKEY="N"
1101
>Next</A
1102
></TD
1103
></TR
1104
><TR
1105
><TD
1106
WIDTH="33%"
1107
ALIGN="left"
1108
VALIGN="top"
1109
>Installation</TD
1110
><TD
1111
WIDTH="34%"
1112
ALIGN="center"
1113
VALIGN="top"
1114
><A
1115
HREF="c49.html"
1116
ACCESSKEY="U"
1117
>Up</A
1118
></TD
1119
><TD
1120
WIDTH="33%"
1121
ALIGN="right"
1122
VALIGN="top"
1123
>Running install.pl</TD
1124
></TR
1125
></TABLE
1126
></DIV
1127
></BODY
1128
></HTML
1129
>