The sale of KeySpan , which is based in Brooklyn and supplies about a quarter of New York City 's power needs , is part of a wave of mergers in the energy industry that started after Congress repealed a Depression-era law last year that limited consolidation .