You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/11/23 21:28:41 UTC
svn commit: r1038325 - /subversion/trunk/tools/dist/collect_sigs.py
Author: hwright
Date: Tue Nov 23 20:28:41 2010
New Revision: 1038325
URL: http://svn.apache.org/viewvc?rev=1038325&view=rev
Log:
Allow the collect sigs script to be used to generate the required config file.
* tools/dist/collect_sigs.py
(make_config): New.
(actions): New.
(): New section to run in command-line mode.
Modified:
subversion/trunk/tools/dist/collect_sigs.py
Modified: subversion/trunk/tools/dist/collect_sigs.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/collect_sigs.py?rev=1038325&r1=1038324&r2=1038325&view=diff
==============================================================================
--- subversion/trunk/tools/dist/collect_sigs.py (original)
+++ subversion/trunk/tools/dist/collect_sigs.py Tue Nov 23 20:28:41 2010
@@ -36,12 +36,43 @@
# also patch wayita to accept and then echo a privmsg?
#
+import sys, os
+
+def make_config():
+ 'Output a blank config file'
+
+ if os.path.exists('config.py'):
+ print "'config.py' already exists!'"
+ sys.exit(1)
+
+ conf = open('config.py', 'w')
+ conf.write("version = ''\n")
+ conf.write("sigdir = ''\n")
+ conf.write("filesdir = ''\n")
+ conf.close()
+
+ print "'config.py' generated"
+
+
+actions = { 'make_config' : make_config }
+
+
+if __name__ == '__main__':
+ if len(sys.argv) > 1:
+ if sys.argv[1] in actions:
+ actions[sys.argv[1]]()
+ sys.exit(0)
+
+
+# Stuff below this line is the web-facing side
+# ======================================================================
+
import cgi
import cgitb
cgitb.enable()
-import sys, os, string, subprocess, re
+import string, subprocess, re
try:
sys.path.append(os.path.dirname(sys.argv[0]))