Update of /cvsroot/sandweb/sandweb/bin
In directory usw-pr-cvs1:/tmp/cvs-serv27885/bin
Modified Files:
sandweb.cgi
Log Message:
gave the file action's info command it's own template.
This will be neccessary for CVSWeb-like output. We are
really close on this - we just need to parse the "cvs log"
output ( this is definitely going to be VCS-dependant :/ )
and implement colorized diff. Then we've reached parity with
CVSWeb/ViewCVS.
Index: sandweb.cgi
===================================================================
RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v
retrieving revision 1.76
retrieving revision 1.77
diff -U2 -r1.76 -r1.77
--- sandweb.cgi 2001/11/26 23:33:16 1.76
+++ sandweb.cgi 2001/11/27 00:47:17 1.77
@@ -346,10 +346,26 @@
}
}
- print header;
- print '<pre>';
+ # can't give the leading / to the VCS
+ $filename =~ s/\///;
+
my %return = $repository->log( file => "$filename" );
- print $return{'output'};
- print '</pre>';
- exit 0;
+ my $content = $ui->file_info(
+ PROGNAME => $progname,
+ LOCATION => $location,
+ FULLPATH => "$users_dir/$username/$location",
+ VCS_OUTPUT => $return{'output'},
+ VCS_ERROR => $return{'error'},
+ );
+
+ print header( -cookie => $cookie );
+ $ui->print_screen(
+ TITLE=> 'SandWeb : File Info',
+ MENU_TITLE => 'SandWeb',
+ SUBMENU_TITLE => 'file info',
+ FOOTER => '',
+ CONTENT => $content,
+ ERROR => $error,
+ );
+ exit 0;
}
elsif ( $command eq 'view' ) {
@@ -551,4 +567,5 @@
my $repo_type = $userprefs->{'repository'}->{'VCS'};
my $root = $userprefs->{'repository'}->{'root'};
+ my %return;
my $sandbox = $userprefs->{'paths'}->{'users_dir'};
@@ -558,12 +575,53 @@
sandbox => "$users_dir/$username",
);
-
- my %return = $repository->$command( file => "$location/$filename" );
+ if ( $command eq 'commit' ) {
+ my $content = $ui->get_commit(
+ LOCATION => $location,
+ PROGNAME => $progname,
+ FULLPATH => "$users_dir/$username/$location",
+ FILENAME => $filename,
+ );
+ print header( -cookie => $cookie );
+ $ui->print_screen(
+ TITLE=> 'SandWeb : Commit',
+ MENU_TITLE => 'SandWeb',
+ SUBMENU_TITLE => 'commit file(s)',
+ FOOTER => '',
+ CONTENT => $content,
+ ERROR => $error,
+ );
+ exit 0;
+ }
+ elsif ($command eq "committed") {
+ # can't give the leading / to the VCS
+ $location =~ s/\///;
+ %return = $repository->commit(
+ file => "$location/$filename",
+ message => "param(message)",
+ );
+ }
+ else {
+ # can't give the leading / to the VCS
+ $location =~ s/\///;
- print header;
- print '<pre>';
- print "$return{'output'}\n";
- print '</pre>';
- exit 0;
+ %return = $repository->$command( file => "$location/$filename" );
+ }
+ my $content = $ui->get_vcs_output(
+ LOCATION => $location,
+ PROGNAME => $progname,
+ FULLPATH => "$users_dir/$username/$location",
+ VCS_OUTPUT => $return{'output'},
+ VCS_ERROR => $return{'error'},
+ );
+ print header( -cookie => $cookie );
+ $ui->print_screen(
+ TITLE=> "SandWeb : VCS $command",
+ MENU_TITLE => 'SandWeb',
+ SUBMENU_TITLE => "VCS $command",
+ FOOTER => '',
+ CONTENT => $content,
+ ERROR => $error,
+ );
+ exit 0;
}
|