Update of /cvsroot/sandweb/sandweb/bin
In directory usw-pr-cvs1:/tmp/cvs-serv10487
Modified Files:
sandweb.cgi
Log Message:
* fixing up checkout_menu() (for checking out a module)
Index: sandweb.cgi
===================================================================
RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v
retrieving revision 1.161
retrieving revision 1.162
diff -U2 -r1.161 -r1.162
--- sandweb.cgi 13 Feb 2002 03:39:36 -0000 1.161
+++ sandweb.cgi 13 Feb 2002 04:08:43 -0000 1.162
@@ -1025,7 +1025,6 @@
sub checkout_menu {
my %args = @_;
-
my $ck_auth = $args{'ck_auth'};
- unless ($ck_auth) {
+ unless ($ck_auth) {
&login_menu();
exit 0;
@@ -1036,45 +1035,8 @@
}
- my $vcs_command = $args{'vcs_command'};
- my @filename = ();
- my $count = 0;
- while ( $args{'filename'}->[$count] ) {
- push (@filename, $args{'filename'}->[$count]);
- $count++;
- }
- my $location = $args{'location'};
- my $message = CGI::param('message');
- my $username = $auth->get_userinfo('username');
- my $template_dir = $config->{'paths'}->{'template_dir'};
- my $users_dir = $config->{'paths'}->{'users_dir'};
- my %return;
- #XXX - not accessing $user->{'repo'}->{$repo_name}*
- my $server = $user->{'repository'}->{'server'};
- my $vcs_username = $user->{'repository'}->{'username'};
- my $repo_type = $user->{'repository'}->{'repo_type'};
- my $connection = $user->{'repository'}->{'connection'};
- my $root = $user->{'repository'}->{'root'};
- my $sandbox = $user->{'paths'}->{'users_dir'};
- my @vcs_output = ();
- my @vcs_error = ();
- my $vcsroot;
-
- if ( $repo_type eq 'CVS' ) {
- if ( $connection eq 'local' ) {
- $vcsroot = "$root";
- } else {
- $vcsroot = ":$connection:$vcs_username\@$server:$root";
- }
- }
-
- my $repository = SandWeb::Repository->new(
- root => $vcsroot,
- repo_type => $repo_type,
- sandbox => "$users_dir/$username",
- );
+ my @repos = sort keys %{$user->{'repo'}};
my $content = $ui->get_menu(
MENU => 'checkout',
- LOCATION => $location,
PROGNAME => $progname,
);
@@ -1422,12 +1384,34 @@
sub checkout_commit {
-# my %args = @_;
-# my $ck_auth = $args{'ck_auth'};
-# unless ($ck_auth) {
-# &login_menu();
-# exit 0;
-# }
-# # this is where the Repository object is used
-#
+ my %args = @_;
+ my $ck_auth = $args{'ck_auth'};
+ unless ($ck_auth) {
+ &login_menu();
+ exit 0;
+ }
+ # this is where the Repository object is used
+ my $server = $user->{'repository'}->{'server'};
+ my $vcs_username = $user->{'repository'}->{'username'};
+ my $repo_type = $user->{'repository'}->{'repo_type'};
+ my $connection = $user->{'repository'}->{'connection'};
+ my $root = $user->{'repository'}->{'root'};
+
+ my $sandbox = $user->{'paths'}->{'users_dir'};
+ my @vcs_output = ();
+ my @vcs_error = ();
+ my $vcsroot;
+
+ my $username = $auth->get_userinfo('username');
+ my $template_dir = $config->{'paths'}->{'template_dir'};
+ my $users_dir = $config->{'paths'}->{'users_dir'};
+
+ if ( $repo_type eq 'CVS' ) {
+ if ( $connection eq 'local' ) {
+ $vcsroot = "$root";
+ } else {
+ $vcsroot = ":$connection:$vcs_username\@$server:$root";
+ }
+ }
+
# foreach my $file (@filename) {
# %return = $repository->$vcs_command(
@@ -1437,4 +1421,10 @@
# push (@vcs_error, "$return{'error'}\n");
# }
+#
+# my $repository = SandWeb::Repository->new(
+# root => $vcsroot,
+# repo_type => $repo_type,
+# sandbox => "$users_dir/$username",
+# );
#
# my $content = $ui->get_menu(
|