If you mess up, redo the part you messed up correctly 5 times in a row.
And, don't just practice the easy stuff. You have to challenge yourself to grow.
I think it may be important to note _when_ to redo this. I started off this way, but after working with a guitar teacher (a Berklee graduate), he recommended that I continue on with the song and return to the problematic parts afterwards. If you constantly stop at the problematic parts to replay them and get it right, you'll have no idea what other parts you'll have trouble with further into the song until much later. In addition to that, being able to move on and continue playing the song after making a mistake is an important skill itself. If you build that skill, it's usually only other musicians that will notice -- a regular audience won't.
What's your take on it?
Everything takes twice as long to learn because I first have to unlearn the old habits.
And as my music professor once said: "If you sound good while practicing, then you're not practicing."
why am I posting here instead of practicing?