make `view diff on commit` a feature that is easy to use
Simon King
simon at simonking.org.uk
Thu Nov 6 10:54:22 UTC 2014
On Thu, Nov 6, 2014 at 9:00 AM, anatoly techtonik <techtonik at gmail.com> wrote:
> On Wed, Nov 5, 2014 at 6:28 PM, Roman Neuhauser <neuhauser at sigpipe.cz> wrote:
>> # techtonik at gmail.com / 2014-11-05 17:43:34 +0300:
>>> I can't completely read `hgeditor` source. This stuff in particular:
>>> grep '^HG: changed' "$1" | cut -b 13- | while read changed;
>>
>> * grep lines starting with "HG: changed" from the file in $1
>> * strip the 13 leading bytes from each such line
>> * loop over those lines, putting the text of each in $changed
>
> So, it finds filenames that were changed (but not added or removed, right?)
> and runs `hg diff` over each to add to diff file. I guess the explicit selection
> is needed to for selective "hg commit". This won't work with "hg record" that
> I use quite often.
>
> I'd still prefer a way to see diff and commit message in a single window
> (for notepad or whatever).
Actually, it does work with "hg record" - I use it like that
regularly. I haven't checked, but I suspect "hg record" actually
modifies your working copy to reflect what is being checked in, and
then undoes those changes after the commit has finished, so hgeditor
automatically sees the correct diffs.
I personally prefer the 2-window approach (I use it with vim, split
into 2 side-by-side frames) because I can scroll through the diff
independently from the commit message, but I can see why others would
prefer a single window.
Simon
More information about the Mercurial
mailing list