gitolite/t/t02-user-groups
Sitaram Chamarty 6e2db12302 allow @groups in setperms command also
This should hopefully be the final step in making wildrepos as close to
normal repos as possible.  You can now do pretty much anything with them
that you can do with normal repos [1]

Implementation notes:

  - compile puts out %groups into the compiled config file regardless of
    GL_BIG_CONFIG because this feature needs it
  - wild_repo_rights caches %groups because the part of the %groups hash
    we care about will not change between calls in the same run

----

[1] **except** use the full-blown config file syntax within the gl-perms
    file :-)  I don't plan to do that; it's too complicated! [2]

[2] yeah yeah I know -- famous last words!
2010-08-21 13:04:13 +05:30

67 lines
1.1 KiB
Plaintext

# vim: syn=sh:
# ----------
$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 0
name "base output with no groups"
echo "
repo aa
RW+ = u1
RW = u2 u3
" | ugc
catconf
expect_filesame $TESTDIR/out/t02-user-groups.1
# ----------
$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 0
name "output with eqvt user groups"
echo "
@g1 = u1
@g2 = u2 u3
@g3 = u4 u5 u6
repo aa
RW+ = @g1
RW = @g2
" | ugc
catconf
expect_filesame $TESTDIR/out/t02-user-groups.1b
# ----------
$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 1
name "base output with no groups but GL_BIG_CONFIG on"
echo "
repo aa
RW+ = u1
RW = u2 u3
" | ugc
catconf
expect_filesame $TESTDIR/out/t02-user-groups.1
# ----------
$TESTDIR/rollback || die "rollback failed"
editrc GL_BIG_CONFIG 1
name "user groups with GL_BIG_CONFIG on"
echo "
@g1 = u1
@g2 = u2 u3
@g3 = u4 u5 u6
repo aa
RW+ = @g1
RW = @g2
" | ugc
catconf
expect_filesame $TESTDIR/out/t02-user-groups.2
name INTERNAL