How does a crow sitting on one of the electric lines attain the same potential as that of the line so as to prevent a charge flow through its body? The crow doesn't get an electric shock while sitting on only one electric line because it has the same potential as that of the line. Since there is no potential difference the charge does not flow through the crow's body unless the crow touches the neutral line and creates a potential difference between one end of its body to the other.
How could the crow attain this much electrical potential? The crow was at a zero potential when it came and sat on the line. Was there any charge flow to the crow's body from the line? If there was, how could the crow survive such a potential hike?
 A: The answer is that there is a flow of charge into the crow's body to raise its potential to that of the wire, but this charge is miniscule. Thereafter, there is a very small current (microamps) into and out of the crow's body and a tiny heating effect (microwatts) as his or her potential varies with the AC cycle. This is very different from the sustained current that would flow through a crow of tens of kilohms resistance across a $22\mathrm{kV}$ potential difference between three phase conductors in the street. Let's calculate the orders of magnitudes of these effects. If the crow links two conductors, the current flow through its body is of the order of ampères and the heating effect of the order of kilowatts. The crow is quickly fried, literally. Now let's think about when the crow sits on one conductor.
Suppose we replace the crow by a conducting sphere of, say, $R=0.1\mathrm{m}$ radius. The crow for the purposes of this calculation is essentially a keratin (feather) covered sack of water and oil with ions in it, so its replacement by a conducting sphere will yield the right order of magnitude in our calculations. Then let's work out the potential (defining $V=0$ at a point infinitely far away from the sphere) at the sphere's surface when that sphere has charge $Q$, it is:
$$V(Q) = \frac{Q}{4\,\pi\,\epsilon_0\,R}$$
therefore, let's suppose the crow sits on a power line at $22\mathrm{kV}$ relative to the ground. From the above equation, he or she must take on a charge of $4\,\pi\,\epsilon_0\,0.1\,2.2\times10^4 = 2.45\times10^{-7}$ Coulombs and the energy needed to charge him or her up is 
$$\int_0^{Q_{max}} V(Q)\mathrm{d}Q = \frac{1}{2} V_{max} Q_{max} = \frac{1}{2} \times 2.2\times10^4 \times 2.45\times10^{-7} = 2.7\mathrm{mJ}$$
and this is the order of magnitude of the electrical energy dissipation in the crow's body, which we can understand by thinking of the crow-ground system as a capacitor with capacitance (from the equation above) $C = 4\,\pi\,\epsilon_0\,R \approx 11\mathrm{pF}$ and assuming that the crow's breakdown resistance is a few tens of kilohms, the crow-ground system's $R C$ charging time constant is of the order of $10^{-7}$ seconds. So there is a significant current spike (roughly an ampere), but it is extremely fleeting. The energy dissipated as heat by this current spike in the crow's body is of the order of millijoules. If we think of the crow as a series $R C$ circuit, once he or she is charged to the line potential, there is a current flowing in and out of his body with the alternating current, but the power levels and currents are very small indeed. The magnitude of the crow's impedance is $\sqrt{R+\omega^{-2} C^{-2}} \approx 4\mathrm{M\Omega}$ leading to a current of the order of $60\mathrm{\mu A}$ and heat dissipation of $5\mathrm{\mu W}$.
There are two threats to higher living things (those with hearts and circulatory systems), the first arising at much lower currents and energies than the second: 


*

*Disruption of the heart because the electricity flow interferes with the heart's own electrical signaling system;

*Destruction of tissue by heating;


The $2.7\mathrm{mJ}$ is tiny, four or five orders of magnitude below the energy delivered by a defibrillator, for instance is tens to hundreds of joules. The sustained heating effect is also tiny, barely noticeable in the tissues of an animal the size of a crow.
Humans can also safely do the same thing when line workers tether themselves to the lines they work on an the power cannot be shut down for some reason. This is even though humans are much more susceptible to electric shock than small animals, whose hearts are so small that it is almost impossible to send into ventricular fibrillation owing to the tiny time delays and the attendant much greater stability margins in the heart's electrical control). A small animal like a crow is likely only at risk from the second effect above: destruction of body tissue by heating.
