Am I correct in assuming a normal port attack mission cannot hit ships that are in drydock in a shipyard and they can only be hit by a City attack mission that hits the shipyard?

like michaelm says above, port attacks hit ships in port and those in the repair shipyard (drydock). If you order a city attack, you will NOT hit ships AFAIK. You can hit the repair yard also during the port attack, probably random die roll.

What happens if all the dry docks are damaged ( as may happen in my game at Calcutta ) do damged ships get ejected from the shipyard? Or just get no benefit? In my game I think 5 out of 6 points of repair facility are damaged and I think the allied player still has some badly damged CL,CA and DD in shipyard there? What happens if all the repair facility are damaged then?

What happens if all the dry docks are damaged ( as may happen in my game at Calcutta ) do damged ships get ejected from the shipyard? Or just get no benefit? In my game I think 5 out of 6 points of repair facility are damaged and I think the allied player still has some badly damged CL,CA and DD in shipyard there? What happens if all the repair facility are damaged then?