diff options
author | Guido van Rossum <guido@python.org> | 2000-02-14 21:41:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-02-14 21:41:50 (GMT) |
commit | d96287830992142389dc34c0524b480bedbab9e3 (patch) | |
tree | c6a0e05b53f40317697f9f61ab19b35cf4775719 /Tools | |
parent | 126960b7443905cccc54a9aa5ca8e1205762a0e7 (diff) | |
download | cpython-d96287830992142389dc34c0524b480bedbab9e3.zip cpython-d96287830992142389dc34c0524b480bedbab9e3.tar.gz cpython-d96287830992142389dc34c0524b480bedbab9e3.tar.bz2 |
Patch by Gerrit Holl:
* In logmerge.py: added '-r' flag to show the oldest checkin
first instead of the newest, and getopt.getopt was used
wrong.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/logmerge.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Tools/scripts/logmerge.py b/Tools/scripts/logmerge.py index c26df30..a09fd46 100755 --- a/Tools/scripts/logmerge.py +++ b/Tools/scripts/logmerge.py @@ -32,10 +32,13 @@ sep2 = '-'*28 + '\n' # revision separator def main(): """Main program""" truncate_last = 0 - opts, args = getopt.getopt(sys.argv[1:], "-t") + reverse = 0 + opts, args = getopt.getopt(sys.argv[1:], "tr") for o, a in opts: if o == '-t': truncate_last = 1 + elif o == '-r': + reverse = 1 database = [] while 1: chunk = read_chunk(sys.stdin) @@ -46,7 +49,8 @@ def main(): del records[-1] database[len(database):] = records database.sort() - database.reverse() + if not reverse: + database.reverse() format_output(database) def read_chunk(fp): |