Don't buy a gun with a pitted barrel. Well unless you intend to replace the barrel.
If you limit surface repair to rust removal and polishing you won't be out too much. Add some home cold blue and you'll have an ok looking gun.
Polishing minor scratches and dings is a little more challenging and time consuming. The effect sometimes looks a little off if you're not careful.
Deep pitting and dents Don't look very good after they've been polished out.