Making 'roll' in histedit use first commit's date

Ben Schmidt mail_ben_schmidt at yahoo.com.au
Wed Apr 20 21:20:11 UTC 2016


Hi!

I've been in discussion re this bug (which is really an enhancement
request):

Bug 4820 - Option to preserve commit timestamp when folding commits

https://bz.mercurial-scm.org/show_bug.cgi?id=4820

I'm wondering whether it would be acceptable to adjust the behaviour of
'roll' in the histedit extension so that it uses the timestamp of the
earlier commit (along with its commit message, which it already does).
This would bring it into line with commit --amend.

The use case is when you realise you forgot to include a particular
change in a commit or have a minor fix to make to it before pushing, but
have already committed something else in the intervening time so cannot
use commit --amend. It is preferable, as commit --amend does, to leave
the original commit's date unchanged as it is more representative of
when the work was done, and keeps the dates in the branch in order.

I can easily prepare a patch for this for consideration, but if it's an
unacceptable break in backward compatibility, I would look at another
way of solving it instead.

Looking forward to hearing your thoughts.

Ben





More information about the Mercurial-devel mailing list