Abstract: In accordance with illustrative embodiments of the present invention, the mainline valves in a crude oil, gas, water or other product pipeline are positively sealed off to allow a hydrotest to be made of a section or segment of the pipeline between the valves. The section is packed with water, and then a mixture of a highly viscous, aqueous-based gel material and a lost-circulation material are injected into the pipeline segment adjacent each valve to form a plug in the line. The gel plugs then are squeezed under pressure against the internal components of each valve to cause all leakage paths therein to be bridged over and sealed off. Then the pipeline segment is hydrotested to determine if there are any leaks therein, after which the gel is flushed out of the line, broken down into a linear pumpable state, and disposed of.