[issue2398] Pre-commit hunk editing (like in git add -p)

michalpabis bugs at mercurial.selenic.com
Sat Sep 25 14:08:45 UTC 2010


New submission from michalpabis <gorsky.exe at gmail.com>:

Mercurial has record extension, that allows user to cherry-pick hunks for
the next commit.

However, it lacks ability to choose changes with granularity on line-level
(not mentioning character-level ;).
In many situations, two adjacent unrelated changes forms one big hunk and
there's no simple way to divide it.

Git has abilities similar to record extension (picking hunks for commit), in
addition it provides mechanism to edit choosen hunk in external editor and
tweak it as needed.

Mercurial has crecord (which has this ability), but it use curses library
(instead of good ol' terminal) - inconsistently with most others mercurial
utilities, has poor performance and forces user to use its internal editor.

In my opinion, the simplest solution is to extend record's options
(regarding hunks) with an 'e' option - edit hunk in external editor (and act
accordingly).

----------
messages: 13723
nosy: michalpabis
priority: feature
status: unread
title: Pre-commit hunk editing (like in git add -p)

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2398>
____________________________________________________


More information about the Mercurial-devel mailing list