Thread: [Codestriker-commits] CVS update: codestriker codestriker.conf CHANGELOG
Brought to you by:
sits
From: <si...@us...> - 2008-09-08 10:40:32
|
User: sits Date: 08/09/08 03:40:31 Modified: lib/Codestriker/Http Method.pm Dispatcher.pm . codestriker.conf CHANGELOG Log: Support older-style deployments here no admin users exist. Index: Method.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Method.pm 8 Sep 2008 10:19:51 -0000 1.8 +++ Method.pm 8 Sep 2008 10:40:30 -0000 1.9 @@ -46,9 +46,11 @@ return undef; } -# Indicates that this method requires authentication. +# Indicates that this method requires authentication. If an admin +# user has been specified in codestriker.conf, then assume +# authentication is required. sub requires_authentication { - return 1; + return defined $Codestriker::admin_users; } # Indicates that this method can only be executed by an admin. Index: Dispatcher.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Dispatcher.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Dispatcher.pm 8 Sep 2008 10:19:51 -0000 1.15 +++ Dispatcher.pm 8 Sep 2008 10:40:30 -0000 1.16 @@ -150,7 +150,8 @@ } # Check if the method requires admin priviledges. - if ($found_method->requires_admin() && !$user->{admin}) { + if (defined $Codestriker::admin_users && + $found_method->requires_admin() && !$user->{admin}) { $http_output->error("This function requires admin access."); return; } Index: codestriker.conf =================================================================== RCS file: /cvsroot/codestriker/codestriker/codestriker.conf,v retrieving revision 1.106 retrieving revision 1.107 diff -u -r1.106 -r1.107 --- codestriker.conf 6 Sep 2008 11:33:06 -0000 1.106 +++ codestriker.conf 8 Sep 2008 10:40:30 -0000 1.107 @@ -35,12 +35,12 @@ # Email addresses of admin users for this installation. Admin users # have unrestricted access to the system. Non-admin users will not -# be able to create/edit/delete projects. If no admin user is defined -# then no login system will be used, and all users will be effectively -# admin users. -$admin_users = [ 'dav...@gm...' ]; +# be able to create/edit/delete projects or download the full +# system metric reports. If this remains commented out, then no +# authentication will be required, and users have full access to the +# system. +#$admin_users = [ 'dav...@gm...' ]; #$admin_users = [ 'dav...@gm...', 'si...@us...' ]; -#$admin_users = []; # Location of the mailing host. This is used when sending out codestriker # comments. @@ -109,10 +109,6 @@ #$codestriker_css = 'codestriker.css'; #$codestriker_css = 'codestriker-alternative.css'; -# Indicate what style URLs to support. The default is CGI-style URLs. Set -# this value to 0 for "nicer" URLs. -#$cgi_style = 1; - # Valid repositories which may be selected at the create topic screen. # The order shown here is the order presented in the option list. Most # deployments will only require a single repository to be specified. Index: CHANGELOG =================================================================== RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v retrieving revision 1.265 retrieving revision 1.266 diff -u -r1.265 -r1.266 --- CHANGELOG 2 Sep 2008 06:33:57 -0000 1.265 +++ CHANGELOG 8 Sep 2008 10:40:30 -0000 1.266 @@ -3,6 +3,12 @@ Version 1.9.7 +* Introduced basic user authentication / authorisation into the + system. If the $admin_users configuration variable is specified + in codestriker.conf, this contains a list of "admin" users. + If defined, admin users are the only ones who can + create/edit/delete projects. + * Created another Subversion post-commit script which is an extension of the standard commit-email.pl script which ships with Subversion. The email sent also includes an additional line, which is the URL to |
From: <si...@us...> - 2008-09-09 22:45:47
|
User: sits Date: 08/09/09 15:45:44 Modified: lib/Codestriker/Repository Vss.pm ViewCvs.pm Subversion.pm ScmBug.pm Perforce.pm CvsWeb.pm Cvs.pm ClearCaseSnapshot.pm ClearCaseDynamic.pm doc codestriker.sgml . codestriker.conf CHANGELOG Added: lib/Codestriker Repository.pm Log: * Make $file_viewer more flexible so it can handle file mapping URLs which have CGI parameters. Submitted by va...@us.... Also updated Repository objects so that there is a base class can share a lot of code, such as the file mapping code. Index: Vss.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Vss.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Vss.pm 6 Sep 2008 00:31:48 -0000 1.23 +++ Vss.pm 9 Sep 2008 22:45:43 -0000 1.24 @@ -14,6 +14,9 @@ use File::Temp qw/ tmpnam tempdir /; use IO::Handle; +use Codestriker::Repository; +@Codestriker::Repository::Vss::ISA = ("Codestriker::Repository"); + # Switch for emitting debug information. my $_DEBUG = 0; @@ -21,7 +24,10 @@ sub new { my ($type, $username, $password, $ssdir) = @_; - my $self = {}; + my $repository_string = + "vss:" . (defined $ssdir && $ssdir ne '' ? "$ssdir;" : '') . + $username . ":" . $password; + my $self = Codestriker::Repository->new($repository_string); $self->{username} = $username; $self->{password} = $password; $self->{ssdir} = $ssdir; @@ -108,21 +114,6 @@ return "vss:"; } -# Return a URL which views the specified file and revision. -sub getViewUrl ($$$) { - my ($self, $filename, $revision) = @_; - - # Lookup the file viewer from the configuration. - my $viewer = $Codestriker::file_viewer->{$self->toString()}; - return (defined $viewer) ? $viewer . "/" . $filename : ""; -} - -# Return a string representation of this repository. -sub toString ($) { - my ($self) = @_; - return "vss:" . $self->{username} . ":" . $self->{password}; -} - # Retrieve the specified VSS diff directly using VSS commands. sub getDiff ($$$$$) { my ($self, $start_tag, $end_tag, $module_name, $fh, $error_fh) = @_; Index: ViewCvs.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/ViewCvs.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ViewCvs.pm 6 Sep 2008 00:31:48 -0000 1.6 +++ ViewCvs.pm 9 Sep 2008 22:45:43 -0000 1.7 @@ -13,13 +13,15 @@ use LWP::UserAgent; +use Codestriker::Repository; +@Codestriker::Repository::ViewCvs::ISA = ("Codestriker::Repository"); + # Constructor, which takes as a parameter the URL to the viewcvs repository, # and the CVSROOT. sub new ($$) { my ($type, $viewcvs_url, $cvsroot) = @_; - my $self = {}; - $self->{viewcvs_url} = $viewcvs_url; + my $self = Codestriker::Repository->new($viewcvs_url); $self->{cvsroot} = $cvsroot; bless $self, $type; } @@ -31,7 +33,7 @@ # Retrieve the data by doing an HTPP GET to the remote viewcvs server. my $ua = LWP::UserAgent->new; - my $request = $self->{viewcvs_url} . + my $request = $self->{repository_string} . "/${filename}?rev=${revision}&content-type=text/plain"; my $response = $ua->get($request); my $content = Codestriker::decode_topic_text($response->content); @@ -49,17 +51,10 @@ return $self->{cvsroot}; } -# Return a URL which views the specified file. -sub getViewUrl ($$) { - my ($self, $filename) = @_; - - return $self->{viewcvs_url} . "/" . $filename; -} - # Return a string representation of this repository. sub toString ($) { my ($self) = @_; - return $self->{viewcvs_url} . " " . $self->{cvsroot}; + return $self->{repository_string} . " " . $self->{cvsroot}; } # The getDiff operation is not supported. Index: Subversion.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- Subversion.pm 6 Sep 2008 00:31:48 -0000 1.25 +++ Subversion.pm 9 Sep 2008 22:45:43 -0000 1.26 @@ -13,10 +13,26 @@ use strict; use Fatal qw / open close /; +use Codestriker::Repository; +@Codestriker::Repository::Subversion::ISA = ("Codestriker::Repository"); + # Constructor, which takes as a parameter the repository url. sub new { my ($type, $repository_url, $user, $password) = @_; + # Sanitise the repository URL. + $repository_url = sanitise_url_component($repository_url); + + # Set the repository string. + my $repository_string = $repository_url; + $repository_string .= ";$user" if defined $user; + $repository_string .= ";$password" if defined $password; + if ($repository_string !~ /^svn:/) { + $repository_string = "svn:" . $repository_string; + } + my $self = Codestriker::Repository->new($repository_string); + $self->{repository_url} = $repository_url; + # Determine if there are additional parameters required for user # authentication. my @userCmdLine = (); @@ -26,19 +42,7 @@ push @userCmdLine, '--password'; push @userCmdLine, $password; } - - # Sanitise the repository URL. - $repository_url = sanitise_url_component($repository_url); - - my $self = {}; - $self->{repository_url} = $repository_url; $self->{userCmdLine} = \@userCmdLine; - $self->{repository_string} = $repository_url; - $self->{repository_string} .= ";$user" if defined $user; - $self->{repository_string} .= ";$password" if defined $password; - if ($self->{repository_string} !~ /^svn:/) { - $self->{repository_string} = "svn:" . $self->{repository_string}; - } bless $self, $type; } @@ -92,25 +96,6 @@ return $self->{repository_url}; } -# Return a URL which views the specified file and revision. -sub getViewUrl ($$$) { - my ($self, $filename, $revision) = @_; - - # Lookup the file viewer from the configuration. - my $viewer = $Codestriker::file_viewer->{$self->toString()}; - if (! (defined $viewer)) { - $viewer = $Codestriker::file_viewer->{$self->{repository_string}}; - } - - return (defined $viewer) ? $viewer . "/" . $filename : ""; -} - -# Return a string representation of this repository. -sub toString ($) { - my ($self) = @_; - return $self->{repository_string}; -} - # Given a Subversion URL, determine if it refers to a directory or a file. sub is_file_url { my ($self, $url) = @_; Index: ScmBug.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/ScmBug.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ScmBug.pm 6 Sep 2008 00:31:48 -0000 1.4 +++ ScmBug.pm 9 Sep 2008 22:45:43 -0000 1.5 @@ -11,6 +11,9 @@ use strict; +use Codestriker::Repository; +@Codestriker::Repository::ScmBug::ISA = ("Codestriker::Repository"); + # Optional dependencies for people who don't require ScmBug functionality. eval("use Scmbug::ActivityUtilities"); @@ -19,7 +22,7 @@ sub new { my ($type, $hostname, $port, $repository) = @_; - my $self = {}; + my $self = Codestriker::Repository->new("scmbug: ${hostname}:${port} " . $repository->toString()); $self->{repository} = $repository; $self->{scmbug} = Scmbug::ActivityUtilities->new($hostname, $port); Index: Perforce.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Perforce.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Perforce.pm 6 Sep 2008 00:31:48 -0000 1.8 +++ Perforce.pm 9 Sep 2008 22:45:43 -0000 1.9 @@ -11,18 +11,22 @@ use strict; +use Codestriker::Repository; +@Codestriker::Repository::Perforce::ISA = ("Codestriker::Repository"); + # Constructor, which takes as a parameter the password, hostname and port. sub new ($$$$$) { my ($type, $user, $password, $hostname, $port) = @_; - my $self = {}; + my $repository_string = "perforce:${user}" . + (defined $password && $password ne '' ? ":${password}" : '') . + "@" . "${hostname}:${port}"; + my $self = Codestriker::Repository->new($repository_string); + $self->{user} = $user; $self->{password} = $password; $self->{hostname} = $hostname; $self->{port} = $port; - $self->{root} = "perforce:${user}" . - (defined $password && $password ne '' ? ":${password}" : '') . - "@" . "${hostname}:${port}"; bless $self, $type; } @@ -53,22 +57,7 @@ # Retrieve the "root" of this repository. sub getRoot ($) { my ($self) = @_; - return $self->{root}; -} - -# Return a URL which views the specified file and revision. -sub getViewUrl ($$$) { - my ($self, $filename, $revision) = @_; - - # Lookup the file viewer from the configuration. - my $viewer = $Codestriker::file_viewer->{$self->{root}}; - return (defined $viewer) ? $viewer . "/" . $filename : ""; -} - -# Return a string representation of this repository. -sub toString ($) { - my ($self) = @_; - return $self->{root}; + return $self->{repository_string}; } # Given a start tag, end tag and a module name, store the text into Index: CvsWeb.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/CvsWeb.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- CvsWeb.pm 6 Sep 2008 00:31:48 -0000 1.7 +++ CvsWeb.pm 9 Sep 2008 22:45:43 -0000 1.8 @@ -13,13 +13,15 @@ use LWP::UserAgent; +use Codestriker::Repository; +@Codestriker::Repository::CvsWeb::ISA = ("Codestriker::Repository"); + # Constructor, which takes as a parameter the URL to the cvsweb repository, # and the CVSROOT. sub new ($$) { my ($type, $cvsweb_url, $cvsroot) = @_; - my $self = {}; - $self->{cvsweb_url} = $cvsweb_url; + my $self = Codestriker::Repository->new($cvsweb_url); $self->{cvsroot} = $cvsroot; bless $self, $type; } @@ -31,7 +33,7 @@ # Retrieve the data by doing an HTPP GET to the remote viewcvs server. my $ua = LWP::UserAgent->new; - my $request = $self->{cvsweb_url} . "/~checkout~" . + my $request = $self->{repository_string} . "/~checkout~" . "/${filename}?rev=${revision}&content-type=text/plain"; my $response = $ua->get($request); my $content = Codestriker::decode_topic_text($response->content); @@ -48,17 +50,10 @@ return $self->{cvsroot}; } -# Return a URL which views the specified file. -sub getViewUrl ($$) { - my ($self, $filename) = @_; - - return $self->{cvsweb_url} . "/" . $filename; -} - # Return a string representation of this repository. sub toString ($) { my ($self) = @_; - return $self->{cvsweb_url} . " " . $self->{cvsroot}; + return $self->{repository_string} . " " . $self->{cvsroot}; } # The getDiff operation is not supported. Index: Cvs.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Cvs.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Cvs.pm 6 Sep 2008 00:31:48 -0000 1.12 +++ Cvs.pm 9 Sep 2008 22:45:43 -0000 1.13 @@ -13,15 +13,17 @@ use FileHandle; use Fatal qw / open close /; +use Codestriker::Repository; +@Codestriker::Repository::Cvs::ISA = ("Codestriker::Repository"); + # Factory method for creating a local CVS repository object. sub build_local { my ($type, $cvsroot, $optional_prefix) = @_; - my $self = {}; + my $self = Codestriker::Repository->new("${optional_prefix}${cvsroot}"); $self->{cvsroot} = $cvsroot; $optional_prefix = "" unless defined $optional_prefix; $self->{optional_prefix} = $optional_prefix; - $self->{url} = "${optional_prefix}${cvsroot}"; bless $self, $type; } @@ -29,15 +31,14 @@ sub build_pserver { my ($type, $optional_args, $username, $password, $hostname, $cvsroot) = @_; - my $self = {}; + my $self = Codestriker::Repository->new(":pserver${optional_args}:${username}:${password}\@" . + "${hostname}:${cvsroot}"); $optional_args = "" unless defined $optional_args; $self->{optional_args} = $optional_args; $self->{username} = $username; $self->{password} = $password; $self->{hostname} = $hostname; $self->{cvsroot} = $cvsroot; - $self->{url} = ":pserver${optional_args}:${username}:${password}\@" . - "${hostname}:${cvsroot}"; bless $self, $type; } @@ -45,13 +46,12 @@ sub build_ext { my ($type, $optional_args, $username, $hostname, $cvsroot) = @_; - my $self = {}; + my $self = Codestriker::Repository->new(":ext${optional_args}:${username}\@${hostname}:${cvsroot}"); $optional_args = "" unless defined $optional_args; $self->{optional_args} = $optional_args; $self->{username} = $username; $self->{hostname} = $hostname; $self->{cvsroot} = $cvsroot; - $self->{url} = ":ext${optional_args}:${username}\@${hostname}:${cvsroot}"; bless $self, $type; } @@ -59,12 +59,11 @@ sub build_sspi { my ($type, $username, $password, $hostname, $cvsroot) = @_; - my $self = {}; + my $self = Codestriker::Repository->new(":sspi:${username}:${password}\@${hostname}:${cvsroot}"); $self->{optional_args} = ""; $self->{username} = $username; $self->{hostname} = $hostname; $self->{cvsroot} = $cvsroot; - $self->{url} = ":sspi:${username}:${password}\@${hostname}:${cvsroot}"; bless $self, $type; } @@ -83,7 +82,7 @@ my @args = (); push @args, '-q'; push @args, '-d'; - push @args, $self->{url}; + push @args, $self->{repository_string}; push @args, 'co'; push @args, '-p'; push @args, '-r'; @@ -108,21 +107,6 @@ return $self->{cvsroot}; } -# Return a URL which views the specified file and revision. -sub getViewUrl ($$$) { - my ($self, $filename, $revision) = @_; - - # Lookup the file viewer from the configuration. - my $viewer = $Codestriker::file_viewer->{$self->{url}}; - return (defined $viewer) ? $viewer . "/" . $filename : ""; -} - -# Return a string representation of this repository. -sub toString ($) { - my ($self) = @_; - return $self->{url}; -} - # Given a start tag, end tag and a module name, store the text into # the specified file handle. If the size of the diff goes beyond the # limit, then return the appropriate error code. @@ -147,7 +131,7 @@ $ENV{'CVS_RSH'} = $Codestriker::ssh if defined $Codestriker::ssh; Codestriker::execute_command($stdout_fh, $stderr_fh, $Codestriker::cvs, - '-q', '-d', $self->{url}, 'rdiff', + '-q', '-d', $self->{repository_string}, 'rdiff', $extra_options, '-u', '-r', $start_tag, '-r', $end_tag, $module_name); return $Codestriker::OK; Index: ClearCaseSnapshot.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/ClearCaseSnapshot.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ClearCaseSnapshot.pm 6 Sep 2008 00:31:48 -0000 1.7 +++ ClearCaseSnapshot.pm 9 Sep 2008 22:45:43 -0000 1.8 @@ -14,13 +14,16 @@ use File::Temp qw/ tempdir /; use File::Spec; +use Codestriker::Repository; +@Codestriker::Repository::ClearCaseSnapshot::ISA = ("Codestriker::Repository"); + # Constructor. # - snapshot_dir: Absolute path to the location that you access the # files in the snapshot view from. NOT the view storage directory. sub new ($$) { my ($type, $snapshot_dir) = @_; - my $self = {}; + my $self = Codestriker::Repository->new("clearcase:$snapshot_dir"); $self->{snapshot_dir} = $snapshot_dir; bless $self, $type; } @@ -102,21 +105,6 @@ return $self->{snapshot_dir}; } -# Return a URL which views the specified file and revision. -sub getViewUrl ($$$) { - my ($self, $filename, $revision) = @_; - - # Lookup the file viewer from the configuration. - my $viewer = $Codestriker::file_viewer->{$self->toString()}; - return (defined $viewer) ? $viewer . "/" . $filename : ""; -} - -# Return a string representation of this repository. -sub toString ($) { - my ($self) = @_; - return "clearcase:" . $self->{snapshot_dir}; -} - # Given a start tag, end tag and a module name, store the text into # the specified file handle. If the size of the diff goes beyond the # limit, then return the appropriate error code. Index: ClearCaseDynamic.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/ClearCaseDynamic.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ClearCaseDynamic.pm 6 Sep 2008 00:31:48 -0000 1.5 +++ ClearCaseDynamic.pm 9 Sep 2008 22:45:43 -0000 1.6 @@ -13,6 +13,9 @@ use strict; use File::Spec; +use Codestriker::Repository; +@Codestriker::Repository::ClearCaseDynamic::ISA = ("Codestriker::Repository"); + # Put this in an eval block so that this becomes an optional dependency for # those people who don't use this module. eval("use ClearCase::CtCmd"); @@ -26,8 +29,7 @@ { my ($type, $url) = @_; - my $self = {}; - + my $self = Codestriker::Repository->new("clearcase:dyn:$url"); $url =~ /([^:]*):(.*)/; $self->{dynamic_view_name} = $1; $self->{vobs_dir} = $2; @@ -107,22 +109,6 @@ return $self->{vobs_dir}; } -# Return a URL which views the specified file and revision. -sub getViewUrl ($$$) { - my ($self, $filename, $revision) = @_; - - # Lookup the file viewer from the configuration. - my $viewer = $Codestriker::file_viewer->{$self->toString()}; - return (defined $viewer) ? $viewer . "/" . $filename : ""; -} - -# Return a string representation of this repository. -sub toString ($) { - my ($self) = @_; - return "clearcase:dyn:" . $self->{dynamic_view_name} . - ":" . $self->{vobs_dir}; -} - # Given a start tag, end tag and a module name, store the text into # the specified file handle. If the size of the diff goes beyond the # limit, then return the appropriate error code. Index: Repository.pm =================================================================== RCS file: Repository.pm diff -N Repository.pm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Repository.pm 9 Sep 2008 22:45:44 -0000 1.1 @@ -0,0 +1,54 @@ +############################################################################### +# Codestriker: Copyright (c) 2001,2002,2003 David Sitsky. All rights reserved. +# si...@us... +# +# This program is free software; you can redistribute it and modify it under +# the terms of the GPL. + +# Base repository object. + +package Codestriker::Repository; + +# Create a new repository instance. +sub new { + my ($type, $repository_string) = @_; + + my $self = {}; + $self->{repository_string} = $repository_string; + return bless $self, $type; +} + +# Return a URL which views the specified file and revision. +sub getViewUrl ($$$) { + my ($self, $filename, $revision) = @_; + + # Lookup the file viewer from the configuration. + my $viewer = $Codestriker::file_viewer->{$self->toString()}; + + # Check in case the user has specified it using the repository string + # instead of the display string. + if (! (defined $viewer)) { + $viewer = $Codestriker::file_viewer->{$self->{repository_string}}; + } + + # If there are CGI parameters in the URL then the file name must + # be inserted before them; otherwise we simply append it to the end. + if (defined $viewer) { + if ($viewer =~ /^([^?]+)(\?.*)$/ ) { + $viewer = $1 . $filename . $2; + } + else { + $viewer .= '/' . $filename; + } + } + + return defined $viewer ? $viewer : ""; +} + +# Return a string representation of this repository. +sub toString ($) { + my ($self) = @_; + return $self->{repository_string}; +} + +1; Index: codestriker.sgml =================================================================== RCS file: /cvsroot/codestriker/codestriker/doc/codestriker.sgml,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- codestriker.sgml 27 Aug 2008 09:51:44 -0000 1.71 +++ codestriker.sgml 9 Sep 2008 22:45:44 -0000 1.72 @@ -577,11 +577,16 @@ During a review, it is sometimes beneficial to see the revision history of a file, such as information provided by CVSweb or ViewCVS. You can specify a mapping of repository - names to URLs for this purpose, for example: + names to URLs for this purpose. When viewing reviews, links + from filenames will be mapped to these URLs, to obtain + revision log information for that file. The filename will + be appended to the end of the URL, before any CGI parameters. <programlisting> $file_viewer = { - '/home/sits/cvs' => 'http://localhost/cgi-bin/cvsweb.cgi' + '/home/sits/cvs' => 'http://localhost/cgi-bin/cvsweb.cgi', + 'svn:file:///var/svn/project/trunk' => + 'http://some.whe.re/cgi-bin/viewvc.cgi/trunk/?root=Project&view=markup' }; </programlisting> This indicates that for any review made against the Index: codestriker.conf =================================================================== RCS file: /cvsroot/codestriker/codestriker/codestriker.conf,v retrieving revision 1.107 retrieving revision 1.108 diff -u -r1.107 -r1.108 --- codestriker.conf 8 Sep 2008 10:40:30 -0000 1.107 +++ codestriker.conf 9 Sep 2008 22:45:44 -0000 1.108 @@ -39,7 +39,7 @@ # system metric reports. If this remains commented out, then no # authentication will be required, and users have full access to the # system. -#$admin_users = [ 'dav...@gm...' ]; +$admin_users = [ 'dav...@gm...' ]; #$admin_users = [ 'dav...@gm...', 'si...@us...' ]; # Location of the mailing host. This is used when sending out codestriker @@ -233,9 +233,13 @@ # not required for remote CVSweb and ViewCVS repositories, as they are # viewers themselves. When viewing reviews, links from filenames will be # mapped to these URLs, to obtain revision log information for that file. +# The filename will be appended to the end of the URL, before any CGI +# parameters. $file_viewer = { - '/home/sits/cvs' => 'http://localhost/cgi-bin/cvsweb.cgi' + '/home/sits/cvs' => 'http://localhost/cgi-bin/cvsweb.cgi', + 'svn:file:///var/svn/project/trunk' => + 'http://some.whe.re/cgi-bin/viewvc.cgi/trunk/?root=Project&view=markup' }; # Exclude these file types from review topics. Index: CHANGELOG =================================================================== RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v retrieving revision 1.266 retrieving revision 1.267 diff -u -r1.266 -r1.267 --- CHANGELOG 8 Sep 2008 10:40:30 -0000 1.266 +++ CHANGELOG 9 Sep 2008 22:45:44 -0000 1.267 @@ -39,7 +39,10 @@ disappear automatically when the cursor is moved off the (?) link. * Fixed a bug where Subversion diffs with binary files that contained - property changes were not handled correctly. + property changes were not handled correctly. + +* Make $file_viewer more flexible so it can handle file mapping URLs + which have CGI parameters. Submitted by va...@us.... Version 1.9.6 |