Topic Text   Topic Comments (7)   Topic Properties   Topic Information sits@use...
Topic title: CVS commit: Created a new optional configuration paramete... Sunday January 15, 2006 13:20:11

Download topic text | View in monospace font | Tab width set to 8 (change to 4)

Files in topic:  
[Jump to] codestriker/CHANGELOG  1.178   {+8,-0}
[Jump to] codestriker/README  1.49   {+1,-1}
[Jump to] codestriker/codestriker.conf  1.78   {+13,-0}
[Jump to] codestriker/doc/codestriker.sgml  1.50   {+23,-2}
[Jump to] codestriker/lib/Codestriker.pm  1.80   {+21,-1}
[Jump to] codestriker/lib/Codestriker/Action/CreateTopic.pm  1.28   {+3,-3}
[Jump to] codestriker/lib/Codestriker/Action/EditComment.pm  1.13   {+1,-1}
[Jump to] codestriker/lib/Codestriker/Action/SubmitEditTopicProperties.pm  1.10   {+8,-1}
[Jump to] codestriker/lib/Codestriker/Action/SubmitNewComment.pm  1.8   {+1,-1}
[Jump to] codestriker/lib/Codestriker/Action/SubmitNewTopic.pm  1.20   {+14,-14}
[Jump to] codestriker/lib/Codestriker/Action/ViewTopicFile.pm  1.11   {+1,-1}
[Jump to] codestriker/lib/Codestriker/Action/ViewTopicProperties.pm  1.12   {+2,-2}
[Jump to] codestriker/lib/Codestriker/TopicListeners/Email.pm  1.14   {+2,-1}

[Add General Comment] to topic.

File codestriker/CHANGELOG (Revision 1.178) [Add File Comment] [Top] [>>]
 
Line 3 | Parallel Line 3 | Parallel
3 3
4 Version 1.9.2 4 Version 1.9.2
5 5
6 * Created a new optional configuration parameter $repository_name_map
7 in codestriker.conf. This allows for a user-defined repository name
8 to be displayed in the codestriker UI, rather than the full
9 repository URL. This can be useful for hiding potentially sensitive
10 username/password information that might be a part of the repository
11 URL. See the codestriker.conf file for more information.
12 Submitted by Edwin Fine <edwin.m.fine@verizon.com>.
13
6 * Fixed problem with Subversion repositories on Win32, where 14 * Fixed problem with Subversion repositories on Win32, where
7 Codestriker was unable to launch the svn program. 15 Codestriker was unable to launch the svn program.
8 16
 
File codestriker/README (Revision 1.49) [Add File Comment] [<<] [Top] [>>]
 
Line 1 | Parallel Line 1 | Parallel
1 Codestriker 1 Codestriker
2 Copyright (c) 2001, 2002, 2003, 2004 David Sitsky. All rights reserved. 2 Copyright (c) 2001 - 2006 David Sitsky. All rights reserved.
3 sits@users.sourceforge.net 3 sits@users.sourceforge.net
4 4
5 *** Please read the CHANGELOG file for details on changes *** 5 *** Please read the CHANGELOG file for details on changes ***
 
File codestriker/codestriker.conf (Revision 1.78) [Add File Comment] [<<] [Top] [>>]
 
Line 161 | Parallel Line 161 | Parallel
161 'clearcase:c:\\stuff\\view_name\\vob_name' 161 'clearcase:c:\\stuff\\view_name\\vob_name'
162 ); 162 );
163 163
164 # A mapping of repository URLs to names. In any screen where a
165 # repository is displayed, if there is a mapping for the repository
166 # defined here, then the symbolic name will be displayed instead of
167 # its raw URL. This is useful when the URL contains sensitive
168 # username/password information, or the symbolic name is more
169 # meaningful to the end-user. If there is no mapping defined for a
170 # specific repository, its URL will be displayed.
171 $repository_name_map =
172 {
173 '/home/sits/cvs' => 'Local CVS',
174 ':pserver:sits:password@cvs.sourceforge.net:/cvsroot' => 'SF CVS'
175 };
176
164 # A mapping of repositories to filename viewers. Examples of such systems 177 # A mapping of repositories to filename viewers. Examples of such systems
165 # would be CVSweb and ViewCVS, for local repositories. Mappings are 178 # would be CVSweb and ViewCVS, for local repositories. Mappings are
166 # not required for remote CVSweb and ViewCVS repositories, as they are 179 # not required for remote CVSweb and ViewCVS repositories, as they are
 
File codestriker/doc/codestriker.sgml (Revision 1.50) [Add File Comment] [<<] [Top] [>>]
 
Line 7 | Parallel Line 7 | Parallel
7 <book> 7 <book>
8 <bookinfo> 8 <bookinfo>
9 <title>The Codestriker Guide</title> 9 <title>The Codestriker Guide</title>
10 <subtitle>Version 1.9.0</subtitle> 10 <subtitle>Version 1.9.2</subtitle>
11 <legalnotice> 11 <legalnotice>
12 <para>Copyright (c) 2001, 2002, 2003, 2004</para> 12 <para>Copyright (c) 2001 - 2006</para>
13 </legalnotice> 13 </legalnotice>
14 <authorgroup> 14 <authorgroup>
15 <author> 15 <author>
 
 
Line 517 | Parallel Line 517 | Parallel
517 </programlisting> 517 </programlisting>
518 </para> 518 </para>
519 <para> 519 <para>
520 As explained by the comment in the codestriker.conf file,
521 sometimes there is a benefit for displaying a name instead of
522 a repository URL in the Codestriker UI.
523 <programlisting>
524 # A mapping of repository URLs to names. In any screen where a
525 # repository is displayed, if there is a mapping for the repository
526 # defined here, then the symbolic name will be displayed instead of
527 # its raw URL. This is useful when the URL contains sensitive
528 # username/password information, or the symbolic name is more
529 # meaningful to the end-user. If there is no mapping defined for a
530 # specific repository, its URL will be displayed.
531 $repository_name_map =
532 {
533 '/home/sits/cvs' => 'Local CVS',
534 ':pserver:sits:password@cvs.sourceforge.net:/cvsroot' => 'SF CVS'
535 };
536
537 </programlisting>
538 </para>
539
540 <para>
520 During a review, it is sometimes beneficial to see the 541 During a review, it is sometimes beneficial to see the
521 revision history of a file, such as information provided by 542 revision history of a file, such as information provided by
522 CVSweb or ViewCVS. You can specify a mapping of repository 543 CVSweb or ViewCVS. You can specify a mapping of repository
 
File codestriker/lib/Codestriker.pm (Revision 1.80) [Add File Comment] [<<] [Top] [>>]
 
Line 23 | Parallel Line 23 | Parallel
23 $allow_delete $allow_searchlist $default_file_to_view 23 $allow_delete $allow_searchlist $default_file_to_view
24 $allow_projects $antispam_email $VERSION $title $BASEDIR 24 $allow_projects $antispam_email $VERSION $title $BASEDIR
25 $metric_config $tmpdir @metric_schema $comment_state_metrics 25 $metric_config $tmpdir @metric_schema $comment_state_metrics
26 $project_states $rss_enabled 26 $project_states $rss_enabled $repository_name_map $repository_url_map
27 @valid_repository_names
27 ); 28 );
28 29
29 # Version of Codestriker. 30 # Version of Codestriker.
 
 
Line 306 | Parallel Line 307 | Parallel
306 { 307 {
307 do "$BASEDIR/codestriker_test.conf"; 308 do "$BASEDIR/codestriker_test.conf";
308 } 309 }
310
311 # Fill in $repository_name_map for those repository entries which don't have
312 # a mapping, with the same value as the repository value itself.
313 foreach my $repository (@valid_repositories) {
314 if (! exists $repository_name_map->{$repository}) {
315 $repository_name_map->{$repository} = $repository;
316 }
317 }
318
319 # Define the equivalent list of valid repository names.
320 @valid_repository_names = ();
321 foreach my $repository (@valid_repositories) {
322 push @valid_repository_names, $repository_name_map->{$repository};
323 }
324
325 # Define the reverse mapping now for convenience.
326 foreach my $key (keys %${repository_name_map}) {
327 $repository_url_map->{$repository_name_map->{$key}} = $key;
328 }
309 } 329 }
310 330
311 # Returns the current time in a format suitable for a DBI timestamp value. 331 # Returns the current time in a format suitable for a DBI timestamp value.
 
File codestriker/lib/Codestriker/Action/CreateTopic.pm (Revision 1.28) [Add File Comment] [<<] [Top] [>>]
 
Line 57 | Parallel Line 57 | Parallel
57 # Set the default repository to select. 57 # Set the default repository to select.
58 if (! (defined $vars->{'default_repository'}) || 58 if (! (defined $vars->{'default_repository'}) ||
59 $vars->{'default_repository'} eq "") { 59 $vars->{'default_repository'} eq "") {
60 if ($#Codestriker::valid_repositories != -1) { 60 if ($#Codestriker::valid_repository_names != -1) {
61 # Choose the first repository as the default selection. 61 # Choose the first repository as the default selection.
62 $vars->{'default_repository'} = 62 $vars->{'default_repository'} =
63 $Codestriker::valid_repositories[0]; 63 $Codestriker::valid_repository_names[0];
64 } 64 }
65 } 65 }
66 66
67 # Indicate the list of valid repositories which can be choosen. 67 # Indicate the list of valid repositories which can be choosen.
68 $vars->{'repositories'} = \@Codestriker::valid_repositories; 68 $vars->{'repositories'} = \@Codestriker::valid_repository_names;
69 69
70 # Read the list of projects available to make that choice available 70 # Read the list of projects available to make that choice available
71 # when a topic is created. 71 # when a topic is created.
 
File codestriker/lib/Codestriker/Action/EditComment.pm (Revision 1.13) [Add File Comment] [<<] [Top] [>>]
 
Line 48 | Parallel Line 48 | Parallel
48 email=>$email, 48 email=>$email,
49 mode=>$mode, 49 mode=>$mode,
50 tabwidth=>$tabwidth, 50 tabwidth=>$tabwidth,
51 repository=>$topic->{repository}, 51 repository=>$Codestriker::repository_name_map->{$topic->{repository}},
52 reload=>0, cache=>0); 52 reload=>0, cache=>0);
53 53
54 # Create the hash for the template variables. 54 # Create the hash for the template variables.
 
File codestriker/lib/Codestriker/Action/SubmitEditTopicProperties.pm (Revision 1.10) [Add File Comment] [<<] [Top] [>>]
 
Line 33 | Parallel Line 33 | Parallel
33 my $cc = $http_input->get('cc'); 33 my $cc = $http_input->get('cc');
34 my $topic_state = $http_input->get('topic_state'); 34 my $topic_state = $http_input->get('topic_state');
35 my $bug_ids = $http_input->get('bug_ids'); 35 my $bug_ids = $http_input->get('bug_ids');
36 my $repository_url = $http_input->get('repository'); 36 my $repository_name = $http_input->get('repository');
37 my $projectid = $http_input->get('projectid'); 37 my $projectid = $http_input->get('projectid');
38 38
39 # Check if this action is allowed, and that the state is valid. 39 # Check if this action is allowed, and that the state is valid.
 
 
Line 80 | Parallel Line 80 | Parallel
80 $cc = $topic->{cc}; 80 $cc = $topic->{cc};
81 } 81 }
82 82
83 # Make sure the repository value is correct.
84 my $repository_url = $Codestriker::repository_url_map->{$repository_name};
85 if ($repository_url eq "") {
86 $feedback .= "Repository name \"$repository_name\" is unknown.\n" .
87 "Update your codestriker.conf file with this entry.\n";
88 }
89
83 if ($feedback eq "") { 90 if ($feedback eq "") {
84 if ($topic_state eq "Deleted") { 91 if ($topic_state eq "Deleted") {
85 $rc = $topic->delete(); 92 $rc = $topic->delete();
 
File codestriker/lib/Codestriker/Action/SubmitNewComment.pm (Revision 1.8) [Add File Comment] [<<] [Top] [>>]
 
Line 93 | Parallel Line 93 | Parallel
93 topic_title=>"Comment Submitted: " . 93 topic_title=>"Comment Submitted: " .
94 "$topic->{title}", 94 "$topic->{title}",
95 email=>$email, 95 email=>$email,
96 repository=>$topic->{repository}, 96 repository=>$Codestriker::repository_name_map->{$topic->{repository}},
97 load_anchor=>$anchor, 97 load_anchor=>$anchor,
98 reload=>$reload, cache=>0); 98 reload=>$reload, cache=>0);
99 99
 
File codestriker/lib/Codestriker/Action/SubmitNewTopic.pm (Revision 1.20) [Add File Comment] [<<] [Top] [>>]
 
Line 36 | Parallel Line 36 | Parallel
36 my $topic_file = $http_input->get('fh_filename'); 36 my $topic_file = $http_input->get('fh_filename');
37 my $fh_mime_type = $http_input->get('fh_mime_type'); 37 my $fh_mime_type = $http_input->get('fh_mime_type');
38 my $bug_ids = $http_input->get('bug_ids'); 38 my $bug_ids = $http_input->get('bug_ids');
39 my $repository_url = $http_input->get('repository'); 39 my $repository_name = $http_input->get('repository');
40 my $projectid = $http_input->get('projectid'); 40 my $projectid = $http_input->get('projectid');
41 my $project_name = $http_input->get('project_name'); 41 my $project_name = $http_input->get('project_name');
42 my $start_tag = $http_input->get('start_tag'); 42 my $start_tag = $http_input->get('start_tag');
 
 
Line 85 | Parallel Line 85 | Parallel
85 85
86 $http_response->generate_header(topic_title=>"Create New Topic", 86 $http_response->generate_header(topic_title=>"Create New Topic",
87 email=>$email, reviewers=>$reviewers, 87 email=>$email, reviewers=>$reviewers,
88 cc=>$cc, repository=>$repository_url, 88 cc=>$cc, repository=>$repository_name,
89 projectid=>$projectid, 89 projectid=>$projectid,
90 reload=>0, cache=>0); 90 reload=>0, cache=>0);
91 91
 
 
Line 101 | Parallel Line 101 | Parallel
101 $error_vars->{'topic_description'} = $topic_description; 101 $error_vars->{'topic_description'} = $topic_description;
102 $error_vars->{'topic_title'} = $topic_title; 102 $error_vars->{'topic_title'} = $topic_title;
103 $error_vars->{'bug_ids'} = $bug_ids; 103 $error_vars->{'bug_ids'} = $bug_ids;
104 $error_vars->{'default_repository'} = $repository_url; 104 $error_vars->{'default_repository'} = $repository_name;
105 $error_vars->{'repositories'} = \@Codestriker::valid_repositories; 105 $error_vars->{'repositories'} = \@Codestriker::valid_repositories;
106 $error_vars->{'start_tag'} = $start_tag; 106 $error_vars->{'start_tag'} = $start_tag;
107 $error_vars->{'end_tag'} = $end_tag; 107 $error_vars->{'end_tag'} = $end_tag;
 
 
Line 110 | Parallel Line 110 | Parallel
110 $error_vars->{'default_to_head'} = $default_to_head; 110 $error_vars->{'default_to_head'} = $default_to_head;
111 111
112 my $repository = undef; 112 my $repository = undef;
113 my $repository_url = undef;
113 if (scalar(@Codestriker::valid_repositories)) { 114 if (scalar(@Codestriker::valid_repositories)) {
114 # Set the repository to the default if it is not entered. 115 # Set the repository to the default if it is not entered.
115 if ($repository_url eq "" || scalar(@Codestriker::valid_repositories) == 1) { 116 if ($repository_name eq "" || scalar(@Codestriker::valid_repository_names) == 1) {
116 $repository_url = $Codestriker::valid_repositories[0]; 117 $repository_name = $Codestriker::valid_repository_names[0];
117 } 118 }
118 119
119 # Check if the repository argument is in fact a configured 120 # Check if the repository argument is in fact a configured
120 # repository. 121 # repository.
121 my $configured = 0; 122 $repository_url = $Codestriker::repository_url_map->{$repository_name};
122 foreach my $rep ( @Codestriker::valid_repositories ) {
123 $configured = 1 if $repository_url eq $rep;
124 }
125 123
126 if ($configured) { 124 if (defined $repository_url) {
127 $repository = 125 $repository =
128 Codestriker::Repository::RepositoryFactory->get($repository_url); 126 Codestriker::Repository::RepositoryFactory->get($repository_url);
129 } 127 }
130 128
131 if (! defined $repository) { 129 if (! defined $repository) {
132 $feedback .= 130 $feedback .=
133 "The repository value \"$repository_url\" is invalid.\n" . 131 "The repository value set for \"$repository_name\" is invalid.\n" .
134 "Please correct this value in your codestriker.conf file, " . 132 "Please correct this value in your codestriker.conf file, " .
135 "and try again.\n"; 133 "and try again.\n";
136 } 134 }
 
 
Line 195 | Parallel Line 193 | Parallel
195 if ($rc == $Codestriker::DIFF_TOO_BIG) { 193 if ($rc == $Codestriker::DIFF_TOO_BIG) {
196 $feedback .= "Generated diff file is too big.\n"; 194 $feedback .= "Generated diff file is too big.\n";
197 } elsif ($rc == $Codestriker::UNSUPPORTED_OPERATION) { 195 } elsif ($rc == $Codestriker::UNSUPPORTED_OPERATION) {
198 $feedback .= "Repository \"" . $repository->toString() . 196 $feedback .= "Repository \"" . $repository_name .
199 "\" does not support tag retrieval, you have to use the text file upload.\n"; 197 "\" does not support tag retrieval, you have to use the text file upload.\n";
198 } elsif ($rc != $Codestriker::OK) {
199 $feedback .= "Unexpected error $rc retrieving diff text.\n";
200 } 200 }
201 201
202 # Seek to the beginning of the temporary file so it can be parsed. 202 # Seek to the beginning of the temporary file so it can be parsed.
 
File codestriker/lib/Codestriker/Action/ViewTopicFile.pm (Revision 1.11) [Add File Comment] [<<] [Top] [>>]
 
Line 100 | Parallel Line 100 | Parallel
100 mode=>$mode, 100 mode=>$mode,
101 tabwidth=>$tabwidth, 101 tabwidth=>$tabwidth,
102 fview=>$fview, 102 fview=>$fview,
103 repository=>$topic->{repository}, 103 repository=>$Codestriker::repository_name_map->{$topic->{repository}},
104 reload=>0, cache=>1); 104 reload=>0, cache=>1);
105 105
106 # Render the HTML header. 106 # Render the HTML header.
 
File codestriker/lib/Codestriker/Action/ViewTopicProperties.pm (Revision 1.12) [Add File Comment] [<<] [Top] [>>]
 
Line 95 | Parallel Line 95 | Parallel
95 95
96 # Indicate what repositories are available, and what the topic's 96 # Indicate what repositories are available, and what the topic's
97 # repository is. 97 # repository is.
98 $vars->{'topic_repository'} = $topic->{repository}; 98 $vars->{'topic_repository'} = $Codestriker::repository_name_map->{$topic->{repository}};
99 $vars->{'repositories'} = \@Codestriker::valid_repositories; 99 $vars->{'repositories'} = \@Codestriker::valid_repository_names;
100 100
101 # Indicate what projects are available, and what the topic's project is. 101 # Indicate what projects are available, and what the topic's project is.
102 my @projects = Codestriker::Model::Project->list(); 102 my @projects = Codestriker::Model::Project->list();
 
File codestriker/lib/Codestriker/TopicListeners/Email.pm (Revision 1.14) [Add File Comment] [<<] [Top]
 
Line 218 | Parallel Line 218 | Parallel
218 218
219 # Check for repository change. 219 # Check for repository change.
220 if ($topic->{repository} ne $topic_orig->{repository}) { 220 if ($topic->{repository} ne $topic_orig->{repository}) {
221 $changes .= "The repository was changed to $topic->{repository}.\n"; 221 my $value = $Codestriker::repository_name_map->{$topic->{repository}};
222 $changes .= "The repository was changed to $value.\n";
222 } 223 }
223 224
224 # Check for description change. 225 # Check for description change.
 
  
Legend:
Removed 
Changed
 Added

[Add General Comment] to topic.