In a case of hypertrophic pyloric stenosis, the metabolic disturbance is
Repetitive vomiting leads to hypochloremic, hypokalemic metabolic alkalosis. The urine is alkaline initially but eventually it becomes acidic (paradoxical aciduria)

Cause of paradoxical aciduria

Initially the kidney compensate for metabolic alkalosis by reabsorbing hydrogen and chloride ions in exchange for sodium, potassium and bicarbonate. But gradually as the body stores of sodium and especially potassium become depleted, kidney starts retaining these ions in exchange of hydrogen ions. thus the urine becomes acidic and metabolic alkaline state is further aggravated.
Respiratory alkalosis
Metabolic acidosis
Metabolic alkalosis with paradoxical aciduria
Metabolic alkalosis with alkaline urine