new RC file variable $GL_SITE_INFO to show site-specific info

This commit is contained in:
Sitaram Chamarty 2010-10-04 14:28:58 +05:30
parent 112f6fab57
commit b851011ce5
2 changed files with 16 additions and 1 deletions

View file

@ -260,6 +260,19 @@ $GL_WILDREPOS = 0;
# $GL_ADC_PATH = "";
# --------------------------------------
# SITE-SPECIFIC INFORMATION
# Some installations would like to give their users customised information
# (like a link to their own websites, for example) so that each end user does
# not have to grok all the gitolite documentation.
# If this variable is defined, the "info" command will print it at the end of
# the listing.
# $GL_SITE_INFO = "";
# $GL_SITE_INFO = "XYZ.COM DEVELOPERS: PLEASE SEE http://xyz.com/gitolite/help first";
# --------------------------------------
# per perl rules, this should be the last line in such a file:
1;

View file

@ -38,7 +38,7 @@ our $USERNAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$); # very simple patter
our $REPOPATT_PATT=qr(^\@?[0-9a-zA-Z[][\\^.$|()[\]*+?{}0-9a-zA-Z._\@/-]*$);
# these come from the RC file
our ($REPO_UMASK, $GL_WILDREPOS, $GL_PACKAGE_CONF, $GL_PACKAGE_HOOKS, $REPO_BASE, $GL_CONF_COMPILED, $GL_BIG_CONFIG, $GL_PERFLOGT, $PROJECTS_LIST, $GL_ALL_INCLUDES_SPECIAL);
our ($REPO_UMASK, $GL_WILDREPOS, $GL_PACKAGE_CONF, $GL_PACKAGE_HOOKS, $REPO_BASE, $GL_CONF_COMPILED, $GL_BIG_CONFIG, $GL_PERFLOGT, $PROJECTS_LIST, $GL_ALL_INCLUDES_SPECIAL, $GL_SITE_INFO);
our %repos;
our %groups;
our %repo_config;
@ -622,6 +622,7 @@ sub report_basic
print "$perm\t$r\r\n" if $perm =~ /\S/;
}
print "only 20 out of $count candidate repos examined\r\nplease use a partial reponame or regex pattern to limit output\r\n" if $GL_BIG_CONFIG and $count > 20;
print "$GL_SITE_INFO\n" if $GL_SITE_INFO;
}
# ----------------------------------------------------------------------------
@ -656,6 +657,7 @@ sub expand_wild
print "$perm\t$creator\t$actual_repo\n";
}
print "only 20 out of $count candidate repos examined\nplease use a partial reponame or regex pattern to limit output\n" if $GL_BIG_CONFIG and $count > 20;
print "$GL_SITE_INFO\n" if $GL_SITE_INFO;
}
# there will be multiple calls to repo_rights; better to use a closure. We