aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Virtanen <tv@eagain.net>2007-11-15 22:22:19 +0200
committerTommi Virtanen <tv@eagain.net>2007-11-15 22:22:19 +0200
commit5bd5bd5bfcf6215e7120f12ed68118667c762c79 (patch)
treea89a5036410c05f9658f38cc586c4fbd3ac0ca93
parentRemove TODO to create gitweb.conf, that would be a security issue. (diff)
downloadgitosis-dakkar-5bd5bd5bfcf6215e7120f12ed68118667c762c79.tar.gz
gitosis-dakkar-5bd5bd5bfcf6215e7120f12ed68118667c762c79.tar.bz2
gitosis-dakkar-5bd5bd5bfcf6215e7120f12ed68118667c762c79.zip
Give meaningful name to gitweb projects.list generation.
Remove mentions of cancelled gitweb.conf generation from docstrings.
-rw-r--r--gitosis/gitweb.py8
-rw-r--r--gitosis/run_hook.py2
-rw-r--r--gitosis/test/test_gitweb.py14
3 files changed, 12 insertions, 12 deletions
diff --git a/gitosis/gitweb.py b/gitosis/gitweb.py
index 419cc39..73c255d 100644
--- a/gitosis/gitweb.py
+++ b/gitosis/gitweb.py
@@ -37,9 +37,9 @@ def _escape_filename(s):
s = s.replace('"', '\\"')
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
:type config: RawConfigParser
@@ -94,9 +94,9 @@ def generate_fp(config, fp):
line = ' '.join([urllib.quote_plus(s) for s in response])
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
:type config: RawConfigParser
diff --git a/gitosis/run_hook.py b/gitosis/run_hook.py
index d249db1..d5dd4ab 100644
--- a/gitosis/run_hook.py
+++ b/gitosis/run_hook.py
@@ -27,7 +27,7 @@ def post_update(cfg, git_dir):
os.path.join(export, 'gitosis.conf'),
os.path.join(export, '..', 'gitosis.conf'),
)
- gitweb.generate(
+ gitweb.generate_project_list(
config=cfg,
path=os.path.join(git_dir, 'projects.list'),
)
diff --git a/gitosis/test/test_gitweb.py b/gitosis/test/test_gitweb.py
index 61a3d3e..ca42a76 100644
--- a/gitosis/test/test_gitweb.py
+++ b/gitosis/test/test_gitweb.py
@@ -10,7 +10,7 @@ from gitosis.test.util import mkdir, maketemp
def test_projectsList_empty():
cfg = RawConfigParser()
got = StringIO()
- gitweb.generate_fp(
+ gitweb.generate_project_list_fp(
config=cfg,
fp=got)
eq(got.getvalue(), '''\
@@ -20,7 +20,7 @@ def test_projectsList_repoDenied():
cfg = RawConfigParser()
cfg.add_section('repo foo/bar')
got = StringIO()
- gitweb.generate_fp(
+ gitweb.generate_project_list_fp(
config=cfg,
fp=got)
eq(got.getvalue(), '''\
@@ -31,7 +31,7 @@ def test_projectsList_noOwner():
cfg.add_section('repo foo/bar')
cfg.set('repo foo/bar', 'gitweb', 'yes')
got = StringIO()
- gitweb.generate_fp(
+ gitweb.generate_project_list_fp(
config=cfg,
fp=got)
eq(got.getvalue(), '''\
@@ -44,7 +44,7 @@ def test_projectsList_haveOwner():
cfg.set('repo foo/bar', 'gitweb', 'yes')
cfg.set('repo foo/bar', 'owner', 'John Doe')
got = StringIO()
- gitweb.generate_fp(
+ gitweb.generate_project_list_fp(
config=cfg,
fp=got)
eq(got.getvalue(), '''\
@@ -60,7 +60,7 @@ def test_projectsList_multiple():
cfg.add_section('repo quux')
cfg.set('repo quux', 'gitweb', 'yes')
got = StringIO()
- gitweb.generate_fp(
+ gitweb.generate_project_list_fp(
config=cfg,
fp=got)
eq(got.getvalue(), '''\
@@ -81,7 +81,7 @@ def test_projectsList_multiple_globalGitwebYes():
# this is still hidden
cfg.set('repo thud', 'gitweb', 'no')
got = StringIO()
- gitweb.generate_fp(
+ gitweb.generate_project_list_fp(
config=cfg,
fp=got)
eq(got.getvalue(), '''\
@@ -99,7 +99,7 @@ def test_projectsList_reallyEndsWithGit():
cfg.add_section('repo foo')
cfg.set('repo foo', 'gitweb', 'yes')
got = StringIO()
- gitweb.generate_fp(
+ gitweb.generate_project_list_fp(
config=cfg,
fp=got)
eq(got.getvalue(), '''\