Give meaningful name to gitweb projects.list generation.

Remove mentions of cancelled gitweb.conf generation from docstrings.
This commit is contained in:
Tommi Virtanen 2007-11-15 22:22:19 +02:00
parent a30645db52
commit 5bd5bd5bfc
3 changed files with 12 additions and 12 deletions

View file

@ -37,9 +37,9 @@ def _escape_filename(s):
s = s.replace('"', '\\"') s = s.replace('"', '\\"')
return s return s
def generate_fp(config, fp): def generate_project_list_fp(config, fp):
""" """
Generate a config file and projects list for ``gitweb``. Generate projects list for ``gitweb``.
:param config: configuration to read projects from :param config: configuration to read projects from
:type config: RawConfigParser :type config: RawConfigParser
@ -94,9 +94,9 @@ def generate_fp(config, fp):
line = ' '.join([urllib.quote_plus(s) for s in response]) line = ' '.join([urllib.quote_plus(s) for s in response])
print >>fp, line print >>fp, line
def generate(config, path): def generate_project_list(config, path):
""" """
Generate a config file and projects list for ``gitweb``. Generate projects list for ``gitweb``.
:param config: configuration to read projects from :param config: configuration to read projects from
:type config: RawConfigParser :type config: RawConfigParser

View file

@ -27,7 +27,7 @@ def post_update(cfg, git_dir):
os.path.join(export, 'gitosis.conf'), os.path.join(export, 'gitosis.conf'),
os.path.join(export, '..', 'gitosis.conf'), os.path.join(export, '..', 'gitosis.conf'),
) )
gitweb.generate( gitweb.generate_project_list(
config=cfg, config=cfg,
path=os.path.join(git_dir, 'projects.list'), path=os.path.join(git_dir, 'projects.list'),
) )

View file

@ -10,7 +10,7 @@ from gitosis.test.util import mkdir, maketemp
def test_projectsList_empty(): def test_projectsList_empty():
cfg = RawConfigParser() cfg = RawConfigParser()
got = StringIO() got = StringIO()
gitweb.generate_fp( gitweb.generate_project_list_fp(
config=cfg, config=cfg,
fp=got) fp=got)
eq(got.getvalue(), '''\ eq(got.getvalue(), '''\
@ -20,7 +20,7 @@ def test_projectsList_repoDenied():
cfg = RawConfigParser() cfg = RawConfigParser()
cfg.add_section('repo foo/bar') cfg.add_section('repo foo/bar')
got = StringIO() got = StringIO()
gitweb.generate_fp( gitweb.generate_project_list_fp(
config=cfg, config=cfg,
fp=got) fp=got)
eq(got.getvalue(), '''\ eq(got.getvalue(), '''\
@ -31,7 +31,7 @@ def test_projectsList_noOwner():
cfg.add_section('repo foo/bar') cfg.add_section('repo foo/bar')
cfg.set('repo foo/bar', 'gitweb', 'yes') cfg.set('repo foo/bar', 'gitweb', 'yes')
got = StringIO() got = StringIO()
gitweb.generate_fp( gitweb.generate_project_list_fp(
config=cfg, config=cfg,
fp=got) fp=got)
eq(got.getvalue(), '''\ eq(got.getvalue(), '''\
@ -44,7 +44,7 @@ def test_projectsList_haveOwner():
cfg.set('repo foo/bar', 'gitweb', 'yes') cfg.set('repo foo/bar', 'gitweb', 'yes')
cfg.set('repo foo/bar', 'owner', 'John Doe') cfg.set('repo foo/bar', 'owner', 'John Doe')
got = StringIO() got = StringIO()
gitweb.generate_fp( gitweb.generate_project_list_fp(
config=cfg, config=cfg,
fp=got) fp=got)
eq(got.getvalue(), '''\ eq(got.getvalue(), '''\
@ -60,7 +60,7 @@ def test_projectsList_multiple():
cfg.add_section('repo quux') cfg.add_section('repo quux')
cfg.set('repo quux', 'gitweb', 'yes') cfg.set('repo quux', 'gitweb', 'yes')
got = StringIO() got = StringIO()
gitweb.generate_fp( gitweb.generate_project_list_fp(
config=cfg, config=cfg,
fp=got) fp=got)
eq(got.getvalue(), '''\ eq(got.getvalue(), '''\
@ -81,7 +81,7 @@ def test_projectsList_multiple_globalGitwebYes():
# this is still hidden # this is still hidden
cfg.set('repo thud', 'gitweb', 'no') cfg.set('repo thud', 'gitweb', 'no')
got = StringIO() got = StringIO()
gitweb.generate_fp( gitweb.generate_project_list_fp(
config=cfg, config=cfg,
fp=got) fp=got)
eq(got.getvalue(), '''\ eq(got.getvalue(), '''\
@ -99,7 +99,7 @@ def test_projectsList_reallyEndsWithGit():
cfg.add_section('repo foo') cfg.add_section('repo foo')
cfg.set('repo foo', 'gitweb', 'yes') cfg.set('repo foo', 'gitweb', 'yes')
got = StringIO() got = StringIO()
gitweb.generate_fp( gitweb.generate_project_list_fp(
config=cfg, config=cfg,
fp=got) fp=got)
eq(got.getvalue(), '''\ eq(got.getvalue(), '''\