require_once 'session.ppp' ;
require_once 'local.ppp' ;
require_once 'conf.ppp' ;
require_once 'baselib.ppp' ;
require_once 'wwwsec.ppp' ;
require_once 'librepo.ppp' ;
# $DEBUG = 2 ;
get_config () ;
$conn = db_connect_or_die () ;
test_login () ;
if ( $ADM = GETVAR ( 'ADM' ) ) { switch_actv ( $ADM ) ; }
$organisation = Conf ( 'organisation' ) ;
$www_server = Conf ( 'www_server' ) ;
$www_scheme = Conf ( 'www_scheme' ) ;
$contact = Conf ( 'www_contact' ) ;
$subv_url = URL ( "$www_scheme://$www_server/", $www_server ) ;
$cnt_repos = cnt_repos ( '', '' ) ;
function namref ( $n, $t ) { return URL ( "#$n", $t ) ; }
function gen_user_txt ()
{ $clases = Conf ( 'clases' ) ;
$cnt = count ( $clases ) ;
$ses = ( $cnt == 1 ? '' : 'es' ) ;
$res = sprintf ( "This repocafe has %d user class%s :", $cnt, $ses ) ;
$trs = TR ( TH ( 'class' ) . TH ( 'description' ) ) ;
foreach ( $clases as $clas => $uclas )
{ $trs .= TR ( TD ( $clas ) . TD ( $uclas -> dscr ) ) ; }
return $res . BQ ( TAB ( $trs ) ) ;
}
function flatten_list ( $lst )
{ $res = '' ;
$cnt = count ( $lst ) ;
if ( $cnt == 1 )
{ $res = $lst [ 0 ] ; }
elseif ( $cnt )
{ $last = array_pop ( $lst ) ;
$res = sprintf
( "%s and %s"
, implode ( ', ', $lst )
, $last
) ;
}
return $res ;
}
function gen_tree_txt ()
{ $clases = Conf ( 'clases' ) ;
$trees = Conf ( 'trees' ) ;
$creas = array () ;
$trs = TR
( TH ( 'part' )
. TH ( 'full repo name' )
. TH ( "repo's can be created by" )
) ;
$repo = new Repo ;
$hv_o = 0 ;
foreach ( $trees as $path => $tree )
{ $repo -> side = $path ;
$repo -> ownr = 'owner' ;
$repo -> name = 'name' ;
$name = $repo -> repo_name ( 'red' ) ;
$hv_o = $hv_o || preg_match ( '/%o/', $tree -> pref ) ;
$crea = array () ;
foreach ( array_keys ( $tree -> crea ) as $clas )
{ $dscr = $clases [ $clas ] -> dscr ;
$crea [] = $dscr ;
$creas [ ITA ( $dscr ) ] ++ ;
}
if ( count ( $crea ) )
{ sort ( $crea ) ;
$ctxt = implode ( "
\n", $crea ) ;
if ( ! $d0 ) { $d0 = $crea [ 0 ] ; $n0 = $name ; }
}
else
{ $ctxt = SPN ( "svn admins ; on request", 'red' ) ; }
$trs .= TR ( TD ( $path ) . TD ( $name ) . TD ( $ctxt ) ) ;
}
$creas_txt = 'svn-admins, on request' ;
if ( count ( $creas ) )
{ ksort ( $creas ) ;
$creas_txt = flatten_list ( array_keys ( $creas ) ) ;
}
$tab = BQ ( TAB ( $trs ) ) ;
$res = "the repository name space " ;
if ( ( $cnt = count ( $trees ) ) == 1 )
{ return array
( "$res is flat :" . $tab
, $creas_txt
) ;
}
$res .= "has $cnt parts :\n" ;
$res .= $tab ;
if ( $hv_o )
{ $holi = LI
( SPN ( 'owner', 'red' ) . " is the login-name "
. "of the creator of the repository"
) ;
}
$res .= "where ...\n" ;
$res .= UL
( $holi
. LI ( SPN ( 'name', 'red' ) . ' '
. 'can be chosen by the owner/creator' )
) ;
$res .= "
Users in different classes, can create repositories in "
. "different parts." ;
if ( $d0 )
{ $res .= "
\nFor instance, $d0 can create repositories "
. "with names like
$n0" ; } return array ( $res, $creas_txt ) ; } $user_txt = gen_user_txt () ; list ( $tree_txt, $creas_txt ) = gen_tree_txt () ; if ( Conf () -> have_guests () ) { $li_guests = LI ( 'In this repocafe, ' . "guest accounts can be created.\n" ) ; if ( $creag = Conf ( 'creag' ) ) { $tmp = array () ; foreach ( $creag as $clas => $uclas ) { $tmp [] = ITA ( $uclas -> dscr ) ; } $lst = implode ( ', ', $tmp ) ; $li_guests_crea = LI ( "Guest accounts can also be created by : $lst.\n" ) ; } } else { $li_guests = LI ( 'In this repocafe, ' . 'guest accounts ' . SPN ( "can't be created", 'red' ) . ".\n" . "The points below are just for your information." ) ; } if ( ! Conf ( 'has_groups' ) ) { $li_groups = LI ( 'In this repocafe, ' . 'groups ' . SPN ( "can't be created", 'red' ) . ".\n" . "The points below are just for your information." ) ; } $top_rules_usage = Conf ( 'top_rules_usage' ) ; $aux_rules_usage = Conf ( 'aux_rules_usage' ) ; $top_statistics = Conf ( 'top_statistics' ) ; $aux_statistics = Conf ( 'aux_statistics' ) ; $TIT = REPO_TIT ( 'documentation' ) ; html_start ( $TIT ) ; if ( file_exists ( 'images/tots.png' ) ) { $img = '' . "\n" ; echo URL ( "#s", $img ) ; $img_stats = BQ ( '' ) ; } echo H4 ( 'contents' ) ; echo "
\n" ; echo "" ; echo UL ( LI ( namref ( '1', 'general' ) ) . LI ( namref ( '2', 'repository name space' ) ) . LI ( namref ( '3', 'repository properties' ) ) . LI ( namref ( 'p', 'path rights & permissions' ) ) . LI ( namref ( '4', 'using the repository service' ) . UL ( LI ( namref ( '41', 'creating a repository' ) ) . LI ( namref ( '42', 'migration : (up)loading a repository' ) ) ) ) . LI ( namref ( '5', 'guests' ) ) . LI ( namref ( '6', 'user groups' ) ) . LI ( namref ( '7', 'rules - usage' ) ) . LI ( namref ( '8', 'rules - cleanup' ) ) . LI ( namref ( 's', 'statistics' ) ) . LI ( namref ( 'c', 'contact' ) ) ) ; echo "
$www_scheme://$www_server/repos/staff.henkp.jinx
svn checkout $www_scheme://$www_server/repos/staff.henkp.jinxthis creates your local copy of the repository staff.henkp.jinx
cd staff.henkp.jinx svn mkdir aap vi aap/noot svn add aap/noot
svn commit -m 'added some aap noot mies'You should receive some mail about the changes that you made.
$www_scheme://$www_server/repos/staff.henkp.jinxyou should see your stuff in the $www_server repository.