From: Thierry Parmentelat Date: Fri, 14 Oct 2011 15:38:54 +0000 (+0200) Subject: display commit first 8 digits instead of previous 'commit' link X-Git-Url: http://git.onelab.eu/?p=infrastructure.git;a=commitdiff_plain;h=ae087be9931a9b88002fa60eed3f71fad99d3cca display commit first 8 digits instead of previous 'commit' link --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bd38e12 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +SOURCE=ple-backup-cleanup.cron + +ple-backup: + for host in www boot; do for name in ple-backup ple-cleanup; do \ + fqdn=$$host.planet-lab.eu; target=/etc/cron.daily/$$name; \ + rsync -av $(SOURCE) $$fqdn:$target \ + done ; done diff --git a/gitweb/Makefile b/gitweb/Makefile new file mode 100644 index 0000000..3c450f2 --- /dev/null +++ b/gitweb/Makefile @@ -0,0 +1,11 @@ +ALL=onelab.cgi f-lab.cgi planet-lab.cgi + +all:$(ALL) + +%.cgi:gitweb.cgi +%.cgi:%.sed + sed -f $< gitweb.cgi > $@ + chmod +x $@ + +clean: + rm -f $(ALL) diff --git a/gitweb/f-lab.sed b/gitweb/f-lab.sed new file mode 100644 index 0000000..34bd7ce --- /dev/null +++ b/gitweb/f-lab.sed @@ -0,0 +1,6 @@ +s,@SITENAME@,git.f-lab, +s,@LOGO@,f-lab-logo, +s,@FAVICON@,f-lab-favicon, +s,@LOGOURL@,http://www.f-lab.fr, +s,@LOGOLABEL@,F-Lab, +s,@GITURL@,git://git.f-lab.fr, diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index 017b8be..b8ad9cc 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -47,7 +47,7 @@ our $home_link_str = $ENV{'SERVER_NAME'} ? "git://" . $ENV{'SERVER_NAME'} : "pro # name of your site or organization to appear in page titles # replace this with something more descriptive for clearer bookmarks -our $site_name = "git.onelab" +our $site_name = "@SITENAME@" || ($ENV{'SERVER_NAME'} || "Untitled") . " Git"; # filename of html text to include at top of each page @@ -62,15 +62,15 @@ our @stylesheets = ("gitweb.css"); # URI of a single stylesheet, which can be overridden in GITWEB_CONFIG. our $stylesheet = undef; # URI of GIT logo (72x27 size) -our $logo = "img/onelab-logo.png"; +our $logo = "img/@LOGO@.png"; # URI of GIT favicon, assumed to be image/png type -our $favicon = "img/onelab-favicon.png"; +our $favicon = "img/@FAVICON@.png"; # URI and label (title) of GIT logo link #our $logo_url = "http://www.kernel.org/pub/software/scm/git/docs/"; #our $logo_label = "git documentation"; -our $logo_url = "http://www.onelab.eu"; -our $logo_label = "Onelab"; +our $logo_url = "@LOGOURL@"; +our $logo_label = "@LOGOLABEL@"; # source of projects list our $projects_list = ""; @@ -94,8 +94,7 @@ our $strict_export = ""; our @git_base_url_list = grep { $_ ne '' } (""); @git_base_url_list = ( - "git://git.onelab.eu", - "ssh://git.onelab.eu/git" + "@GITURL@" ); @@ -3610,6 +3609,7 @@ sub git_project_list_body { print "\n"; } + sub git_shortlog_body { # uses global variable $project my ($commitlist, $from, $to, $refs, $extra) = @_; @@ -3638,7 +3638,7 @@ sub git_shortlog_body { href(action=>"commit", hash=>$commit), $ref); print "\n" . "" . - $cgi->a({-href => href(action=>"commit", hash=>$commit)}, "commit") . " | " . + $cgi->a({-href => href(action=>"commit", hash=>$commit)}, substr($commit,0,8)) . " | " . $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff") . " | " . $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree"); my $snapshot_links = format_snapshot_links($commit); diff --git a/gitweb/onelab.sed b/gitweb/onelab.sed new file mode 100644 index 0000000..0562b78 --- /dev/null +++ b/gitweb/onelab.sed @@ -0,0 +1,6 @@ +s,@SITENAME@,git.onelab, +s,@LOGO@,onelab-logo, +s,@FAVICON@,onelab-favicon, +s,@LOGOURL@,http://www.onelab.eu, +s,@LOGOLABEL@,OneLab, +s,@GITURL@,git://git.onelab.eu, diff --git a/gitweb/planet-lab.sed b/gitweb/planet-lab.sed new file mode 100644 index 0000000..94d196a --- /dev/null +++ b/gitweb/planet-lab.sed @@ -0,0 +1,6 @@ +s,@SITENAME@,git.planet-lab, +s,@LOGO@,planet-lab-logo, +s,@FAVICON@,planet-lab-favicon, +s,@LOGOURL@,http://www.planet-lab.org, +s,@LOGOLABEL@,PlanetLab, +s,@GITURL@,git://git.planet-lab.org,