Rollback ate my commit message! (issue 1635)

Greg Ward greg-hg at gerg.ca
Wed Nov 18 17:32:03 CST 2009


On Wed, Nov 18, 2009 at 5:08 PM, Dan Villiom Podlaski Christiansen
<danchr at gmail.com> wrote:
> Back on topic, how about extending the journal? When performing a commit, the message could be stored in the journal. This would then allow ‘rollback’ to distinguish commits and restore the deleted message somehow. Or simply print it. Does this make sense?

Hmmm, interesting.  I've been thinking along similar lines for various
ways to make rollback a little smarter without making it slower or
more complex.  Basically, for a variety of reasons it'd be nice if
localrepository.destroyed() could know which nodes were just
destroyed.  (That would enable us to e.g. add meaningful 'predestroy'
and 'destroy' hooks.  It might make it possible to invalidate only
parts of the branch head cache, and to be smarter about tag caching.)

Doing that requires any code that commits a transaction to write
additional information saying what was in that transaction: bare
minimum, a list of changeset IDs.  Possibly other meta-data in the
case of a commit transaction.

Anyways... that's much bigger than my simple poxy little patch to make
"commit" write a .hg/message.txt (or whatever) so that it's not
destroyed by rollback.  So let's not get sidetracked ... oh wait, I
just did.  Oops!

Greg


More information about the Mercurial-devel mailing list