As previous, basically you can't get pitting out, you just remove the surrounding metal until it is level with the bases of the pits!

However... On a gun that has been blued properly, the pits become practically unnoticeable or at least very tolerable.