if switch == '-c':
comments = val
+ # User may have supplied a comments file
+ initstrings = {}
+ if comments:
+ for line in open(comments):
+ try:
+ line = line.strip()
+ if not line: # ignore blank lines
+ continue
+ (filename, initstring) = line.split(":")
+ except ValueError:
+ die("ill-formed line '%s' in comments file" % line)
+ if filename in initstrings:
+ die("duplicate filename in initstrings")
+ initstrings[filename] = initstrings
+
+ # If the CSSC package is installed, the SCCS commands might be here.
+ # This assumption works under Debian/Ubuntu and will be harmless elsewhere.
+ os.environ["PATH"] += ":/usr/lib/cssc"
+
logtext = ""
# Sanity checks on the directory
except OSError:
die("failed while attempting to create RCS directory.")
- # User may have supplied a comments file
- initstrings = {}
- if comments:
- for line in open(comments):
- try:
- line = line.strip()
- if not line: # ignore blank lines
- continue
- (filename, initstring) = line.split(":")
- except ValueError:
- die("ill-formed line '%s' in comments file" % line)
- if filename in initstrings:
- die("duplicate filename in initstrings")
- initstrings[filename] = initstrings
-
- # If the CSSC package is installed, the SCCS commands might be here.
- # This assumption works under Debian/Ubuntu and will be harmless elsewhere.
- os.environ["PATH"] += ":/usr/lib/cssc"
-
# Loop over every s-file in SCCS dir
workfiles = []
for master in filter(lambda f: f.startswith("s."), os.listdir("SCCS")):