call for Emacs testers (and opinion) native support of hg ci -i

Georges Racinet georges.racinet at octobus.net
Tue Oct 11 10:55:50 UTC 2022


Hi Uwe,


On 10/10/2022 22:17, Uwe Brauer wrote:
> Hi
>
> I am not sure how many mercurial users, also use GNU emacs for their
> work. I do, and I am mostly happy with vc-hg.el provided by GNU emacs.
>
> There is however one feature I really miss,
>
>   hg ci -i
>
> So that you can just commit certain hunks.

> Be it as it may, right now, GNU emacs starts to support that feature
> natively!
> It is already implemented for git on the master branch for the developer
> version.
>
> And just today Dmitry Gutov kindly sent me a patch.
Sounds really great.
>
>
> Dmitry unfortunately uses only git and is not very acquainted with
> mercurial so he asked me to test it. I did and found a bit strange
> behavior that I would like to discuss below.
> So I am looking for mercurial+emacs users who are interested in this
> issue and would like to test the patch and send their comments or
> recommendations, best would be to the emacs dev list or to me.

This is interesting and I'd be happy to test it, if I get the time (that 
is the hard part as you can imagine). Such a feature could even get me 
to actually use `vc-hg`, especially if we can get the variant for `hg 
amend -i`.

>
> Let me describe how is this is supposed to work
>
>
>      1. In a file of your hg repository you start vc-diff (or
>         diff-hl-diff-goto-hunk which is also provided Dmitry and I can
>         only recommend).
>
>      2. You visit the diff buffer and manipulates the hunks as you wish:
>         delete some, split others etc
>
>      3. You call  vc-next-action a windows appears for the commit message
>         (if you use commit-patch, you would use bound to   C-c C-c)
>
>      4. It seems to work fine, the only problem I faced is that contrary
>         to  commit-patch
>         @ is *not* updated, that is hg up tip has not been run. I think
>         it should, since this is the standard behavior. What do others think

Can you please clarify this last point? Do you mean that the working 
directory parent is not the changeset that has just been created, or is 
that a matter of bookmarks?

>
>
> How to test it?
>
>      1. Clone or pull git://git.savannah.gnu.org/emacs.git (I recommend
>         to use git, since hg with hg-git needs hours)
>
>      2. Apply the attached patch with git apply
>
>      3. Configure and compiles
>
>      4. Either install it or  cd $HOME/src/emacs-git/src (or wherever you
>         have your source code) and run        ./emacs

Believe it or not, I've never compiled Emacs that I can remember. Could 
you please point me to quick instructions to compile it in text mode 
only, like `emacs -nw` does ? I suppose it's much simpler and faster, as 
GUI dependencies tend to be terrible, and it will be remind me of VTs 
time ;-)

Best,



-- 
Georges Racinet
https://octobus.net, https://heptapod.net
GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics



More information about the Mercurial-devel mailing list