emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: log-edit-insert-changelog even when run git/hg from the


From: Dmitry Gutov
Subject: Re: log-edit-insert-changelog even when run git/hg from the
Date: Sat, 1 Oct 2022 21:13:32 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 01.10.2022 15:51, Uwe Brauer wrote:
"DG" == Dmitry Gutov <dgutov@yandex.ru> writes:

On 01.10.2022 08:58, Uwe Brauer wrote:
I think the most common use case, that also git users use quite a bit,
would be the rebase command, since in my understanding vc does not
support it and so the ChangeLog in that case would be unavailable.

Wouldn't you need to insert the older entries from ChangeLog, as
you're rebasing the older commits?

Ok, to give some more details: I don't like rebasing in fact, I hate it, I 
prefer merging.

I prefer merging as well, but I'm fine with either.

However there is a particular workflow, where it comes in handy. Suppose
I develop some code on a branch that I don't push (in hg that would be a
secret branch, as far as I know git does not have phases) or say I
cannot push since I don't have write access. When I finish the other
developers only want to see the final change set.

So I rebase the branch on top of master (in git speech) and collapse all
changesets to one (not sure git has this feature).

Normally, when you edit the log message for the combined changeset, all the messages from the squashed commits should already be present in the buffer. So you would just rearrange them and commit.

So I never felt the need to insert changelog entries again (after doing that when creating the original sequence of commits).

BTW, interesting (fun) fact.

Mercurial and git are often orthogonal in there default setting (like
mercurial hg log always show all branches, if you want only particular
one, you need to specify which git is the other way around, also in
commit: mercurial commits all change set to all files per default but
you can change that by using the interactive option (I think git stage
is something similar).

Now there is a package commit-patch, with fortunately a emacs interace 
commit-patch-buffer.el

that allows mercurial users to interactive commit some hunks but not all
(magit has this for a long time I think)

Now the point is that this interface, also it does not rely on
vc-next-action, allows me to use log-edit-insert-changelog.

I have to find out how.

We have a ready counterpart for that feature for the Git backend, and I should hopefully make it support Hg as well, before Emacs 29 is out.

It does rely on vc-next-action, though (and works when 'C-x v v' is called from a diff-mode buffer).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]