Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'calm/mkgitoliteconf.py')
-rwxr-xr-xcalm/mkgitoliteconf.py54
1 files changed, 27 insertions, 27 deletions
diff --git a/calm/mkgitoliteconf.py b/calm/mkgitoliteconf.py
index a7d7cf6..e75621d 100755
--- a/calm/mkgitoliteconf.py
+++ b/calm/mkgitoliteconf.py
@@ -47,31 +47,31 @@ def transform_username(name):
#
#
-def do_main(args):
+def do_main(pkglist, file=sys.stdout):
# Get per-package list of maintainers
- pkgs = maintainers.pkg_list(args.pkglist)
+ pkgs = maintainers.pkg_list(pkglist)
# header
- print("# automatically generated by mkgitoliteconf")
+ print("# automatically generated by mkgitoliteconf", file=file)
# global configuration
- print('')
- print('@leads = %s' % ' '.join(map(transform_username, common_constants.TRUSTEDMAINT.split('/'))))
- print('')
- print('repo @all')
- print(' RW = @leads')
- print(' RW+ playground$ = @all')
- print('# anyone can create, push, rewind or delete the \'playground\' branch')
- print(' R = @all')
- print(' R = gitweb daemon')
- print(' config core.sharedrepository = all')
- print(' config uploadpack.allowReachableSHA1InWant = true')
- print(' config receive.advertisePushOptions = true')
- print(' - VREF/MAX_NEWBIN_SIZE/1024 = @all')
- print('# this rejects binary files over the size limit, text files of any size are still permiited')
- print(' - VREF/HIGHLANDER/cygport = @all')
- print('# this checks for trees which contain more than one .cygport file')
- print('')
+ print('', file=file)
+ print('@leads = %s' % ' '.join(map(transform_username, common_constants.TRUSTEDMAINT.split('/'))), file=file)
+ print('', file=file)
+ print('repo @all', file=file)
+ print(' RW = @leads', file=file)
+ print(' RW+ playground$ = @all', file=file)
+ print('# anyone can create, push, rewind or delete the \'playground\' branch', file=file)
+ print(' R = @all', file=file)
+ print(' R = gitweb daemon', file=file)
+ print(' config core.sharedrepository = all', file=file)
+ print(' config uploadpack.allowReachableSHA1InWant = true', file=file)
+ print(' config receive.advertisePushOptions = true', file=file)
+ print(' - VREF/MAX_NEWBIN_SIZE/1024 = @all', file=file)
+ print('# this rejects binary files over the size limit, text files of any size are still permiited', file=file)
+ print(' - VREF/HIGHLANDER/cygport = @all', file=file)
+ print('# this checks for trees which contain more than one .cygport file', file=file)
+ print('', file=file)
# for each package
for p in sorted(pkgs):
@@ -86,14 +86,14 @@ def do_main(args):
if pkg.is_orphaned():
owner = 'ORPHANED'
- print("repo git/cygwin-packages/%s" % (p))
- print("C = %s @leads" % (users))
+ print("repo git/cygwin-packages/%s" % (p), file=file)
+ print("C = %s @leads" % (users), file=file)
if users:
- print("RW master$ = %s" % (users))
- print("RW refs/tags/ = %s" % (users))
+ print("RW master$ = %s" % (users), file=file)
+ print("RW refs/tags/ = %s" % (users), file=file)
if owner:
- print("owner = %s" % (owner))
- print("")
+ print("owner = %s" % (owner), file=file)
+ print("", file=file)
#
@@ -107,7 +107,7 @@ def main():
parser.add_argument('--pkglist', action='store', metavar='FILE', help="package maintainer list (default: " + pkglist_default + ")", default=pkglist_default)
(args) = parser.parse_args()
- do_main(args)
+ do_main(args.pkglist)
return 0