From what I get, I believe the original reporter ask for something similar to what git has.

git co -b crazyFeature
hack, hack, hack...
git ci -a
hack, hack, hack...
git ci -a

If you see that the crazy feature did finish correctly, then you are set up:

git co master; git merge crazyFeature; git branch -d crazyFeature

If the crazy feature was, well... just crazy, and you just want to drop away that crazy code:

git co master; git branch -d crazyFeature