(minor) change to version reporting

This commit is contained in:
Sitaram Chamarty 2011-09-10 10:53:05 +05:30
parent 37584908eb
commit d2c10e87d8
2 changed files with 8 additions and 5 deletions

View file

@ -512,8 +512,11 @@ sub setup_gitweb_access
sub report_version {
my($user) = @_;
print "hello $user, the gitolite version here is ";
print slurp( ($GL_PACKAGE_CONF || "$GL_ADMINDIR/conf") . "/VERSION" );
my $gl_version = slurp( ($GL_PACKAGE_CONF || "$GL_ADMINDIR/conf") . "/VERSION" );
chomp($gl_version);
my $git_version = `git --version`;
$git_version =~ s/^git version //;
print "hello $user, this is gitolite $gl_version running on git $git_version";
}
sub perm_code {

View file

@ -35,7 +35,7 @@ do
name "u1 info"
runlocal ssh u1 info
expect "hello u1, the gitolite version here is"
expect "hello u1, this is gitolite v"
expect " @R_ @W_.testing"
[ "$wr" = "1" ] && [ "$bc" = "0" ] && expect " C R W .foo/u1/\\.\\+"
[ "$wr" = "1" ] && [ "$bc" = "1" ] && notexpect " C R W .foo/u1/\\.\\+"
@ -44,13 +44,13 @@ do
name "u1 expand"
runlocal ssh u1 expand
[ "$wr" = "0" ] && expect "wildrepos disabled, sorry"
[ "$wr" = "1" ] && expect "hello u1, the gitolite version here is"
[ "$wr" = "1" ] && expect "hello u1, this is gitolite v"
[ "$wr" = "1" ] && expect " R W .(u1).foo/u1/bar"
[ "$wr" = "1" ] && expect "@R_ @W_..gitolite..testing"
name "gitolite info u1"
runlocal ssh gitolite info . u1
expect "hello u1, the gitolite version here is"
expect "hello u1, this is gitolite v"
expect " @R_ @W_.testing"
[ "$wr" = "1" ] && [ "$bc" = "0" ] && expect " C R W .foo/u1/\\.\\+"
[ "$wr" = "1" ] && [ "$bc" = "1" ] && notexpect " C R W .foo/u1/\\.\\+"