When using mercurial, I know we can use hg commit --interactive
to select which chunks of which files to commit. Is there any way to do this non-interactively, perhaps by preparing a patch file then applying it?
I'm thinking of making a vim plugin to handle mercurial commits, and it would be nice if there was a way to commit only specific chunks after the user selects them. For git, I think we can use git apply
with a patch file, and there are many plugins which provide this feature for git (but none that I know of for mercurial).
I'm looking for something that exists in mercurial's public CLI interface, since they discourage using the python hg libraries (it's not considered a stable API).