]> Git repositories of Nishi - repoview.git/commitdiff
it works
authorNishi <nishi@nishi.boats>
Wed, 21 Aug 2024 15:39:47 +0000 (15:39 +0000)
committerNishi <nishi@nishi.boats>
Wed, 21 Aug 2024 15:39:47 +0000 (15:39 +0000)
git-svn-id: file:///raid/svn-personal/repoview/trunk@16 7e8b2a19-8934-dd40-8cb3-db22cdd5a80f

CGI/repo.c
CGI/theme/modern.c

index 27e506bc61dd80430bb3395a0c3106d25e72582e..2c96e0f432225b11d69372730daf6011a1df38a0 100644 (file)
@@ -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);
index 836d05ce5cb83c8317d1032d3592d8d6e4f610dd..ac9ac764be45c69c2dcd617d28a6e771a27c1e85 100644 (file)
@@ -486,6 +486,7 @@ void render_page(void) {
                                free(showrepo);
                                free(showreadme);
 #ifdef WWW_SVN_ROOT
+                               add_data(&nav, "<li><a href=\"#repoinfo\">Info</a></li>\n");
                                add_data(&page, "<h2 id=\"repoinfo\">Info</h2>\n");
                                add_data(&page, "<a href=\"");
                                add_data(&page, WWW_SVN_ROOT);