make sure gl-perms exists, even if it is empty...
I expect this to help if we optimise the rule generation by caching.
This commit is contained in:
parent
70ad045e08
commit
be61cd2d66
|
@ -48,6 +48,7 @@ echo "$from forked to $to" >&2
|
||||||
cd $GL_REPO_BASE/$to.git
|
cd $GL_REPO_BASE/$to.git
|
||||||
echo $GL_USER > gl-creator
|
echo $GL_USER > gl-creator
|
||||||
|
|
||||||
|
touch gl-perms
|
||||||
if gitolite query-rc -q DEFAULT_ROLE_PERMS
|
if gitolite query-rc -q DEFAULT_ROLE_PERMS
|
||||||
then
|
then
|
||||||
gitolite query-rc DEFAULT_ROLE_PERMS > gl-perms
|
gitolite query-rc DEFAULT_ROLE_PERMS > gl-perms
|
||||||
|
|
|
@ -191,7 +191,7 @@ sub new_wild_repo {
|
||||||
trigger( 'PRE_CREATE', $repo, $user, $aa );
|
trigger( 'PRE_CREATE', $repo, $user, $aa );
|
||||||
new_repo($repo);
|
new_repo($repo);
|
||||||
_print( "$repo.git/gl-creator", $user );
|
_print( "$repo.git/gl-creator", $user );
|
||||||
_print( "$repo.git/gl-perms", "$rc{DEFAULT_ROLE_PERMS}\n" ) if $rc{DEFAULT_ROLE_PERMS};
|
_print( "$repo.git/gl-perms", ( $rc{DEFAULT_ROLE_PERMS} ? "$rc{DEFAULT_ROLE_PERMS}\n" : "" ) );
|
||||||
trigger( 'POST_CREATE', $repo, $user, $aa );
|
trigger( 'POST_CREATE', $repo, $user, $aa );
|
||||||
|
|
||||||
_chdir( $rc{GL_ADMIN_BASE} );
|
_chdir( $rc{GL_ADMIN_BASE} );
|
||||||
|
|
3
t/fork.t
3
t/fork.t
|
@ -61,7 +61,8 @@ try "
|
||||||
|
|
||||||
my $t;
|
my $t;
|
||||||
try "cd $rb; find . -name gl-perms"; $t = md5sum(sort (lines())); cmp $t,
|
try "cd $rb; find . -name gl-perms"; $t = md5sum(sort (lines())); cmp $t,
|
||||||
'59b3a74b4d33c7631f08e75e7b60c7ce ./foo/u1/u1a2.git/gl-perms
|
'd41d8cd98f00b204e9800998ecf8427e ./foo/u1/u1a.git/gl-perms
|
||||||
|
59b3a74b4d33c7631f08e75e7b60c7ce ./foo/u1/u1a2.git/gl-perms
|
||||||
59b3a74b4d33c7631f08e75e7b60c7ce ./foo/u1/u1e.git/gl-perms
|
59b3a74b4d33c7631f08e75e7b60c7ce ./foo/u1/u1e.git/gl-perms
|
||||||
';
|
';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue