From: Eric S. Raymond Date: Fri, 13 Jul 2007 13:52:02 +0000 (+0000) Subject: Reorganization. X-Git-Tag: 1.4~6 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=a4acb19616197ced530e302cddd7cce116ca6f02;p=sccs2rcs.git Reorganization. --- diff --git a/sccs2rcs b/sccs2rcs index 1289bec..9994bf3 100755 --- a/sccs2rcs +++ b/sccs2rcs @@ -164,6 +164,25 @@ if __name__ == '__main__': 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 @@ -184,25 +203,6 @@ if __name__ == '__main__': 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")):