Merge teemu/topic/wildrepo_description_and_owner into wildrepos
This commit is contained in:
commit
767657c187
2 changed files with 29 additions and 2 deletions
|
@ -123,7 +123,10 @@ sub new_repo
|
|||
# erm, note that's "and die" not "or die" as is normal in perl
|
||||
wrap_chdir("$repo.git");
|
||||
system("git --bare init >&2");
|
||||
system("echo $creater > gl-creater") if $creater;
|
||||
if ($creater) {
|
||||
system("echo $creater > gl-creater");
|
||||
system("git", "config", "gitweb.owner", $creater);
|
||||
}
|
||||
# propagate our own, plus any local admin-defined, hooks
|
||||
system("cp $hooks_dir/* hooks/");
|
||||
chmod 0755, "hooks/update";
|
||||
|
@ -177,6 +180,26 @@ sub get_set_perms
|
|||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# getdesc and setdesc
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
sub get_set_desc
|
||||
{
|
||||
my($repo_base_abs, $repo, $verb, $user) = @_;
|
||||
my ($creater, $dummy, $dummy2) = &repo_rights($repo_base_abs, $repo, "");
|
||||
die "$repo doesnt exist or is not yours\n" unless $user eq $creater;
|
||||
wrap_chdir("$repo_base_abs");
|
||||
wrap_chdir("$repo.git");
|
||||
if ($verb eq 'getdesc') {
|
||||
system("cat", "description") if -f "description";
|
||||
} else {
|
||||
system("cat > description");
|
||||
print "New description is:\n";
|
||||
system("cat", "description");
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# parse the compiled acl
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue