GNU bug report logs - #34944
27.0.50; FR: support amend in vc-hg

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Fri, 22 Mar 2019 10:57:02 UTC

Severity: wishlist

Found in version 27.0.50

Fixed in version 27.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

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 34944 in the body.
You can then email your comments to 34944 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#34944; Package emacs. (Fri, 22 Mar 2019 10:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 22 Mar 2019 10:57:02 GMT) Full text and rfc822 format available.

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

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; FR: support amend in vc-hg
Date: Fri, 22 Mar 2019 11:44:02 +0100
The Git integration for vc.el supports amending commits via a magic
changelog header.  Mercurial has the same functionality, see
https://www.mercurial-scm.org/wiki/EditingHistory#Amending_the_latest_changeset_with_commit_--amend.
If would be great to support this in Emacs as well.  Maybe the Git
approach could even move into main VC, and made available to all
backends that support amending?


In GNU Emacs 27.0.50 (build 56, x86_64-pc-linux-gnu, GTK+ Version 3.24.2)
 of 2019-03-22
Repository revision: 4174409c53d85a0def138f92d3e71901380c907a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux buster/sid

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --enable-gcc-warnings=warn-only
 --enable-gtk-deprecation-warnings --without-pop --with-mailutils
 --enable-checking --enable-check-lisp-object-type --with-modules
 'CFLAGS=-O0 -ggdb3''

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS
FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS
LIBSYSTEMD JSON PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa epg epg-config gnus-util
rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils phst skeleton derived edmacro
kmacro pcase ffap thingatpt url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
subr-x rx gnutls puny seq byte-opt gv bytecomp byte-compile cconv dbus
xml cl-loaddefs cl-lib elec-pair mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 59162 6704)
 (symbols 48 7776 1)
 (strings 32 20000 2289)
 (string-bytes 1 657624)
 (vectors 16 11264)
 (vector-slots 8 146496 8886)
 (floats 8 23 16)
 (intervals 56 211 0)
 (buffers 992 12))

-- 
Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

If you received this communication by mistake, please don’t forward it to
anyone else (it may contain confidential or privileged information), please
erase all copies of it, including all attachments, and please let the sender
know it went to the wrong person.  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34944; Package emacs. (Fri, 22 Mar 2019 13:19:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 34944 <at> debbugs.gnu.org
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Fri, 22 Mar 2019 15:18:16 +0200
> From: Philipp Stephani <p.stephani2 <at> gmail.com>
> Date: Fri, 22 Mar 2019 11:44:02 +0100
> 
> The Git integration for vc.el supports amending commits via a magic
> changelog header.  Mercurial has the same functionality, see
> https://www.mercurial-scm.org/wiki/EditingHistory#Amending_the_latest_changeset_with_commit_--amend.
> If would be great to support this in Emacs as well.  Maybe the Git
> approach could even move into main VC, and made available to all
> backends that support amending?

Can you propose a patch for that?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34944; Package emacs. (Sat, 23 Mar 2019 02:35:01 GMT) Full text and rfc822 format available.

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

From: Richard Stallman <rms <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34944 <at> debbugs.gnu.org, p.stephani2 <at> gmail.com
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Fri, 22 Mar 2019 22:34:04 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > The Git integration for vc.el supports amending commits via a magic
  > > changelog header.

What does this mean, concretely?

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34944; Package emacs. (Sat, 23 Mar 2019 07:29:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org
Cc: 34944 <at> debbugs.gnu.org, p.stephani2 <at> gmail.com
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Sat, 23 Mar 2019 09:28:19 +0200
> From: Richard Stallman <rms <at> gnu.org>
> Cc: p.stephani2 <at> gmail.com, 34944 <at> debbugs.gnu.org
> Date: Fri, 22 Mar 2019 22:34:04 -0400
> 
>   > > The Git integration for vc.el supports amending commits via a magic
>   > > changelog header.
> 
> What does this mean, concretely?

That a specially formatted header in the VC log buffer signals VC to
make the next checkin operation replace the last commit instead of
adding a new commit.  See vc-git-log-edit-toggle-amend and
vc-git-checkin for the details.  It boils down to whether or not the
nezt "git commit" is invoked with the --amend switch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34944; Package emacs. (Sun, 24 Mar 2019 01:45:02 GMT) Full text and rfc822 format available.

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

From: Richard Stallman <rms <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34944 <at> debbugs.gnu.org, p.stephani2 <at> gmail.com
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Sat, 23 Mar 2019 21:44:00 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > That a specially formatted header in the VC log buffer signals VC to
  > make the next checkin operation replace the last commit instead of
  > adding a new commit.  See vc-git-log-edit-toggle-amend and
  > vc-git-checkin for the details.  It boils down to whether or not the
  > nezt "git commit" is invoked with the --amend switch.

Thanks.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34944; Package emacs. (Wed, 03 Apr 2019 00:34:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Philipp Stephani <p.stephani2 <at> gmail.com>, 34944 <at> debbugs.gnu.org
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Wed, 3 Apr 2019 03:33:12 +0300
[Message part 1 (text/plain, inline)]
On 22.03.2019 12:44, Philipp Stephani wrote:
> 
> The Git integration for vc.el supports amending commits via a magic
> changelog header.  Mercurial has the same functionality, see
> https://www.mercurial-scm.org/wiki/EditingHistory#Amending_the_latest_changeset_with_commit_--amend.
> If would be great to support this in Emacs as well.  Maybe the Git
> approach could even move into main VC, and made available to all
> backends that support amending?

Here's a patch you can try (attached).

No backend API change necessary, so far.

Are there many backends that could support amending?
[vc-hg-amend.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34944; Package emacs. (Sat, 06 Apr 2019 13:55:02 GMT) Full text and rfc822 format available.

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

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 34944 <at> debbugs.gnu.org
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Sat, 6 Apr 2019 15:54:08 +0200
Am Mi., 3. Apr. 2019 um 02:33 Uhr schrieb Dmitry Gutov <dgutov <at> yandex.ru>:
>
> On 22.03.2019 12:44, Philipp Stephani wrote:
> >
> > The Git integration for vc.el supports amending commits via a magic
> > changelog header.  Mercurial has the same functionality, see
> > https://www.mercurial-scm.org/wiki/EditingHistory#Amending_the_latest_changeset_with_commit_--amend.
> > If would be great to support this in Emacs as well.  Maybe the Git
> > approach could even move into main VC, and made available to all
> > backends that support amending?
>
> Here's a patch you can try (attached).
>
> No backend API change necessary, so far.
>
> Are there many backends that could support amending?

I'm not aware of others. I think for now it's fine to support
Mercurial without an API change. Once there are more backends showing
up that should have similar support, we can generalize the approach.
Thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34944; Package emacs. (Sun, 07 Apr 2019 00:49:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 34944 <at> debbugs.gnu.org
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Sun, 7 Apr 2019 03:48:17 +0300
On 06.04.2019 16:54, Philipp Stephani wrote:
> I'm not aware of others. I think for now it's fine to support
> Mercurial without an API change. Once there are more backends showing
> up that should have similar support, we can generalize the approach.
> Thanks!

Does the patch work well for you? If yes, I'll install it.

(I'm not actually a user of Mercurial at all).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34944; Package emacs. (Wed, 17 Apr 2019 18:41:02 GMT) Full text and rfc822 format available.

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

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 34944 <at> debbugs.gnu.org
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Wed, 17 Apr 2019 20:40:01 +0200
Am So., 7. Apr. 2019 um 02:48 Uhr schrieb Dmitry Gutov <dgutov <at> yandex.ru>:
>
> On 06.04.2019 16:54, Philipp Stephani wrote:
> > I'm not aware of others. I think for now it's fine to support
> > Mercurial without an API change. Once there are more backends showing
> > up that should have similar support, we can generalize the approach.
> > Thanks!
>
> Does the patch work well for you? If yes, I'll install it.

I haven't really tried it to be honest and I don't have a Hg
repository to work with at the moment :) But it looks correct, so feel
free to install it and I'll report back in a couple of weeks.




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Sat, 20 Apr 2019 21:41:02 GMT) Full text and rfc822 format available.

Notification sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
bug acknowledged by developer. (Sat, 20 Apr 2019 21:41:03 GMT) Full text and rfc822 format available.

Message #34 received at 34944-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 34944-done <at> debbugs.gnu.org
Subject: Re: bug#34944: 27.0.50; FR: support amend in vc-hg
Date: Sun, 21 Apr 2019 00:40:47 +0300
Version: 27.1

On 17.04.2019 21:40, Philipp Stephani wrote:

> I haven't really tried it to be honest and I don't have a Hg
> repository to work with at the moment :) But it looks correct, so feel
> free to install it and I'll report back in a couple of weeks.

OK, if you insist. Pushed a slightly different patch.

Please try it out when you have the chance.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 19 May 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 337 days ago.

Previous Next


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