From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 01 21:43:23 2020 Received: (at submit) by debbugs.gnu.org; 2 Jan 2020 02:43:23 +0000 Received: from localhost ([127.0.0.1]:37893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imqSJ-00006M-B2 for submit@debbugs.gnu.org; Wed, 01 Jan 2020 21:43:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:48536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imqSH-000067-5O for submit@debbugs.gnu.org; Wed, 01 Jan 2020 21:43:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47468) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imqSF-0003Fq-W6 for bug-vc-dwim@gnu.org; Wed, 01 Jan 2020 21:43:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_20, DOS_RCVD_IP_TWICE_B, RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imqSD-0003XU-QH for bug-vc-dwim@gnu.org; Wed, 01 Jan 2020 21:43:18 -0500 Received: from freefriends.org ([96.88.95.60]:40304) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1imqSD-0003Wy-J3 for bug-vc-dwim@gnu.org; Wed, 01 Jan 2020 21:43:17 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 0022hE3h022950 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 1 Jan 2020 19:43:15 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 0022hECS022949; Wed, 1 Jan 2020 19:43:14 -0700 Date: Wed, 1 Jan 2020 19:43:14 -0700 Message-Id: <202001020243.0022hECS022949@freefriends.org> From: Karl Berry To: bug-vc-dwim@gnu.org Subject: attribution line parsing X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 96.88.95.60 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit 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: -2.4 (--) Hi Jim - When I had only a single space between date and name in the attribution line, as in: 2020-01-01 Karl Berry vcd gave no errors by default. Then I accidentally ran vcd --commit with that CL and the only error (warning) was at the end, direct from Perl: Use of uninitialized value $author in sprintf at /u/karl/gnu/src/vkarl/VC.pm line 210. Use of uninitialized value $author in sprintf at /u/karl/gnu/src/vkarl/VC.pm line 210. I was not left in a good state. There seemed to be no good way to recover from this, since the erroneous ChangeLog was already committed, so vcd did not think there were any files in the ChangeLog lines. So I ended up doing rm -rf .git/c/.git and running vcd --init again to restart my CL repo, and also git fetch && git reset --hard origin && git checkout && git submodule update to eradicate all my changes (after saving the actual diff :) in the source repo. Thankfully, that apparently erased the memory of the bad CL so I could proceed. Instead of worrying about the exact number of spaces, I wonder about parsing attr lines by checking that first word is a YYYY-MM-DD date, the last word is , and considering the words in between to be the real name. Reasonable error msgs would then be easy to give if the first and last words don't fit the expected syntax. And if there is no author, it could give up at that point. After all, vcd relies on all kinds of finicky details about the CL, so seems like it might as well force a good attr line too instead of accepting bad ones. If the idea seems ok, maybe one of us (or a new contributor!) can work in that direction eventually. --best, karl. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 04 01:01:58 2020 Received: (at 38862-done) by debbugs.gnu.org; 4 Jan 2020 06:01:58 +0000 Received: from localhost ([127.0.0.1]:42389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1incVZ-0003G4-VI for submit@debbugs.gnu.org; Sat, 04 Jan 2020 01:01:58 -0500 Received: from mail-wm1-f41.google.com ([209.85.128.41]:36807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1incVY-0003Fp-Me for 38862-done@debbugs.gnu.org; Sat, 04 Jan 2020 01:01:57 -0500 Received: by mail-wm1-f41.google.com with SMTP id p17so10316374wma.1 for <38862-done@debbugs.gnu.org>; Fri, 03 Jan 2020 22:01:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WjmvrRvRFfgN9ra8QWzmWHJx5cZrdFZfXT0kNlD8ShE=; b=WXxjWFialazeR67Z+Z+lyz14gwEGKZWmC7egq/Ve17Q+zpsBQ5EYf4erRGBV1VbLXZ dYwgmVIgte5X8qXK1nMHwKTJPwhu9uKuZ6UXTgoGF/mpah3wNv+MWeoMgoXRT1cciB6v vR3n4TZhbyclMbMIiH90qdmU48ag3hD5GclfeUUWhM0hW+eMUfcevbomF9TmMFWFFNu0 dZTbe0/F/a/23/yGr+g7WtojVnp/4K9p+a4wDNmNwJTnZqn0YA1rsVvRQH8t13Reb2p9 2DSov2zSckJ40Qqp0OTEZEJ/kItLV5e7KMEj5vlavtK7k/ZYGfvPj6ob+WRtnDXB3KVG uBrg== X-Gm-Message-State: APjAAAUWtCXVbfnw/CbSkue5e0jrY+7yzVVGi9m6ZOsrywfmtkb3EN+4 djOaVepPsRq6tbPUyNNdSZa1DljlFyR7yGFGRRA= X-Google-Smtp-Source: APXvYqz8nnn0BO7p0n+uF3+tHzJGtNTI+IOtBQElAgfhpo2EEihAbycu6MnQkf5adqsaHX6+QuuRrGAV1tGUs7GL6U8= X-Received: by 2002:a7b:cf2d:: with SMTP id m13mr23256466wmg.163.1578117710853; Fri, 03 Jan 2020 22:01:50 -0800 (PST) MIME-Version: 1.0 References: <202001020243.0022hECS022949@freefriends.org> In-Reply-To: <202001020243.0022hECS022949@freefriends.org> From: Jim Meyering Date: Fri, 3 Jan 2020 22:01:38 -0800 Message-ID: Subject: Re: [Bug-vc-dwim] bug#38862: attribution line parsing To: Karl Berry Content-Type: multipart/mixed; boundary="0000000000009206fa059b4a296c" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 38862-done Cc: 38862-done@debbugs.gnu.org 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.6 (/) --0000000000009206fa059b4a296c Content-Type: text/plain; charset="UTF-8" On Wed, Jan 1, 2020 at 6:44 PM Karl Berry wrote: > Hi Jim - When I had only a single space between date and name in the > attribution line, as in: > > 2020-01-01 Karl Berry > > vcd gave no errors by default. Then I accidentally ran vcd --commit with > that CL and the only error (warning) was at the end, direct from Perl: > > Use of uninitialized value $author in sprintf at /u/karl/gnu/src/vkarl/VC.pm line 210. > Use of uninitialized value $author in sprintf at /u/karl/gnu/src/vkarl/VC.pm line 210. > > I was not left in a good state. There seemed to be no good way to > recover from this, since the erroneous ChangeLog was already committed, > so vcd did not think there were any files in the ChangeLog lines. > > So I ended up doing rm -rf .git/c/.git and running vcd --init again to > restart my CL repo, and also > git fetch && git reset --hard origin && git checkout && git submodule update > to eradicate all my changes (after saving the actual diff :) in the > source repo. Thankfully, that apparently erased the memory of the bad CL > so I could proceed. > > Instead of worrying about the exact number of spaces, I wonder about > parsing attr lines by checking that first word is a YYYY-MM-DD date, the > last word is , and considering the words in between to be > the real name. > > Reasonable error msgs would then be easy to give if the first and last > words don't fit the expected syntax. And if there is no author, it > could give up at that point. After all, vcd relies on all kinds of > finicky details about the CL, so seems like it might as well force a > good attr line too instead of accepting bad ones. > > If the idea seems ok, maybe one of us (or a new contributor!) can work > in that direction eventually. --best, karl. Hi Karl, Thanks for reporting and digging into that. Here's the change that I've just pushed to address it: --0000000000009206fa059b4a296c Content-Type: application/octet-stream; name="vcd-diagnose-bad-date-line.diff" Content-Disposition: attachment; filename="vcd-diagnose-bad-date-line.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k4z6i4690 RnJvbSAyNDBjNWYzMTYyZjZhYWQ2NGU0YTIzMjY2MDBlMGFkYjgzY2ZjOGMxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gTWV5ZXJpbmcgPG1leWVyaW5nQGZiLmNvbT4KRGF0ZTog RnJpLCAzIEphbiAyMDIwIDIxOjU5OjAwIC0wODAwClN1YmplY3Q6IFtQQVRDSF0gdmMtZHdpbTog ZGlhZ25vc2UgYW4gaW52YWxpZCAiZGF0ZSAgbmFtZSAgPGVtYWlsPiIgbGluZQoKKiB2Yy1kd2lt LnBsIChtYWluKTogRGlhZ25vc2UgYW4gaW52YWxpZCAiZGF0ZSAgbmFtZSAgPGVtYWlsPiIKbGlu ZSBhbmQgZmFpbCAtLSBjdXJyZW50bHkgZGV0ZWN0cyB0aGUgY2FzZXMgb2YgdXNpbmcgYSBzaW5n bGUKc3BhY2UgaW5zdGVhZCBvZiB0d28gc3BhY2VzIGFzIHNlcGFyYXRvci4KKiB0ZXN0cy9jbC1z eW50YXg6IFRlc3QgZm9yIHRoZXNlIGNhc2VzLgpSZXBvcnRlZCBieSBLYXJsIEJlcnJ5IGluIGh0 dHA6Ly9idWcuZ251Lm9yZy8zODg2MgotLS0KIHRlc3RzL2NsLXN5bnRheCB8IDE5ICsrKysrKysr KysrKysrKysrKysKIHZjLWR3aW0ucGwgICAgICB8ICA2ICsrKysrKwogMiBmaWxlcyBjaGFuZ2Vk LCAyNSBpbnNlcnRpb25zKCspC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92Yy1kd2ltLnBsIGIvdmMtZHdpbS5wbApp bmRleCA5NzMyOGYyLi45NTZlODhlIDEwMDc1NQotLS0gYS92Yy1kd2ltLnBsCisrKyBiL3ZjLWR3 aW0ucGwKQEAgLTk4MSw2ICs5ODEsMTIgQEAgc3ViIG1haW4KCiAgICAgICBpZiAoMyA8PSAkbl9s b2dfbGluZXMpCiAgICAgICAgIHsKKyAgICAgICAgICBpZiAoJGxvZ19saW5lc1swXSA9fiAvXlwr XGR7NH0tXGRcZC1cZFxkKD86IFxTfC4qXFMgPCkvKQorICAgICAgICAgICAgeworICAgICAgICAg ICAgICBkaWUgIiRNRTokbG9nOiBpbnZhbGlkICdkYXRlICBuYW1lICA8ZW1haWw+JyBsaW5lOlxu IgorICAgICAgICAgICAgICAgIC4gJGxvZ19saW5lc1swXSAuICJcbiI7CisgICAgICAgICAgICB9 CisKICAgICAgICAgICBpZiAoJGxvZ19saW5lc1swXSA9fiAvXlwrXGR7NH0tXGRcZC1cZFxkICAo LiopLykKICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgbXkgJG5hbWVfYW5kX2VtYWlsID0g JDE7Ci0tIAoyLjI0LjAuMzkwLmcwODMzNzhjYzM1Cgo= --0000000000009206fa059b4a296c-- From unknown Mon Jun 23 09:36:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 01 Feb 2020 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