summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-04-20 00:59:24 (GMT)
committerBarry Warsaw <barry@python.org>2003-04-20 00:59:24 (GMT)
commit334df6c597951fcb5c67b249540c420371b36bdc (patch)
treec3e827f1fbc664bc9c95527135f37e32a2705a18 /Tools/scripts
parent1aca359e895d6cc8cc366fd8d8d0edbef13a5a13 (diff)
downloadcpython-334df6c597951fcb5c67b249540c420371b36bdc.zip
cpython-334df6c597951fcb5c67b249540c420371b36bdc.tar.gz
cpython-334df6c597951fcb5c67b249540c420371b36bdc.tar.bz2
Finally added a -h option to print the module docstring and exit. ;)
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/logmerge.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Tools/scripts/logmerge.py b/Tools/scripts/logmerge.py
index f6766d2..977324d 100755
--- a/Tools/scripts/logmerge.py
+++ b/Tools/scripts/logmerge.py
@@ -28,9 +28,10 @@ output to checkin messages belonging to the CVS head (trunk). (It
produces some output if tag is a non-branch tag, but this output is
not very useful.)
+-h prints this message and exits.
+
XXX This code was created by reverse engineering CVS 1.9 and RCS 5.7
from their output.
-
"""
import os, sys, getopt, re
@@ -43,7 +44,7 @@ def main():
truncate_last = 0
reverse = 0
branch = None
- opts, args = getopt.getopt(sys.argv[1:], "trb:")
+ opts, args = getopt.getopt(sys.argv[1:], "trb:h")
for o, a in opts:
if o == '-t':
truncate_last = 1
@@ -51,6 +52,9 @@ def main():
reverse = 1
elif o == '-b':
branch = a
+ elif o == '-h':
+ print __doc__
+ sys.exit(0)
database = []
while 1:
chunk = read_chunk(sys.stdin)