Original unchanged history in ./SCCS.
"""
if logtext:
- print "Log follows:"
- print logtext
- print "Log ends here."
+ if logfile:
+ wfp = open(logfile, "w")
+ wfp.write(logtext)
+ wfp.close()
+ else:
+ print "Log follows:"
+ print logtext
+ print "Log ends here."
sys.exit(1)
def warn(msg):
if __name__ == '__main__':
comments = None
- (options, arguments) = getopt.getopt(sys.argv[1:], "c:")
+ logfile = None
+ (options, arguments) = getopt.getopt(sys.argv[1:], "c:l:")
for (switch, val) in options:
if switch == '-c':
comments = val
+ elif switch == '-l':
+ logfile = val
# User may have supplied a comments file
initstrings = {}
for filename in os.listdir("SCCS"):
if is_sccsmaster(master):
do_it("co " + rcsfile(workfile(master)))
+
+ if logfile:
+ wfp = open(logfile, "w")
+ wfp.write(logtext)
+ wfp.close()
+
progress("done.")
# sccs2rcs ends here
<cmdsynopsis>
<command>sccs2rcs</command>
<arg choice='opt'>-c <replaceable>commentfile</replaceable></arg>
+ <arg choice='opt'>-l <replaceable>logfile</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<para>If this tool fails it will tell you why. `rm -rf RCS; unget SCCS/s.*'
will recover your initial state.</para>
-<para>There is one option. With -c you can specify an initial-comments file.
+<para>With -c you can specify an initial-comments file.
Each line should consist of a filename followed by a colon, followed
by the RCS initial coment to set for that file.</para>
+
+<para>With -l you can make the command log be written to a specified
+file, whether the program fails or succeeds. This is mainly useful
+for debugging unusual situations.</para>
</refsect1>
<refsect1 id='returns'><title>ERROR RETURNS</title>