#
# Read an overall config file.
#
-def ConfigFile (name):
+
+def ConfigFile (name, confdir):
try:
file = open (name, 'r')
except IOError:
if len (sline) < 2:
croak ('Funky config line: "%s"' % (line))
if sline[0] == 'EmailAliases':
- ReadEmailAliases (sline[1])
+ ReadEmailAliases (confdir + sline[1])
elif sline[0] == 'EmailMap':
- ReadEmailEmployers (sline[1])
+ ReadEmailEmployers (confdir + sline[1])
elif sline[0] == 'GroupMap':
if len (sline) != 3:
croak ('Funky group map line "%s"' % (line))
- ReadGroupMap (sline[1], sline[2])
+ ReadGroupMap (confdir + sline[1], sline[2])
else:
croak ('Unrecognized config line: "%s"' % (line))
line = ReadConfigLine (file)
-a If a patch contains signoff lines from both Andrew Morton
and Linus Torvalds, omit Linus's.
+ -b dir Specify the base directory to fetch the configuration files.
+
-c file Specify the name of the gitdm configuration file.
By default, "./gitdm.config" is used.
AkpmOverLt = 0
DumpDB = 0
CFName = 'gitdm.config'
+DirName = ''
+
#
# Options:
#
# -a Andrew Morton's signoffs shadow Linus's
+# -b dir Specify the base directory to fetch the configuration files
# -c cfile Specify a configuration file
# -d Output individual developer stats
# -D Output date statistics
def ParseOpts ():
global MapUnknown, DevReports
global DateStats, AuthorSOBs, FileFilter, AkpmOverLt, DumpDB
- global CFName, CSVFile
+ global CFName, CSVFile, DirName
- opts, rest = getopt.getopt (sys.argv[1:], 'adc:Dh:l:o:r:sux:z')
+ opts, rest = getopt.getopt (sys.argv[1:], 'ab:dc:Dh:l:o:r:sux:z')
for opt in opts:
if opt[0] == '-a':
AkpmOverLt = 1
+ elif opt[0] == '-b':
+ DirName = opt[1]
elif opt[0] == '-c':
CFName = opt[1]
elif opt[0] == '-d':
#
# Read the config files.
#
-ConfigFile.ConfigFile (CFName)
+ConfigFile.ConfigFile (CFName, DirName)
#
# Let's pre-seed the database with a couple of hackers