}
}
-sub rcs_ad ($) {
+sub rcs_add ($) {
my $file=shift;
if (-d "$srcdir/.svn") {
- if (system("svn", "add", "--quiet", $file) != 0) {
+ my $parent=dirname($file);
+ while (! -d "$srcdir/$parent/.svn") {
+ $file=$parent;
+ $parent=dirname($file);
+ }
+
+ if (system("svn", "add", "--quiet", "$srcdir/$file") != 0) {
warn("svn add failed\n");
}
}
$page=~/$wiki_file_prune_regexp/ || $page=~/^\//) {
error("bad page name");
}
+ $page=lc($page);
my $action=$q->request_uri;
$action=~s/\?.*//;
}
my @page_locs;
- my $default_loc="";
my ($from)=$q->param('from')=~/$wiki_file_regexp/;
if (! defined $from || ! length $from ||
$from ne $q->param('from') ||
@page_locs=$page;
}
else {
- @page_locs="$from/$page";
- $from=dirname($from);
+ my $dir=$from."/";
+ $dir=~s![^/]+/$!!;
+ push @page_locs, $dir.$page;
push @page_locs, "$from/$page";
- $default_loc="$from/$page";
- while (length $from) {
- $from=dirname($from);
- push @page_locs, "$from/$page";
+ while (length $dir) {
+ $dir=~s![^/]+/$!!;
+ push @page_locs, $dir.$page;
}
}
$q->h1("$wikiname: Creating $page"),
$q->start_form(-action => $action),
$q->hidden('do'),
- $q->popup_menu('page', \@page_locs, $default_loc),
+ "Select page location:",
+ $q->popup_menu('page', \@page_locs),
$q->textarea(-name => 'content',
-default => "",
-rows => 20,
-columns => 80),
$q->br,
- "Optional comment about this change",
+ "Optional comment about this change:",
$q->br,
$q->textfield(-name => "comments", -size => 80),
$q->br,
-rows => 20,
-columns => 80),
$q->br,
- "Optional comment about this change",
+ "Optional comment about this change:",
$q->br,
$q->textfield(-name => "comments", -size => 80),
$q->br,