From unknown Sat Sep 20 05:02:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#68117 <68117@debbugs.gnu.org> To: bug#68117 <68117@debbugs.gnu.org> Subject: Status: [PATCH] vc-hg-annotate-time extracts incorrect dates Reply-To: bug#68117 <68117@debbugs.gnu.org> Date: Sat, 20 Sep 2025 12:02:32 +0000 retitle 68117 [PATCH] vc-hg-annotate-time extracts incorrect dates reassign 68117 emacs submitter 68117 Kjetil =C3=98rbekk severity 68117 normal tag 68117 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 29 20:11:35 2023 Received: (at submit) by debbugs.gnu.org; 30 Dec 2023 01:11:35 +0000 Received: from localhost ([127.0.0.1]:42615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJNt0-0000oM-3R for submit@debbugs.gnu.org; Fri, 29 Dec 2023 20:11:34 -0500 Received: from lists.gnu.org ([2001:470:142::17]:60324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJDmt-0006O1-K2 for submit@debbugs.gnu.org; Fri, 29 Dec 2023 09:24:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJDmo-0000aL-Cz for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 09:24:30 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJDmm-0008FQ-Hw for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 09:24:30 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id C7D845C0170 for ; Fri, 29 Dec 2023 09:24:26 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute6.internal (MEProxy); Fri, 29 Dec 2023 09:24:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orbekk.com; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm3; t=1703859866; x=1703946266; bh=HqsgczN2CwcHKuHjXRbBN7J+VCglvew7 jAefFL9T+aA=; b=K/XE2B/USOjWD5nUQxEu+0dhgGRsRqPRLiAKKP7uPSu8bXtR XnCaXw5kOIn7kqPwvJCgUjS8HfG6bjZK+dtLvGovyNKhP2YquYQx2eJ74u0Ws7mI ioGaq9ht3py0PvrdXpCISuMoJVxiJ15gJxPbeLBai97ASzOiJ37qE7k2GDecoxEx 5BFiy3epKUDGu22Oi4/NvS3kCvWA8HnmZ0xTIvN54ci45h+oUjkJgd7Q6nQ0U6Xb wUKXDLzhm19vdTs+anluIevZLFaOJ64NsXCfQPDglNiFJz22XwzNgXgL2QVPtMqx 8wazsrTcLGkWvw2xIH5aqizCVq88Tod6dxBk7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1703859866; x=1703946266; bh=HqsgczN2CwcHKuHjXRbBN7J+VCglvew7jAe fFL9T+aA=; b=QV1UkJcP5hOOgPEonlEkSB7b8dsw8tCcJzUKn8XZRCqKASTAika UN29fSiILyFshSWHWpcCmaGJHs3SLnlCgX1rzKmaVLh8H8s5nY2YHGnLIhhvK8EZ 8+cuSlqsISv8DCC3i+IqYPCQgIafy3a0mStDXrim6zVz5IXbD19A10q5DLjVO2mU Eui1g9HB2WMRUP4BQd4X5xai+k+Yca6RcFVAH+aH8/2slDvCazkm9b7sRF8zV80c qzCNWt3s4xIq9TA+I8ybIQwOZeFzJiU9p3kb1GsA3b1NDJQj0d59cX8qql+OvZ/k twcLd+vcR7As2CGIFZqHOJquUF+Xhe6H2cA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeffedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefohffvufffkfggtgesmhdtreerre dtjeenucfhrhhomhepmfhjvghtihhlucnrrhgsvghkkhcuoehkjhesohhrsggvkhhkrdgt ohhmqeenucggtffrrghtthgvrhhnpedvueejueeugfelhedvudffvedttdelteeijefgud eljeelleelffetteekgeeuffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehkjhesohhrsggvkhhkrdgtohhm X-ME-Proxy: Feedback-ID: i1b4944d9:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7801536A0076; Fri, 29 Dec 2023 09:24:26 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface From: =?utf-8?Q?Kjetil_=C3=98rbekk?= To: bug-gnu-emacs@gnu.org Subject: [PATCH] vc-hg-annotate-time extracts incorrect dates Date: Fri, 29 Dec 2023 09:21:52 -0500 Message-ID: <8734vldr7j.fsf@orbekk.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=66.111.4.27; envelope-from=kj@orbekk.com; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 29 Dec 2023 20:11:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/plain Hi, I noticed that vc-hg-annotate-time constructs a timestamp based on incorrect strings. E.g., the date "2014-11-28" is interpreted as year 2014, day -1, month 1. Please see the attached patch for a fix. -- Kjetil --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-vg-hg-annotate-time-bug.patch Content-Description: Fix vg-hg-annotate-time bug >From 47274868e458f92073eb75bb48f6e34564f020e5 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Fri, 29 Dec 2023 08:59:23 -0500 Subject: [PATCH] Fix vg-hg-annotate-time bug * lisp/vc/vc-hg.el (vc-hg-annotate-time): Fix extraction of timestamp from string. * test/lisp/vc/vc-hg-tests.el (vc-hg-annotate-time): Test that the correct timestamp is found. Copyright-paperwork-exempt: yes --- lisp/vc/vc-hg.el | 4 ++-- test/lisp/vc/vc-hg-tests.el | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index d6dadb7..10be29c 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -584,8 +584,8 @@ vc-hg-annotate-time (vc-annotate-convert-time (let ((str (match-string-no-properties 2))) (encode-time 0 0 0 - (string-to-number (substring str 6 8)) - (string-to-number (substring str 4 6)) + (string-to-number (substring str 8 10)) + (string-to-number (substring str 5 7)) (string-to-number (substring str 0 4))))))) (defun vc-hg-annotate-extract-revision-at-line () diff --git a/test/lisp/vc/vc-hg-tests.el b/test/lisp/vc/vc-hg-tests.el index 89d518b..43bb922 100644 --- a/test/lisp/vc/vc-hg-tests.el +++ b/test/lisp/vc/vc-hg-tests.el @@ -53,6 +53,8 @@ vc-hg-annotate-extract-revision-at-line-with-both (ert-deftest vc-hg-annotate-time () (with-temp-buffer (save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:")) - (should (floatp (vc-hg-annotate-time))))) + (should (equal (vc-hg-annotate-time) + (vc-annotate-convert-time + (encode-time 0 0 0 28 11 2014)))))) ;;; vc-hg-tests.el ends here -- 2.42.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 01 12:57:11 2024 Received: (at 68117-done) by debbugs.gnu.org; 1 Jan 2024 17:57:11 +0000 Received: from localhost ([127.0.0.1]:48707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKMXG-00052Q-Qj for submit@debbugs.gnu.org; Mon, 01 Jan 2024 12:57:11 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:38419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKMXE-000529-0m for 68117-done@debbugs.gnu.org; Mon, 01 Jan 2024 12:57:09 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id CB6023200C0E; Mon, 1 Jan 2024 12:56:59 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 01 Jan 2024 12:57:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1704131819; x=1704218219; bh=E+ZoglyGOc/5I4/27JfDf0/kRwsbEdhARzYmdH3AC40=; b= J98EK21TMhMOxpRgbLflyJoROoZ6B7tF3YTBDo7+gypbkWd6m7/FdiuakJDTY5UC vlbfkRcnpNagoCeROcbqmUlcu6rzFVCMp55LgpWPWIB0hpBzoxlKvvo1GlvXFwHh HpBduomNy8KyYHMMARGM2toYsexc/x2WIxc2sl7GmB/ClpVI0ygEhM5i7QOuCoY1 QmqmOuJu4+9my2FPKp0Zza3reXCqNppfbPwCJeX4lVORAyeM53XZQ+Z31RrI8FiK Vjf3xSLHLEm0g3jQjG9kxsmbtyCrYoY3gdHhHK2eejboWRGAv9KH7KtxRPtgow72 Q2n0eEOezvDvxbZ+RxMFwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704131819; x= 1704218219; bh=E+ZoglyGOc/5I4/27JfDf0/kRwsbEdhARzYmdH3AC40=; b=k 8uHEmzy3WhCvcMGFr+IDucQ8SBt6H3Nlw/bs5nh31Rn+QYyJUHlNUww0CycKcGsC EH/kHutdfcmzNX87NyFtSjR+QKvPBhSJjHq8mk+EtCNuM990u14XKdkG30xxTFJT bPw47a4qxhJp2Ftehw6aeyrQ55UG2+L/fVFT1wZ1RZmY6cyUvXICSRXiYTNeHHE9 M6HFmTid+8xwiZYFkWzOAC3NJDCqTmxAPc4lDrhQMYzvF0V9Nb/cVlT6IeXGFPjS k1mtW2xU5rlJoWijHNml4EntHBxjEt4vpmT1nth+bIj+kPwbdGf1g4D2U9QvJj0R h+FanGOv9jJT06ohAV4lg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdegtddguddtiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesth ekredttddvjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehg uhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpeegueegteffuddvjeevvdelleeitd eftdduhfeffeffjedukeevjedvfeffgfevgeenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Jan 2024 12:56:58 -0500 (EST) Message-ID: <54b94775-7b75-466f-9033-a3887bbceddf@gutov.dev> Date: Mon, 1 Jan 2024 19:56:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68117: [PATCH] vc-hg-annotate-time extracts incorrect dates Content-Language: en-US To: =?UTF-8?Q?Kjetil_=C3=98rbekk?= , 68117-done@debbugs.gnu.org References: <8734vldr7j.fsf@orbekk.com> From: Dmitry Gutov In-Reply-To: <8734vldr7j.fsf@orbekk.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68117-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Version: 30.1 On 29/12/2023 16:21, Kjetil Ørbekk wrote: > Hi, > > I noticed that vc-hg-annotate-time constructs a timestamp based on > incorrect strings. E.g., the date "2014-11-28" is interpreted as year > 2014, day -1, month 1. > > Please see the attached patch for a fix. Thanks! Installed. From unknown Sat Sep 20 05:02:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 30 Jan 2024 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator