gitolite/t/t02-user-groups
Sitaram Chamarty 10a30c961d (major change in big-config mode) split the compiled config file
Fedora's config has over 11,000 repositories and the compiled config
file is over 20 MB in size.  Although negligible on a server class
machine, on my laptop just parsing this file takes a good 2.5 seconds.

Even if you use GL_ALL_READ_ALL (see a couple of commits before this
one) to remove the overhead for 'read's, that's still a pretty big
overhead for writes.  And GL_ALL_READ_ALL is not really a solution for
most people anyway.

With this commit, using GL_BIG_CONFIG adds another optimisation; see
doc/big-config.mkd for details (look for the word "split config" to find
the section that talks about it).

----

Implementation notes:

  - the check for GL_NO_CREATE_REPOS has moved *into* the loop (which it
    completely bypassed earlier) so that write_1_compiled_conf can be
    called on each item
2011-01-02 11:30:29 +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
catconfs
expect_filesame $TESTDIR/out/t02-user-groups.1bs
# ----------
$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
catconfs
expect_filesame $TESTDIR/out/t02-user-groups.2bs
name INTERNAL