From: Rob H. <for...@us...> - 2001-10-17 04:27:33
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv21468/lib/SandWeb Modified Files: Browse.pm Repository.pm Log Message: browse now gets it's repo_type and vcs_commands via sandweb.cgi, which instantiates a Repository object using userprefs. Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -U2 -r1.14 -r1.15 --- Browse.pm 2001/10/16 04:51:44 1.14 +++ Browse.pm 2001/10/17 04:27:29 1.15 @@ -5,11 +5,4 @@ package SandWeb::Browse; -########################################### -# TEMPORARY VARIABLE FOR TESTING PURPOSES # -# # -my $repo_type = 'CVS'; # -# # -########################################### - use lib '../lib'; use SandWeb::UI; @@ -34,4 +27,7 @@ my $path = shift; my $progname = shift; + my $vcs_commands = shift; + my $repo_type = shift; + my %args = @_; @@ -40,4 +36,5 @@ my $template_dir = $self->_get_template_dir(); my $sandbox = "$users_dir/$username"; + my @vcs_commands = split (/ /, $vcs_commands ); if (! $sandbox) { @@ -138,8 +135,6 @@ my @loop_data = (); - my @cvs_commands = ( 'add', 'annotate', 'commit', 'diff', 'edit', 'editors', 'history', 'import', 'log', 'remove', 'status', 'tag', 'unedit', 'update', 'tag', 'unedit', 'watch', 'watchers' ); - if ($repo_type eq "CVS") { - foreach my $vcs_command (@cvs_commands) { + foreach my $vcs_command (@vcs_commands) { my %row_data; $row_data{VCS_CMD} = "$vcs_command"; Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- Repository.pm 2001/08/15 22:06:47 1.9 +++ Repository.pm 2001/10/17 04:27:29 1.10 @@ -588,4 +588,8 @@ } +sub get_vcs_commands { + return ( 'add', 'annotate', 'commit', 'diff', 'edit', 'editors', 'history', 'import', 'log', 'remove', 'status', 'tag', 'unedit', 'update', 'tag', 'unedit', 'watch', 'watchers' ); +} + sub get_root { my $self = shift; |