We investigate the shock dynamics of liquid flows containing small gas bubbles, based on a continuum bubbly flow model. Particular attention is devoted to the effects on shock dynamics of distributed bubble sizes and gas-phase nonlinearity. Ensemble-averaged conservation laws for polydisperse bubbly flows, together with a Rayleigh-Plesset-type model for single bubble dynamics, form the starting point for these studies. Numerical simulations of one-dimensional shock propagation reveal that phase cancellations in oscillations of different-sized bubbles can lead to an apparent damping of the averaged shock dynamics. Experimentally we study the propagation of finite-amplitude waves in a bubbly liquid in a de-formable tube. The ensemble-averaged bubbly flow model is extended to quasi-one-dimensional cases and the corresponding steady shock relations are derived. These account for the compressibilities associated with the tube deformation as well as the bubbles and host liquid. A comparison between the theory and the water-hammer experiment suggests that the gas-phase nonlinearity plays an essential role in the propagation of strong shocks.