'''Feature Request''': I would really like to have the ability to split hunks in this plugin. The problem is, that if there are multiple adjacent changes that have nothing to do with each other (like two new functions right next to each other) it is downright hard to commit them separately short of removing one, comitting and adding the other one again. --MartinHäcker . Me too. git has this handy feature. --LesliePolzer . How does git do this? --ThurnerRupert . When using {{{git add -p}}}, you will enter the interactive mode, and do something similar with darcs|hg record. But in git you've the choice of 'e' to open up an editor, and edit the patch. There is an example[1] at the footer of this page. --WeakishJiang . Yes, this feature of {{{darcs record}}} is missing. It would be great to have it. As described below, git does have it - using the '''e''' option to open an editor, like in darcs. However, I like the darcs approach, with a "before" and "after" section, better than the git approach of editing "+" and "-" markers. I find it cleaner. --YitzGale . fyi: this has been available for some time with the CrecordExtension (based on RecordExtension), so maybe it wouldn't be too hard to incorporate some of the changes back into record. --MarkEdgington . crecord uses a curses interface, but record uses merely command line. so it's not very easy to specify how to split the hunks in record. Besides, crecord provides line-level granularity, which in most case is sufficient. But in some edge cases, we may have two changes doing different things in ''one'' line. The best practice I can think of right now is git's approach (manually editing the patch) explained above. --WeakishJiang . I find crecord to be really clunky when dealing with sizable patches. It's slow, and requires me to scroll a lot unnecessarily. In addition to the (decent) interface in [1], git also has a powerful "interactive" interface. It's not user-friendly, but once you figure it out, it's much more efficient than crecord, and much more powerful than record. --JustinLebar . I think going more for git add --interactive works great. you can edit patches, and you can split which just breaks the hunk into smaller parts. Once split makes it as small as you want you can edit manually to break it apart how you want. Also git's interactive add also lets you see the diff so far and manually select which files you want to do this with. It's not the simplest interface but it is very powerful. --JacobKeller . You can try my [[Aurum]] plugin for vim. It allows using vim to edit version that’ll be committed, opening files in a standard vimdiff split with all vim features fully available. ---- '''Question:''' how is "hg record" different from "hg commit -i"? It appears to be almost identical. "hg record --help" seems to indicate a few more options regarding ignoring whitespace, but otherwise you can get a perfectly good record command by doing: {{{ [alias] record=commit -i }}} ---- Footnotes: [1] a git example: {{{#!diff $ git add -p f.c diff --git a/f.c b/f.c index a32488e..cf4b43e 100644 --- a/f.c +++ b/f.c @@ -1,2 +1,4 @@ -void splodge(int c) { +int blorf() { return s_blorfulocity / s_RAT; } + +void splodge(long c) { } Stage this hunk [y/n/a/d/e/?]? e 4) External editor opens up with this content # Manual hunk edit mode -- see bottom for a quick guide @@ -1,2 +1,4 @@ -void splodge(int c) { +int blorf() { return s_blorfulocity / s_RAT; } + +void splodge(long c) { } # --- # To remove '-' lines, make them ' ' lines (context). # To remove '+' lines, delete them. # Lines starting with # will be removed. # # If the patch applies cleanly, the edited hunk will immediately be # marked for staging. If it does not apply cleanly, you will be given # an opportunity to edit again. If all lines of the hunk are removed, # then the edit is aborted and the hunk is left unchanged. }}}