commit (interactive mode)

Marcus Harnisch marcus.harnisch at verilab.com
Wed Jun 20 09:20:18 UTC 2018


Sometimes, a small change might lead to a rather bulky diff which is then
really hard to select hunks from and commit in hg's interactive commit mode.
An example would be adding a conditional, which may lead to reindenting
everything inside.Due to the way diff works this could end up scattered
across several hunks, possibly even lumped together with other unrelated
changes. Unrelated changes within that same code region may make it really
hard to select changes such that the commited file remains coherent.
In many such cases my observation was that ‘hg diff -wB’ would present the
same change in a lot more readable manner.
Would it be possible or desirable to have an option or key toggle the
display, such that the output of ‘diff -wB’ is presented for selecting
hunks?
In a first implementation the selected changes would be committed as
presented, such that whitespace changes would be ommitted from the
changeset.
In a further step users could alternatively choose to commit whitespace
changes that are part of the commited code changes.

Regards,
Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20180620/838d694c/attachment.html>


More information about the Mercurial mailing list