Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 312773

Summary: dev-vcs/mercurial-1.5: hgeditor does not close the diff window when :wq'ing the commit message window (patch included)
Product: Gentoo Linux Reporter: Itamar Ravid <iravid>
Component: New packagesAssignee: Dirkjan Ochtman (RETIRED) <djc>
Status: RESOLVED UPSTREAM    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch to make hgeditor behave nicely

Description Itamar Ravid 2010-04-02 10:36:08 UTC
Hey guys, I started using hgeditor for editing commit messages so I can see the diff when commiting. Problem is, I have to :wq twice now. This is rather annoying, so I shamelessly stole these arguments from the Mercurial wiki. Would be rather nice to see these integrated as a patch to the ebuild, so I'll attach a patch. :)

Reproducible: Always
Comment 1 Itamar Ravid 2010-04-02 10:37:00 UTC
Created attachment 226257 [details, diff]
patch to make hgeditor behave nicely
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2010-04-02 13:38:10 UTC
What if someone sets $EDITOR to something else? 
Or is this fixed to some particular value in the program?
Comment 3 Itamar Ravid 2010-04-02 17:04:30 UTC
(In reply to comment #2)
> What if someone sets $EDITOR to something else? 
> Or is this fixed to some particular value in the program?
> 

Well, upstream states that you must customize hgeditor yourself if you wish to support editors other than emacs/vi. 

Admittedly, the patch I submitted would not work for emacs. I could modify it to only apply the arguments in case $EDITOR is gvim/vim; there's a case statement in the hgeditor script that tests for $EDITOR values.
Comment 4 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-04-02 17:19:00 UTC
Please fix the patch up so that it doesn't cause problems for emacs users, then take this upstream. It sounds like it makes sense, but I don't know myself, and since hgeditor comes from upstream and this doesn't sound like a very bad bug that we need a patch for, I'd prefer to let our upstream team handle this.