From 4e7b137737eef29dac9edc3091d37bd95985dffa Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Wed, 28 Feb 2024 13:43:50 -0700 Subject: [PATCH] inittags: some updates Bring it into the 6.x world --- inittags | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/inittags b/inittags index 81161cb..44a2f08 100755 --- a/inittags +++ b/inittags @@ -1,4 +1,4 @@ -#!/usr/bin/pypy +#!/usr/bin/python # -*- python -*- # # Generate a database of commits and major versions they went into. @@ -52,7 +52,7 @@ if args.load: DB = pickle.load(open(args.database, 'r')) else: DB = { } -out = open(args.database, 'w') +out = open(args.database, 'wb') if args.repository: os.chdir(args.repository) @@ -75,11 +75,14 @@ GetCommits('v3.19..v4.0', 'v4.0') for v in range(1, 21): GetCommits('v4.%d..v4.%d' % (v - 1, v), 'v4.%d' % (v)) GetCommits('v4.20..v5.0', 'v5.0') -final = args.version -for v in range(1, final): +for v in range(1, 20): GetCommits('v5.%d..v5.%d' % (v - 1, v), 'v5.%d' % (v)) -GetCommits('v5.%d..' % (final - 1), 'v5.%d' % (final)) +GetCommits('v5.19..v6.0', 'v6.0') +final = args.version +for v in range(1, int(final)): + GetCommits('v6.%d..v6.%d' % (v - 1, v), 'v6.%d' % (v)) +GetCommits('v6.%d..' % (final - 1), 'v6.%d' % (final)) -print '\nFound %d commits' % (len(DB.keys())) +print('\nFound %d commits' % (len(DB.keys()))) pickle.dump(DB, out) out.close() -- 2.11.4.GIT