From 82adf4c67647a08e31911ed8cbbc51e3fc2ab695 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sun, 26 Aug 2007 01:08:18 +0200 Subject: [PATCH] Clean up user-visible texts --- cgi/p/editproj.cgi | 8 ++++---- cgi/regproj.cgi | 39 ++++++++++++++++++++++----------------- cgi/reguser.cgi | 17 ++++++++--------- clone.sh | 5 ++++- 4 files changed, 38 insertions(+), 31 deletions(-) diff --git a/cgi/p/editproj.cgi b/cgi/p/editproj.cgi index cad9f67..0d01828 100755 --- a/cgi/p/editproj.cgi +++ b/cgi/p/editproj.cgi @@ -24,7 +24,7 @@ if (!Git::RepoCGI::Project::does_exist($name)) { } if (!Git::RepoCGI::Project::available($name)) { - print "

Sorry but your project has not finished mirroring yet. If it takes inordinate amount of time, please tell the administrator.

\n"; + print "

Sorry but your project has not finished mirroring yet. If it takes inordinate amount of time, please ask the administrator about it.

\n"; exit; } @@ -43,9 +43,9 @@ if ($cgi->param('email')) { my %h = $proj->form_defaults; print <Here you can adjust project settings. Go wild. +

Here you can adjust the settings of project $h{name}. Go wild. Though you can currently enable access only for a single user at a time -so perhaps you will need to click a lot.

+so perhaps you will need to click a lot. Sorry! (Patches welcome.)

Project name (w/o the .git suffix): $h{name}

Admin password: (leave empty to keep it at the current value)

@@ -60,7 +60,7 @@ EOT if ($proj->{mirror}) { print "

Warning: This is a mirrored repository, thus you cannot push into it. Changing the user set will have no practical effect.

\n"; } elsif (not grep { $_ eq 'mob' } @{$h{users}}) { - print "

(Please consider adding the mob user.[learn more])

\n"; + print "

(Please consider adding the mob user.(learn more))

\n"; } foreach my $user (@{$h{users}}) { print "
  • $user
  • \n"; diff --git a/cgi/regproj.cgi b/cgi/regproj.cgi index d8b8422..a76d4e2 100755 --- a/cgi/regproj.cgi +++ b/cgi/regproj.cgi @@ -20,29 +20,33 @@ if ($cgi->param('mode')) { my $name = $repo->wparam('name'); valid_proj_name($name) and Git::RepoCGI::Project::does_exist($name) - and $repo->err("Project with that name already exists."); + and $repo->err("Project with the name '$name' already exists."); $name =~ /\.git$/ - and $repo->err("Project name should not end with .git, I'll add that automagically."); + and $repo->err("Project name should not end with .git - I'll add that automagically."); + + ($cgi->{pwd} eq $cgi->{pwd2}) + or $repo->err("Our high-paid security consultants have determined that the admin passwords you have entered do not match each other."); my $mirror = $cgi->param('mode') eq 'mirror'; my $proj = Git::RepoCGI::Project->ghost($name, $mirror); if ($proj->cgi_fill($repo)) { if ($mirror) { $proj->premirror; - print "

    Initiated mirroring. You will be notified by mail about results.

    \n"; + print "

    Initiated mirroring. You will be notified about the result by mail.

    \n"; } else { $proj->conjure; print < -Project $name successfuly set up. -You can assign users now (use project name as username, admin password as password) -- don't forget to assign yourself as well! -You need to register a user first if you have not done so yet. +Project $name successfuly set up.

    +

    The push URL for the project is git+ssh://repo.or.cz/srv/git/$name.git.

    +

    You can assign users now (use project name (without .git) as username, admin password as password) +- don't forget to assign yourself as a user as well if you want to push! +Everyone who wants to push must register himself as a user first. (One user can have push access to multiple projects and multiple users can have push access to one project.)

    -

    The push URL for the project is git+ssh://repo.or.cz/srv/git/$name.git.

    +

    Note that you cannot clone an empty repository since it contains no branches; you need to make the first push from an existing repository.

    You may experience permission problems if you try to push right now. -If so, that should get fixed automagically in few minutes.

    +If so, that should get fixed automagically in few minutes, please be patient.

    Enjoy yourself!

    EOT } @@ -53,22 +57,22 @@ EOT print <Here you can register a project. It can be hosted in two modes: mirror mode and push mode. -In the first mode, we will check another repository at a given URL every hour and mirror any new updates. -In the second mode, registered users with appropriate permissions will be able to push to the repository. +In the mirror mode, our dedicated git monkeys will check another repository at a given URL every hour and mirror any new updates. +In the push mode, registered users with appropriate permissions will be able to push to the repository. You currently cannot switch freely between those two modes; -if you want to switch from mirroring to push mode, delete and recreate +if you want to switch from mirroring to push mode, just delete and recreate the project. If you want to switch the other way, please contact the administrator.

    -

    You will need the admin password to adjust project settings later +

    You will need the admin password to adjust the project settings later (mirroring URL, list of users allowed to push, project description, ...). -Use the project name as the username when asked by the browser.

    +Use the project name (without .git) as the username when asked by the browser.

    EOT unless ($name =~ m#/#) { print <Note that if your project is a fork of an existing project (this does not mean anything socially bad), please instead go to the project's -summary view and click the 'fork' link in the top bar. This way, both you and -we will save bandwidth and your project will be properly categorized. If your -project is a fork but the existing project is not registered here yet, please +gitweb page and click the 'fork' link in the top bar. This way, all of us +will save bandwidth and more importantly, your project will be properly categorized. +If your project is a fork but the existing project is not registered here yet, please consider registering it first; you do not have to be involved in the project in order to register it here as a mirror.

    EOT @@ -89,6 +93,7 @@ about the hosting and terms and conditions.

    Project name (w/o the .git suffix):

    Admin password:

    +

    Admin password (retype):

    E-mail contact:

    Hosting mode:

    • Mirror mode. Repository URL:
    • diff --git a/cgi/reguser.cgi b/cgi/reguser.cgi index 18649ba..9a4bcc4 100755 --- a/cgi/reguser.cgi +++ b/cgi/reguser.cgi @@ -23,9 +23,8 @@ if ($cgi->param('name')) { if ($user->cgi_fill($repo)) { $user->conjure; print < -User successfuly registered. -You (or whoever knows the project password) can assign it to a project now +

      User $name successfuly registered.

      +

      Project administrators can now assign you to have a push access to their projects (use project name as username, admin password as password). (One user can have push access to multiple projects and multiple users can have push access to one project.)

      @@ -37,12 +36,12 @@ EOT print <Here you can register a user. -You need to register a user so that it can be granted push access to project(s). -SSH is used for pushing (the git+ssh protocol) and what authenticates you is your SSH key - -there is no password (though we recommend that your SSH key is password-protected). -You can find your public key in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub; -if you do not have any yet, generate it using the ssh-keygen command. -You can paste multiple keys in the box below, if you wish, each on a separate line. +You need to register a user so that it can be granted project(s) push access.

      +

      SSH is used for pushing (the git+ssh protocol), your SSH key authenticates you - +there is no password (though we recommend that your SSH key is password-protected; use ssh-agent to help your fingers). +You can find your public key in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub. +If you do not have any yet, generate it using the ssh-keygen command. +You can paste multiple keys in the box below, each on a separate line. Paste each key including the ssh-whatever prefix and email-like postfix. Changing the keys later is not implemented yet - if you need to do that, please contact the administrator.

      We won't bother to verify your email contact, but fill in something sensible in your own interest diff --git a/clone.sh b/clone.sh index f9924c2..7888deb 100755 --- a/clone.sh +++ b/clone.sh @@ -46,7 +46,10 @@ GIT_DIR=/srv/git/"$proj".git bang git config --bool --add mirror.allowed true GIT_DIR=/srv/git/"$proj".git bang git update-server-info cd "$basedir" && rm -rf "$proj"/* && rmdir -p "$proj" # NO bang AT THIS POINT! rm -r depends on cwd. -echo "Congratulations! You can adjust the project settings in the future at http://repo.or.cz/m/p/editproj.cgi." | mail -s "[repo.or.cz] $proj clone completed" "$mail",pasky@ucw.cz +mail -s "[repo.or.cz] $proj clone completed" "$mail",pasky@ucw.cz <