It's usually fine to shift mid-hill. Just lighten up on the pedals a bit as you do it. I usually shift in the rear when my pedals are at 3 and 9 for that reason.