GNU bug report logs - #28637
[PATCH] Display commit in package description, if available

Previous Next

Package: emacs;

Reported by: David Glasser <glasser <at> davidglasser.net>

Date: Thu, 28 Sep 2017 23:24:02 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28637 in the body.
You can then email your comments to 28637 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Thu, 28 Sep 2017 23:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Glasser <glasser <at> davidglasser.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 28 Sep 2017 23:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Glasser <glasser <at> davidglasser.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Display commit in package description, if available
Date: Thu, 28 Sep 2017 16:06:00 -0700
MELPA includes a :commit field in its
packages (https://github.com/melpa/package-build/pull/6). You can use
this to tell if MELPA has processed a recently-merged change.  This
commit adds that metadata to the package description buffer.

* lisp/emacs-lisp/package.el: Display commit in package description
---
 lisp/emacs-lisp/package.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 8b101c1323..dd05c70dc8 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2260,6 +2260,7 @@ Otherwise no newline is inserted."
          (archive (if desc (package-desc-archive desc)))
          (extras (and desc (package-desc-extras desc)))
          (homepage (cdr (assoc :url extras)))
+         (commit (cdr (assoc :commit extras)))
          (keywords (if desc (package-desc--keywords desc)))
          (built-in (eq pkg-dir 'builtin))
          (installable (and archive (not built-in)))
@@ -2332,6 +2333,8 @@ Otherwise no newline is inserted."
     (and version
          (package--print-help-section "Version"
            (package-version-join version)))
+    (when commit
+      (package--print-help-section "Commit" commit))
     (when desc
       (package--print-help-section "Summary"
         (package-desc-summary desc)))
--
2.14.1




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Tue, 10 Oct 2017 19:37:01 GMT) Full text and rfc822 format available.

Message #8 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: David Glasser <glasser <at> davidglasser.net>
To: 28637 <at> debbugs.gnu.org
Subject: Display commit in package description, if available
Date: Tue, 10 Oct 2017 12:35:58 -0700
Can I confirm that this went through successfully? Should I be
bringing up this patch on a different email list?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Tue, 10 Oct 2017 20:08:01 GMT) Full text and rfc822 format available.

Message #11 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: David Glasser <glasser <at> davidglasser.net>
Cc: 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: Display commit in package description, if available
Date: Tue, 10 Oct 2017 23:07:12 +0300
> From: David Glasser <glasser <at> davidglasser.net>
> Date: Tue, 10 Oct 2017 12:35:58 -0700
> 
> Can I confirm that this went through successfully?

AFAICT, no one has reviewed this yet.

> Should I be bringing up this patch on a different email list?

This is the right place, just keep pinging until the patch is
reviewed.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Tue, 10 Oct 2017 22:07:01 GMT) Full text and rfc822 format available.

Message #14 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: David Glasser <glasser <at> davidglasser.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: Display commit in package description, if available
Date: Tue, 10 Oct 2017 15:05:41 -0700
OK, sure!

I think this is a pretty minimal-impact change which makes the
experience of using melpa a lot better. I frequently send PRs to
packages that I fetch via melpa, and once I get the "merged"
notification, I want to be able to tell whether or not my change is
available in the melpa build.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Tue, 10 Oct 2017 22:41:01 GMT) Full text and rfc822 format available.

Message #17 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: David Glasser <glasser <at> davidglasser.net>
Cc: 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Tue, 10 Oct 2017 18:40:34 -0400
David Glasser <glasser <at> davidglasser.net> writes:

> MELPA includes a :commit field in its
> packages (https://github.com/melpa/package-build/pull/6). You can use
> this to tell if MELPA has processed a recently-merged change.  This
> commit adds that metadata to the package description buffer.

Code looks fine, but could you post a "before and after" picture please?
I'm wondering if it might make sense to abbreviate the hash.

> * lisp/emacs-lisp/package.el: Display commit in package description

I think you should have a period at the end of sentence though.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Tue, 10 Oct 2017 22:48:01 GMT) Full text and rfc822 format available.

Message #20 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: David Glasser <glasser <at> davidglasser.net>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Tue, 10 Oct 2017 15:46:53 -0700
On Tue, Oct 10, 2017 at 3:40 PM, Noam Postavsky
<npostavs <at> users.sourceforge.net> wrote:
> David Glasser <glasser <at> davidglasser.net> writes:
>
>> MELPA includes a :commit field in its
>> packages (https://github.com/melpa/package-build/pull/6). You can use
>> this to tell if MELPA has processed a recently-merged change.  This
>> commit adds that metadata to the package description buffer.
>
> Code looks fine, but could you post a "before and after" picture please?
> I'm wondering if it might make sense to abbreviate the hash.

Sure! Here's a randomly chosen melpa package's *Help* page:

```
archive-rpm is a new package.

     Status: New from melpa -- Install
    Archive: melpa
    Version: 20171005.1548
     Commit: 830158cfb3b43c85cfcb4bd5b92d4457d015c80a
    Summary: RPM and CPIO support for archive-mode
   Requires: emacs-24.4

This module adds support for RPM archives to archive-mode.

RPM files consist of metadata plus a compressed CPIO archive, so
this module relies on `archive-cpio'.
```

This is the "after" picture; the "before" picture lacks the Commit line.

Abbreviating the hash might be nice, but it seems like maybe that should be
the job of the code that creates the metadata (ie in melpa's package builder)
rather than the code that displays it.


>> * lisp/emacs-lisp/package.el: Display commit in package description
>
> I think you should have a period at the end of sentence though.

OK, a new version of the patch is below (is this the right way to send
a new version of the patch? I am not used to mail-based git
workflows):

From a4ebfa2ed35a620e4754399da8181caba13a1eb9 Mon Sep 17 00:00:00 2001
From: David Glasser <glasser <at> davidglasser.net>
Date: Thu, 28 Sep 2017 14:00:04 -0700
Subject: [PATCH] Display commit in package description, if available

MELPA includes a :commit field in its
packages (https://github.com/melpa/package-build/pull/6). You can use
this to tell if MELPA has processed a recently-merged change.  This
commit adds that metadata to the package description buffer.

* lisp/emacs-lisp/package.el: Display commit in package description.
---
 lisp/emacs-lisp/package.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 8b101c1323..dd05c70dc8 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2260,6 +2260,7 @@ Otherwise no newline is inserted."
          (archive (if desc (package-desc-archive desc)))
          (extras (and desc (package-desc-extras desc)))
          (homepage (cdr (assoc :url extras)))
+         (commit (cdr (assoc :commit extras)))
          (keywords (if desc (package-desc--keywords desc)))
          (built-in (eq pkg-dir 'builtin))
          (installable (and archive (not built-in)))
@@ -2332,6 +2333,8 @@ Otherwise no newline is inserted."
     (and version
          (package--print-help-section "Version"
            (package-version-join version)))
+    (when commit
+      (package--print-help-section "Commit" commit))
     (when desc
       (package--print-help-section "Summary"
         (package-desc-summary desc)))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Wed, 11 Oct 2017 01:17:01 GMT) Full text and rfc822 format available.

Message #23 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: David Glasser <glasser <at> davidglasser.net>
Cc: 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Tue, 10 Oct 2017 21:16:36 -0400
David Glasser <glasser <at> davidglasser.net> writes:

> Abbreviating the hash might be nice, but it seems like maybe that should be
> the job of the code that creates the metadata (ie in melpa's package builder)
> rather than the code that displays it.

Hmm, I'm not so sure about that, but looking at the result now I think
there's no need to abbreviate it anyway.

I think this should be okay to go to emacs-26; it's not strictly
speaking a bug fix, but it's obviously safe and this info is often
useful for package maintainers fielding bug reports, so it would be good
to have it more widely available.  Eli?

> OK, a new version of the patch is below (is this the right way to send
> a new version of the patch? I am not used to mail-based git
> workflows):

Yup, that's fine.  You can also use the -v option to git-format-patch in
order to make it more obvious that the patch is new.  For small stuff
like this, it's not really important though.

I suppose you haven't assigned copyright for Emacs?  No problem if not,
the patch is small enough to go in anyway, we just have to mark it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Wed, 11 Oct 2017 04:16:01 GMT) Full text and rfc822 format available.

Message #26 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: David Glasser <glasser <at> davidglasser.net>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Tue, 10 Oct 2017 21:14:57 -0700
[Message part 1 (text/plain, inline)]
On Oct 10, 2017 6:16 PM, "Noam Postavsky" <npostavs <at> users.sourceforge.net>
wrote:

I suppose you haven't assigned copyright for Emacs?  No problem if not,
the patch is small enough to go in anyway, we just have to mark it.


I don't believe I have.

--dave
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Wed, 11 Oct 2017 10:42:01 GMT) Full text and rfc822 format available.

Message #29 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: glasser <at> davidglasser.net, 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Wed, 11 Oct 2017 13:41:18 +0300
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Date: Tue, 10 Oct 2017 21:16:36 -0400
> Cc: 28637 <at> debbugs.gnu.org
> 
> I think this should be okay to go to emacs-26; it's not strictly
> speaking a bug fix, but it's obviously safe and this info is often
> useful for package maintainers fielding bug reports, so it would be good
> to have it more widely available.  Eli?

Are we sure no feature parses this output, and might be confused by
the extra line?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Wed, 11 Oct 2017 12:33:01 GMT) Full text and rfc822 format available.

Message #32 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: glasser <at> davidglasser.net, 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Wed, 11 Oct 2017 08:32:43 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
>> Date: Tue, 10 Oct 2017 21:16:36 -0400
>> Cc: 28637 <at> debbugs.gnu.org
>> 
>> I think this should be okay to go to emacs-26; it's not strictly
>> speaking a bug fix, but it's obviously safe and this info is often
>> useful for package maintainers fielding bug reports, so it would be good
>> to have it more widely available.  Eli?
>
> Are we sure no feature parses this output, and might be confused by
> the extra line?

As far as I can tell, it's only used for the *Help* buffer, and nothing
parses that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Wed, 11 Oct 2017 13:13:02 GMT) Full text and rfc822 format available.

Message #35 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: glasser <at> davidglasser.net, 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Wed, 11 Oct 2017 16:12:25 +0300
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Cc: glasser <at> davidglasser.net,  28637 <at> debbugs.gnu.org
> Date: Wed, 11 Oct 2017 08:32:43 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> >> Date: Tue, 10 Oct 2017 21:16:36 -0400
> >> Cc: 28637 <at> debbugs.gnu.org
> >> 
> >> I think this should be okay to go to emacs-26; it's not strictly
> >> speaking a bug fix, but it's obviously safe and this info is often
> >> useful for package maintainers fielding bug reports, so it would be good
> >> to have it more widely available.  Eli?
> >
> > Are we sure no feature parses this output, and might be confused by
> > the extra line?
> 
> As far as I can tell, it's only used for the *Help* buffer, and nothing
> parses that.

Then it could be okay for emacs-26, if its addition is deemed
important enough.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Mon, 23 Oct 2017 23:59:02 GMT) Full text and rfc822 format available.

Message #38 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: glasser <at> davidglasser.net, 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Mon, 23 Oct 2017 19:58:32 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

> Then it could be okay for emacs-26, if its addition is deemed
> important enough.

From my perspective as a package maintainer, it would be very useful to
get the commit hash in bug reports.  Getting a timestamp in place of a
version from MELPA users has been a pretty long-standing source of minor
irritation.  So I would like to have this in Emacs 26 to end the
irritation sooner rather than later.

Obviously it's not vital, but it usefulness vs risk ratio seems to me
high enough to be worth it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Tue, 24 Oct 2017 14:48:01 GMT) Full text and rfc822 format available.

Message #41 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: glasser <at> davidglasser.net, 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Tue, 24 Oct 2017 17:46:38 +0300
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Cc: glasser <at> davidglasser.net,  28637 <at> debbugs.gnu.org
> Date: Mon, 23 Oct 2017 19:58:32 -0400
> 
> >From my perspective as a package maintainer, it would be very useful to
> get the commit hash in bug reports.  Getting a timestamp in place of a
> version from MELPA users has been a pretty long-standing source of minor
> irritation.  So I would like to have this in Emacs 26 to end the
> irritation sooner rather than later.
> 
> Obviously it's not vital, but it usefulness vs risk ratio seems to me
> high enough to be worth it.

OK.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28637; Package emacs. (Tue, 24 Oct 2017 23:27:02 GMT) Full text and rfc822 format available.

Message #44 received at 28637 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: glasser <at> davidglasser.net, 28637 <at> debbugs.gnu.org
Subject: Re: bug#28637: [PATCH] Display commit in package description,
 if available
Date: Tue, 24 Oct 2017 19:26:01 -0400
tags 28637 fixed
close 28637 26.1
quit

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
>> Cc: glasser <at> davidglasser.net,  28637 <at> debbugs.gnu.org
>> Date: Mon, 23 Oct 2017 19:58:32 -0400
>> 
>> >From my perspective as a package maintainer, it would be very useful to
>> get the commit hash in bug reports.  Getting a timestamp in place of a
>> version from MELPA users has been a pretty long-standing source of minor
>> irritation.  So I would like to have this in Emacs 26 to end the
>> irritation sooner rather than later.
>> 
>> Obviously it's not vital, but it usefulness vs risk ratio seems to me
>> high enough to be worth it.
>
> OK.

Pushed to emacs-26.

[1: 0c536a20fb]: 2017-10-24 19:14:30 -0400
  Display commit in package description, if available (Bug#28637)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0c536a20fb4833bafea1c2a14b9ff2bac2a3ebd8




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Tue, 24 Oct 2017 23:27:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 28637 <at> debbugs.gnu.org and David Glasser <glasser <at> davidglasser.net> Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Tue, 24 Oct 2017 23:27:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Nov 2017 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.