From 51e97ba54c008632569da13822899bbd8118e3f8 Mon Sep 17 00:00:00 2001 From: Nishi Date: Wed, 21 Aug 2024 15:39:47 +0000 Subject: [PATCH] it works git-svn-id: file:///raid/svn-personal/repoview/trunk@16 7e8b2a19-8934-dd40-8cb3-db22cdd5a80f --- CGI/repo.c | 10 +++++++++- CGI/theme/modern.c | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CGI/repo.c b/CGI/repo.c index 27e506b..2c96e0f 100644 --- a/CGI/repo.c +++ b/CGI/repo.c @@ -97,8 +97,16 @@ void rv_create_repo(const char* repouser) { char* path = rv_strcat3(SVN_ROOT, "/", repouser); char* cmd[] = {"svnadmin", "create", path, NULL}; null_exec(cmd); + + char* readme = rv_strcat(path, "/README.txt"); + FILE* f = fopen(readme, "w"); + fprintf(f, "This is the default README of the RepoView repository.\n"); + fprintf(f, "You can change it from the repository manager.\n"); + fclose(f); + free(readme); + free(path); - FILE* f = fopen(APACHE_AUTHZ, "r+"); + f = fopen(APACHE_AUTHZ, "r+"); lockf(fileno(f), F_LOCK, 0); fseek(f, 0, SEEK_END); diff --git a/CGI/theme/modern.c b/CGI/theme/modern.c index 836d05c..ac9ac76 100644 --- a/CGI/theme/modern.c +++ b/CGI/theme/modern.c @@ -486,6 +486,7 @@ void render_page(void) { free(showrepo); free(showreadme); #ifdef WWW_SVN_ROOT + add_data(&nav, "
  • Info
  • \n"); add_data(&page, "

    Info

    \n"); add_data(&page, "