action/test1
changeset 269 a09f1bc9a6cf
parent 268 24145a4eb6fc
child 270 28b355b7390e
equal deleted inserted replaced
268:24145a4eb6fc 269:a09f1bc9a6cf
    15 hg clone ssh://chroothg/hgadmin
    15 hg clone ssh://chroothg/hgadmin
    16 echo "Updating hgadmin..."
    16 echo "Updating hgadmin..."
    17 cd hgadmin
    17 cd hgadmin
    18 
    18 
    19 cat > access.conf <<__END__
    19 cat > access.conf <<__END__
    20 read user=restricted/** file=special/**
    20 write user=restricted/** file=allowedhere/**
    21 write user=restricted/**
    21 read user=restricted/**
    22 __END__
    22 __END__
    23 mkdir -p keys/restricted
    23 mkdir -p keys/restricted
    24 cp /home/test2/.ssh/id_rsa.pub keys/restricted/test2
    24 cp /home/test2/.ssh/id_rsa.pub keys/restricted/test2
    25 
    25 
    26 hg add keys/restricted/test2 access.conf
    26 hg add keys/restricted/test2 access.conf
    29 hg push
    29 hg push
    30 cd ..
    30 cd ..
    31 mkdir realrepo
    31 mkdir realrepo
    32 cd realrepo
    32 cd realrepo
    33 hg init .
    33 hg init .
    34 echo "This is a file" > content
    34 mkdir allowedhere
    35 mkdir special
    35 echo "This is a file" > allowedhere/content
    36 echo "This is a file not everyone can write to" > special/cantwrite
    36 echo "This is a file not everyone can write to" > cantwrite
    37 hg add content special/cantwrite
    37 hg add allowedhere/content cantwrite
    38 hg commit -u test1 -m "Add a file to the repo"
    38 hg commit -u test1 -m "Add files to the repo"
    39 echo "Pushing changes"
    39 echo "Pushing changes"
    40 hg clone . ssh://chroothg/real/project
    40 hg clone . ssh://chroothg/real/project
    41 echo "Done for user test1"
    41 echo "Done for user test1"