From patchwork Wed Dec 14 10:34:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 61924 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A74B838378CE for ; Wed, 14 Dec 2022 10:35:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 41B403838F0F for ; Wed, 14 Dec 2022 10:34:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 41B403838F0F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 45A591FE77; Wed, 14 Dec 2022 10:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1671014065; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xsqyVq0gMp/n3mPErzjwIg13JmZJqWMQ75r+4+ZHdYs=; b=lzZWXnHuQjAaJnj/u4LThT+/XH4vmcv7lrXSGnDU0Vict7kjoo7vhqTZUQ5H0wGTTmlJhh atXPr1e1t1ehQ8Yv6l1ns+ei4rk6PUTy6YPSJZ/gKu2669xrcxQCwC8eSKcdrrPoPyYAGp XiiOVCedmguuWMelt7LVNncGywAVTU0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1671014065; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xsqyVq0gMp/n3mPErzjwIg13JmZJqWMQ75r+4+ZHdYs=; b=PB4A4ZoaVjewOkC6CV+rT6QszhodVEoK6b4Es/fmzhXgW/+IdJ3QQ8syuDtk9JelQEM4Ha 5n+3ue2FN2eNhSDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 343291333E; Wed, 14 Dec 2022 10:34:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id d1G+C7GmmWP8JAAAMHmgww (envelope-from ); Wed, 14 Dec 2022 10:34:25 +0000 Message-ID: <2672593b-414a-d1b4-8e84-abdba0915410@suse.cz> Date: Wed, 14 Dec 2022 11:34:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH (pushed)] mklog: do not depend on recent unidiff version To: gcc-patches@gcc.gnu.org References: <5f53c39a-2964-c67c-2773-8b40c6925425@codesourcery.c> Content-Language: en-US Cc: Tobias Burnus In-Reply-To: <5f53c39a-2964-c67c-2773-8b40c6925425@codesourcery.c> X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" contrib/ChangeLog: * mklog.py: Check for number of hunks and not if a modified file is binary. --- contrib/mklog.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/mklog.py b/contrib/mklog.py index 358b7fc6b8b..5dea8a05c0c 100755 --- a/contrib/mklog.py +++ b/contrib/mklog.py @@ -186,8 +186,9 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False, # contains commented code which a note that it # has not been tested due to a certain PR or DR. this_file_prs = [] - if not file.is_binary_file: - for line in list(file)[0][0:10]: + hunks = list(file) + if hunks: + for line in hunks[0][0:10]: m = pr_regex.search(line.value) if m: pr = m.group('pr')