make `view diff on commit` a feature that is easy to use
Anton Shestakov
engored at gmail.com
Thu Nov 6 10:33:54 UTC 2014
2014-11-06 17:00 GMT+08:00 anatoly techtonik <techtonik at gmail.com>:
> 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.
Actually, it works with record. Although I have a modified hgeditor
(e.g. it also considers added and deleted files), it's otherwise
stock. My guess why it works is that record modifies the files
in-place before committing.
More information about the Mercurial
mailing list