hg split

Craig Ozancin c.ozancin at gmail.com
Tue Dec 22 19:05:18 UTC 2020


It is very common for me, while working on a task, to make many small
commits. I will combine / reorganises these later after the task has been
completed. This works well for me.

It is also common for me to gather other peripheral changes into a common
changeset. These peripheral changes are issues that are not directly part of
the task, but discovered during development. I will later split this common
changeset into multiple changes that address each specific fix being
addressed.

Today I finished working on an issue and was cleaning up changesets. I had a
changeset with about 5 different unrelated changes in it. I decided to spit
this changeset into smaller changesets that each addressed a specific issue.
I had finished creating 4 of the 5 changes that included adding very
detailed
commit message and was on the last change. When asked if I wanted to
continue,
I typed Y and mercurial put me into the curses interactive selection
interface.
I accidentally typed q here instead of c to continue with the selected
changes.
Much to my dismay mercurial display the following and all my efforts where
list:

    transaction abort!
    rollback completed
    abort: user quit

As far as I can tell the changesets that I had been creating were lost.

Surely there must be a better way to handle this. I would think that with
hg-evolve, these queued changesets could still be created as obsolete. This
would have the same basic function as a rollback, but still preserving the
aborted changes. At least that would have given me an option to recover.

As it stands now, I lost about 20 minutes of work and have to start from
scratch on spitting the changeset.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20201222/774165ea/attachment.html>


More information about the Mercurial mailing list