Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Mercurial experiences
- - By Newton [de] Date 2010-08-23 14:28
Oof, just one experience I want to share with you:

I was just committing changes, neatly splitting them up into several commits when I made a mistake (I committed one file too much). So I thought I'd strip that last commit even though I still had uncommitted changes. Don't do that! All your uncommitted changes will be gone too, not only the commit you stripped. :-(

By the way, does someone know the proper way to do this - without loosing all uncommitted changes?
Parent - By Clonk-Karl [de] Date 2010-08-23 14:50
I think in this very special case you could have used rollback which undoes the last commit iff there have not yet been any other hg operations since it was created.
Reply
Parent - By Günther [de] Date 2010-08-23 22:38
There's probably no proper way to do this with mercurial - mercurial is designed to never loose commits (except for the last one, as ck mentioned, but only if you haven't done anything too involved since it was created). So you have to use extensions to be able to create high-quality commits, and which extension one is supposed to use isn't obvious at all. I think it might be mq - after all, it's essential for the strip command alone, so everyone has to have it enabled anyway. So you could have committed the other changes, imported everything into the patch queue and then edited the patches to satisfaction.

Another way would use the shelve feature to move uncommitted changes out of the way temporarily.

Also, your uncommitted changes might be in a backup folder somewhere in the .hg directory.
Reply
Up Topic Development / Developer's Corner / Mercurial experiences

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill