Um, just crimp it? The answer depends a lot on the details of the pipe.
I guess if you wanted to be clever you could make some kind of bung that grips onto the inside of the pipe under pressure from the water. I imagine some kind of flexible tube with a closed end. If there's enough tube area, then no matter how high the pressure, the friction to the pipe wall can always exceed the force trying to push it out of the pipe.
Well that's assuming it a competition. Might not be so great in the real world with changing pressures and what not.