Detecting the "default" partition wasn't working right.
git-svn-id: svn://10.0.0.236/trunk@9281 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f59b95da76
commit
8f441bb341
@ -73,7 +73,7 @@ foreach $f (@files) {
|
||||
print STDERR "GetT returned '$t' for '$repository/$f' branch '$b'\n";
|
||||
}
|
||||
if ($t eq "") {
|
||||
$t = "default";
|
||||
$t = $defaultid;
|
||||
}
|
||||
if (!defined $mode{$t} || $mode{$t} eq "Open") {
|
||||
next;
|
||||
|
||||
@ -130,12 +130,17 @@ while (@reprow = $repquery->fetchrow()) {
|
||||
print COMMITCHECK "# tweak things from there.\n\n";
|
||||
|
||||
$query = Query("select partitions.id,partitions.name,state,branches.name from partitions,branches where repositoryid = '$repid' and branches.id=branchid order by partitions.name");
|
||||
$founddefault = 0;
|
||||
while (@row = $query->fetchrow()) {
|
||||
($id,$name,$state,$branch) = (@row);
|
||||
$d = "\$";
|
||||
print COMMITCHECK $d . "mode{'$id'} = '$state';\n";
|
||||
print COMMITCHECK $d . "branch{'$id'} = '$branch';\n";
|
||||
print COMMITCHECK $d . "fullname{'$id'} = '$name';\n";
|
||||
if ($name eq 'default') {
|
||||
print COMMITCHECK $d . "defaultid = '$id';\n";
|
||||
$founddefault = 1;
|
||||
}
|
||||
if ($state ne "Open") {
|
||||
foreach $n ("blessed", "super") {
|
||||
print COMMITCHECK $d . "$n" . "{'$id'} = [";
|
||||
@ -153,6 +158,9 @@ while (@reprow = $repquery->fetchrow()) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$founddefault) {
|
||||
print COMMITCHECK $d . "defaultid = 'none';\n";
|
||||
}
|
||||
print COMMITCHECK "sub GetT {\n";
|
||||
print COMMITCHECK '($b,$_) = (@_);' . "\n";
|
||||
$query = Query("select branches.name,partitions.id from partitions,branches where repositoryid = '$repid' and state != 'Open' and branches.id = branchid order by branches.name");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user