]> thyrsus.com Git - sccs2rcs.git/commitdiff
Reorganization.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 13 Jul 2007 13:52:02 +0000 (13:52 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 13 Jul 2007 13:52:02 +0000 (13:52 +0000)
sccs2rcs

index 1289bec750e613ce182805d5b28835abc3f1bb45..9994bf345f5e76ee73fbb6d8c816c699d8239edd 100755 (executable)
--- 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")):